diff --git a/.agent/skills/basalt-html/SKILL.md b/.agent/skills/basalt-html/SKILL.md index 48598df2..42d20273 100644 --- a/.agent/skills/basalt-html/SKILL.md +++ b/.agent/skills/basalt-html/SKILL.md @@ -9,14 +9,14 @@ Standalone HTML that looks and behaves like Basalt: one file, no network, dark a ## Use it -1. Pick modules from the index below and print their usage in one call, always with core: `node .agent/skills/basalt-html/compose.mjs --usage core table status callout`. Core is the classes every page uses. Each usage also names the modules it needs and the markup that adds it. `--usage` alone prints the index. -2. Write the **body** to a file such as `report.body.html`: the HTML inside ``, with the classes the usage names. It may carry `` (else the first `<h1>`), your own `<style>`, and head tags: `<meta name="description">`, `og:`/`twitter:` meta, `<link rel="icon" href="data:…">` or `canonical` (no other meta or link); the script adds `Basalt.init()` unless your `<script>` calls it. -3. Run `node .agent/skills/basalt-html/compose.mjs report.body.html` (writes `report.html`; `--out <page.html>` names it). It adds the doctype, meta and theme bootstrap, Geist inlined, the core, only the modules your markup uses, and the icons you name in quotes. It prints what it added, and one warning line for each module added. `--no-fonts` skips Geist (only for a file a tool reads, never a file a person opens), `--lang fr` sets the language, `--all` adds every module. +1. Pick modules from the index below and print their usage in one call, always with core: `node .agent/skills/basalt-html/compose.mjs --usage core table status callout`. Each usage names the modules it needs and the markup that adds it. `--usage` alone prints the index. +2. Write the **body** to a file: the HTML inside `<body>`, with the classes the usage names. It may carry `<title>` (else the first `<h1>`), your own `<style>`, and head tags: `<meta name="description">`, `og:`/`twitter:` meta, `<link rel="icon" href="data:…">` or `canonical` (no other meta or link); the script adds `Basalt.init()` unless your `<script>` calls it. +3. Run `node .agent/skills/basalt-html/compose.mjs report.body.html` (writes `report.html`; `--out <page.html>` names it). It adds the doctype, meta and theme bootstrap, Geist inlined, the core, only the modules your markup uses, and the icons you name in quotes. It prints what it added, and one warning line for each module added. `--no-fonts` skips Geist (for a file only a tool reads), `--lang fr` sets the language, `--all` adds every module. 4. Open the page in both themes at 1440 and 390 wide before you hand it over. It follows the system theme; the toggle or `Basalt.toggleTheme()` switches it. **Data you did not write** (a file, an API, a user) goes in as `textContent`; a link from it passes `Basalt.safeHref` (relative, http, https, mailto, tel); an option comes from a fixed list. Never into markup, a `<script>`, `style` or an `on…` attribute. -`examples/static.body.html`, `sales.body.html` (reports) and `interactive.body.html` (inputs, tabs, a palette) are bodies to copy. Never open or paste `parts/`: it is minified output. +`examples/static.body.html`, `sales.body.html` (reports) and `interactive.body.html` are bodies to copy. Never open or paste `parts/`: it is minified output. ## Modules @@ -104,6 +104,7 @@ Your CSS goes in a body `<style>` (moved after Basalt's), with `--basalt-*` toke - **Type:** Geist and Geist Mono, weights 400, 500 and 600 only. Mono for identifiers, code, numbers in logs. - **Levels, rim, nesting.** A panel (`.panel`, `.card`, `.callout`, `.code`, `.table-wrap`) is one level above what holds it, capped at 3, with a 1px rim and no shadow. Level is position, not importance: a hero is level 1. Group with space and dividers first; a panel is for a distinct object; at most one panel deep. Only things that leave the flow (menu, popover, dialog) take `.float` and a shadow. - **Keys.** No single-character shortcuts on the page (WCAG 2.1.4): a shortcut needs ⌘, ⌃ or ⌥. +- **Edges.** A ghost `.btn` that starts or ends a head takes `data-edge="start"` or `"end"`, never a hand margin. - **Selected** is a shape or weight, never a wash alone: a segment or tab label at 600 (400 at rest) on its pill or underline, a row's filled background, a checked box. No vertical bar; an outline never marks a state. - **Both themes, always.** WCAG 2.2 AA: 4.5:1 text, 3:1 boundaries, focus and icons (the tokens pass; add no colours). - **Motion** from the tokens only; entries ease out, nothing overshoots; under reduced motion, opacity only. A press is a colour step; only `.btn` scales (`--usage core`). diff --git a/.agent/skills/basalt-html/examples/interactive.body.html b/.agent/skills/basalt-html/examples/interactive.body.html index 46665a30..a946be74 100644 --- a/.agent/skills/basalt-html/examples/interactive.body.html +++ b/.agent/skills/basalt-html/examples/interactive.body.html @@ -88,7 +88,7 @@ <h1>Egress cost planner</h1> <div class="tabpanel" style="padding-top: var(--basalt-space-4)" id="view-json" role="tabpanel" aria-labelledby="tab-json" hidden> <div class="code"> - <div class="code-head"><span>estimate.json</span><span class="spacer"></span><button class="btn" data-variant="ghost" data-size="sm" data-copy="#json"><span data-glyph="copy"></span><span>Copy</span></button></div> + <div class="code-head"><span>estimate.json</span><span class="spacer"></span><button class="btn" data-variant="ghost" data-size="sm" data-edge="end" data-copy="#json"><span data-glyph="copy"></span><span>Copy</span></button></div> <pre class="code-body" tabindex="0"><code id="json"></code></pre> </div> </div> diff --git a/.agent/skills/basalt-html/examples/static.body.html b/.agent/skills/basalt-html/examples/static.body.html index 77c5dc61..85cae250 100644 --- a/.agent/skills/basalt-html/examples/static.body.html +++ b/.agent/skills/basalt-html/examples/static.body.html @@ -82,7 +82,7 @@ <h1>Reliability report</h1> <p>Press <kbd class="kbd" data-doc>Esc</kbd> to close any dialog.</p> </div> <div class="code"> - <div class="code-head"><span>alerts.json</span><span class="spacer"></span><button class="btn" data-variant="ghost" data-size="sm" data-copy="#alerts"><span data-glyph="copy"></span><span>Copy</span></button></div> + <div class="code-head"><span>alerts.json</span><span class="spacer"></span><button class="btn" data-variant="ghost" data-size="sm" data-edge="end" data-copy="#alerts"><span data-glyph="copy"></span><span>Copy</span></button></div> <pre class="code-body" tabindex="0"><code id="alerts">{ <span class="tok-k">"queue"</span>: { <span class="tok-k">"alertAt"</span>: <span class="tok-n">0.4</span>, diff --git a/.agent/skills/basalt-html/parts/app-shell.css b/.agent/skills/basalt-html/parts/app-shell.css index dab92ac7..a2257390 100644 --- a/.agent/skills/basalt-html/parts/app-shell.css +++ b/.agent/skills/basalt-html/parts/app-shell.css @@ -1 +1 @@ -@layer basalt{.app-shell{display:grid;grid-template-columns:var(--basalt-size-sidebar-width) minmax(0,1fr);min-height:100dvh}:root{--basalt-shell-width: calc(var(--basalt-size-sidebar-width) + var(--basalt-size-page-width))}.app-shell[data-capped]{max-width:var(--basalt-shell-width);margin-inline:auto}.app-shell[data-capped] .app-main{max-width:none}@media(width>=1024px){:root:has(.app-shell) .skip-link{--_brand-start: calc(2 * var(--basalt-space-3) + var(--basalt-space-1-5));inset-inline-start:var(--_brand-start)}:root:has(.app-shell[data-capped]) .skip-link{inset-inline-start:calc(max(var(--basalt-space-0),(100% - var(--basalt-shell-width)) / 2) + var(--_brand-start))}}@media(width>=720px)and (width<1024px){:root:has(.app-shell) .skip-link{inset-inline-start:calc((var(--basalt-size-rail-width) - var(--basalt-size-tap-min)) / 2)}}.app-column{min-width:0}.app-sidebar{position:sticky;top:0;align-self:start;box-sizing:border-box;display:flex;flex-direction:column;height:100dvh;padding-inline:var(--basalt-space-3);overflow-y:auto;overscroll-behavior:contain;border-inline-end:var(--basalt-size-hairline) solid var(--basalt-border-divider);background:var(--basalt-surface-page);color:var(--basalt-text-primary);font-family:var(--basalt-font-family-sans)}.app-brand{box-sizing:border-box;display:flex;align-items:center;flex:none;height:var(--basalt-sticky-offset);padding-top:var(--bh-inset-top);padding-inline:calc(var(--basalt-space-1-5) + var(--basalt-space-3))}.app-brand .brand>span{display:inline-flex;align-items:center;gap:var(--basalt-space-2);height:var(--basalt-size-control-md);border-radius:var(--basalt-radius-sm)}.app-brand .brand>.brand-rail{display:none}.app-nav{flex:1 0 auto;padding-bottom:var(--basalt-space-4)}.app-account{flex:none;padding-bottom:var(--basalt-space-4)}.app-main{box-sizing:border-box;min-width:0;max-width:var(--basalt-size-page-width);padding:var(--basalt-space-6) var(--bh-pad-right) var(--basalt-space-16) var(--bh-pad-left)}.app-bar{box-sizing:border-box;display:flex;align-items:center;gap:var(--basalt-space-2);height:calc(var(--basalt-size-header) - var(--basalt-size-hairline));padding-top:var(--basalt-size-hairline);padding-inline:var(--bh-pad-left) var(--bh-pad-right)}.app-title{min-width:0;margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font:var(--basalt-font-weight-semibold) var(--basalt-text-lg-size) / var(--basalt-text-lg-line-height) var(--basalt-font-family-sans);letter-spacing:var(--basalt-text-lg-tracking)}.app-actions{display:flex;align-items:center;flex:none;gap:var(--basalt-space-2)}.app-heading{display:flex;flex-direction:column;flex:0 1 auto;min-width:0}.app-facts{min-width:0;margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--basalt-text-secondary);font:var(--basalt-font-weight-regular) var(--bh-sm);letter-spacing:var(--basalt-text-sm-tracking)}.app-facts>*{vertical-align:top}@media(width>=720px)and (width<1024px){.app-shell{grid-template-columns:var(--basalt-size-rail-width) minmax(0,1fr)}.app-sidebar{padding-inline:0}.app-brand{justify-content:center;padding-inline:0}.app-brand .brand{justify-content:center}.app-brand .brand>.brand-full{display:none}.app-brand .brand>.brand-rail{display:inline-flex}}@media(width<720px){.app-shell{grid-template-columns:minmax(0,1fr)}.app-sidebar{display:none}.app-actions{gap:var(--basalt-space-1)}.app-header .btn[data-variant=primary]{flex:none}.app-shell[data-tabbar] .app-main{padding-bottom:calc(var(--basalt-bottom-offset) + var(--basalt-space-6))}}@media(forced-colors:active){.app-sidebar{border-inline-end-color:CanvasText}}.app-version{margin:var(--basalt-space-2) calc(var(--basalt-space-1-5) + var(--basalt-space-3)) 0}@media(width>=720px)and (width<1024px){.app-version{margin-inline:var(--basalt-space-1-5)}.app-version .version-link{display:flex;justify-content:center;text-align:center}.app-version :is(.version-link-words>:first-child,.version-link-date){position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}}} +@layer basalt{.app-shell{display:grid;grid-template-columns:var(--basalt-size-sidebar-width) minmax(0,1fr);min-height:100dvh}:root{--basalt-shell-width: calc(var(--basalt-size-sidebar-width) + var(--basalt-size-page-width))}.app-shell[data-capped]{max-width:var(--basalt-shell-width);margin-inline:auto}.app-shell[data-capped] .app-main{max-width:none}@media(width>=1024px){:root:has(.app-shell) .skip-link{--_brand-start: calc(2 * var(--basalt-space-3) + var(--basalt-space-1-5));inset-inline-start:var(--_brand-start)}:root:has(.app-shell[data-capped]) .skip-link{inset-inline-start:calc(max(var(--basalt-space-0),(100% - var(--basalt-shell-width)) / 2) + var(--_brand-start))}}@media(width>=720px)and (width<1024px){:root:has(.app-shell) .skip-link{inset-inline-start:calc((var(--basalt-size-rail-width) - var(--basalt-size-tap-min)) / 2)}}.app-column{min-width:0}.app-sidebar{position:sticky;top:0;align-self:start;box-sizing:border-box;display:flex;flex-direction:column;height:100dvh;padding-inline:var(--basalt-space-3);overflow-y:auto;overscroll-behavior:contain;border-inline-end:var(--basalt-size-hairline) solid var(--basalt-border-divider);background:var(--basalt-surface-page);color:var(--basalt-text-primary);font-family:var(--basalt-font-family-sans)}.app-brand{box-sizing:border-box;display:flex;align-items:center;flex:none;height:var(--basalt-sticky-offset);padding-top:var(--bh-inset-top);padding-inline:calc(var(--basalt-space-1-5) + var(--basalt-space-3))}.app-brand .brand>span{display:inline-flex;align-items:center;gap:var(--basalt-space-2);height:var(--basalt-size-control-md);border-radius:var(--basalt-radius-sm)}.app-brand .brand>.brand-rail{display:none}.app-nav{flex:1 0 auto;padding-bottom:var(--basalt-space-4)}.app-account{flex:none;padding-bottom:var(--basalt-space-4)}.app-main{box-sizing:border-box;min-width:0;max-width:var(--basalt-size-page-width);padding-block:var(--basalt-space-6) var(--basalt-space-16);padding-inline:var(--bh-pad-start) var(--bh-pad-end)}.app-bar{box-sizing:border-box;display:flex;align-items:center;gap:var(--basalt-space-2);height:calc(var(--basalt-size-header) - var(--basalt-size-hairline));padding-top:var(--basalt-size-hairline);padding-inline:var(--bh-pad-start) var(--bh-pad-end)}.app-title{min-width:0;margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font:var(--basalt-font-weight-semibold) var(--basalt-text-lg-size) / var(--basalt-text-lg-line-height) var(--basalt-font-family-sans);letter-spacing:var(--basalt-text-lg-tracking)}.app-actions{display:flex;align-items:center;flex:none;gap:var(--basalt-space-2)}.app-heading{display:flex;flex-direction:column;flex:0 1 auto;min-width:0}.app-facts{min-width:0;margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--basalt-text-secondary);font:var(--basalt-font-weight-regular) var(--bh-sm);letter-spacing:var(--basalt-text-sm-tracking)}.app-facts>*{vertical-align:top}@media(width>=720px)and (width<1024px){.app-shell{grid-template-columns:var(--basalt-size-rail-width) minmax(0,1fr)}.app-sidebar{padding-inline:0}.app-brand{justify-content:center;padding-inline:0}.app-brand .brand{justify-content:center}.app-brand .brand>.brand-full{display:none}.app-brand .brand>.brand-rail{display:inline-flex}}@media(width<720px){.app-shell{grid-template-columns:minmax(0,1fr)}.app-sidebar{display:none}.app-actions{gap:var(--basalt-space-1)}.app-header .btn[data-variant=primary]{flex:none}.app-shell[data-tabbar] .app-main{padding-bottom:calc(var(--basalt-bottom-offset) + var(--basalt-space-6))}}@media(forced-colors:active){.app-sidebar{border-inline-end-color:CanvasText}}.app-version{margin:var(--basalt-space-2) calc(var(--basalt-space-1-5) + var(--basalt-space-3)) 0}@media(width>=720px)and (width<1024px){.app-version{margin-inline:var(--basalt-space-1-5)}.app-version .version-link{display:flex;justify-content:center;text-align:center}.app-version :is(.version-link-words>:first-child,.version-link-date){position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}}} diff --git a/.agent/skills/basalt-html/parts/chart.js b/.agent/skills/basalt-html/parts/chart.js index b28a2032..be24ab23 100644 --- a/.agent/skills/basalt-html/parts/chart.js +++ b/.agent/skills/basalt-html/parts/chart.js @@ -1 +1 @@ -(function($){"use strict";var pa=$._,w=pa.esc,jr=864e5,Z="Not observed",ya=["disc","square","diamond"],ga=["solid","dash","dot"],lr=56,ur=80,cr=.6,hr=2,ba=[1,2,2.5,5],fr=0;function qt(r,s,u){return Math.max(s,Math.min(u,r))}function dr(r){var s=String(r).split("-").map(Number);return Date.UTC(s[0]||1970,(s[1]||1)-1,s[2]||1)}function Wt(r){return r.replace(/\d/g,"0")}function xa(r){return r.filter(function(s,u){return r.indexOf(s)===u})}function vr(r,s){return Math.abs(r-s)<1e-9}function jt(r){return typeof r=="number"&&isFinite(r)}function Vt(r,s,u){for(var n=[],h=r;h<=s;h++){var f=u(h),v=n[n.length-1];v&&v.key===f?v.to=h:n.push({from:h,to:h,key:f})}return n}function mr(r,s){var u=Math.max(1,Math.floor(s&&s.window||7)),n=Math.max(1,Math.min(Math.floor(s&&s.min||3),u));function h(f){return jt(r[f])}return r.map(function(f,v){for(var c=0,l=0,E=Math.max(0,v-u+1);E<=v;E++)h(E)&&(c+=r[E],l++);return l>=n&&(h(v)||h(v-1)&&h(v+1))?c/l:null})}function pr(r,s,u,n){var h=r.length?Math.min.apply(null,r):0,f=r.length?Math.max.apply(null,r):1,v=s||u,c=v?Math.min(0,h):h,l=v?Math.max(0,f):f,E=s?0:Math.max((l-c)*.04,0),z=s?Math.max(l*1.04,l):l+E,C=c-(v?0:E);function dt(k){var at=Math.floor(C/k+1e-9)*k;return{lo:at,hi:Math.max(Math.ceil(z/k-1e-9)*k,at+k),step:k}}function vt(k){return Math.round((k.hi-k.lo)/k.step)}var D;if(n&&n>0&&(D=dt(n),vt(D)<=5))return D.lo===D.hi?{lo:D.lo,hi:D.lo+2*n,step:n}:D;for(var St=Math.max(z-C,l>0?l:1),R=Math.floor(Math.log10(Math.max(St,1e-9))),mt=0;mt<5;mt++)for(var K=0;K<ba.length;K++){var tt=ba[K]*Math.pow(10,R-2+mt);if(D=dt(tt),vt(D)<=5)return vt(D)<2?{lo:D.lo,hi:D.lo+2*tt,step:tt}:D}return dt(St)}function yr(r){for(var s=[],u=0,n=Math.min(Math.round((r.hi-r.lo)/r.step),12);u<=n;u++)s.push(Math.round((r.lo+u*r.step)*1e9)/1e9);return s}function gr(r){var s=Math.floor(r/60),u=Math.round(r-s*60);return u===60&&(s+=1,u=0),u?s+" h "+u+" m":s+" h"}function br(r){var s=Math.floor(r/60),u=Math.round(r-s*60);return u===60&&(s+=1,u=0),s+" "+(s===1?"hour":"hours")+(u?" "+u+" "+(u===1?"minute":"minutes"):"")}function xr(r,s){if(r=r||{},r.duration)return{write:gr,say:br};var u={};for(var n in r)n!=="prefix"&&n!=="suffix"&&n!=="spoken"&&n!=="duration"&&(u[n]=r[n]);var h=new Intl.NumberFormat(s,u),f=r.prefix||"",v=r.suffix||"",c=r.spoken!=null?r.spoken:v;return{write:function(l){return f+h.format(l)+v},say:function(l){return f+h.format(l)+c}}}function wr(r,s){var u=[r.formats.long.format(r.stamps[s])+(s===r.n-1&&r.lastIsToday?", today":"")];r.series.forEach(function(E){var z=E.values[s],C=E.reasons&&E.reasons[s];u.push(E.name+" "+(z==null?"not observed"+(C?", "+C:""):r.say(z)+(s===r.partial?" "+r.partialSuffix:"")))});var n=r.plan,h=n&&n.values[s],f=n&&n.kind==="value"&&n.notes?n.notes[s]:void 0,v=n&&n.label||"Plan";u.push(h==null?f||"No "+v.toLowerCase():typeof h=="number"?v+" "+r.say(h):v+" "+r.say(h[0])+" to "+r.say(h[1]));var c=r.series[0],l=c&&c.values[s];return c&&h!=null&&l!=null&&s!==r.partial&&(typeof h=="number"?u.push(l<h?r.say(h-l)+" under the plan":l>h?r.say(l-h)+" over the plan":"On the plan"):u.push(l<h[0]?c.name+" "+r.say(h[0]-l)+" under the plan":l>h[1]?c.name+" "+r.say(l-h[1])+" over the plan":c.name+" inside the plan")),u.join(". ")+"."}function wa(r,s){return s==null?"":r.formatPlan?r.formatPlan(s):typeof s=="number"?r.format(s):r.format(s[0])+"–"+r.format(s[1])}function kt(r,s,u,n,h,f,v,c){f=f||0;var l=v?c/2:0,E=' data-shape="'+r+'"'+(v?' data-so-far=""':"");if(r==="square"){var z=n*Math.sqrt(Math.PI)/2+f-l;return'<rect class="'+h+'" x="'+(s-z)+'" y="'+(u-z)+'" width="'+2*z+'" height="'+2*z+'"'+E+"/>"}if(r==="diamond"){var C=n*Math.sqrt(Math.PI/2)+(f-l)*Math.SQRT2;return'<path class="'+h+'" d="M'+s+" "+(u-C)+"L"+(s+C)+" "+u+"L"+s+" "+(u+C)+"L"+(s-C)+" "+u+'Z"'+E+"/>"}return'<circle class="'+h+'" cx="'+s+'" cy="'+u+'" r="'+(n+f-l)+'"'+E+"/>"}function At(r,s,u,n){var h=ga[s%3],f=ya[s%3],v="";return r==="series"?v='<line class="chart-line" data-dash="'+h+'" x1="0" x2="16" y1="8" y2="8"/>'+kt(f,8,8,4,"chart-ring",2)+kt(f,8,8,4,"chart-mark"):r==="bar"?v='<rect class="chart-bar" x="4" y="2" width="8" height="14"/>':r==="so-far"?v='<rect class="chart-bar" data-so-far="" x="'+(n?5:4)+'" y="'+(n?7:4)+'" width="'+(n?6:8)+'" height="8"/>':r==="value"?v='<line class="chart-plan" x1="0" x2="16" y1="8" y2="8"/>':r==="band"?v='<rect class="chart-band" x="0" y="3.5" width="16" height="9"/><line class="chart-band-edge" x1="0" x2="16" y1="3.5" y2="3.5"/><line class="chart-band-edge" x1="0" x2="16" y1="12.5" y2="12.5"/>':r==="missing"&&(v='<defs><pattern id="'+u+'-sw" patternUnits="userSpaceOnUse" width="4" height="4" patternTransform="rotate(45)"><line class="chart-hatch-line" x1="0.5" y1="0" x2="0.5" y2="4"/></pattern></defs><rect x="2" y="0" width="12" height="16" fill="url(#'+u+'-sw)"/>'),'<svg class="chart-swatch" viewBox="0 0 16 16" aria-hidden="true" focusable="false">'+v+"</svg>"}var Gt=typeof WeakMap=="function"?new WeakMap:null;function Mr(r){var s=r.closest&&r.closest(".chart-group");if(!s||!Gt)return null;var u=Gt.get(s);return u||(u={members:[],shared:{gutter:0,right:0}},u.report=function(n,h){n.sizes=h;var f={gutter:0,right:0};u.members.forEach(function(v){v.sizes&&(f.gutter=Math.max(f.gutter,v.sizes.gutter),f.right=Math.max(f.right,v.sizes.right))}),!(f.gutter===u.shared.gutter&&f.right===u.shared.right)&&(u.shared=f,u.members.forEach(function(v){v!==n&&v.draw()}))},Gt.set(s,u)),u}function Ma(r,s){if(!r||!s)return null;var u=r.__bhChart&&r.__bhChart.drawn?r.__bhChart.drawn():null;r.__bhChart&&r.__bhChart.destroy();var n=s,h=n.kind==="bar",f=(n.series||[]).slice(0,h?1:3),v=n.days||[],c=v.length,l=n.plan,E=n.locale||"en-US",z=xr(n.format,E),C=typeof n.format=="function"?n.format:z.write,dt=typeof n.spoken=="function"?n.spoken:typeof n.format=="function"?C:z.say,vt=new Intl.NumberFormat(void 0,{maximumFractionDigits:6}),D=n.tickDivisor||1,St=typeof n.formatTick=="function"?n.formatTick:function(t){return vt.format(t/D)},R=n.partial,mt=n.partialLabel||"Today so far",K=n.partialSuffix||"so far",tt=n.unit,k="bc"+ ++fr,at=k+"-title",Ea=k+"-summary",ka=k+"-keys",Aa=k+"-table",rt={short:new Intl.DateTimeFormat(E,{day:"numeric",month:"short",timeZone:"UTC"}),withDay:new Intl.DateTimeFormat(E,{weekday:"short",day:"numeric",month:"short",timeZone:"UTC"}),long:new Intl.DateTimeFormat(E,{weekday:"long",day:"numeric",month:"long",timeZone:"UTC"})},et=v.map(dr),kr=n.now==null?Date.now():new Date(n.now).getTime(),Zt={n:c,series:f,plan:l,partial:R,partialSuffix:K,say:dt,format:C,stamps:et,formats:rt,formatPlan:n.formatPlan,lastIsToday:c>0&&v[c-1]===new Date(kr).toISOString().slice(0,10)},Vr=function(t){return rt.short.format(et[t])},Sa=function(t){return rt.withDay.format(et[t])},Lt=[];f.forEach(function(t){t.values.forEach(function(a){jt(a)&&Lt.push(a)})}),l&&l.values.forEach(function(t){t!=null&&(typeof t=="number"?Lt.push(t):Lt.push(t[0],t[1]))});var nt=pr(Lt,h,!!n.fromZero,n.step),pt=yr(nt);function La(t,a){return St(t)+(tt&&a===pt.length-1?" "+tt:"")}var Ca="h"+([2,3,4,5,6].indexOf(n.heading)===-1?3:n.heading),Ar=f.some(function(t){return t.values.some(function(a){return a==null})}),Sr=R!=null&&R>=0&&R<c,Ct=l&&l.label||"Plan";function Da(t,a){var o=t.values[a];return o==null?t.reasons&&t.reasons[a]?Z+" · "+t.reasons[a]:Z:C(o)+(a===R?" "+K:"")}function Ta(t){var a=l.values[t],o=l.kind==="value"&&l.notes?l.notes[t]:void 0;return a==null?o||"None":wa(Zt,a)}function Kt(t){return xa(t).map(function(a){return'<span class="chart-reserve" aria-hidden="true">'+w(a)+"</span>"}).join("")}var yt="";if(f.forEach(function(t,a){for(var o=[],d=0;d<c;d++)o.push(Wt(Da(t,d)));t.values.some(function(m){return m==null})&&o.push(Z),yt+='<li class="chart-entry">'+At(h?"bar":"series",a,k)+'<span class="chart-name">'+w(t.name)+'</span><span class="visually-hidden"> </span><span class="chart-value" data-series="'+w(t.id)+'">'+Kt(o)+'<span data-part="value"></span></span></li>'}),l){for(var _a=[],Jt=0;Jt<c;Jt++)_a.push(Wt(Ta(Jt)));yt+='<li class="chart-entry">'+At(l.kind,0,k)+'<span class="chart-name">'+w(Ct)+'</span><span class="visually-hidden"> </span><span class="chart-value" data-series="plan">'+Kt(_a)+'<span data-part="value"></span></span></li>'}Sr&&(yt+='<li class="chart-entry">'+At("so-far",0,k,h)+'<span class="chart-name">'+w(mt)+"</span></li>"),Ar&&(yt+='<li class="chart-entry">'+At("missing",0,k)+'<span class="chart-name">'+Z+"</span></li>");for(var Oa=[],Qt=0;Qt<c;Qt++)Oa.push(Wt("Latest · "+Sa(Qt)));var it=function(t){return'<kbd class="kbd">'+t+"</kbd>"};r.textContent="",r.setAttribute("aria-labelledby",at),r.setAttribute("data-kind",n.kind),r.innerHTML='<div class="chart-head"><'+Ca+' id="'+at+'" class="chart-title">'+w(n.title||"")+"</"+Ca+">"+(n.source?'<p class="chart-source">'+w(n.source)+"</p>":"")+'</div><div class="chart-key"><p class="chart-date">'+Kt(Oa)+'<span data-part="date"></span></p><ul class="chart-legend" aria-label="Key">'+yt+'</ul></div><div class="chart-plot"><span class="chart-ruler" aria-hidden="true"></span><div class="chart-svg-host"></div><div role="group" aria-roledescription="chart" aria-labelledby="'+at+'" aria-describedby="'+Ea+" "+ka+'" class="chart-days"></div><span id="'+ka+'" class="visually-hidden">Arrow keys move a day, Page Up and Page Down a week, Home and End to the ends.</span></div><p class="chart-hint" data-kbd-hint="" aria-hidden="true"><span>'+it("←")+" "+it("→")+" a day</span><span>"+it("PgUp")+" "+it("PgDn")+" a week</span><span>"+it("Home")+" "+it("End")+' the ends</span></p><div class="chart-foot"><button type="button" class="btn chart-toggle" data-variant="secondary" data-size="sm" aria-expanded="false" aria-controls="'+Aa+'"><span>View as table</span></button></div><div id="'+Aa+'" class="chart-table" hidden></div><figcaption id="'+Ea+'" class="chart-summary">'+w(n.summary||"")+"</figcaption>";for(var P=r.querySelector(".chart-plot"),Xt=r.querySelector(".chart-ruler"),Yt=r.querySelector(".chart-svg-host"),gt=r.querySelector(".chart-days"),Lr=r.querySelector('[data-part="date"]'),Ha=r.querySelectorAll(".chart-value"),Dt=r.querySelector(".chart-toggle"),st=r.querySelector(".chart-table"),$t=[],Tt=0;Tt<c;Tt++){var ot=document.createElement("div");ot.setAttribute("role","img"),ot.className="chart-day",ot.setAttribute("data-i",Tt),ot.setAttribute("aria-label",wr(Zt,Tt)),gt.appendChild(ot),$t.push(ot)}var bt=null;function Cr(){var t=getComputedStyle(P),a=function(o,d){var m=parseFloat(t.getPropertyValue(o));return isFinite(m)?m:d};return{mark:a("--basalt-size-chart-mark",8),cut:a("--basalt-size-cut",2),line:a("--basalt-size-chart-line",2),hair:a("--basalt-size-hairline",1),pitch:a("--basalt-size-hatch-pitch",4),barMax:a("--basalt-size-chart-bar-max",24),barMin:a("--basalt-size-chart-bar-min",2),plot:a("--basalt-size-chart-plot",240),s1:a("--basalt-space-1",4),s2:a("--basalt-space-2",8),lineH:a("--basalt-text-xs-line-height",16),container:a("--basalt-size-breakpoint-container",480),dash:a("--basalt-size-chart-dash",6),dashGap:a("--basalt-size-chart-dash-gap",4)}}var _t={};function J(t,a){a=a||400;var o=a+"|"+t;return _t[o]!==void 0?_t[o]:(Xt.style.fontWeight=String(a),Xt.textContent=t,_t[o]=Xt.getBoundingClientRect().width)}var Ot=null,lt=null,Ht=null,ta=!1;function za(){return qt(Ht===null?c-1:Ht,0,Math.max(c-1,0))}function Ba(){var t=ta?za():lt!==null?lt:Ot;return t!==null&&t>=0&&t<c?t:null}var aa=0,i=null,N=Mr(r),ra={sizes:null,draw:function(){j(!0)}};N&&N.members.push(ra);function Dr(){var t=bt,a=Math.max(aa,240),o=a<t.container,d=!h&&f.length>1&&!o,m=Math.ceil(Math.max.apply(null,pt.map(function(A,U){return J(La(A,U))})))+t.s2,_=f.map(function(A){return A.name}).concat(l?[Ct]:[]),S=d?Math.ceil(Math.max.apply(null,_.map(function(A){return J(A)})))+2*t.s2:t.s2;N&&N.report(ra,{gutter:m,right:S});var y=o?2:1,O=y*t.lineH+t.s1,x=t.plot,L=Math.max(m,N?N.shared.gutter:0),g=a-Math.max(S,N?N.shared.right:0),B=(g-L)/c;return{width:a,height:O+x+t.s2+t.lineH,narrow:o,laneRows:y,x0:L,x1:g,top:O,plotH:x,bottom:O+x,slot:B,direct:d,lo:nt.lo,hi:nt.hi,barWidth:Math.max(t.barMin,Math.min(t.barMax,Math.round(B*cr))),y:function(A){return O+(1-(A-nt.lo)/(nt.hi-nt.lo))*x},cx:function(A){return L+(A+.5)*B},sx:function(A){return L+A*B}}}var H=(function(){for(var t=[],a=[],o=0;o<c;o++){var d=l?l.values[o]:null;d==null?(t.push(null),a.push(null)):typeof d=="number"?(t.push(d),a.push(null)):(t.push(d[0]),a.push(d[1]))}return{series:f.map(function(m){return m.values.map(function(_){return jt(_)?_:null})}),planA:t,planB:a}})();function Tr(t){var a=bt,o=function(e){return Math.round(e-.5)+.5},d=k+"-hatch",m='<defs><pattern id="'+d+'" patternUnits="userSpaceOnUse" width="'+a.pitch+'" height="'+a.pitch+'" patternTransform="rotate(45)"><line class="chart-hatch-line" x1="'+a.hair/2+'" y1="0" x2="'+a.hair/2+'" y2="'+a.pitch+'"/></pattern></defs>',_=H.series[0]||[],S;pt.forEach(function(e){S===void 0&&vr(e,0)&&(S=e)}),pt.forEach(function(e){var p=o(i.y(e));p<i.top-1||p>i.bottom+1||e===S||(m+='<line class="chart-grid" x1="'+i.x0+'" x2="'+i.x1+'" y1="'+p+'" y2="'+p+'"/>')}),t!==null&&(m+='<rect class="chart-plate" x="'+i.sx(t)+'" y="'+i.top+'" width="'+i.slot+'" height="'+i.plotH+'"/>'),l&&l.kind==="band"&&Vt(0,c-1,function(e){return H.planA[e]==null?"":H.planA[e]+"-"+H.planB[e]}).forEach(function(e){if(e.key){var p=Math.round(i.sx(e.from)),b=Math.round(i.sx(e.to+1)),M=o(i.y(H.planB[e.from])),I=o(i.y(H.planA[e.from]));m+='<rect class="chart-band" x="'+p+'" y="'+M+'" width="'+(b-p)+'" height="'+(I-M)+'"/><line class="chart-band-edge" x1="'+p+'" x2="'+b+'" y1="'+M+'" y2="'+M+'"/><line class="chart-band-edge" x1="'+p+'" x2="'+b+'" y1="'+I+'" y2="'+I+'"/>'}});for(var y=[],O=0;O<c;O++){var x=f.filter(function(e){return e.values[O]==null});y.push(x.length?{key:x.map(function(e){return e.id}).join("+")+":"+(x[0].reasons&&x[0].reasons[O]||""),names:x.map(function(e){return e.name}),all:x.length===f.length,why:x[0].reasons&&x[0].reasons[O]||void 0}:null)}var L=Vt(0,c-1,function(e){return y[e]?y[e].key:""}).filter(function(e){return e.key});if(L.forEach(function(e){var p=Math.round(i.sx(e.from)),b=Math.round(i.sx(e.to+1));m+='<rect class="chart-hatch" x="'+p+'" y="'+i.top+'" width="'+(b-p)+'" height="'+i.plotH+'" fill="url(#'+d+')"/>'}),S!==void 0){var g=o(i.y(S));m+='<line class="chart-baseline" x1="'+i.x0+'" x2="'+i.x1+'" y1="'+g+'" y2="'+g+'"/>'}if(h){for(var B=i.barWidth,A=Math.round(i.y(Math.max(i.lo,0))),U=0;U<c;U++){var V=_[U];if(V!=null){var G=Math.round(i.cx(U)-B/2),q=Math.round(i.y(V));if(U===R){var X=a.line/2;m+='<rect class="chart-bar" data-so-far="" x="'+(G+X)+'" y="'+(q+X)+'" width="'+Math.max(B-2*X,0)+'" height="'+Math.max(A-q-2*X,0)+'"/>'}else A-q>0&&(m+='<rect class="chart-bar" x="'+G+'" y="'+q+'" width="'+B+'" height="'+(A-q)+'"/>')}}for(var F=0;F<c;F++){var Ka=H.planA[F],Ja=_[F];if(!(Ka==null||Ja==null)){var wt=Math.round(i.y(Ka)),Qa=Math.round(i.y(Ja)),Mt=a.line/2,Xa=Math.round(i.cx(F)-B/2);Qa<=wt-Mt-a.cut-2&&(m+='<rect class="chart-cut" x="'+Xa+'" y="'+(wt-Mt-a.cut)+'" width="'+B+'" height="'+a.cut+'"/>'),Qa<=wt-Mt&&A>wt+Mt+a.cut&&(m+='<rect class="chart-cut" x="'+Xa+'" y="'+(wt+Mt)+'" width="'+B+'" height="'+a.cut+'"/>')}}}if(l&&l.kind==="value"&&Vt(0,c-1,function(e){return H.planA[e]==null?"":String(H.planA[e])}).forEach(function(e){if(e.key){var p=Math.round(i.y(H.planA[e.from]));m+='<line class="chart-plan" x1="'+Math.round(i.sx(e.from))+'" x2="'+Math.round(i.sx(e.to+1))+'" y1="'+p+'" y2="'+p+'"/>'}}),!h)for(var Rr=i.slot>=hr*a.mark,ct=f.length-1;ct>=0;ct--){var Ir=f[ct],Pr=H.series[ct]||[],ht=Pr.map(function(e,p){return e==null?null:{i:p,x:i.cx(p),y:i.y(e)}}),Ya=ht.filter(function(e,p){if(!e)return!1;var b=p>0?ht[p-1]:void 0,M=p<ht.length-1?ht[p+1]:void 0,I=p>0&&!b||p<ht.length-1&&!M,Ft=!b&&!M;return Rr||e.i===t||e.i===c-1||e.i===R||I||Ft}),$a=ya[ct]||"disc",sa="",oa=!1;ht.forEach(function(e){if(!e){oa=!1;return}sa+=(oa?"L":"M")+e.x.toFixed(1)+" "+e.y.toFixed(1),oa=!0}),m+='<g data-series="'+w(Ir.id)+'" class="chart-series">'+Ya.map(function(e){return kt($a,e.x,e.y,a.mark/2,"chart-ring",a.cut)}).join("")+(sa?'<path class="chart-line" data-dash="'+(ga[ct]||"solid")+'" d="'+sa+'"/>':"")+Ya.map(function(e){return kt($a,e.x,e.y,a.mark/2,"chart-mark",0,e.i===R,a.line)}).join("")+"</g>"}for(var Rt=[],tr=0;tr<i.laneRows;tr++)Rt.push(-1/0);L.forEach(function(e,p){for(var b=y[e.from],M=p%i.laneRows,I=L[p+i.laneRows],Ft=L[p-1],Ur=Math.round(i.sx(e.from)),qr=Math.round(i.sx(e.to+1)),sr=I?Math.round(i.sx(I.from))-a.s2*2:i.width,Wr=Ft?Math.round(i.sx(Ft.to+1))+a.s2:-1/0,da=b.all?Z:b.names.join(" and ")+" not observed",va=[b.why?da+" · "+b.why:da,da,Z],Ut=0;Ut<va.length;Ut++){var or=va[Ut],ma=J(or),Y=Math.max(Ur,Rt[M]+a.s2*2);if(Y+ma>sr){if(Ut<va.length-1)continue;Y=sr-ma}if(!(Y<Wr||Y<Rt[M]+a.s2*2||Y>qr)){m+='<text class="chart-lane" x="'+Y+'" y="'+(M*a.lineH+a.lineH/2)+'">'+w(or)+"</text>",Rt[M]=Y+ma;break}}}),pt.forEach(function(e,p){var b=i.y(e);b<i.top-1||b>i.bottom+1||(m+='<text class="chart-axis" x="'+(i.x0-a.s2)+'" y="'+b+'" text-anchor="end">'+w(La(e,p))+"</text>")});var Et=Math.ceil(lr/i.slot),It=[];if(Et<=1)for(var la=0;la<c;la++)It.push(la);else if(c<=14)for(var ua=c-1;ua>=0;ua-=Et)It.push(ua);else for(var Nr=Math.ceil(Et/7),ar=0,Pt=c-1;Pt>=0;Pt--)new Date(et[Pt]).getUTCDay()===1&&(ar%Nr===0&&It.push(Pt),ar++);var Fr=i.slot*Math.max(Et,1)>=ur&&Et<=1,rr=function(e){return(Fr?rt.withDay:rt.short).format(et[e])},er=i.bottom+a.s2+a.lineH/2,nr=function(e,p){var b=J(p);return e+b/2>i.width?"end":e-b/2<0?"start":"middle"},Nt=t===null?null:rr(t),ca=t===null?null:[i.cx(t)-J(Nt)/2-a.s2,i.cx(t)+J(Nt)/2+a.s2];if(It.forEach(function(e){if(e!==t){var p=rr(e),b=J(p),M=i.cx(e);if(!(ca&&M+b/2>ca[0]&&M-b/2<ca[1])){var I=nr(M,p);m+='<text class="chart-axis" x="'+(I==="end"?i.width:I==="start"?0:M)+'" y="'+er+'" text-anchor="'+I+'">'+w(p)+"</text>"}}}),t!==null){var ha=nr(i.cx(t),Nt);m+='<text class="chart-axis" data-active="" x="'+(ha==="end"?i.width:ha==="start"?0:i.cx(t))+'" y="'+er+'" text-anchor="'+ha+'">'+w(Nt)+"</text>"}if(i.direct){var W=[];f.forEach(function(e,p){for(var b=H.series[p]||[],M=c-1;M>=0;M--)if(b[M]!=null){W.push({name:e.name,y:i.y(b[M])});break}});var fa=H.planA[c-1],ir=H.planB[c-1];l&&fa!=null&&W.push({name:Ct,y:i.y(ir==null?fa:(fa+ir)/2)}),W.sort(function(e,p){return e.y-p.y});for(var ft=1;ft<W.length;ft++)W[ft].y-W[ft-1].y<a.lineH&&(W[ft].y=W[ft-1].y+a.lineH);W.forEach(function(e){m+='<text class="chart-direct" x="'+(i.x1+a.s2)+'" y="'+e.y+'">'+w(e.name)+"</text>"})}return'<svg class="chart-svg" width="'+i.width+'" height="'+i.height+'" viewBox="0 0 '+i.width+" "+i.height+'" aria-hidden="true" focusable="false">'+m+"</svg>"}function _r(t,a){Lr.textContent=(a===null?"Latest · ":"")+Sa(t);var o=0;if(f.forEach(function(S){var y=Ha[o++].querySelector('[data-part="value"]');y.textContent=Da(S,t),S.values[t]==null?y.setAttribute("data-missing",""):y.removeAttribute("data-missing")}),l){var d=Ha[o].querySelector('[data-part="value"]'),m=l.values[t],_=l.kind==="value"&&l.notes?l.notes[t]:void 0;d.textContent=Ta(t),m==null&&!_?d.setAttribute("data-missing",""):d.removeAttribute("data-missing")}}var ea,Ra=".chart-bar, .chart-plan, .chart-band, .chart-band-edge, .chart-line, .chart-ring, .chart-mark",T=null,Ia=!n.entrance||!!u,Pa=!1,Na="basalt-entrance:"+location.pathname;function Fa(){try{localStorage.setItem(Na,"seen")}catch{}}function na(t,a){var o=/^\s*([\d.]+)(ms|s)\s*$/.exec(getComputedStyle(document.documentElement).getPropertyValue(t));return o?Number(o[1])*(o[2]==="s"?1e3:1):a}function Or(){var t=P.getBoundingClientRect();if(matchMedia("(prefers-reduced-motion: reduce)").matches||matchMedia("print").matches||document.documentElement.getAttribute("data-loops")==="held"||document.visibilityState==="hidden"||performance.now()-($.pageChangedAt||0)>1e3)return!1;try{if(localStorage.getItem(Na)==="seen")return!1}catch{}return t.bottom>0&&t.top<innerHeight}function zt(){T&&(clearTimeout(T.timer),T=null,Fa(),j(!0))}function Hr(){var t=Yt.querySelectorAll(Ra),a=T.from,o=na("--basalt-duration-slow",200),d=a?o:na("--basalt-duration-figure",600),m=!a&&t.length>1?Math.min(na("--basalt-duration-stagger",22),o/(t.length-1)):0,_=getComputedStyle(document.documentElement).getPropertyValue("--basalt-ease-out").trim()||"cubic-bezier(0.16, 1, 0.3, 1)",S=performance.now()-T.t0;Array.prototype.forEach.call(t,function(y,O){var x,L=y.style,g=a&&a[O];if(y.classList.contains("chart-bar")){L.transformBox="fill-box",L.transformOrigin="50% 100%";var B=g&&g.k==="bar"&&y.getBBox().height>0?Math.min(g.h*g.s/y.getBBox().height,4):0;x=[{transform:"scaleY("+(a?B:0)+")"},{transform:"scaleY(1)"}]}else{var A=y.classList.contains("chart-line"),U=A&&y.getAttribute("data-dash")==="solid"&&y.getTotalLength&&y.getTotalLength()>0,V,G;if(U){var q=y.getTotalLength(),X=q+2*(parseFloat(getComputedStyle(y).strokeWidth)||2);L.strokeDasharray=q+" "+q*2,V={strokeDashoffset:String(g&&g.k==="line"?g.p*X:X)},G={strokeDashoffset:"0"}}else V={opacity:g&&g.o!==void 0?g.o:0},G={opacity:1};if(g&&A&&g.d&&y.getAttribute("d")&&g.d.replace(/[-\d.]+/g,"")===y.getAttribute("d").replace(/[-\d.]+/g,""))V.d='path("'+g.d+'")',G.d='path("'+y.getAttribute("d")+'")';else if(g&&!A&&g.cx!==void 0){var F=y.getBBox();V.transform="translate("+(g.cx-(F.x+F.width/2))+"px, "+(g.cy-(F.y+F.height/2))+"px)",G.transform="none"}x=[V,G]}y.animate(x,{duration:d,delay:O*m,easing:_,fill:"backwards"}).currentTime=S}),T.timer||(T.timer=setTimeout(zt,Math.max(0,(t.length-1)*m+d-S)+20))}function zr(){return T?Array.prototype.map.call(Yt.querySelectorAll(Ra),function(t){var a=getComputedStyle(t);if(t.classList.contains("chart-bar"))return{k:"bar",s:!a.transform||a.transform==="none"?1:new DOMMatrixReadOnly(a.transform).d,h:t.getBBox().height};var o=t.getBBox(),d={cx:o.x+o.width/2,cy:o.y+o.height/2,o:parseFloat(a.opacity)};return t.classList.contains("chart-line")&&(d.d=t.getAttribute("d")),t.classList.contains("chart-line")&&t.style.strokeDasharray?(d.k="line",d.p=parseFloat(a.strokeDashoffset)/(parseFloat(t.style.strokeDasharray)+2*(parseFloat(a.strokeWidth)||2))):d.k="fade",d}):null}function Ua(t){t.detail&&t.detail.held&&zt()}document.addEventListener("basalt:loops",Ua);var xt=matchMedia("print");function qa(){xt.matches&&zt()}xt.addEventListener&&xt.addEventListener("change",qa);function Wa(){zt()}window.addEventListener("beforeprint",Wa);function j(t){if(!(!bt||!c)){var a=Ba();i=Dr(),P.style.height=i.height+"px",Yt.innerHTML=Tr(a),T&&Hr(),r.toggleAttribute("data-narrow",i.narrow);var o=za();$t.forEach(function(d,m){d.style.left=i.x0+m*i.slot+"px",d.style.top=i.top+"px",d.style.width=i.slot+"px",d.style.height=i.plotH+"px",d.tabIndex=m===o?0:-1,d.toggleAttribute("data-active",a===m)}),(t||a!==ea)&&_r(a===null?c-1:a,a),ea=a}}function ut(){Ba()!==ea&&j()}function ja(){aa=P.clientWidth,bt||(bt=Cr()),Ia?u&&!T&&!Pa&&(Pa=!0,T={t0:performance.now(),timer:0,from:u}):(Ia=!0,Or()&&(T={t0:performance.now(),timer:0,from:null})),j(!0)}function ia(t){if(!i)return null;var a=t.clientX-P.getBoundingClientRect().left;return a<i.x0||a>i.x1?null:qt(Math.floor((a-i.x0)/i.slot),0,c-1)}P.addEventListener("pointermove",function(t){if(t.pointerType==="touch"){t.buttons!==0&&(lt=ia(t),ut());return}Ot=ia(t),ut()}),P.addEventListener("pointerdown",function(t){var a=ia(t);t.pointerType==="touch"?lt=a:Ot=a,ut()}),P.addEventListener("pointerleave",function(t){t.pointerType!=="touch"&&(Ot=null,ut())});var Va=function(t){lt!==null&&t.composedPath().indexOf(P)===-1&&(lt=null,ut())};document.addEventListener("pointerdown",Va),gt.addEventListener("keydown",function(t){var a=Number(t.target.getAttribute("data-i"));if(!(!isFinite(a)||t.target.getAttribute("data-i")===null)){var o=a;if(t.key==="ArrowRight")o=a+1;else if(t.key==="ArrowLeft")o=a-1;else if(t.key==="PageDown")o=a+7;else if(t.key==="PageUp")o=a-7;else if(t.key==="Home")o=0;else if(t.key==="End")o=c-1;else return;t.preventDefault(),o=qt(o,0,c-1),Ht=o,$t[o].focus({preventScroll:!0}),ut(),j(!0)}}),gt.addEventListener("focusin",function(t){var a=t.target.getAttribute&&t.target.getAttribute("data-i");a!=null&&(Ht=Number(a),ta=!0,j(!0))}),gt.addEventListener("focusout",function(t){gt.contains(t.relatedTarget)||(ta=!1,j(!0))});var Q=null;function Br(){for(var t=['<col style="width:8rem">'].concat(f.map(function(){return'<col style="width:7.5rem">'}),l?['<col style="width:8.5rem">']:[],["<col>"]),a="",o=c-1;o>=0;o--){var d=[],m=f.map(function(x){var L=x.values[o];if(L==null){var g=x.reasons&&x.reasons[o];return g&&d.push((f.length>1?x.name+" ":"")+g),'<td data-numeric=""><span class="chart-not-observed">'+Z+"</span></td>"}return'<td data-numeric="">'+w(C(L)+(o===R?" "+K:""))+"</td>"}).join(""),_=l&&l.values[o],S=l&&l.kind==="value"&&l.notes?l.notes[o]:void 0;l&&_==null&&S&&d.push(S);var y=xa(d).join("; ");a+='<tr><th scope="row">'+w(rt.withDay.format(et[o]))+"</th>"+m+(l?'<td data-numeric="">'+(_==null?"":w(wa(Zt,_)))+"</td>":"")+'<td class="chart-note">'+w(y?y.charAt(0).toUpperCase()+y.slice(1):"")+"</td></tr>"}var O="calc("+(t.length-1)+" * 8rem + 12rem)";return'<div class="panel table-wrap" role="region" aria-label="'+w((n.title||"")+" table")+'" tabindex="0"><table style="min-width:'+O+'"><colgroup>'+t.join("")+'</colgroup><caption class="visually-hidden">'+w((n.title||"")+", newest first")+'</caption><thead><tr><th scope="col">Date</th>'+f.map(function(x){return'<th scope="col" data-numeric="">'+w(x.name)+"</th>"}).join("")+(l?'<th scope="col" data-numeric="">'+w(Ct)+"</th>":"")+'<th scope="col">Note</th></tr></thead><tbody>'+a+"</tbody></table></div>"}Dt.addEventListener("click",function(){var t=Dt.getAttribute("aria-expanded")!=="true";if(Dt.setAttribute("aria-expanded",String(t)),Dt.firstElementChild.textContent=t?"Hide the table":"View as table",Q&&(Q.disconnect(),Q=null),!t){st.hidden=!0,st.textContent="";return}st.innerHTML=Br(),st.hidden=!1;var a=st.firstElementChild,o=null,d=function(){a.toggleAttribute("data-scrolled",Math.abs(a.scrollLeft)>0);var m=a.scrollWidth>a.clientWidth+1;m&&!o?(o=document.createElement("p"),o.className="chart-scroll-hint",o.textContent="Scroll sideways for every column.",st.appendChild(o)):!m&&o&&(o.remove(),o=null)};a.addEventListener("scroll",d,{passive:!0}),d(),typeof ResizeObserver=="function"&&(Q=new ResizeObserver(d),Q.observe(a))});var Bt=null,Ga=!0;typeof ResizeObserver=="function"&&(Bt=new ResizeObserver(function(){(Math.abs(P.clientWidth-aa)>=.5||!i)&&ja()}),Bt.observe(P)),ja(),document.fonts&&document.fonts.ready&&document.fonts.ready.then(function(){Ga&&(_t={},j(!0))});var Za={drawn:zr,destroy:function(){Ga=!1,T&&(clearTimeout(T.timer),T=null,Fa()),document.removeEventListener("basalt:loops",Ua),xt.removeEventListener&&xt.removeEventListener("change",qa),window.removeEventListener("beforeprint",Wa),Bt&&Bt.disconnect(),Q&&Q.disconnect(),document.removeEventListener("pointerdown",Va),N&&N.members.splice(N.members.indexOf(ra),1),r.__bhChart=null}};return r.__bhChart=Za,Za}function Er(){document.querySelectorAll('script[type="application/json"][data-chart]').forEach(function(r){var s=r.parentElement;if(!(!s||s.__bhChart||r.__bh)){r.__bh=!0;var u;try{u=JSON.parse(r.textContent)}catch(n){console.warn("Basalt: a chart's data is not valid JSON ("+n.message+")");return}r.remove();try{Ma(s,u)}catch(n){console.warn("Basalt: chart not drawn: "+n.message)}}})}$.pageChange=function(r){$.pageChangedAt=r===void 0?performance.now():r},$.chart=Ma,$.trailingMean=mr,pa.step(60,"wireCharts",Er)})(window.Basalt); +(function(Y){"use strict";var ya=Y._,w=ya.esc,Gr=864e5,$="Not observed",ga=["disc","square","diamond"],ba=["solid","dash","dot"],lr=56,ur=80,cr=.6,hr=2,xa=[1,2,2.5,5],fr=0;function jt(r,o,u){return Math.max(o,Math.min(u,r))}function dr(r){var o=String(r).split("-").map(Number);return Date.UTC(o[0]||1970,(o[1]||1)-1,o[2]||1)}function At(r){return r.replace(/\d/g,"0")}function wa(r){return r.filter(function(o,u){return r.indexOf(o)===u})}function vr(r,o){return Math.abs(r-o)<1e-9}function Vt(r){return typeof r=="number"&&isFinite(r)}function Gt(r,o,u){for(var n=[],f=r;f<=o;f++){var c=u(f),v=n[n.length-1];v&&v.key===c?v.to=f:n.push({from:f,to:f,key:c})}return n}function mr(r,o){var u=Math.max(1,Math.floor(o&&o.window||7)),n=Math.max(1,Math.min(Math.floor(o&&o.min||3),u));function f(c){return Vt(r[c])}return r.map(function(c,v){for(var h=0,l=0,E=Math.max(0,v-u+1);E<=v;E++)f(E)&&(h+=r[E],l++);return l>=n&&(f(v)||f(v-1)&&f(v+1))?h/l:null})}function pr(r,o,u,n){var f=r.length?Math.min.apply(null,r):0,c=r.length?Math.max.apply(null,r):1,v=o||u,h=v?Math.min(0,f):f,l=v?Math.max(0,c):c,E=o?0:Math.max((l-h)*.04,0),z=o?Math.max(l*1.04,l):l+E,C=h-(v?0:E);function dt(A){var at=Math.floor(C/A+1e-9)*A;return{lo:at,hi:Math.max(Math.ceil(z/A-1e-9)*A,at+A),step:A}}function vt(A){return Math.round((A.hi-A.lo)/A.step)}var T;if(n&&n>0&&(T=dt(n),vt(T)<=5))return T.lo===T.hi?{lo:T.lo,hi:T.lo+2*n,step:n}:T;for(var Lt=Math.max(z-C,l>0?l:1),R=Math.floor(Math.log10(Math.max(Lt,1e-9))),mt=0;mt<5;mt++)for(var Z=0;Z<xa.length;Z++){var tt=xa[Z]*Math.pow(10,R-2+mt);if(T=dt(tt),vt(T)<=5)return vt(T)<2?{lo:T.lo,hi:T.lo+2*tt,step:tt}:T}return dt(Lt)}function yr(r){for(var o=[],u=0,n=Math.min(Math.round((r.hi-r.lo)/r.step),12);u<=n;u++)o.push(Math.round((r.lo+u*r.step)*1e9)/1e9);return o}function gr(r){var o=Math.floor(r/60),u=Math.round(r-o*60);return u===60&&(o+=1,u=0),u?o+" h "+u+" m":o+" h"}function br(r){var o=Math.floor(r/60),u=Math.round(r-o*60);return u===60&&(o+=1,u=0),o+" "+(o===1?"hour":"hours")+(u?" "+u+" "+(u===1?"minute":"minutes"):"")}function xr(r,o){if(r=r||{},r.duration)return{write:gr,say:br};var u={};for(var n in r)n!=="prefix"&&n!=="suffix"&&n!=="spoken"&&n!=="duration"&&(u[n]=r[n]);var f=new Intl.NumberFormat(o,u),c=r.prefix||"",v=r.suffix||"",h=r.spoken!=null?r.spoken:v;return{write:function(l){return c+f.format(l)+v},say:function(l){return c+f.format(l)+h}}}function wr(r,o){var u=[r.formats.long.format(r.stamps[o])+(o===r.n-1&&r.lastIsToday?", today":"")];r.series.forEach(function(E){var z=E.values[o],C=E.reasons&&E.reasons[o];u.push(E.name+" "+(z==null?"not observed"+(C?", "+C:""):r.say(z)+(o===r.partial?" "+r.partialSuffix:"")))});var n=r.plan,f=n&&n.values[o],c=n&&n.kind==="value"&&n.notes?n.notes[o]:void 0,v=n&&n.label||"Plan";u.push(f==null?c||"No "+v.toLowerCase():typeof f=="number"?v+" "+r.say(f):v+" "+r.say(f[0])+" to "+r.say(f[1]));var h=r.series[0],l=h&&h.values[o];return h&&f!=null&&l!=null&&o!==r.partial&&(typeof f=="number"?u.push(l<f?r.say(f-l)+" under the plan":l>f?r.say(l-f)+" over the plan":"On the plan"):u.push(l<f[0]?h.name+" "+r.say(f[0]-l)+" under the plan":l>f[1]?h.name+" "+r.say(l-f[1])+" over the plan":h.name+" inside the plan")),u.join(". ")+"."}function Ma(r,o){return o==null?"":r.formatPlan?r.formatPlan(o):typeof o=="number"?r.format(o):r.format(o[0])+"–"+r.format(o[1])}function kt(r,o,u,n,f,c,v,h){c=c||0;var l=v?h/2:0,E=' data-shape="'+r+'"'+(v?' data-so-far=""':"");if(r==="square"){var z=n*Math.sqrt(Math.PI)/2+c-l;return'<rect class="'+f+'" x="'+(o-z)+'" y="'+(u-z)+'" width="'+2*z+'" height="'+2*z+'"'+E+"/>"}if(r==="diamond"){var C=n*Math.sqrt(Math.PI/2)+(c-l)*Math.SQRT2;return'<path class="'+f+'" d="M'+o+" "+(u-C)+"L"+(o+C)+" "+u+"L"+o+" "+(u+C)+"L"+(o-C)+" "+u+'Z"'+E+"/>"}return'<circle class="'+f+'" cx="'+o+'" cy="'+u+'" r="'+(n+c-l)+'"'+E+"/>"}function St(r,o,u,n){var f=ba[o%3],c=ga[o%3],v="";return r==="series"?v='<line class="chart-line" data-dash="'+f+'" x1="0" x2="16" y1="8" y2="8"/>'+kt(c,8,8,4,"chart-ring",2)+kt(c,8,8,4,"chart-mark"):r==="bar"?v='<rect class="chart-bar" x="4" y="2" width="8" height="14"/>':r==="so-far"?v='<rect class="chart-bar" data-so-far="" x="'+(n?5:4)+'" y="'+(n?7:4)+'" width="'+(n?6:8)+'" height="8"/>':r==="value"?v='<line class="chart-plan" x1="0" x2="16" y1="8" y2="8"/>':r==="band"?v='<rect class="chart-band" x="0" y="3.5" width="16" height="9"/><line class="chart-band-edge" x1="0" x2="16" y1="3.5" y2="3.5"/><line class="chart-band-edge" x1="0" x2="16" y1="12.5" y2="12.5"/>':r==="missing"&&(v='<defs><pattern id="'+u+'-sw" patternUnits="userSpaceOnUse" width="4" height="4" patternTransform="rotate(45)"><line class="chart-hatch-line" x1="0.5" y1="0" x2="0.5" y2="4"/></pattern></defs><rect x="2" y="0" width="12" height="16" fill="url(#'+u+'-sw)"/>'),'<svg class="chart-swatch" viewBox="0 0 16 16" aria-hidden="true" focusable="false">'+v+"</svg>"}var Zt=typeof WeakMap=="function"?new WeakMap:null;function Mr(r){var o=r.closest&&r.closest(".chart-group");if(!o||!Zt)return null;var u=Zt.get(o);return u||(u={members:[],shared:{gutter:0,right:0}},u.report=function(n,f){n.sizes=f;var c={gutter:0,right:0};u.members.forEach(function(v){v.sizes&&(c.gutter=Math.max(c.gutter,v.sizes.gutter),c.right=Math.max(c.right,v.sizes.right))}),!(c.gutter===u.shared.gutter&&c.right===u.shared.right)&&(u.shared=c,u.members.forEach(function(v){v!==n&&v.draw()}))},Zt.set(o,u)),u}function Ea(r,o){if(!r||!o)return null;var u=r.__bhChart&&r.__bhChart.drawn?r.__bhChart.drawn():null;r.__bhChart&&r.__bhChart.destroy();var n=o,f=n.kind==="bar",c=(n.series||[]).slice(0,f?1:3),v=n.days||[],h=v.length,l=n.plan,E=n.locale||"en-US",z=xr(n.format,E),C=typeof n.format=="function"?n.format:z.write,dt=typeof n.spoken=="function"?n.spoken:typeof n.format=="function"?C:z.say,vt=new Intl.NumberFormat(void 0,{maximumFractionDigits:6}),T=n.tickDivisor||1,Lt=typeof n.formatTick=="function"?n.formatTick:function(t){return vt.format(t/T)},R=n.partial,mt=n.partialLabel||"Today so far",Z=n.partialSuffix||"so far",tt=n.unit,A="bc"+ ++fr,at=A+"-title",Aa=A+"-summary",ka=A+"-keys",Sa=A+"-table",rt={short:new Intl.DateTimeFormat(E,{day:"numeric",month:"short",timeZone:"UTC"}),withDay:new Intl.DateTimeFormat(E,{weekday:"short",day:"numeric",month:"short",timeZone:"UTC"}),long:new Intl.DateTimeFormat(E,{weekday:"long",day:"numeric",month:"long",timeZone:"UTC"})},et=v.map(dr),Ar=n.now==null?Date.now():new Date(n.now).getTime(),Kt={n:h,series:c,plan:l,partial:R,partialSuffix:Z,say:dt,format:C,stamps:et,formats:rt,formatPlan:n.formatPlan,lastIsToday:h>0&&v[h-1]===new Date(Ar).toISOString().slice(0,10)},Zr=function(t){return rt.short.format(et[t])},kr=function(t){return rt.withDay.format(et[t])},Ct=[];c.forEach(function(t){t.values.forEach(function(a){Vt(a)&&Ct.push(a)})}),l&&l.values.forEach(function(t){t!=null&&(typeof t=="number"?Ct.push(t):Ct.push(t[0],t[1]))});var nt=pr(Ct,f,!!n.fromZero,n.step),pt=yr(nt);function La(t,a){return Lt(t)+(tt&&a===pt.length-1?" "+tt:"")}var Ca="h"+([2,3,4,5,6].indexOf(n.heading)===-1?3:n.heading),Sr=c.some(function(t){return t.values.some(function(a){return a==null})}),Lr=R!=null&&R>=0&&R<h,Tt=l&&l.label||"Plan";function Ta(t,a){var s=t.values[a];return s==null?$:C(s)+(a===R?" "+Z:"")}function Da(t){var a=l.values[t],s=l.kind==="value"&&l.notes?l.notes[t]:void 0;return a==null?s||"None":Ma(Kt,a)}function Jt(t){return wa(t).map(function(a){return'<span class="chart-reserve" aria-hidden="true">'+w(a)+"</span>"}).join("")}var yt="";if(c.forEach(function(t,a){for(var s=[],d=0;d<h;d++)t.values[d]!=null&&s.push(At(Ta(t,d)));t.values.some(function(m){return m==null})&&s.push($),yt+='<li class="chart-entry">'+St(f?"bar":"series",a,A)+'<span class="chart-name">'+w(t.name)+'</span><span class="visually-hidden"> </span><span class="chart-value" data-series="'+w(t.id)+'">'+Jt(s)+'<span data-part="value"></span></span></li>'}),l){for(var Oa=[],Qt=0;Qt<h;Qt++)Oa.push(At(Da(Qt)));yt+='<li class="chart-entry">'+St(l.kind,0,A)+'<span class="chart-name">'+w(Tt)+'</span><span class="visually-hidden"> </span><span class="chart-value" data-series="plan">'+Jt(Oa)+'<span data-part="value"></span></span></li>'}Lr&&(yt+='<li class="chart-entry">'+St("so-far",0,A,f)+'<span class="chart-name">'+w(mt)+"</span></li>"),Sr&&(yt+='<li class="chart-entry">'+St("missing",0,A)+'<span class="chart-name">'+$+"</span></li>");function Cr(t){for(var a=0;a<c.length;a++){var s=c[a].values[t]==null&&c[a].reasons&&c[a].reasons[t];if(s)return s}return""}function Xt(t,a){var s=Cr(t);return(a?"Latest · ":"")+kr(t)+(s?" · "+s:"")}for(var _a=[],Dt=0;Dt<h;Dt++)_a.push(At(Xt(Dt,!0)),At(Xt(Dt,!1)));var it=function(t){return'<kbd class="kbd">'+t+"</kbd>"};r.textContent="",r.setAttribute("aria-labelledby",at),r.setAttribute("data-kind",n.kind),r.innerHTML='<div class="chart-head"><'+Ca+' id="'+at+'" class="chart-title">'+w(n.title||"")+"</"+Ca+">"+(n.source?'<p class="chart-source">'+w(n.source)+"</p>":"")+'</div><div class="chart-key"><p class="chart-date">'+Jt(_a)+'<span data-part="date"></span></p><ul class="chart-legend" aria-label="Key">'+yt+'</ul></div><div class="chart-plot"><span class="chart-ruler" aria-hidden="true"></span><div class="chart-svg-host"></div><div role="group" aria-roledescription="chart" aria-labelledby="'+at+'" aria-describedby="'+Aa+" "+ka+'" class="chart-days"></div><span id="'+ka+'" class="visually-hidden">Arrow keys move a day, Page Up and Page Down a week, Home and End to the ends.</span></div><p class="chart-hint" data-kbd-hint="" aria-hidden="true"><span>'+it("←")+" "+it("→")+" a day</span><span>"+it("PgUp")+" "+it("PgDn")+" a week</span><span>"+it("Home")+" "+it("End")+' the ends</span></p><div class="chart-foot"><button type="button" class="btn chart-toggle" data-variant="secondary" data-size="sm" aria-expanded="false" aria-controls="'+Sa+'"><span>View as table</span></button></div><div id="'+Sa+'" class="chart-table" hidden></div><figcaption id="'+Aa+'" class="chart-summary">'+w(n.summary||"")+"</figcaption>";for(var P=r.querySelector(".chart-plot"),Yt=r.querySelector(".chart-ruler"),$t=r.querySelector(".chart-svg-host"),gt=r.querySelector(".chart-days"),Tr=r.querySelector('[data-part="date"]'),Ha=r.querySelectorAll(".chart-value"),Ot=r.querySelector(".chart-toggle"),st=r.querySelector(".chart-table"),ta=[],_t=0;_t<h;_t++){var ot=document.createElement("div");ot.setAttribute("role","img"),ot.className="chart-day",ot.setAttribute("data-i",_t),ot.setAttribute("aria-label",wr(Kt,_t)),gt.appendChild(ot),ta.push(ot)}var bt=null;function Dr(){var t=getComputedStyle(P),a=function(s,d){var m=parseFloat(t.getPropertyValue(s));return isFinite(m)?m:d};return{mark:a("--basalt-size-chart-mark",8),cut:a("--basalt-size-cut",2),line:a("--basalt-size-chart-line",2),hair:a("--basalt-size-hairline",1),pitch:a("--basalt-size-hatch-pitch",4),barMax:a("--basalt-size-chart-bar-max",24),barMin:a("--basalt-size-chart-bar-min",2),plot:a("--basalt-size-chart-plot",240),s1:a("--basalt-space-1",4),s2:a("--basalt-space-2",8),lineH:a("--basalt-text-xs-line-height",16),container:a("--basalt-size-breakpoint-container",480),dash:a("--basalt-size-chart-dash",6),dashGap:a("--basalt-size-chart-dash-gap",4)}}var Ht={};function K(t,a){a=a||400;var s=a+"|"+t;return Ht[s]!==void 0?Ht[s]:(Yt.style.fontWeight=String(a),Yt.textContent=t,Ht[s]=Yt.getBoundingClientRect().width)}var zt=null,lt=null,Bt=null,aa=!1;function za(){return jt(Bt===null?h-1:Bt,0,Math.max(h-1,0))}function Ba(){var t=aa?za():lt!==null?lt:zt;return t!==null&&t>=0&&t<h?t:null}var ra=0,i=null,N=Mr(r),ea={sizes:null,draw:function(){j(!0)}};N&&N.members.push(ea);function Or(){var t=bt,a=Math.max(ra,240),s=a<t.container,d=!f&&c.length>1&&!s,m=Math.ceil(Math.max.apply(null,pt.map(function(k,U){return K(La(k,U))})))+t.s2,O=c.map(function(k){return k.name}).concat(l?[Tt]:[]),S=d?Math.ceil(Math.max.apply(null,O.map(function(k){return K(k)})))+2*t.s2:t.s2;N&&N.report(ea,{gutter:m,right:S});var y=s?2:1,_=y*t.lineH+t.s1,x=t.plot,L=Math.max(m,N?N.shared.gutter:0),g=a-Math.max(S,N?N.shared.right:0),B=(g-L)/h;return{width:a,height:_+x+t.s2+t.lineH,narrow:s,laneRows:y,x0:L,x1:g,top:_,plotH:x,bottom:_+x,slot:B,direct:d,lo:nt.lo,hi:nt.hi,barWidth:Math.max(t.barMin,Math.min(t.barMax,Math.round(B*cr))),y:function(k){return _+(1-(k-nt.lo)/(nt.hi-nt.lo))*x},cx:function(k){return L+(k+.5)*B},sx:function(k){return L+k*B}}}var H=(function(){for(var t=[],a=[],s=0;s<h;s++){var d=l?l.values[s]:null;d==null?(t.push(null),a.push(null)):typeof d=="number"?(t.push(d),a.push(null)):(t.push(d[0]),a.push(d[1]))}return{series:c.map(function(m){return m.values.map(function(O){return Vt(O)?O:null})}),planA:t,planB:a}})();function _r(t){var a=bt,s=function(e){return Math.round(e-.5)+.5},d=A+"-hatch",m='<defs><pattern id="'+d+'" patternUnits="userSpaceOnUse" width="'+a.pitch+'" height="'+a.pitch+'" patternTransform="rotate(45)"><line class="chart-hatch-line" x1="'+a.hair/2+'" y1="0" x2="'+a.hair/2+'" y2="'+a.pitch+'"/></pattern></defs>',O=H.series[0]||[],S;pt.forEach(function(e){S===void 0&&vr(e,0)&&(S=e)}),pt.forEach(function(e){var p=s(i.y(e));p<i.top-1||p>i.bottom+1||e===S||(m+='<line class="chart-grid" x1="'+i.x0+'" x2="'+i.x1+'" y1="'+p+'" y2="'+p+'"/>')}),t!==null&&(m+='<rect class="chart-plate" x="'+i.sx(t)+'" y="'+i.top+'" width="'+i.slot+'" height="'+i.plotH+'"/>'),l&&l.kind==="band"&&Gt(0,h-1,function(e){return H.planA[e]==null?"":H.planA[e]+"-"+H.planB[e]}).forEach(function(e){if(e.key){var p=Math.round(i.sx(e.from)),b=Math.round(i.sx(e.to+1)),M=s(i.y(H.planB[e.from])),I=s(i.y(H.planA[e.from]));m+='<rect class="chart-band" x="'+p+'" y="'+M+'" width="'+(b-p)+'" height="'+(I-M)+'"/><line class="chart-band-edge" x1="'+p+'" x2="'+b+'" y1="'+M+'" y2="'+M+'"/><line class="chart-band-edge" x1="'+p+'" x2="'+b+'" y1="'+I+'" y2="'+I+'"/>'}});for(var y=[],_=0;_<h;_++){var x=c.filter(function(e){return e.values[_]==null});y.push(x.length?{key:x.map(function(e){return e.id}).join("+")+":"+(x[0].reasons&&x[0].reasons[_]||""),names:x.map(function(e){return e.name}),all:x.length===c.length,why:x[0].reasons&&x[0].reasons[_]||void 0}:null)}var L=Gt(0,h-1,function(e){return y[e]?y[e].key:""}).filter(function(e){return e.key});if(L.forEach(function(e){var p=Math.round(i.sx(e.from)),b=Math.round(i.sx(e.to+1));m+='<rect class="chart-hatch" x="'+p+'" y="'+i.top+'" width="'+(b-p)+'" height="'+i.plotH+'" fill="url(#'+d+')"/>'}),S!==void 0){var g=s(i.y(S));m+='<line class="chart-baseline" x1="'+i.x0+'" x2="'+i.x1+'" y1="'+g+'" y2="'+g+'"/>'}if(f){for(var B=i.barWidth,k=Math.round(i.y(Math.max(i.lo,0))),U=0;U<h;U++){var V=O[U];if(V!=null){var G=Math.round(i.cx(U)-B/2),q=Math.round(i.y(V));if(U===R){var Q=a.line/2;m+='<rect class="chart-bar" data-so-far="" x="'+(G+Q)+'" y="'+(q+Q)+'" width="'+Math.max(B-2*Q,0)+'" height="'+Math.max(k-q-2*Q,0)+'"/>'}else k-q>0&&(m+='<rect class="chart-bar" x="'+G+'" y="'+q+'" width="'+B+'" height="'+(k-q)+'"/>')}}for(var F=0;F<h;F++){var Ka=H.planA[F],Ja=O[F];if(!(Ka==null||Ja==null)){var wt=Math.round(i.y(Ka)),Qa=Math.round(i.y(Ja)),Mt=a.line/2,Xa=Math.round(i.cx(F)-B/2);Qa<=wt-Mt-a.cut-2&&(m+='<rect class="chart-cut" x="'+Xa+'" y="'+(wt-Mt-a.cut)+'" width="'+B+'" height="'+a.cut+'"/>'),Qa<=wt-Mt&&k>wt+Mt+a.cut&&(m+='<rect class="chart-cut" x="'+Xa+'" y="'+(wt+Mt)+'" width="'+B+'" height="'+a.cut+'"/>')}}}if(l&&l.kind==="value"&&Gt(0,h-1,function(e){return H.planA[e]==null?"":String(H.planA[e])}).forEach(function(e){if(e.key){var p=Math.round(i.y(H.planA[e.from]));m+='<line class="chart-plan" x1="'+Math.round(i.sx(e.from))+'" x2="'+Math.round(i.sx(e.to+1))+'" y1="'+p+'" y2="'+p+'"/>'}}),!f)for(var Pr=i.slot>=hr*a.mark,ct=c.length-1;ct>=0;ct--){var Nr=c[ct],Fr=H.series[ct]||[],ht=Fr.map(function(e,p){return e==null?null:{i:p,x:i.cx(p),y:i.y(e)}}),Ya=ht.filter(function(e,p){if(!e)return!1;var b=p>0?ht[p-1]:void 0,M=p<ht.length-1?ht[p+1]:void 0,I=p>0&&!b||p<ht.length-1&&!M,qt=!b&&!M;return Pr||e.i===t||e.i===h-1||e.i===R||I||qt}),$a=ga[ct]||"disc",oa="",la=!1;ht.forEach(function(e){if(!e){la=!1;return}oa+=(la?"L":"M")+e.x.toFixed(1)+" "+e.y.toFixed(1),la=!0}),m+='<g data-series="'+w(Nr.id)+'" class="chart-series">'+Ya.map(function(e){return kt($a,e.x,e.y,a.mark/2,"chart-ring",a.cut)}).join("")+(oa?'<path class="chart-line" data-dash="'+(ba[ct]||"solid")+'" d="'+oa+'"/>':"")+Ya.map(function(e){return kt($a,e.x,e.y,a.mark/2,"chart-mark",0,e.i===R,a.line)}).join("")+"</g>"}for(var Pt=[],tr=0;tr<i.laneRows;tr++)Pt.push(-1/0);L.forEach(function(e,p){for(var b=y[e.from],M=p%i.laneRows,I=L[p+i.laneRows],qt=L[p-1],Wr=Math.round(i.sx(e.from)),jr=Math.round(i.sx(e.to+1)),sr=I?Math.round(i.sx(I.from))-a.s2*2:i.width,Vr=qt?Math.round(i.sx(qt.to+1))+a.s2:-1/0,va=b.all?$:b.names.join(" and ")+" not observed",ma=[b.why?va+" · "+b.why:va,va,$],Wt=0;Wt<ma.length;Wt++){var or=ma[Wt],pa=K(or),X=Math.max(Wr,Pt[M]+a.s2*2);if(X+pa>sr){if(Wt<ma.length-1)continue;X=sr-pa}if(!(X<Vr||X<Pt[M]+a.s2*2||X>jr)){m+='<text class="chart-lane" x="'+X+'" y="'+(M*a.lineH+a.lineH/2)+'">'+w(or)+"</text>",Pt[M]=X+pa;break}}}),pt.forEach(function(e,p){var b=i.y(e);b<i.top-1||b>i.bottom+1||(m+='<text class="chart-axis" x="'+(i.x0-a.s2)+'" y="'+b+'" text-anchor="end">'+w(La(e,p))+"</text>")});var Et=Math.ceil(lr/i.slot),Nt=[];if(Et<=1)for(var ua=0;ua<h;ua++)Nt.push(ua);else if(h<=14)for(var ca=h-1;ca>=0;ca-=Et)Nt.push(ca);else for(var Ur=Math.ceil(Et/7),ar=0,Ft=h-1;Ft>=0;Ft--)new Date(et[Ft]).getUTCDay()===1&&(ar%Ur===0&&Nt.push(Ft),ar++);var qr=i.slot*Math.max(Et,1)>=ur&&Et<=1,rr=function(e){return(qr?rt.withDay:rt.short).format(et[e])},er=i.bottom+a.s2+a.lineH/2,nr=function(e,p){var b=K(p);return e+b/2>i.width?"end":e-b/2<0?"start":"middle"},Ut=t===null?null:rr(t),ha=t===null?null:[i.cx(t)-K(Ut)/2-a.s2,i.cx(t)+K(Ut)/2+a.s2];if(Nt.forEach(function(e){if(e!==t){var p=rr(e),b=K(p),M=i.cx(e);if(!(ha&&M+b/2>ha[0]&&M-b/2<ha[1])){var I=nr(M,p);m+='<text class="chart-axis" x="'+(I==="end"?i.width:I==="start"?0:M)+'" y="'+er+'" text-anchor="'+I+'">'+w(p)+"</text>"}}}),t!==null){var fa=nr(i.cx(t),Ut);m+='<text class="chart-axis" data-active="" x="'+(fa==="end"?i.width:fa==="start"?0:i.cx(t))+'" y="'+er+'" text-anchor="'+fa+'">'+w(Ut)+"</text>"}if(i.direct){var W=[];c.forEach(function(e,p){for(var b=H.series[p]||[],M=h-1;M>=0;M--)if(b[M]!=null){W.push({name:e.name,y:i.y(b[M])});break}});var da=H.planA[h-1],ir=H.planB[h-1];l&&da!=null&&W.push({name:Tt,y:i.y(ir==null?da:(da+ir)/2)}),W.sort(function(e,p){return e.y-p.y});for(var ft=1;ft<W.length;ft++)W[ft].y-W[ft-1].y<a.lineH&&(W[ft].y=W[ft-1].y+a.lineH);W.forEach(function(e){m+='<text class="chart-direct" x="'+(i.x1+a.s2)+'" y="'+e.y+'">'+w(e.name)+"</text>"})}return'<svg class="chart-svg" width="'+i.width+'" height="'+i.height+'" viewBox="0 0 '+i.width+" "+i.height+'" aria-hidden="true" focusable="false">'+m+"</svg>"}function Hr(t,a){Tr.textContent=Xt(t,a===null);var s=0;if(c.forEach(function(S){var y=Ha[s++].querySelector('[data-part="value"]');y.textContent=Ta(S,t),S.values[t]==null?y.setAttribute("data-missing",""):y.removeAttribute("data-missing")}),l){var d=Ha[s].querySelector('[data-part="value"]'),m=l.values[t],O=l.kind==="value"&&l.notes?l.notes[t]:void 0;d.textContent=Da(t),m==null&&!O?d.setAttribute("data-missing",""):d.removeAttribute("data-missing")}}var na,Ra=".chart-bar, .chart-plan, .chart-band, .chart-band-edge, .chart-line, .chart-ring, .chart-mark",D=null,Ia=!n.entrance||!!u,Pa=!1,Na="basalt-entrance:"+location.pathname;function Fa(){try{localStorage.setItem(Na,"seen")}catch{}}function ia(t,a){var s=/^\s*([\d.]+)(ms|s)\s*$/.exec(getComputedStyle(document.documentElement).getPropertyValue(t));return s?Number(s[1])*(s[2]==="s"?1e3:1):a}function zr(){var t=P.getBoundingClientRect();if(matchMedia("(prefers-reduced-motion: reduce)").matches||matchMedia("print").matches||document.documentElement.getAttribute("data-loops")==="held"||document.visibilityState==="hidden"||performance.now()-(Y.pageChangedAt||0)>1e3)return!1;try{if(localStorage.getItem(Na)==="seen")return!1}catch{}return t.bottom>0&&t.top<innerHeight}function Rt(){D&&(clearTimeout(D.timer),D=null,Fa(),j(!0))}function Br(){var t=$t.querySelectorAll(Ra),a=D.from,s=ia("--basalt-duration-slow",200),d=a?s:ia("--basalt-duration-figure",600),m=!a&&t.length>1?Math.min(ia("--basalt-duration-stagger",22),s/(t.length-1)):0,O=getComputedStyle(document.documentElement).getPropertyValue("--basalt-ease-out").trim()||"cubic-bezier(0.16, 1, 0.3, 1)",S=performance.now()-D.t0;Array.prototype.forEach.call(t,function(y,_){var x,L=y.style,g=a&&a[_];if(y.classList.contains("chart-bar")){L.transformBox="fill-box",L.transformOrigin="50% 100%";var B=g&&g.k==="bar"&&y.getBBox().height>0?Math.min(g.h*g.s/y.getBBox().height,4):0;x=[{transform:"scaleY("+(a?B:0)+")"},{transform:"scaleY(1)"}]}else{var k=y.classList.contains("chart-line"),U=k&&y.getAttribute("data-dash")==="solid"&&y.getTotalLength&&y.getTotalLength()>0,V,G;if(U){var q=y.getTotalLength(),Q=q+2*(parseFloat(getComputedStyle(y).strokeWidth)||2);L.strokeDasharray=q+" "+q*2,V={strokeDashoffset:String(g&&g.k==="line"?g.p*Q:Q)},G={strokeDashoffset:"0"}}else V={opacity:g&&g.o!==void 0?g.o:0},G={opacity:1};if(g&&k&&g.d&&y.getAttribute("d")&&g.d.replace(/[-\d.]+/g,"")===y.getAttribute("d").replace(/[-\d.]+/g,""))V.d='path("'+g.d+'")',G.d='path("'+y.getAttribute("d")+'")';else if(g&&!k&&g.cx!==void 0){var F=y.getBBox();V.transform="translate("+(g.cx-(F.x+F.width/2))+"px, "+(g.cy-(F.y+F.height/2))+"px)",G.transform="none"}x=[V,G]}y.animate(x,{duration:d,delay:_*m,easing:O,fill:"backwards"}).currentTime=S}),D.timer||(D.timer=setTimeout(Rt,Math.max(0,(t.length-1)*m+d-S)+20))}function Rr(){return D?Array.prototype.map.call($t.querySelectorAll(Ra),function(t){var a=getComputedStyle(t);if(t.classList.contains("chart-bar"))return{k:"bar",s:!a.transform||a.transform==="none"?1:new DOMMatrixReadOnly(a.transform).d,h:t.getBBox().height};var s=t.getBBox(),d={cx:s.x+s.width/2,cy:s.y+s.height/2,o:parseFloat(a.opacity)};return t.classList.contains("chart-line")&&(d.d=t.getAttribute("d")),t.classList.contains("chart-line")&&t.style.strokeDasharray?(d.k="line",d.p=parseFloat(a.strokeDashoffset)/(parseFloat(t.style.strokeDasharray)+2*(parseFloat(a.strokeWidth)||2))):d.k="fade",d}):null}function Ua(t){t.detail&&t.detail.held&&Rt()}document.addEventListener("basalt:loops",Ua);var xt=matchMedia("print");function qa(){xt.matches&&Rt()}xt.addEventListener&&xt.addEventListener("change",qa);function Wa(){Rt()}window.addEventListener("beforeprint",Wa);function j(t){if(!(!bt||!h)){var a=Ba();i=Or(),P.style.height=i.height+"px",$t.innerHTML=_r(a),D&&Br(),r.toggleAttribute("data-narrow",i.narrow);var s=za();ta.forEach(function(d,m){d.style.left=i.x0+m*i.slot+"px",d.style.top=i.top+"px",d.style.width=i.slot+"px",d.style.height=i.plotH+"px",d.tabIndex=m===s?0:-1,d.toggleAttribute("data-active",a===m)}),(t||a!==na)&&Hr(a===null?h-1:a,a),na=a}}function ut(){Ba()!==na&&j()}function ja(){ra=P.clientWidth,bt||(bt=Dr()),Ia?u&&!D&&!Pa&&(Pa=!0,D={t0:performance.now(),timer:0,from:u}):(Ia=!0,zr()&&(D={t0:performance.now(),timer:0,from:null})),j(!0)}function sa(t){if(!i)return null;var a=t.clientX-P.getBoundingClientRect().left;return a<i.x0||a>i.x1?null:jt(Math.floor((a-i.x0)/i.slot),0,h-1)}P.addEventListener("pointermove",function(t){if(t.pointerType==="touch"){t.buttons!==0&&(lt=sa(t),ut());return}zt=sa(t),ut()}),P.addEventListener("pointerdown",function(t){var a=sa(t);t.pointerType==="touch"?lt=a:zt=a,ut()}),P.addEventListener("pointerleave",function(t){t.pointerType!=="touch"&&(zt=null,ut())});var Va=function(t){lt!==null&&t.composedPath().indexOf(P)===-1&&(lt=null,ut())};document.addEventListener("pointerdown",Va),gt.addEventListener("keydown",function(t){var a=Number(t.target.getAttribute("data-i"));if(!(!isFinite(a)||t.target.getAttribute("data-i")===null)){var s=a;if(t.key==="ArrowRight")s=a+1;else if(t.key==="ArrowLeft")s=a-1;else if(t.key==="PageDown")s=a+7;else if(t.key==="PageUp")s=a-7;else if(t.key==="Home")s=0;else if(t.key==="End")s=h-1;else return;t.preventDefault(),s=jt(s,0,h-1),Bt=s,ta[s].focus({preventScroll:!0}),ut(),j(!0)}}),gt.addEventListener("focusin",function(t){var a=t.target.getAttribute&&t.target.getAttribute("data-i");a!=null&&(Bt=Number(a),aa=!0,j(!0))}),gt.addEventListener("focusout",function(t){gt.contains(t.relatedTarget)||(aa=!1,j(!0))});var J=null;function Ir(){for(var t=['<col style="width:8rem">'].concat(c.map(function(){return'<col style="width:7.5rem">'}),l?['<col style="width:8.5rem">']:[],["<col>"]),a="",s=h-1;s>=0;s--){var d=[],m=c.map(function(x){var L=x.values[s];if(L==null){var g=x.reasons&&x.reasons[s];return g&&d.push((c.length>1?x.name+" ":"")+g),'<td data-numeric=""><span class="chart-not-observed">'+$+"</span></td>"}return'<td data-numeric="">'+w(C(L)+(s===R?" "+Z:""))+"</td>"}).join(""),O=l&&l.values[s],S=l&&l.kind==="value"&&l.notes?l.notes[s]:void 0;l&&O==null&&S&&d.push(S);var y=wa(d).join("; ");a+='<tr><th scope="row">'+w(rt.withDay.format(et[s]))+"</th>"+m+(l?'<td data-numeric="">'+(O==null?"":w(Ma(Kt,O)))+"</td>":"")+'<td class="chart-note">'+w(y?y.charAt(0).toUpperCase()+y.slice(1):"")+"</td></tr>"}var _="calc("+(t.length-1)+" * 8rem + 12rem)";return'<div class="panel table-wrap" role="region" aria-label="'+w((n.title||"")+" table")+'" tabindex="0"><table style="min-width:'+_+'"><colgroup>'+t.join("")+'</colgroup><caption class="visually-hidden">'+w((n.title||"")+", newest first")+'</caption><thead><tr><th scope="col">Date</th>'+c.map(function(x){return'<th scope="col" data-numeric="">'+w(x.name)+"</th>"}).join("")+(l?'<th scope="col" data-numeric="">'+w(Tt)+"</th>":"")+'<th scope="col">Note</th></tr></thead><tbody>'+a+"</tbody></table></div>"}Ot.addEventListener("click",function(){var t=Ot.getAttribute("aria-expanded")!=="true";if(Ot.setAttribute("aria-expanded",String(t)),Ot.firstElementChild.textContent=t?"Hide the table":"View as table",J&&(J.disconnect(),J=null),!t){st.hidden=!0,st.textContent="";return}st.innerHTML=Ir(),st.hidden=!1;var a=st.firstElementChild,s=null,d=function(){a.toggleAttribute("data-scrolled",Math.abs(a.scrollLeft)>0);var m=a.scrollWidth>a.clientWidth+1;m&&!s?(s=document.createElement("p"),s.className="chart-scroll-hint",s.textContent="Scroll sideways for every column.",st.appendChild(s)):!m&&s&&(s.remove(),s=null)};a.addEventListener("scroll",d,{passive:!0}),d(),typeof ResizeObserver=="function"&&(J=new ResizeObserver(d),J.observe(a))});var It=null,Ga=!0;typeof ResizeObserver=="function"&&(It=new ResizeObserver(function(){(Math.abs(P.clientWidth-ra)>=.5||!i)&&ja()}),It.observe(P)),ja(),document.fonts&&document.fonts.ready&&document.fonts.ready.then(function(){Ga&&(Ht={},j(!0))});var Za={drawn:Rr,destroy:function(){Ga=!1,D&&(clearTimeout(D.timer),D=null,Fa()),document.removeEventListener("basalt:loops",Ua),xt.removeEventListener&&xt.removeEventListener("change",qa),window.removeEventListener("beforeprint",Wa),It&&It.disconnect(),J&&J.disconnect(),document.removeEventListener("pointerdown",Va),N&&N.members.splice(N.members.indexOf(ea),1),r.__bhChart=null}};return r.__bhChart=Za,Za}function Er(){document.querySelectorAll('script[type="application/json"][data-chart]').forEach(function(r){var o=r.parentElement;if(!(!o||o.__bhChart||r.__bh)){r.__bh=!0;var u;try{u=JSON.parse(r.textContent)}catch(n){console.warn("Basalt: a chart's data is not valid JSON ("+n.message+")");return}r.remove();try{Ea(o,u)}catch(n){console.warn("Basalt: chart not drawn: "+n.message)}}})}Y.pageChange=function(r){Y.pageChangedAt=r===void 0?performance.now():r},Y.chart=Ea,Y.trailingMean=mr,ya.step(60,"wireCharts",Er)})(window.Basalt); diff --git a/.agent/skills/basalt-html/parts/code.css b/.agent/skills/basalt-html/parts/code.css index c1e35693..820acbd8 100644 --- a/.agent/skills/basalt-html/parts/code.css +++ b/.agent/skills/basalt-html/parts/code.css @@ -1 +1 @@ -@layer basalt{.code{border-radius:var(--basalt-radius-md);background-color:var(--panel-well);font:var(--basalt-font-weight-regular) var(--bh-sm-mono)}pre.code,.code-body{margin:0;padding:var(--basalt-space-3) var(--basalt-space-4);overflow:auto;tab-size:2}.code code{font:inherit}.code-head{display:flex;align-items:center;gap:var(--basalt-space-2);min-height:var(--basalt-size-control-lg);padding:var(--basalt-space-1) var(--basalt-space-2) var(--basalt-space-1) var(--basalt-space-4);font:var(--basalt-font-weight-medium) var(--bh-xs);color:var(--basalt-text-secondary);border-bottom:var(--basalt-size-hairline) solid var(--basalt-border-divider)}.tok-k{color:var(--basalt-syntax-keyword)}.tok-s{color:var(--basalt-syntax-string)}.tok-n{color:var(--basalt-syntax-constant)}.tok-f{color:var(--basalt-syntax-function)}.tok-c{color:var(--basalt-syntax-comment)}@media print{pre.code,.code-body{white-space:pre-wrap;overflow-wrap:anywhere;overflow:visible}}} +@layer basalt{.code{border-radius:var(--basalt-radius-md);background-color:var(--panel-well);font:var(--basalt-font-weight-regular) var(--bh-sm-mono)}pre.code,.code-body{margin:0;padding:var(--basalt-space-3) var(--basalt-space-4);overflow:auto;tab-size:2}.code code{font:inherit}.code-head{display:flex;align-items:center;gap:var(--basalt-space-2);min-height:var(--basalt-size-control-lg);padding-block:var(--basalt-space-1);padding-inline:var(--basalt-space-4);--basalt-edge-room: var(--basalt-space-4);--basalt-edge-room-start: initial;--basalt-edge-room-end: initial;font:var(--basalt-font-weight-medium) var(--bh-xs);color:var(--basalt-text-secondary);border-bottom:var(--basalt-size-hairline) solid var(--basalt-border-divider)}.tok-k{color:var(--basalt-syntax-keyword)}.tok-s{color:var(--basalt-syntax-string)}.tok-n{color:var(--basalt-syntax-constant)}.tok-f{color:var(--basalt-syntax-function)}.tok-c{color:var(--basalt-syntax-comment)}@media print{pre.code,.code-body{white-space:pre-wrap;overflow-wrap:anywhere;overflow:visible}}} diff --git a/.agent/skills/basalt-html/parts/command-list.css b/.agent/skills/basalt-html/parts/command-list.css index 3a908582..1f82d17c 100644 --- a/.agent/skills/basalt-html/parts/command-list.css +++ b/.agent/skills/basalt-html/parts/command-list.css @@ -1 +1 @@ -@layer basalt{.command-list{display:block;min-width:0}.command-list[data-pane]{container-type:inline-size}.command-split{display:grid;grid-template-columns:minmax(0,1fr);gap:var(--basalt-space-4);align-items:stretch;min-width:0}.command-page,.command-pane{box-sizing:border-box;display:flex;flex-direction:column;min-width:0;overflow:clip}.command-page:focus{outline:none}.command-page .input-row>input{letter-spacing:normal}.command-slot{display:inline-flex;flex:none;align-items:center;justify-content:center;width:var(--basalt-size-icon-sm);height:var(--basalt-size-icon-sm);color:var(--basalt-text-tertiary)}.command-body{position:relative;flex:none;height:var(--held, auto);max-height:var(--basalt-size-popup-max-height)}.command-results{position:relative;box-sizing:border-box;height:100%;max-height:var(--basalt-size-popup-max-height);overflow-y:auto;overscroll-behavior:contain;padding:var(--basalt-space-0-5) var(--basalt-space-1);scroll-padding-block:var(--basalt-space-0-5)}.command-sizer>[role=group]+[role=group]{margin-top:var(--basalt-space-1)}.command-none{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--basalt-space-3);padding:var(--basalt-space-6) var(--basalt-space-4);text-align:center;font:var(--basalt-font-weight-regular) var(--bh-sm);color:var(--basalt-text-secondary)}.command-none p{margin:0;overflow-wrap:anywhere}.command-foot{display:flex;flex-wrap:wrap;align-items:center;gap:var(--basalt-space-2) var(--basalt-space-4);flex:none;padding:var(--basalt-space-2) var(--basalt-space-4);border-top:var(--basalt-size-hairline) solid var(--basalt-border-divider);color:var(--basalt-text-secondary)}.command-count{margin:0;font:var(--basalt-font-weight-regular) var(--bh-xs);font-variant-numeric:tabular-nums}.command-hints{display:inline-flex;flex-wrap:wrap;gap:var(--basalt-space-4);margin-inline-start:auto;font:var(--basalt-font-weight-regular) var(--bh-xs)}.command-hints>span{display:inline-flex;align-items:center;gap:var(--basalt-space-1-5)}.command-results[data-idle] .row:is([data-active],[aria-selected=true]){color:var(--basalt-text-secondary);transition-duration:var(--basalt-duration-fast)}.command-results[data-idle] .row:is([data-active],[aria-selected=true]):before{background-color:transparent;transition-duration:var(--basalt-duration-fast)}.command-results[data-idle] .row[data-danger]:is([data-active],[aria-selected=true]){color:var(--basalt-status-danger)}.command-results[data-idle] .row:is([data-active],[aria-selected=true]) .row-description{color:var(--basalt-text-tertiary)}@container (width >= 816px){.command-split{grid-template-columns:var(--basalt-size-list-width) minmax(0,1fr)}.command-split .command-pane{contain:size;overflow:auto}}@container (width < 816px){.command-split:not([data-mode])>.command-pane{display:none}.command-split:not([data-mode]) .row-chevron{display:block}}.command-split[data-mode=push] .row-chevron{display:block}.command-split[data-mode=push][data-view=list]>.command-pane,.command-split[data-mode=push][data-view=detail]>.command-page{display:none}.command-pane-body{flex:1;min-height:0;padding:var(--basalt-space-6)}.command-split[data-mode=push] .command-pane-body{padding:var(--basalt-space-4)}.command-pane-body :is(h1,h2,h3,h4,h5,h6):focus{outline:none}.command-pane-empty{margin:0;color:var(--basalt-text-secondary);font-size:var(--basalt-text-sm-size)}.command-back{display:none;flex:none;align-items:center;padding:var(--basalt-space-1-5);border-bottom:var(--basalt-size-hairline) solid var(--basalt-border-divider)}.command-split[data-mode=push] .command-back{display:flex}@media(hover:hover){.command-split[data-mode=split] .row:not([aria-selected=true]):hover{color:var(--basalt-text-primary)}.command-split[data-mode=split] .row:not([aria-selected=true]):hover .row-description{color:var(--basalt-text-secondary)}}.command-split{--push: 1}.command-split:dir(rtl){--push: -1}@keyframes push-in{0%{opacity:0;transform:translate(calc(var(--push) * var(--basalt-space-2)))}}@keyframes push-out{0%{opacity:0;transform:translate(calc(var(--push) * -1 * var(--basalt-space-2)))}}@keyframes push-fade{0%{opacity:0}}.command-split[data-mode=push][data-enter=next]>.command-pane{animation:push-in var(--basalt-duration-slow) var(--basalt-ease-out)}.command-split[data-mode=push][data-enter=prev]>.command-page{animation:push-out var(--basalt-duration-slow) var(--basalt-ease-out)}@media(prefers-reduced-motion:reduce){.command-split[data-mode=push][data-enter=next]>.command-pane{animation-name:push-fade}.command-split[data-mode=push][data-enter=prev]>.command-page{animation-name:push-fade}}@media(forced-colors:active){.command-results[data-idle] .row:is([data-active],[aria-selected=true]){forced-color-adjust:auto;color:CanvasText}.command-results[data-idle] .row:is([data-active],[aria-selected=true]):before{background-color:transparent}.command-results[data-idle] .row:is([data-active],[aria-selected=true]) :is(svg,.row-label,.row-hint,.row-description,.status,.badge){color:CanvasText}.command-results[data-idle] .row:is([data-active],[aria-selected=true]) .kbd{background:Canvas;border-color:GrayText;color:CanvasText}.command-count,.command-none{color:CanvasText}}} +@layer basalt{.command-list{display:block;min-width:0;min-block-size:var(--held-page, auto)}:is(:is(.panel,.card,.callout,.code,.table-wrap),dialog,[popover]) .command-list,.command-list[data-reserve=off]{min-block-size:0}.command-list[data-pane]{container-type:inline-size}.command-split{display:grid;grid-template-columns:minmax(0,1fr);gap:var(--basalt-space-4);align-items:stretch;min-width:0}.command-page,.command-pane{box-sizing:border-box;display:flex;flex-direction:column;min-width:0;overflow:clip}.command-page:focus{outline:none}.command-page .input-row>input{letter-spacing:normal}.command-slot{display:inline-flex;flex:none;align-items:center;justify-content:center;width:var(--basalt-size-icon-sm);height:var(--basalt-size-icon-sm);color:var(--basalt-text-tertiary)}.command-body{position:relative;flex:none;max-height:var(--basalt-size-popup-max-height)}.command-split[data-mode] .command-body{height:var(--held, auto)}.command-split[data-mode] .command-results{height:100%}.command-results{position:relative;box-sizing:border-box;max-height:var(--basalt-size-popup-max-height);overflow-y:auto;overscroll-behavior:contain;padding:var(--basalt-space-0-5) var(--basalt-space-1);scroll-padding-block:var(--basalt-space-0-5)}.command-sizer>[role=group]+[role=group]{margin-top:var(--basalt-space-1)}.command-split[data-mode] .command-none{position:absolute;inset:0}.command-none[data-measure]{position:absolute;inset-inline:0;top:0;visibility:hidden}.command-none{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--basalt-space-3);padding:var(--basalt-space-6) var(--basalt-space-4);text-align:center;font:var(--basalt-font-weight-regular) var(--bh-sm);color:var(--basalt-text-secondary)}.command-none p{margin:0;overflow-wrap:anywhere}.command-foot{display:flex;flex-wrap:wrap;align-items:center;gap:var(--basalt-space-2) var(--basalt-space-4);flex:none;padding:var(--basalt-space-2) var(--basalt-space-4);border-top:var(--basalt-size-hairline) solid var(--basalt-border-divider);color:var(--basalt-text-secondary)}.command-count{margin:0;font:var(--basalt-font-weight-regular) var(--bh-xs);font-variant-numeric:tabular-nums}.command-hints{display:inline-flex;flex-wrap:wrap;gap:var(--basalt-space-4);margin-inline-start:auto;font:var(--basalt-font-weight-regular) var(--bh-xs)}.command-hints>span{display:inline-flex;align-items:center;gap:var(--basalt-space-1-5)}.command-results[data-idle] .row:is([data-active],[aria-selected=true]){color:var(--basalt-text-secondary);transition-duration:var(--basalt-duration-fast)}.command-results[data-idle] .row:is([data-active],[aria-selected=true]):before{background-color:transparent;transition-duration:var(--basalt-duration-fast)}.command-results[data-idle] .row[data-danger]:is([data-active],[aria-selected=true]){color:var(--basalt-status-danger)}.command-results[data-idle] .row:is([data-active],[aria-selected=true]) .row-description{color:var(--basalt-text-tertiary)}@container (width >= 816px){.command-split{grid-template-columns:var(--basalt-size-list-width) minmax(0,1fr)}.command-split .command-pane{contain:size;overflow:auto}}@container (width < 816px){.command-split:not([data-mode])>.command-pane{display:none}.command-split:not([data-mode]) .row-chevron{display:block}}.command-split[data-mode=push] .row-chevron{display:block}.command-split[data-mode=push][data-view=list]>.command-pane,.command-split[data-mode=push][data-view=detail]>.command-page{display:none}.command-pane-body{flex:1;min-height:0;padding:var(--basalt-space-6)}.command-split[data-mode=push] .command-pane-body{padding:var(--basalt-space-4)}.command-pane-body :is(h1,h2,h3,h4,h5,h6):focus{outline:none}.command-pane-empty{margin:0;color:var(--basalt-text-secondary);font-size:var(--basalt-text-sm-size)}.command-back{display:none;flex:none;align-items:center;padding:var(--basalt-space-1-5);border-bottom:var(--basalt-size-hairline) solid var(--basalt-border-divider)}.command-split[data-mode=push] .command-back{display:flex}@media(hover:hover){.command-split[data-mode=split] .row:not([aria-selected=true]):hover{color:var(--basalt-text-primary)}.command-split[data-mode=split] .row:not([aria-selected=true]):hover .row-description{color:var(--basalt-text-secondary)}}.command-split{--push: 1}.command-split:dir(rtl){--push: -1}@keyframes push-in{0%{opacity:0;transform:translate(calc(var(--push) * var(--basalt-space-2)))}}@keyframes push-out{0%{opacity:0;transform:translate(calc(var(--push) * -1 * var(--basalt-space-2)))}}@keyframes push-fade{0%{opacity:0}}.command-split[data-mode=push][data-enter=next]>.command-pane{animation:push-in var(--basalt-duration-slow) var(--basalt-ease-out)}.command-split[data-mode=push][data-enter=prev]>.command-page{animation:push-out var(--basalt-duration-slow) var(--basalt-ease-out)}@media(prefers-reduced-motion:reduce){.command-split[data-mode=push][data-enter=next]>.command-pane{animation-name:push-fade}.command-split[data-mode=push][data-enter=prev]>.command-page{animation-name:push-fade}}@media(forced-colors:active){.command-results[data-idle] .row:is([data-active],[aria-selected=true]){forced-color-adjust:auto;color:CanvasText}.command-results[data-idle] .row:is([data-active],[aria-selected=true]):before{background-color:transparent}.command-results[data-idle] .row:is([data-active],[aria-selected=true]) :is(svg,.row-label,.row-hint,.row-description,.status,.badge){color:CanvasText}.command-results[data-idle] .row:is([data-active],[aria-selected=true]) .kbd{background:Canvas;border-color:GrayText;color:CanvasText}.command-count,.command-none{color:CanvasText}}} diff --git a/.agent/skills/basalt-html/parts/command-list.js b/.agent/skills/basalt-html/parts/command-list.js index 9ab16649..376129ec 100644 --- a/.agent/skills/basalt-html/parts/command-list.js +++ b/.agent/skills/basalt-html/parts/command-list.js @@ -1 +1 @@ -(function(H){"use strict";var g=H._,k=g.palette,w=g.esc,z=g.kbd.kbdGroup,ce=0,V=!1,G=' viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="2.25" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"',ue='<svg class="icon row-chevron"'+G+'><path d="M9 6L15 12M15 12L9 18"/></svg>',ve='<svg class="icon"'+G+'><path d="M15 18L9 12M9 12L15 6"/></svg>';function P(a,i,p){var f=parseFloat(getComputedStyle(a).getPropertyValue(i));return isFinite(f)?f:p}function J(a,i){if(a.__bhCommandList)return a.__bhCommandList;var p="bh-cl-"+ ++ce,f=i.label||a.getAttribute("data-label")||"Commands",N=i.noun||a.getAttribute("data-noun")||"command",W=i.placeholder||a.getAttribute("data-placeholder")||"Search commands",U=i.groups||[];U.forEach(function(e,t){(e.items||[]).forEach(function(d,v){d.id==null&&(d.id="g"+t+"c"+v)})});var o=typeof i.detail=="function"?i.detail:a.querySelector("template[data-detail]")?function(e){var t=a.querySelector('template[data-detail="'+String(e.id).replace(/["\\]/g,"\\$&")+'"]');return t?t.content.cloneNode(!0):""}:null,B=k.rows(U,p,"",o?ue:""),E=B.flat,A=E.length;a.insertAdjacentHTML("beforeend",'<div class="command-split"><div class="panel command-page" tabindex="-1" role="region" aria-label="'+w(f)+'"><div class="input-row">'+g.searchSvg+'<input type="text" role="combobox" aria-expanded="true" aria-controls="'+p+'-list" aria-autocomplete="list" aria-label="'+w(W)+'" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" placeholder="'+w(W)+'"><span class="command-slot" aria-hidden="true"></span></div><div class="command-body"><div class="command-results" id="'+p+'-list" role="listbox" aria-label="'+w(f)+'" tabindex="-1" data-idle><div class="command-sizer">'+B.html+'</div></div><div class="command-none" hidden><p></p><button type="button" class="btn" data-variant="ghost" data-size="sm">Clear search</button></div></div><div hidden>'+B.words+'</div><div class="command-foot"><p class="command-count"><span aria-hidden="true"></span><span role="status" aria-live="polite" aria-atomic="true" class="visually-hidden"></span></p><span class="command-hints" data-kbd-hint aria-hidden="true"><span>'+z(["↑","↓"])+" Move</span><span>"+z(["↵"])+(o?" Open":" Run")+"</span>"+(o?"":"<span>"+z(["Esc"])+" Clear</span>")+"</span></div></div>"+(o?'<div class="panel command-pane" role="region"><div class="command-back"><button type="button" class="btn" data-variant="ghost" data-size="sm" aria-label="Back to '+w(f)+'">'+ve+w(f)+'</button></div><div class="command-pane-body"></div></div>':"")+"</div>");var c=a.lastElementChild;c.setAttribute("data-view","list");var m=c.firstElementChild,u=o?c.lastElementChild:null,n=m.querySelector("input"),l=m.querySelector(".command-results"),C=l.firstElementChild,pe=m.querySelector(".command-body"),K=m.querySelector(".command-none"),$=m.querySelector(".command-count").firstChild,Q=m.querySelector(".command-count").lastChild,_=Array.prototype.slice.call(l.querySelectorAll(".row")),fe=Array.prototype.slice.call(C.children),T=document.createElement("span");T.className="plate",T.setAttribute("aria-hidden","true"),l.insertBefore(T,C),o&&a.setAttribute("data-pane","");var s=_.map(function(e,t){return t}),h=-1,M="",D=!1,I=!1,y="push",X="list",F="key",Y=0,Z=NaN,S=u&&u.querySelector(".command-pane-body"),ee=$.textContent=Q.textContent=A+" "+(A===1?N:N+"s"),te;function me(e){$.textContent=e,clearTimeout(te),e!==ee&&(te=setTimeout(function(){Q.textContent=ee=e},400))}function L(){l.toggleAttribute("data-idle",!(o&&y==="split")&&!D&&!I)}function ae(){if(!M){var e=getComputedStyle(l);pe.style.setProperty("--held",C.getBoundingClientRect().height+parseFloat(e.paddingTop)+parseFloat(e.paddingBottom)+"px")}}function re(){var e=E[h],t=u.querySelector("h1, h2, h3, h4, h5, h6");return t?(t.id=t.id||p+"-h",t.tabIndex=-1,u.setAttribute("aria-labelledby",t.id),u.removeAttribute("aria-label")):(u.removeAttribute("aria-labelledby"),u.setAttribute("aria-label",e?e.label:f)),t}function ne(){var e=E[h];if(e!==Z){Z=e,S.textContent="";var t=e?o(e):null;e?typeof t=="string"?S.innerHTML=t:t&&S.appendChild(t):S.innerHTML='<p class="command-pane-empty">Nothing to show.</p>',re()}}function x(e,t){var d=_[h];d&&(d.setAttribute("aria-selected","false"),d.removeAttribute("data-active")),h=e;var v=_[e];v?(v.setAttribute("aria-selected","true"),v.setAttribute("data-active",""),n.setAttribute("aria-activedescendant",v.id),t!==!1&&v.scrollIntoView({block:"nearest"})):n.removeAttribute("aria-activedescendant"),o&&ne()}function O(){M=n.value;var e=M.trim(),t=E.map(function(r){return k.tier(r,e)});_.forEach(function(r,b){r.hidden=t[b]<0});var d=function(r){return t[r]<0?2:t[r]},v=fe.map(function(r,b){var q=Array.prototype.slice.call(r.querySelectorAll(".row")).sort(function(j,be){var se=Number(j.dataset.index),de=Number(be.dataset.index);return d(se)-d(de)||se-de});return q.forEach(function(j){r.appendChild(j)}),r.hidden=!q.length||t[Number(q[0].dataset.index)]<0,{g:r,pos:b,best:q.length?d(Number(q[0].dataset.index)):2}}).sort(function(r,b){return r.best-b.best||r.pos-b.pos});v.forEach(function(r){C.appendChild(r.g)}),s=[],v.forEach(function(r){Array.prototype.forEach.call(r.g.querySelectorAll(".row"),function(b){b.hidden||s.push(Number(b.dataset.index))})}),K.hidden=s.length>0,K.firstChild.textContent="Nothing matches “"+e+"”.",l.scrollTop=0,me(s.length===A?A+" "+(A===1?N:N+"s"):s.length+" of "+A),x(s.length?s[0]:-1,!1)}function R(e){if(X=e,c.setAttribute("data-view",e),e==="detail"){var t=re();t||(u.tabIndex=-1,t=u),t.focus({preventScroll:!0})}else{l.scrollTop=Y;var d=F==="touch"&&document.documentElement.getAttribute("data-keyboard")!=="hardware";(d?m:n).focus({preventScroll:!0})}}function ie(e){var t=E[e];if(t){if(!o){k.activate(t,i);return}x(e,!1),y==="push"&&(Y=l.scrollTop,c.setAttribute("data-enter","next"),R("detail"))}}if(m.addEventListener("keydown",function(e){if(F="key",!k.composing(e)){if(e.key==="Escape"){n.value&&(e.preventDefault(),e.stopPropagation(),n.value="",O());return}if(e.key==="ArrowDown"||e.key==="ArrowUp"){e.preventDefault(),s.length&&x(s[(s.indexOf(h)+(e.key==="ArrowDown"?1:s.length-1))%s.length]);return}if(e.key==="Enter"&&e.target===n&&!(e.ctrlKey||e.metaKey||e.altKey||e.shiftKey))if(e.preventDefault(),o&&y==="split"){var t=S.querySelector("button:not([disabled]), a[href]");t&&t.click()}else h>-1&&ie(h)}}),m.addEventListener("pointerdown",function(e){F=e.pointerType==="touch"?"touch":"pointer"},!0),n.addEventListener("input",O),n.addEventListener("focus",function(){D=!0,L()}),n.addEventListener("blur",function(){D=!1,L()}),l.addEventListener("pointerenter",function(e){e.pointerType!=="touch"&&(I=!0,L())}),l.addEventListener("pointerleave",function(){I=!1,L()}),l.addEventListener("pointermove",function(e){var t=e.target.closest(".row");t&&!(o&&y==="split")&&Number(t.dataset.index)!==h&&x(Number(t.dataset.index),!1)}),l.addEventListener("click",function(e){var t=e.target.closest(".row");t&&ie(Number(t.dataset.index))}),K.querySelector("button").addEventListener("click",function(){n.value="",O(),n.focus()}),o){u.querySelector(".command-back button").addEventListener("click",function(){c.setAttribute("data-enter","prev"),R("list")}),c.addEventListener("animationend",function(e){e.target.parentNode===c&&c.removeAttribute("data-enter")});var oe=function(){var e=P(a,"--basalt-size-list-width",320)+P(a,"--basalt-space-4",16)+P(a,"--basalt-size-breakpoint-container",480);y=a.clientWidth>=e?"split":"push",c.setAttribute("data-mode",y),L(),y==="split"&&X==="detail"&&R("list")};oe(),new ResizeObserver(oe).observe(a)}new ResizeObserver(ae).observe(C),ae(),g.glide(l,T,{active:".row[data-active]",attr:"data-active"}),s.length&&x(0,!1),o&&ne();var le={element:a,focus:function(){n.focus({preventScroll:!0}),n.select(),n.scrollIntoView({block:"nearest",inline:"nearest"})}};return a.__bhCommandList=le,V||(V=!0,document.addEventListener("keydown",function(e){if(!(e.defaultPrevented||document.documentElement.__bhPalette||String(e.key).toLowerCase()!=="k"||!(e.metaKey||e.ctrlKey)||e.altKey||e.shiftKey||k.composing(e))){var t=document.querySelector(".command-list");t&&t.__bhCommandList&&(e.preventDefault(),t.__bhCommandList.focus())}})),le}H.commandList=function(a,i){return J(typeof a=="string"?document.querySelector(a):a,i||{})},g.step(115,"wireCommandLists",function(){document.querySelectorAll(".command-list").forEach(function(a){if(!a.__bhCommandList){var i=a.querySelector('script[type="application/json"][data-commands]'),p={};if(i)try{p=JSON.parse(i.textContent)}catch{console.warn("Basalt: the command list's JSON is not valid");return}J(a,p)}})})})(window.Basalt); +(function(j){"use strict";var w=j._,k=w.palette,C=w.esc,P=w.kbd.kbdGroup,ce=0,V=!1,G=' viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="2.25" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"',ue='<svg class="icon row-chevron"'+G+'><path d="M9 6L15 12M15 12L9 18"/></svg>',ve='<svg class="icon"'+G+'><path d="M15 18L9 12M9 12L15 6"/></svg>';function z(a,l,b){var h=parseFloat(getComputedStyle(a).getPropertyValue(l));return isFinite(h)?h:b}function J(a,l){if(a.__bhCommandList)return a.__bhCommandList;var b="bh-cl-"+ ++ce,h=l.label||a.getAttribute("data-label")||"Commands",_=l.noun||a.getAttribute("data-noun")||"command",W=l.placeholder||a.getAttribute("data-placeholder")||"Search commands",U=l.groups||[];U.forEach(function(e,t){(e.items||[]).forEach(function(n,u){n.id==null&&(n.id="g"+t+"c"+u)})});var i=typeof l.detail=="function"?l.detail:a.querySelector("template[data-detail]")?function(e){var t=a.querySelector('template[data-detail="'+String(e.id).replace(/["\\]/g,"\\$&")+'"]');return t?t.content.cloneNode(!0):""}:null,M=k.rows(U,b,"",i?ue:""),E=M.flat,A=E.length;a.insertAdjacentHTML("beforeend",'<div class="command-split"><div class="panel command-page" tabindex="-1" role="region" aria-label="'+C(h)+'"><div class="input-row">'+w.searchSvg+'<input type="text" role="combobox" aria-expanded="true" aria-controls="'+b+'-list" aria-autocomplete="list" aria-label="'+C(W)+'" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" placeholder="'+C(W)+'"><span class="command-slot" aria-hidden="true"></span></div><div class="command-body"><div class="command-results" id="'+b+'-list" role="listbox" aria-label="'+C(h)+'" tabindex="-1" data-idle><div class="command-sizer">'+M.html+'</div></div><div class="command-none" hidden><p></p><button type="button" class="btn" data-variant="ghost" data-size="sm">Clear search</button></div></div><div hidden>'+M.words+'</div><div class="command-foot"><p class="command-count"><span aria-hidden="true"></span><span role="status" aria-live="polite" aria-atomic="true" class="visually-hidden"></span></p><span class="command-hints" data-kbd-hint aria-hidden="true"><span>'+P(["↑","↓"])+" Move</span><span>"+P(["↵"])+(i?" Open":" Run")+"</span>"+(i?"":"<span>"+P(["Esc"])+" Clear</span>")+"</span></div></div>"+(i?'<div class="panel command-pane" role="region"><div class="command-back"><button type="button" class="btn" data-variant="ghost" data-size="sm" aria-label="Back to '+C(h)+'">'+ve+C(h)+'</button></div><div class="command-pane-body"></div></div>':"")+"</div>");var p=a.lastElementChild;p.setAttribute("data-view","list");var f=p.firstElementChild,m=i?p.lastElementChild:null,o=f.querySelector("input"),d=f.querySelector(".command-results"),S=d.firstElementChild,pe=f.querySelector(".command-body"),c=f.querySelector(".command-none"),$=f.querySelector(".command-count").firstChild,Q=f.querySelector(".command-count").lastChild,T=Array.prototype.slice.call(d.querySelectorAll(".row")),fe=Array.prototype.slice.call(S.children),B=document.createElement("span");B.className="plate",B.setAttribute("aria-hidden","true"),d.insertBefore(B,S),i&&a.setAttribute("data-pane","");var s=T.map(function(e,t){return t}),y=-1,K="",R=!1,D=!1,g="push",X="list",I="key",Y=0,Z=NaN,x=m&&m.querySelector(".command-pane-body"),ee=$.textContent=Q.textContent=A+" "+(A===1?_:_+"s"),te;function me(e){$.textContent=e,clearTimeout(te),e!==ee&&(te=setTimeout(function(){Q.textContent=ee=e},400))}function L(){d.toggleAttribute("data-idle",!(i&&g==="split")&&!R&&!D)}function ae(){if(!K){var e=getComputedStyle(d),t=parseFloat(e.paddingTop)+parseFloat(e.paddingBottom),n=S.getBoundingClientRect().height+t;if(pe.style.setProperty("--held",n+"px"),!i){var u=c.hidden,r=c.firstChild.textContent;r||(c.firstChild.textContent="Nothing matches."),c.hidden=!1,c.setAttribute("data-measure","");var v=t+c.getBoundingClientRect().height;c.removeAttribute("data-measure"),c.hidden=u,c.firstChild.textContent=r,a.style.setProperty("--held-page",f.getBoundingClientRect().height-n+Math.max(n,v)+"px")}}}function re(){var e=E[y],t=m.querySelector("h1, h2, h3, h4, h5, h6");return t?(t.id=t.id||b+"-h",t.tabIndex=-1,m.setAttribute("aria-labelledby",t.id),m.removeAttribute("aria-label")):(m.removeAttribute("aria-labelledby"),m.setAttribute("aria-label",e?e.label:h)),t}function ne(){var e=E[y];if(e!==Z){Z=e,x.textContent="";var t=e?i(e):null;e?typeof t=="string"?x.innerHTML=t:t&&x.appendChild(t):x.innerHTML='<p class="command-pane-empty">Nothing to show.</p>',re()}}function q(e,t){var n=T[y];n&&(n.setAttribute("aria-selected","false"),n.removeAttribute("data-active")),y=e;var u=T[e];u?(u.setAttribute("aria-selected","true"),u.setAttribute("data-active",""),o.setAttribute("aria-activedescendant",u.id),t!==!1&&u.scrollIntoView({block:"nearest"})):o.removeAttribute("aria-activedescendant"),i&&ne()}function F(){K=o.value;var e=K.trim(),t=E.map(function(r){return k.tier(r,e)});T.forEach(function(r,v){r.hidden=t[v]<0});var n=function(r){return t[r]<0?2:t[r]},u=fe.map(function(r,v){var N=Array.prototype.slice.call(r.querySelectorAll(".row")).sort(function(H,be){var de=Number(H.dataset.index),se=Number(be.dataset.index);return n(de)-n(se)||de-se});return N.forEach(function(H){r.appendChild(H)}),r.hidden=!N.length||t[Number(N[0].dataset.index)]<0,{g:r,pos:v,best:N.length?n(Number(N[0].dataset.index)):2}}).sort(function(r,v){return r.best-v.best||r.pos-v.pos});u.forEach(function(r){S.appendChild(r.g)}),s=[],u.forEach(function(r){Array.prototype.forEach.call(r.g.querySelectorAll(".row"),function(v){v.hidden||s.push(Number(v.dataset.index))})}),c.hidden=s.length>0,c.firstChild.textContent="Nothing matches “"+e+"”.",d.scrollTop=0,me(s.length===A?A+" "+(A===1?_:_+"s"):s.length+" of "+A),q(s.length?s[0]:-1,!1)}function O(e){if(X=e,p.setAttribute("data-view",e),e==="detail"){var t=re();t||(m.tabIndex=-1,t=m),t.focus({preventScroll:!0})}else{d.scrollTop=Y;var n=I==="touch"&&document.documentElement.getAttribute("data-keyboard")!=="hardware";(n?f:o).focus({preventScroll:!0})}}function ie(e){var t=E[e];if(t){if(!i){k.activate(t,l);return}q(e,!1),g==="push"&&(Y=d.scrollTop,p.setAttribute("data-enter","next"),O("detail"))}}if(f.addEventListener("keydown",function(e){if(I="key",!k.composing(e)){if(e.key==="Escape"){o.value&&(e.preventDefault(),e.stopPropagation(),o.value="",F());return}if(e.key==="ArrowDown"||e.key==="ArrowUp"){e.preventDefault(),s.length&&q(s[(s.indexOf(y)+(e.key==="ArrowDown"?1:s.length-1))%s.length]);return}if(e.key==="Enter"&&e.target===o&&!(e.ctrlKey||e.metaKey||e.altKey||e.shiftKey))if(e.preventDefault(),i&&g==="split"){var t=x.querySelector("button:not([disabled]), a[href]");t&&t.click()}else y>-1&&ie(y)}}),f.addEventListener("pointerdown",function(e){I=e.pointerType==="touch"?"touch":"pointer"},!0),o.addEventListener("input",F),o.addEventListener("focus",function(){R=!0,L()}),o.addEventListener("blur",function(){R=!1,L()}),d.addEventListener("pointerenter",function(e){e.pointerType!=="touch"&&(D=!0,L())}),d.addEventListener("pointerleave",function(){D=!1,L()}),d.addEventListener("pointermove",function(e){var t=e.target.closest(".row");t&&!(i&&g==="split")&&Number(t.dataset.index)!==y&&q(Number(t.dataset.index),!1)}),d.addEventListener("click",function(e){var t=e.target.closest(".row");t&&ie(Number(t.dataset.index))}),c.querySelector("button").addEventListener("click",function(){o.value="",F(),o.focus()}),i){m.querySelector(".command-back button").addEventListener("click",function(){p.setAttribute("data-enter","prev"),O("list")}),p.addEventListener("animationend",function(e){e.target.parentNode===p&&p.removeAttribute("data-enter")});var oe=function(){var e=z(a,"--basalt-size-list-width",320)+z(a,"--basalt-space-4",16)+z(a,"--basalt-size-breakpoint-container",480);g=a.clientWidth>=e?"split":"push",p.setAttribute("data-mode",g),L(),g==="split"&&X==="detail"&&O("list")};oe(),new ResizeObserver(oe).observe(a)}new ResizeObserver(ae).observe(S),ae(),w.glide(d,B,{active:".row[data-active]",attr:"data-active"}),s.length&&q(0,!1),i&&ne();var le={element:a,focus:function(){o.focus({preventScroll:!0}),o.select(),o.scrollIntoView({block:"nearest",inline:"nearest"})}};return a.__bhCommandList=le,V||(V=!0,document.addEventListener("keydown",function(e){if(!(e.defaultPrevented||document.documentElement.__bhPalette||String(e.key).toLowerCase()!=="k"||!(e.metaKey||e.ctrlKey)||e.altKey||e.shiftKey||k.composing(e))){var t=document.querySelector(".command-list");t&&t.__bhCommandList&&(e.preventDefault(),t.__bhCommandList.focus())}})),le}j.commandList=function(a,l){return J(typeof a=="string"?document.querySelector(a):a,l||{})},w.step(115,"wireCommandLists",function(){document.querySelectorAll(".command-list").forEach(function(a){if(!a.__bhCommandList){var l=a.querySelector('script[type="application/json"][data-commands]'),b={};if(l)try{b=JSON.parse(l.textContent)}catch{console.warn("Basalt: the command list's JSON is not valid");return}J(a,b)}})})})(window.Basalt); diff --git a/.agent/skills/basalt-html/parts/copy.js b/.agent/skills/basalt-html/parts/copy.js index 726a5eba..e722e97c 100644 --- a/.agent/skills/basalt-html/parts/copy.js +++ b/.agent/skills/basalt-html/parts/copy.js @@ -1 +1 @@ -(function(d){"use strict";var u=d._,p=u.announce;function s(e){return navigator.clipboard&&navigator.clipboard.writeText?navigator.clipboard.writeText(e).then(function(){return!0},function(){return f(e)}):Promise.resolve(f(e))}function f(e){for(var t=document.activeElement,n=getSelection(),o=[],i=0;i<n.rangeCount;i++)o.push(n.getRangeAt(i));var r=null;try{t&&t.selectionStart!=null&&(r=[t.selectionStart,t.selectionEnd,t.selectionDirection])}catch{}var a=document.createElement("textarea");a.value=e,a.setAttribute("readonly",""),a.style.cssText="position:fixed;top:0;opacity:0";var l=!1;try{document.body.appendChild(a),a.select(),l=document.execCommand("copy")}catch{l=!1}a.remove(),n.removeAllRanges(),o.forEach(function(c){n.addRange(c)}),t&&t.focus&&document.contains(t)&&t.focus({preventScroll:!0});try{r&&t.setSelectionRange(r[0],r[1],r[2])}catch{}return l}function h(e){var t=e.innerHTML,n=document.createElement("span");n.className="copy-words";var o=document.createElement("span");o.setAttribute("data-on",""),o.innerHTML=t;var i=document.createElement("span");i.textContent=e.getAttribute("data-copy-words"),i.setAttribute("aria-hidden","true"),i.inert=!0,n.appendChild(o),n.appendChild(i),e.textContent="",e.appendChild(n);function r(a){o.toggleAttribute("data-on",!a),i.toggleAttribute("data-on",a),o.setAttribute("aria-hidden",String(a)),o.inert=a,i.setAttribute("aria-hidden",String(!a)),i.inert=!a}r(!1),e.addEventListener("click",function(){var a=e.dataset.copy?document.querySelector(e.dataset.copy):null,l=e.dataset.copyText!=null?e.dataset.copyText:a?a.textContent:"";s(l).then(function(c){c&&(r(!0),p(e.getAttribute("data-copy-status")||"Copied to clipboard"),clearTimeout(e.__bhTimer),e.__bhTimer=setTimeout(function(){r(!1)},1500))})})}function v(){document.querySelectorAll("[data-copy], [data-copy-text]").forEach(function(e){if(!e.__bh){if(e.__bh=!0,e.hasAttribute("data-copy-words")){h(e);return}var t=[e.innerHTML,e.getAttribute("aria-label")],n=e.hasAttribute("data-icon-only");e.addEventListener("click",function(){var o=e.dataset.copy?document.querySelector(e.dataset.copy):null,i=e.dataset.copyText!=null?e.dataset.copyText:o?o.textContent:"";s(i).then(function(r){e.innerHTML=(r?'<svg class="icon" viewBox="0 0 24 24" width="16" height="16" fill="none" aria-hidden="true" focusable="false"><g fill="none" stroke="currentColor" stroke-width="2.25" stroke-linecap="round" stroke-linejoin="round"><path d="M5 13C6.667 14.667 8.333 16.333 10 18"/><path d="M10 18C13 14.333 16 10.667 19 7"/></g></svg>':'<svg class="icon" viewBox="0 0 24 24" width="16" height="16" fill="none" aria-hidden="true" focusable="false"><g fill="none" stroke="currentColor" stroke-width="2.25" stroke-linecap="round" stroke-linejoin="round"><path d="M7.05 7.05C10.35 10.35 13.65 13.65 16.95 16.95"/><path d="M16.95 7.05C13.65 10.35 10.35 13.65 7.05 16.95"/></g></svg>')+(n?"":"<span>"+(r?"Copied":"Copy failed")+"</span>"),n&&e.setAttribute("aria-label",r?"Copied":"Copy failed"),p(r?"Copied to clipboard":"Could not copy"),clearTimeout(e.__bhTimer),e.__bhTimer=setTimeout(function(){e.innerHTML=t[0],n&&(t[1]==null?e.removeAttribute("aria-label"):e.setAttribute("aria-label",t[1]))},1600)})})}})}d.copyText=s,u.step(70,"wireCopy",v)})(window.Basalt); +(function(d){"use strict";var u=d._,p=u.announce;function s(e){return navigator.clipboard&&navigator.clipboard.writeText?navigator.clipboard.writeText(e).then(function(){return!0},function(){return f(e)}):Promise.resolve(f(e))}function f(e){for(var t=document.activeElement,n=getSelection(),o=[],i=0;i<n.rangeCount;i++)o.push(n.getRangeAt(i));var r=null;try{t&&t.selectionStart!=null&&(r=[t.selectionStart,t.selectionEnd,t.selectionDirection])}catch{}var a=document.createElement("textarea");a.value=e,a.setAttribute("readonly",""),a.style.cssText="position:fixed;top:0;opacity:0";var c=!1;try{document.body.appendChild(a),a.select(),c=document.execCommand("copy")}catch{c=!1}a.remove(),n.removeAllRanges(),o.forEach(function(l){n.addRange(l)}),t&&t.focus&&document.contains(t)&&t.focus({preventScroll:!0});try{r&&t.setSelectionRange(r[0],r[1],r[2])}catch{}return c}function h(e){var t=e.innerHTML,n=document.createElement("span");n.className="copy-words";var o=document.createElement("span");o.setAttribute("data-on",""),o.innerHTML=t;var i=document.createElement("span");i.textContent=e.getAttribute("data-copy-words"),i.setAttribute("aria-hidden","true"),i.inert=!0,n.appendChild(o),n.appendChild(i),e.textContent="",e.appendChild(n);function r(a){o.toggleAttribute("data-on",!a),i.toggleAttribute("data-on",a),o.setAttribute("aria-hidden",String(a)),o.inert=a,i.setAttribute("aria-hidden",String(!a)),i.inert=!a}r(!1),e.addEventListener("click",function(){var a=e.dataset.copy?document.querySelector(e.dataset.copy):null,c=e.dataset.copyText!=null?e.dataset.copyText:a?a.textContent:"";s(c).then(function(l){l&&(r(!0),p(e.getAttribute("data-copy-status")||"Copied to clipboard"),clearTimeout(e.__bhTimer),e.__bhTimer=setTimeout(function(){r(!1)},1500))})})}function v(){document.querySelectorAll("[data-copy], [data-copy-text]").forEach(function(e){if(!e.__bh){if(e.__bh=!0,e.hasAttribute("data-copy-words")){h(e);return}var t=[e.innerHTML,e.getAttribute("aria-label")],n=e.hasAttribute("data-icon-only");e.addEventListener("click",function(){var o=e.dataset.copy?document.querySelector(e.dataset.copy):null,i=e.dataset.copyText!=null?e.dataset.copyText:o?o.textContent:"";s(i).then(function(r){e.innerHTML=t[0].replace(/<svg[\s\S]*?<\/svg>|<span data-glyph[^>]*><\/span>/,r?'<svg class="icon" viewBox="0 0 24 24" width="16" height="16" fill="none" aria-hidden="true" focusable="false"><g fill="none" stroke="currentColor" stroke-width="2.25" stroke-linecap="round" stroke-linejoin="round"><path d="M5 13C6.667 14.667 8.333 16.333 10 18"/><path d="M10 18C13 14.333 16 10.667 19 7"/></g></svg>':'<svg class="icon" viewBox="0 0 24 24" width="16" height="16" fill="none" aria-hidden="true" focusable="false"><g fill="none" stroke="currentColor" stroke-width="2.25" stroke-linecap="round" stroke-linejoin="round"><path d="M7.05 7.05C10.35 10.35 13.65 13.65 16.95 16.95"/><path d="M16.95 7.05C13.65 10.35 10.35 13.65 7.05 16.95"/></g></svg>'),n&&e.setAttribute("aria-label",r?"Copied":"Copy failed"),p(n?r?"Copied to clipboard":"Copy failed":r?"Copied":"Copy failed"),clearTimeout(e.__bhTimer),e.__bhTimer=setTimeout(function(){e.innerHTML=t[0],n&&(t[1]==null?e.removeAttribute("aria-label"):e.setAttribute("aria-label",t[1]))},1500)})})}})}d.copyText=s,u.step(70,"wireCopy",v)})(window.Basalt); diff --git a/.agent/skills/basalt-html/parts/core.css b/.agent/skills/basalt-html/parts/core.css index 468f10be..e905b778 100644 --- a/.agent/skills/basalt-html/parts/core.css +++ b/.agent/skills/basalt-html/parts/core.css @@ -1 +1 @@ -:root{--basalt-neutral-0: oklch(0 0 0);--basalt-neutral-4: oklch(.1448 0 0);--basalt-neutral-7: oklch(.1776 0 0);--basalt-neutral-9: oklch(.2046 0 0);--basalt-neutral-20: oklch(.3211 0 0);--basalt-neutral-30: oklch(.4202 0 0);--basalt-neutral-36: oklch(.4748 0 0);--basalt-neutral-42: oklch(.5278 0 0);--basalt-neutral-52: oklch(.6167 0 0);--basalt-neutral-59: oklch(.675 0 0);--basalt-neutral-63: oklch(.709 0 0);--basalt-neutral-64: oklch(.7155 0 0);--basalt-neutral-73: oklch(.79 0 0);--basalt-neutral-75: oklch(.8047 0 0);--basalt-neutral-93: oklch(.9461 0 0);--basalt-neutral-94: oklch(.9551 0 0);--basalt-neutral-96: oklch(.9702 0 0);--basalt-neutral-98: oklch(.9851 0 0);--basalt-neutral-100: oklch(1 0 0);--basalt-neutral-42-4: oklch(.53 0 0);--basalt-neutral-95-7: oklch(.966 0 0);--basalt-white-6: oklch(1 0 0 / .06);--basalt-white-8: oklch(1 0 0 / .08);--basalt-white-9: oklch(1 0 0 / .09);--basalt-white-15: oklch(1 0 0 / .145);--basalt-white-24: oklch(1 0 0 / .24);--basalt-white-38: oklch(1 0 0 / .38);--basalt-black-4: oklch(0 0 0 / .04);--basalt-black-6: oklch(0 0 0 / .06);--basalt-black-7: oklch(0 0 0 / .07);--basalt-black-8: oklch(0 0 0 / .08);--basalt-black-10: oklch(0 0 0 / .1);--basalt-black-16: oklch(0 0 0 / .16);--basalt-black-18: oklch(0 0 0 / .18);--basalt-black-24: oklch(0 0 0 / .24);--basalt-black-40: oklch(0 0 0 / .4);--basalt-black-45: oklch(0 0 0 / .45);--basalt-black-60: oklch(0 0 0 / .6);--basalt-black-80: oklch(0 0 0 / .8);--basalt-status-danger-dark: oklch(.7 .191 22);--basalt-status-success-dark: oklch(.73 .211 148);--basalt-status-warning-dark: oklch(.79 .171 70);--basalt-status-danger-light: oklch(.51 .19 25);--basalt-status-success-light: oklch(.55 .159 148);--basalt-status-warning-light: oklch(.6 .137 62);--basalt-space-0: 0px;--basalt-space-1: 4px;--basalt-space-2: 8px;--basalt-space-3: 12px;--basalt-space-4: 16px;--basalt-space-5: 20px;--basalt-space-6: 24px;--basalt-space-8: 32px;--basalt-space-10: 40px;--basalt-space-12: 48px;--basalt-space-16: 64px;--basalt-space-24: 96px;--basalt-space-0-5: 2px;--basalt-space-1-5: 6px;--basalt-space-2-5: 10px;--basalt-space-3-5: 14px;--basalt-radius-2xs: 2px;--basalt-radius-xs: 4px;--basalt-radius-sm: 6px;--basalt-radius-md: 8px;--basalt-radius-lg: 12px;--basalt-radius-xl: 16px;--basalt-radius-full: 9999px;--basalt-size-control-xs: 24px;--basalt-size-control-sm: 28px;--basalt-size-control-md: 32px;--basalt-size-control-lg: 36px;--basalt-size-control-xl: 40px;--basalt-size-control-2xl: 44px;--basalt-size-control-3xl: 48px;--basalt-size-control-4xl: 52px;--basalt-size-control-5xl: 56px;--basalt-size-control-6xl: 64px;--basalt-size-menu-row: 36px;--basalt-size-menu-row-touch: 44px;--basalt-size-tap-min: 44px;--basalt-size-icon-sm: 16px;--basalt-size-icon-md: 20px;--basalt-size-icon-lg: 24px;--basalt-size-focus-width: 2px;--basalt-size-focus-offset: 2px;--basalt-size-hairline: 1px;--basalt-size-indicator: 2px;--basalt-size-description-label: 160px;--basalt-size-field-label-inline: 80px;--basalt-size-track: 4px;--basalt-size-dot: 6px;--basalt-size-choice: 16px;--basalt-size-choice-mark: 12px;--basalt-size-switch-width: 32px;--basalt-size-switch-height: 18px;--basalt-size-switch-thumb: 14px;--basalt-size-kbd: 20px;--basalt-size-badge: 22px;--basalt-size-table-row: 40px;--basalt-size-command-input: 48px;--basalt-size-code-line-height: 20px;--basalt-size-underline-offset: 3px;--basalt-size-slider-length: 180px;--basalt-size-dialog-width: 480px;--basalt-size-sheet-width: 440px;--basalt-size-command-width: 560px;--basalt-size-dialog-width-wide: 992px;--basalt-size-search-trigger: 200px;--basalt-size-search-logo-width: 96px;--basalt-size-search-logo-height: 48px;--basalt-size-search-pack-width: 48px;--basalt-size-search-pack-height: 60px;--basalt-size-toast-width: 360px;--basalt-size-popover-max: 320px;--basalt-size-tooltip-max: 280px;--basalt-size-menu-min: 200px;--basalt-size-select-min: 160px;--basalt-size-popup-max-height: 360px;--basalt-size-list-width: 320px;--basalt-size-header: 56px;--basalt-size-tab-bar: 56px;--basalt-size-sidebar-width: 256px;--basalt-size-rail-width: 72px;--basalt-size-page-width: 72rem;--basalt-size-prose-width: 34rem;--basalt-size-gutter: var(--basalt-space-6);--basalt-size-gutter-narrow: var(--basalt-space-4);--basalt-size-breakpoint-md: 720px;--basalt-size-breakpoint-lg: 1024px;--basalt-size-breakpoint-container: 480px;--basalt-size-breakpoint-container-sm: 340px;--basalt-size-breakpoint-container-lg: 640px;--basalt-size-cut: 2px;--basalt-size-hatch-pitch: 4px;--basalt-size-meter-marker: 12px;--basalt-opacity-amount: .72;--basalt-opacity-recede-2: .5;--basalt-opacity-recede-3: .32;--basalt-opacity-recede-4: .2;--basalt-opacity-recede-5: .12;--basalt-opacity-recede-danger: .88;--basalt-opacity-queued: .65;--basalt-font-family-sans: Geist, "Geist Fallback", ui-sans-serif, system-ui, sans-serif;--basalt-font-family-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;--basalt-font-weight-regular: 400;--basalt-font-weight-medium: 500;--basalt-font-weight-semibold: 600;--basalt-text-xs-size: 12px;--basalt-text-xs-line-height: 16px;--basalt-text-xs-tracking: .01em;--basalt-text-sm-size: 13px;--basalt-text-sm-line-height: 18px;--basalt-text-sm-tracking: 0em;--basalt-text-base-size: 14px;--basalt-text-base-line-height: 20px;--basalt-text-base-tracking: 0em;--basalt-text-md-size: 16px;--basalt-text-md-line-height: 24px;--basalt-text-md-tracking: -.005em;--basalt-text-lg-size: 18px;--basalt-text-lg-line-height: 26px;--basalt-text-lg-tracking: -.01em;--basalt-text-xl-size: 20px;--basalt-text-xl-line-height: 28px;--basalt-text-xl-tracking: -.015em;--basalt-text-2xl-size: 24px;--basalt-text-2xl-line-height: 30px;--basalt-text-2xl-tracking: -.02em;--basalt-text-3xl-size: 30px;--basalt-text-3xl-line-height: 36px;--basalt-text-3xl-tracking: -.025em;--basalt-text-4xl-size: 40px;--basalt-text-4xl-line-height: 44px;--basalt-text-4xl-tracking: -.03em;--basalt-text-5xl-size: 56px;--basalt-text-5xl-line-height: 60px;--basalt-text-5xl-tracking: -.035em;--basalt-blur-chrome: 12px;--basalt-duration-instant: 0ms;--basalt-duration-fast: .1s;--basalt-duration-base: .15s;--basalt-duration-slow: .2s;--basalt-duration-slower: .3s;--basalt-duration-confirm: 1.5s;--basalt-duration-figure: .6s;--basalt-duration-stagger: 22ms;--basalt-duration-loop-ring: .64s;--basalt-duration-loop-braille: .8s;--basalt-duration-loop-fade: 1.2s;--basalt-duration-loop-ambient: 6s;--basalt-ease-out: cubic-bezier(.16, 1, .3, 1);--basalt-ease-in-out: cubic-bezier(.65, 0, .35, 1);--basalt-ease-in: cubic-bezier(.4, 0, 1, 1);--basalt-ease-linear: cubic-bezier(0, 0, 1, 1);--basalt-layer-base: 0;--basalt-layer-sticky: 100;--basalt-layer-overlay: 500;--basalt-layer-popover: 600;--basalt-layer-dialog: 700;--basalt-layer-toast: 800;--basalt-layer-tooltip: 1100}:root,[data-theme=light],.light{color-scheme:light;--basalt-status-danger: var(--basalt-status-danger-light);--basalt-status-success: var(--basalt-status-success-light);--basalt-status-warning: var(--basalt-status-warning-light);--basalt-syntax-keyword: oklch(.5 .12 255);--basalt-syntax-string: oklch(.5 .12 150);--basalt-syntax-constant: oklch(.5 .1 70);--basalt-syntax-function: oklch(.5 .12 305);--basalt-syntax-comment: var(--basalt-text-tertiary);--basalt-surface-0: var(--basalt-neutral-98);--basalt-surface-1: var(--basalt-neutral-100);--basalt-surface-2: var(--basalt-neutral-100);--basalt-surface-3: var(--basalt-neutral-100);--basalt-surface-page: var(--basalt-surface-0);--basalt-surface-raised: var(--basalt-surface-1);--basalt-surface-overlay: var(--basalt-surface-2);--basalt-surface-top: var(--basalt-surface-3);--basalt-surface-sunken: var(--basalt-neutral-96);--basalt-surface-well-2: var(--basalt-surface-sunken);--basalt-surface-well-3: var(--basalt-surface-sunken);--basalt-surface-sunken-strong: var(--basalt-neutral-94);--basalt-surface-kbd: var(--basalt-black-6);--basalt-surface-chrome: oklch(.9851 0 0 / .96);--basalt-surface-placeholder: var(--basalt-neutral-94);--basalt-text-primary: var(--basalt-neutral-9);--basalt-text-secondary: var(--basalt-neutral-30);--basalt-text-tertiary: var(--basalt-neutral-42);--basalt-text-disabled: var(--basalt-neutral-64);--basalt-text-inverse: var(--basalt-neutral-100);--basalt-border-rim: var(--basalt-black-8);--basalt-border-rim-top: var(--basalt-black-8);--basalt-border-hairline: var(--basalt-black-8);--basalt-border-hover: var(--basalt-black-16);--basalt-border-divider: var(--basalt-black-8);--basalt-border-input: var(--basalt-black-45);--basalt-border-field: var(--basalt-border-input);--basalt-border-focus: var(--basalt-neutral-30);--basalt-state-hover: var(--basalt-black-4);--basalt-state-selected: var(--basalt-black-7);--basalt-plate-0: oklch(.9325 0 0);--basalt-plate-1: oklch(.9466 0 0);--basalt-plate-2: oklch(.9466 0 0);--basalt-plate-3: oklch(.9466 0 0);--basalt-action-primary: var(--basalt-neutral-9);--basalt-action-primary-hover: var(--basalt-neutral-0);--basalt-action-primary-press: var(--basalt-neutral-20);--basalt-action-primary-text: var(--basalt-neutral-100);--basalt-line-contrast: var(--basalt-black-45);--basalt-ink-contrast: var(--basalt-neutral-30);--basalt-field-contrast: var(--basalt-neutral-30);--basalt-scrim: var(--basalt-black-40);--basalt-shadow-hairline: 0px 0px 0px 1px oklch(0 0 0 / .08), 0px 0px 0px 1px oklch(.9851 0 0);--basalt-shadow-overlay: 0px 4px 8px -4px oklch(0 0 0 / .06), 0px 16px 24px -8px oklch(0 0 0 / .1);--basalt-shadow-modal: 0px 8px 16px -4px oklch(0 0 0 / .06), 0px 24px 32px -8px oklch(0 0 0 / .1)}[data-theme=dark],.dark{color-scheme:dark;--basalt-status-danger: var(--basalt-status-danger-dark);--basalt-status-success: var(--basalt-status-success-dark);--basalt-status-warning: var(--basalt-status-warning-dark);--basalt-syntax-keyword: oklch(.8 .09 255);--basalt-syntax-string: oklch(.8 .09 150);--basalt-syntax-constant: oklch(.8 .09 70);--basalt-syntax-function: oklch(.8 .09 305);--basalt-syntax-comment: var(--basalt-text-tertiary);--basalt-surface-0: var(--basalt-neutral-0);--basalt-surface-1: var(--basalt-neutral-4);--basalt-surface-2: var(--basalt-neutral-7);--basalt-surface-3: var(--basalt-neutral-9);--basalt-surface-page: var(--basalt-surface-0);--basalt-surface-raised: var(--basalt-surface-1);--basalt-surface-overlay: var(--basalt-surface-2);--basalt-surface-top: var(--basalt-surface-3);--basalt-surface-sunken: var(--basalt-surface-1);--basalt-surface-well-2: var(--basalt-surface-2);--basalt-surface-well-3: var(--basalt-surface-3);--basalt-surface-sunken-strong: var(--basalt-surface-2);--basalt-surface-kbd: var(--basalt-white-8);--basalt-surface-chrome: oklch(0 0 0 / .925);--basalt-surface-placeholder: var(--basalt-neutral-9);--basalt-text-primary: var(--basalt-neutral-95-7);--basalt-text-secondary: var(--basalt-neutral-73);--basalt-text-tertiary: var(--basalt-neutral-59);--basalt-text-disabled: var(--basalt-neutral-42-4);--basalt-text-inverse: var(--basalt-neutral-0);--basalt-border-hairline: var(--basalt-white-15);--basalt-border-rim: var(--basalt-white-6);--basalt-border-rim-top: var(--basalt-white-8);--basalt-border-hover: var(--basalt-white-24);--basalt-border-divider: var(--basalt-white-6);--basalt-border-input: var(--basalt-white-38);--basalt-border-field: var(--basalt-border-input);--basalt-border-focus: var(--basalt-text-secondary);--basalt-state-hover: var(--basalt-white-6);--basalt-state-selected: var(--basalt-white-9);--basalt-plate-0: oklch(.2438 0 0);--basalt-plate-1: oklch(.2703 0 0);--basalt-plate-2: oklch(.2926 0 0);--basalt-plate-3: oklch(.2926 0 0);--basalt-action-primary: var(--basalt-neutral-93);--basalt-action-primary-hover: var(--basalt-neutral-100);--basalt-action-primary-press: var(--basalt-neutral-75);--basalt-action-primary-text: var(--basalt-neutral-0);--basalt-line-contrast: var(--basalt-white-38);--basalt-ink-contrast: var(--basalt-text-secondary);--basalt-field-contrast: var(--basalt-text-secondary);--basalt-scrim: var(--basalt-black-80);--basalt-shadow-hairline: 0px 0px 0px 1px oklch(1 0 0 / .145), 0px 0px 0px 1px oklch(0 0 0);--basalt-shadow-overlay: 0px 4px 8px -4px oklch(0 0 0 / .24), 0px 16px 24px -8px oklch(0 0 0 / .4);--basalt-shadow-modal: 0px 8px 16px -4px oklch(0 0 0 / .24), 0px 24px 32px -8px oklch(0 0 0 / .6)}@media(prefers-color-scheme:dark){:root:not([data-theme=light]):not(.light){color-scheme:dark;--basalt-status-danger: var(--basalt-status-danger-dark);--basalt-status-success: var(--basalt-status-success-dark);--basalt-status-warning: var(--basalt-status-warning-dark);--basalt-syntax-keyword: oklch(.8 .09 255);--basalt-syntax-string: oklch(.8 .09 150);--basalt-syntax-constant: oklch(.8 .09 70);--basalt-syntax-function: oklch(.8 .09 305);--basalt-surface-0: var(--basalt-neutral-0);--basalt-surface-1: var(--basalt-neutral-4);--basalt-surface-2: var(--basalt-neutral-7);--basalt-surface-3: var(--basalt-neutral-9);--basalt-surface-sunken: var(--basalt-surface-1);--basalt-surface-well-2: var(--basalt-surface-2);--basalt-surface-well-3: var(--basalt-surface-3);--basalt-surface-sunken-strong: var(--basalt-surface-2);--basalt-surface-kbd: var(--basalt-white-8);--basalt-surface-chrome: oklch(0 0 0 / .925);--basalt-surface-placeholder: var(--basalt-neutral-9);--basalt-text-primary: var(--basalt-neutral-95-7);--basalt-text-secondary: var(--basalt-neutral-73);--basalt-text-tertiary: var(--basalt-neutral-59);--basalt-text-disabled: var(--basalt-neutral-42-4);--basalt-text-inverse: var(--basalt-neutral-0);--basalt-border-hairline: var(--basalt-white-15);--basalt-border-rim: var(--basalt-white-6);--basalt-border-rim-top: var(--basalt-white-8);--basalt-border-hover: var(--basalt-white-24);--basalt-border-divider: var(--basalt-white-6);--basalt-border-input: var(--basalt-white-38);--basalt-border-focus: var(--basalt-text-secondary);--basalt-state-hover: var(--basalt-white-6);--basalt-state-selected: var(--basalt-white-9);--basalt-plate-0: oklch(.2438 0 0);--basalt-plate-1: oklch(.2703 0 0);--basalt-plate-2: oklch(.2926 0 0);--basalt-plate-3: oklch(.2926 0 0);--basalt-action-primary: var(--basalt-neutral-93);--basalt-action-primary-hover: var(--basalt-neutral-100);--basalt-action-primary-press: var(--basalt-neutral-75);--basalt-action-primary-text: var(--basalt-neutral-0);--basalt-line-contrast: var(--basalt-white-38);--basalt-ink-contrast: var(--basalt-text-secondary);--basalt-field-contrast: var(--basalt-text-secondary);--basalt-scrim: var(--basalt-black-80);--basalt-shadow-hairline: 0px 0px 0px 1px oklch(1 0 0 / .145), 0px 0px 0px 1px oklch(0 0 0);--basalt-shadow-overlay: 0px 4px 8px -4px oklch(0 0 0 / .24), 0px 16px 24px -8px oklch(0 0 0 / .4);--basalt-shadow-modal: 0px 8px 16px -4px oklch(0 0 0 / .24), 0px 24px 32px -8px oklch(0 0 0 / .6)}}@media(prefers-contrast:more){:root,[data-theme=light],[data-theme=dark],.light,.dark,:root:not([data-theme=light]):not(.light){--basalt-border-hairline: var(--basalt-line-contrast);--basalt-border-rim: var(--basalt-line-contrast);--basalt-border-rim-top: var(--basalt-line-contrast);--basalt-border-divider: var(--basalt-line-contrast);--basalt-text-tertiary: var(--basalt-ink-contrast);--basalt-border-field: var(--basalt-field-contrast);--basalt-border-hover: var(--basalt-text-secondary);--basalt-shadow-hairline: 0px 0px 0px 1px var(--basalt-line-contrast), 0px 0px 0px 1px var(--basalt-surface-0)}}@media(prefers-reduced-motion:reduce){:root{--basalt-duration-base: .1s;--basalt-duration-slow: .1s;--basalt-duration-slower: .1s;--basalt-duration-figure: .1s;--basalt-duration-stagger: 0ms}}@layer reset,basalt;@layer reset{*,*:before,*:after{box-sizing:border-box}html{background:var(--basalt-surface-0);-webkit-text-size-adjust:100%}body{margin:0;background:var(--basalt-surface-0);color:var(--basalt-text-primary);font:var(--basalt-font-weight-regular) var(--bh-base);-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}b,strong,th{font-weight:var(--basalt-font-weight-semibold)}img,svg,video{max-width:100%}button,input,select,textarea{font:inherit;letter-spacing:inherit;color:inherit;margin:0}a{color:inherit;text-decoration:underline;text-decoration-color:var(--basalt-border-input);text-underline-offset:var(--basalt-size-underline-offset)}a:hover{text-decoration-color:currentColor}h1,h2,h3,h4,p,ul,ol,dl,dd,figure,blockquote{margin:0}h1,h2,h3,h4{font-weight:var(--basalt-font-weight-semibold);color:var(--basalt-text-primary);text-wrap:balance}h5,h6{font-weight:var(--basalt-font-weight-semibold)}h1,.display{font-size:var(--basalt-text-3xl-size);line-height:var(--basalt-text-3xl-line-height);letter-spacing:var(--basalt-text-3xl-tracking)}h2{font-size:var(--basalt-text-2xl-size);line-height:var(--basalt-text-2xl-line-height);letter-spacing:var(--basalt-text-2xl-tracking)}h3{font-size:var(--basalt-text-lg-size);line-height:var(--basalt-text-lg-line-height);letter-spacing:var(--basalt-text-lg-tracking)}h4{font-size:var(--basalt-text-base-size);line-height:var(--basalt-text-base-line-height)}@media(width>=720px){h1,.display{font-size:var(--basalt-text-4xl-size);line-height:var(--basalt-text-4xl-line-height);letter-spacing:var(--basalt-text-4xl-tracking)}}p,li{text-wrap:pretty}code:not(.code code){padding:var(--basalt-size-hairline) var(--basalt-space-1);border-radius:var(--basalt-radius-xs);background:var(--basalt-surface-kbd);font:var(--basalt-font-weight-regular) .92em / 1 var(--basalt-font-family-mono)}pre,code,kbd,samp{font-family:var(--basalt-font-family-mono)}}@layer basalt{:root{--bh-xs: var(--basalt-text-xs-size) / var(--basalt-text-xs-line-height) var(--basalt-font-family-sans);--bh-sm: var(--basalt-text-sm-size) / var(--basalt-text-sm-line-height) var(--basalt-font-family-sans);--bh-base: var(--basalt-text-base-size) / var(--basalt-text-base-line-height) var(--basalt-font-family-sans);--bh-md: var(--basalt-text-md-size) / var(--basalt-text-md-line-height) var(--basalt-font-family-sans);--bh-2xl: var(--basalt-text-2xl-size) / var(--basalt-text-2xl-line-height) var(--basalt-font-family-sans);--bh-xs-mono: var(--basalt-text-xs-size) / var(--basalt-text-xs-line-height) var(--basalt-font-family-mono);--bh-sm-mono: var(--basalt-text-sm-size) / var(--basalt-size-code-line-height) var(--basalt-font-family-mono)}:root{accent-color:var(--basalt-action-primary);--basalt-gutter: var(--basalt-size-gutter)}@media(width<720px){:root{--basalt-gutter: var(--basalt-size-gutter-narrow)}}a,button,summary,[role=tab],.row,.disclosure,.segment button{-webkit-tap-highlight-color:transparent}[hidden]{display:none!important}:focus-visible{outline:var(--basalt-size-focus-width) solid var(--basalt-border-focus);outline-offset:var(--basalt-size-focus-offset)}::selection{background:var(--basalt-state-selected)}svg.icon{flex:none}svg[data-brand]{pointer-events:none}.dot-sep:before{content:"·";content:"·" / ""}.dot-sep[data-spaced]:before{content:" · ";content:" · " / ""}.dot-sep>.visually-hidden{white-space:pre}.display{font-weight:var(--basalt-font-weight-semibold)}.text-5xl{font-size:var(--basalt-text-5xl-size);line-height:var(--basalt-text-5xl-line-height);letter-spacing:var(--basalt-text-5xl-tracking);font-weight:var(--basalt-font-weight-semibold)}.lead{font-size:var(--basalt-text-md-size);line-height:var(--basalt-text-md-line-height);color:var(--basalt-text-secondary);max-width:var(--basalt-size-prose-width);text-wrap:pretty}.eyebrow{font:var(--basalt-font-weight-medium) var(--bh-xs);color:var(--basalt-text-secondary)}.muted{color:var(--basalt-text-secondary)}.faint{color:var(--basalt-text-tertiary)}.small{font-size:var(--basalt-text-sm-size);line-height:var(--basalt-text-sm-line-height)}.mono{font-family:var(--basalt-font-family-mono)}.num{font-variant-numeric:tabular-nums}.prose{max-inline-size:var(--basalt-size-prose-width);margin-inline:0 auto}.prose>*+*{margin-top:var(--basalt-space-4)}.prose>:is(h2,h3){margin-top:var(--basalt-space-8)}.prose>:is(h2,h3)+*{margin-top:var(--basalt-space-2)}.prose :is(ul,ol){padding-inline-start:var(--basalt-space-5)}.prose li+li{margin-top:var(--basalt-space-1)}.prose blockquote{padding-inline-start:var(--basalt-space-4);color:var(--basalt-text-secondary)}.page{width:100%;max-width:var(--basalt-size-page-width);margin-inline:auto;padding:var(--basalt-space-8) var(--basalt-gutter) var(--basalt-space-16)}.page.narrow{max-width:46rem}@media(width<720px){.page{padding-block:var(--basalt-space-6) var(--basalt-space-12)}}.stack{display:flex;flex-direction:column;gap:var(--gap, var(--basalt-space-4));min-width:0}.cluster{display:flex;flex-wrap:wrap;align-items:center;gap:var(--gap, var(--basalt-space-2));min-width:0}.grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(var(--min, 220px),100%),1fr));gap:var(--gap, var(--basalt-space-4))}.split{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:var(--gap, var(--basalt-space-6))}@media(width>=720px){.split.aside{grid-template-columns:minmax(0,var(--basalt-size-list-width)) minmax(0,1fr);align-items:start}}@media(width<720px){.split{grid-template-columns:minmax(0,1fr)}}.spacer{flex:1}@media(width<720px){.hide-narrow{display:none!important}}.section{margin-top:var(--basalt-space-12)}.section>.section-head{margin-bottom:var(--basalt-space-4)}.footer{margin-top:var(--basalt-space-16);padding-top:var(--basalt-space-4);border-top:var(--basalt-size-hairline) solid var(--basalt-border-divider);color:var(--basalt-text-secondary);font-size:var(--basalt-text-sm-size)}.footer:not(.page .footer){width:calc(min(100%,var(--basalt-size-page-width)) - 2 * var(--basalt-gutter));margin-top:0;margin-inline:auto;padding-bottom:var(--basalt-space-8)}.skip-link{position:absolute;inset-inline-start:var(--basalt-space-2);top:var(--basalt-space-2);transform:translateY(-200%);padding:var(--basalt-space-2) var(--basalt-space-3);border:var(--basalt-size-hairline) solid var(--basalt-border-rim);border-top-color:var(--basalt-border-rim-top);border-radius:var(--basalt-radius-md);background:var(--basalt-surface-3);color:var(--basalt-text-primary);z-index:var(--basalt-layer-toast)}.skip-link:focus{transform:none;box-shadow:var(--basalt-shadow-overlay)}.visually-hidden{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}:is(.panel,.card,.callout,.code,.table-wrap){--panel-bg: var(--basalt-surface-1);--panel-next: var(--basalt-surface-2);--panel-well: var(--basalt-surface-sunken);--panel-plate: light-dark(var(--basalt-state-selected), color-mix(in srgb, var(--basalt-neutral-100) 9%, var(--panel-next)));position:relative;min-width:0;background-color:var(--panel-bg);color:var(--basalt-text-primary);border:var(--basalt-size-hairline) solid var(--basalt-border-rim);border-top-color:var(--basalt-border-rim-top);border-radius:var(--basalt-radius-lg)}:is(.panel,.card,.callout,.code,.table-wrap) :is(.panel,.card,.callout,.code,.table-wrap){--panel-bg: var(--basalt-surface-2);--panel-next: var(--basalt-surface-3);--panel-well: var(--basalt-surface-well-2)}:is(.panel,.card,.callout,.code,.table-wrap) :is(.panel,.card,.callout,.code,.table-wrap) :is(.panel,.card,.callout,.code,.table-wrap){--panel-bg: var(--basalt-surface-3);--panel-next: var(--basalt-surface-3);--panel-well: var(--basalt-surface-well-3)}@supports not (color: light-dark(white,black)){:root,[data-theme=light],.light{--_dkp: 0%}[data-theme=dark],.dark{--_dkp: 100%}@media(prefers-color-scheme:dark){:root:not([data-theme=light]):not(.light){--_dkp: 100%}}:root,:is(.panel,.card,.callout,.code,.table-wrap){--_dk: color-mix(in srgb, var(--basalt-neutral-100) 9%, var(--panel-next, var(--basalt-surface-1)));--_mx: color-mix(in srgb, var(--_dk) var(--_dkp), color-mix(in srgb, var(--basalt-neutral-0) 7%, var(--panel-bg, var(--basalt-surface-page))));--panel-plate: color-mix(in srgb, var(--_dk) var(--_dkp), var(--basalt-state-selected))}.choice-card.choice-card{--_solid: var(--_mx)}.btn.btn.btn[aria-pressed=true]:not([data-variant=primary],[data-variant=danger]){background:var(--_mx)}.segment.segment{--pill-fill: color-mix(in srgb, color-mix(in srgb, var(--basalt-neutral-100) 9%, var(--basalt-surface-top)) var(--_dkp), var(--basalt-surface-top))}select.input.input{--_pop-plate: color-mix(in srgb, color-mix(in srgb, var(--basalt-neutral-100) 9%, var(--_pop-next)) var(--_dkp), var(--basalt-state-selected))}}.panel-pad,.card{padding:var(--basalt-space-4)}@media(width>=720px){.panel-pad.lg,.card.lg{padding:var(--basalt-space-6)}}.panel-head{display:flex;flex-wrap:wrap;align-items:center;gap:var(--basalt-space-2);padding:var(--basalt-space-3) var(--basalt-space-4);border-bottom:var(--basalt-size-hairline) solid var(--basalt-border-divider);font-weight:var(--basalt-font-weight-medium)}.float{--panel-bg: var(--basalt-surface-1);--panel-next: var(--basalt-surface-2);--panel-well: var(--basalt-surface-sunken);box-shadow:var(--basalt-shadow-overlay)}.float.modal{box-shadow:var(--basalt-shadow-modal);--panel-bg: var(--basalt-surface-1);--panel-next: var(--basalt-surface-2);--panel-well: var(--basalt-surface-sunken)}.float.modal :is(.panel,.card,.callout,.code,.table-wrap){--panel-bg: var(--basalt-surface-2);--panel-next: var(--basalt-surface-3);--panel-well: var(--basalt-surface-well-2)}[data-level="0"]{--panel-next: var(--basalt-surface-1)}[data-level="1"] :is(.panel,.card,.callout,.code,.table-wrap){--panel-bg: var(--basalt-surface-2);--panel-next: var(--basalt-surface-3);--panel-well: var(--basalt-surface-well-2)}[data-level="2"] :is(.panel,.card,.callout,.code,.table-wrap),[data-level="3"] :is(.panel,.card,.callout,.code,.table-wrap){--panel-bg: var(--basalt-surface-3);--panel-next: var(--basalt-surface-3);--panel-well: var(--basalt-surface-well-3)}.divider{display:block;height:var(--basalt-size-hairline);margin:0;border:0;background:var(--basalt-border-divider);flex:none}.divide-y>*+*{border-top:var(--basalt-size-hairline) solid var(--basalt-border-divider)}.btn{position:relative;--_h: var(--basalt-size-control-md);--_px: var(--basalt-space-3);display:inline-flex;align-items:center;justify-content:center;gap:var(--basalt-space-1-5);height:var(--_h);padding:0 var(--_px);margin:0;border:0;border-radius:var(--basalt-radius-sm);font:var(--basalt-font-weight-medium) var(--basalt-text-base-size) / 1 var(--basalt-font-family-sans);white-space:nowrap;text-decoration:none;cursor:pointer;user-select:none;background:var(--basalt-surface-1);color:var(--basalt-text-primary);box-shadow:var(--basalt-shadow-hairline);transition-property:background-color,color,box-shadow,transform;transition-duration:var(--basalt-duration-fast);transition-timing-function:var(--basalt-ease-out)}.btn[data-size=sm]{--_h: var(--basalt-size-control-sm);--_px: var(--basalt-space-2-5);font-size:var(--basalt-text-sm-size)}.btn[data-size=lg]{--_h: var(--basalt-size-control-lg);--_px: var(--basalt-space-3-5);border-radius:var(--basalt-radius-md)}.btn[data-icon-only]{width:var(--_h);padding:0}.btn[data-variant=primary]{background:var(--basalt-action-primary);color:var(--basalt-action-primary-text);box-shadow:none}.btn[data-variant=ghost]{background:transparent;color:var(--basalt-text-secondary);box-shadow:none}.btn[data-variant=danger]{background:transparent;color:var(--basalt-status-danger);box-shadow:inset 0 0 0 var(--basalt-size-hairline) color-mix(in oklch,var(--basalt-status-danger) 45%,transparent)}@media(hover:hover){.btn:hover:not([disabled],[aria-disabled=true]){box-shadow:0 0 0 var(--basalt-size-hairline) var(--basalt-border-hover),0 0 0 var(--basalt-size-hairline) var(--basalt-surface-0)}.btn[data-variant=primary]:hover:not([disabled],[aria-disabled=true]){background:var(--basalt-action-primary-hover);box-shadow:none}.btn[data-variant=ghost]:hover:not([disabled],[aria-disabled=true]){background:var(--basalt-state-hover);color:var(--basalt-text-primary);box-shadow:none}.btn[data-variant=danger]:hover:not([disabled],[aria-disabled=true]){background:var(--basalt-state-hover);box-shadow:inset 0 0 0 var(--basalt-size-hairline) color-mix(in oklch,var(--basalt-status-danger) 70%,transparent)}}.btn:active:not([disabled],[aria-disabled=true]){background:var(--basalt-state-selected)}.btn[data-variant=primary]:active:not([disabled],[aria-disabled=true]){background:var(--basalt-action-primary-press)}.btn:active:not([disabled],[aria-disabled=true],[aria-busy=true]){transform:scale(.98)}.btn:active:not([disabled],[aria-disabled=true],[aria-busy=true]):after{content:"";position:absolute;inset:-1.03%}.btn[disabled],.btn[aria-disabled=true]{cursor:not-allowed;color:var(--basalt-text-disabled);box-shadow:0 0 0 var(--basalt-size-hairline) color-mix(in oklch,var(--basalt-border-hairline) 50%,transparent)}.btn[data-variant=primary][disabled],.btn[data-variant=primary][aria-disabled=true]{background:var(--basalt-state-selected);box-shadow:none}.btn[data-variant=ghost][disabled]{box-shadow:none}.btn[aria-busy=true]{cursor:progress}.btn[aria-busy=true]>*{opacity:0}.btn[aria-busy=true]:after{content:"";position:absolute;inset:0;margin:auto;width:var(--basalt-size-icon-sm);height:var(--basalt-size-icon-sm);border:1.5px solid color-mix(in oklch,currentColor 25%,transparent);border-top-color:currentColor;border-radius:var(--basalt-radius-full);animation:bh-spin var(--basalt-duration-loop-ring) linear infinite}.btn svg{flex:none}@media(pointer:coarse),(width<720px){.btn{min-height:var(--basalt-size-tap-min);border-radius:var(--basalt-radius-md)}.btn[data-icon-only]{min-width:var(--basalt-size-tap-min)}}@media(pointer:coarse),(width<720px){a:not(.btn,.row,.tab,.disclosure,.brand,.skip-link,:is(p,li,.prose,.small,.hint,.error,.callout-body) a),nav a:not(.btn,.site-footer-links-host a),.footer a,.tap{display:inline-flex;align-items:center;min-height:var(--basalt-size-tap-min);margin-block:var(--bh-tap-margin, min( 0lh , calc((1lh - var(--basalt-size-tap-min)) / 2)))}.skip-link{display:inline-flex;align-items:center;min-height:var(--basalt-size-tap-min)}:is(a:not(.btn,.row,.tab,.disclosure,.brand,.skip-link,.topbar-links a,:is(p,li,.prose,.small,.hint,.error,.callout-body) a),.tap){position:relative}:is(a:not(.btn,.row,.tab,.disclosure,.brand,.skip-link,.topbar-links a,:is(p,li,.prose,.small,.hint,.error,.callout-body) a),.tap):after{content:"";position:absolute;inset-block:0;left:50%;width:max(100%,var(--basalt-size-tap-min));transform:translate(-50%)}.stack>a:not(.btn,.row,.tab,.disclosure):has(+a){margin-block-end:0;min-height:calc((var(--basalt-size-tap-min) + 1lh) / 2);align-items:flex-end}.stack>a+a:not(.btn,.row,.tab,.disclosure){margin-block-start:0;min-height:calc((var(--basalt-size-tap-min) + 1lh) / 2);align-items:flex-start}.stack>a+a:not(.btn,.row,.tab,.disclosure):has(+a){min-height:1lh;align-items:center}}@keyframes bh-spin{to{transform:rotate(360deg)}}@keyframes bh-fade{50%{opacity:.55}}@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}.btn[aria-busy=true]:after{animation:bh-fade var(--basalt-duration-loop-fade) var(--basalt-ease-in-out) infinite;border-top-color:color-mix(in oklch,currentColor 25%,transparent)}.btn:active:not([disabled],[aria-disabled=true],[aria-busy=true]){transform:none}.btn{transition-property:background-color,color,box-shadow}}@media(forced-colors:active){:is(.panel,.card,.callout,.code,.table-wrap){border-color:CanvasText}.btn{border:var(--basalt-size-hairline) solid ButtonText}}@media print{.skip-link{display:none}:is(.panel,.card,.callout,.code,.table-wrap){break-inside:avoid}}} +:root{--basalt-neutral-0: oklch(0 0 0);--basalt-neutral-4: oklch(.1448 0 0);--basalt-neutral-7: oklch(.1776 0 0);--basalt-neutral-9: oklch(.2046 0 0);--basalt-neutral-20: oklch(.3211 0 0);--basalt-neutral-30: oklch(.4202 0 0);--basalt-neutral-36: oklch(.4748 0 0);--basalt-neutral-42: oklch(.5278 0 0);--basalt-neutral-52: oklch(.6167 0 0);--basalt-neutral-59: oklch(.675 0 0);--basalt-neutral-63: oklch(.709 0 0);--basalt-neutral-64: oklch(.7155 0 0);--basalt-neutral-73: oklch(.79 0 0);--basalt-neutral-75: oklch(.8047 0 0);--basalt-neutral-93: oklch(.9461 0 0);--basalt-neutral-94: oklch(.9551 0 0);--basalt-neutral-96: oklch(.9702 0 0);--basalt-neutral-98: oklch(.9851 0 0);--basalt-neutral-100: oklch(1 0 0);--basalt-neutral-42-4: oklch(.53 0 0);--basalt-neutral-95-7: oklch(.966 0 0);--basalt-white-6: oklch(1 0 0 / .06);--basalt-white-8: oklch(1 0 0 / .08);--basalt-white-9: oklch(1 0 0 / .09);--basalt-white-15: oklch(1 0 0 / .145);--basalt-white-24: oklch(1 0 0 / .24);--basalt-white-38: oklch(1 0 0 / .38);--basalt-black-4: oklch(0 0 0 / .04);--basalt-black-6: oklch(0 0 0 / .06);--basalt-black-7: oklch(0 0 0 / .07);--basalt-black-8: oklch(0 0 0 / .08);--basalt-black-10: oklch(0 0 0 / .1);--basalt-black-16: oklch(0 0 0 / .16);--basalt-black-18: oklch(0 0 0 / .18);--basalt-black-24: oklch(0 0 0 / .24);--basalt-black-40: oklch(0 0 0 / .4);--basalt-black-45: oklch(0 0 0 / .45);--basalt-black-60: oklch(0 0 0 / .6);--basalt-black-80: oklch(0 0 0 / .8);--basalt-status-danger-dark: oklch(.7 .191 22);--basalt-status-success-dark: oklch(.73 .211 148);--basalt-status-warning-dark: oklch(.79 .171 70);--basalt-status-danger-light: oklch(.51 .19 25);--basalt-status-success-light: oklch(.55 .159 148);--basalt-status-warning-light: oklch(.6 .137 62);--basalt-space-0: 0px;--basalt-space-1: 4px;--basalt-space-2: 8px;--basalt-space-3: 12px;--basalt-space-4: 16px;--basalt-space-5: 20px;--basalt-space-6: 24px;--basalt-space-8: 32px;--basalt-space-10: 40px;--basalt-space-12: 48px;--basalt-space-16: 64px;--basalt-space-24: 96px;--basalt-space-0-5: 2px;--basalt-space-1-5: 6px;--basalt-space-2-5: 10px;--basalt-space-3-5: 14px;--basalt-radius-2xs: 2px;--basalt-radius-xs: 4px;--basalt-radius-sm: 6px;--basalt-radius-md: 8px;--basalt-radius-lg: 12px;--basalt-radius-xl: 16px;--basalt-radius-full: 9999px;--basalt-size-control-xs: 24px;--basalt-size-control-sm: 28px;--basalt-size-control-md: 32px;--basalt-size-control-lg: 36px;--basalt-size-control-xl: 40px;--basalt-size-control-2xl: 44px;--basalt-size-control-3xl: 48px;--basalt-size-control-4xl: 52px;--basalt-size-control-5xl: 56px;--basalt-size-control-6xl: 64px;--basalt-size-menu-row: 36px;--basalt-size-menu-row-touch: 44px;--basalt-size-tap-min: 44px;--basalt-size-icon-sm: 16px;--basalt-size-icon-md: 20px;--basalt-size-icon-lg: 24px;--basalt-size-focus-width: 2px;--basalt-size-focus-offset: 2px;--basalt-size-hairline: 1px;--basalt-size-indicator: 2px;--basalt-size-description-label: 160px;--basalt-size-field-label-inline: 80px;--basalt-size-track: 4px;--basalt-size-dot: 6px;--basalt-size-choice: 16px;--basalt-size-choice-mark: 12px;--basalt-size-switch-width: 32px;--basalt-size-switch-height: 18px;--basalt-size-switch-thumb: 14px;--basalt-size-kbd: 20px;--basalt-size-badge: 22px;--basalt-size-table-row: 40px;--basalt-size-command-input: 48px;--basalt-size-code-line-height: 20px;--basalt-size-underline-offset: 3px;--basalt-size-slider-length: 180px;--basalt-size-dialog-width: 480px;--basalt-size-sheet-width: 440px;--basalt-size-command-width: 560px;--basalt-size-dialog-width-wide: 992px;--basalt-size-search-trigger: 200px;--basalt-size-search-logo-width: 96px;--basalt-size-search-logo-height: 48px;--basalt-size-search-pack-width: 48px;--basalt-size-search-pack-height: 60px;--basalt-size-toast-width: 360px;--basalt-size-popover-max: 320px;--basalt-size-tooltip-max: 280px;--basalt-size-menu-min: 200px;--basalt-size-select-min: 160px;--basalt-size-popup-max-height: 360px;--basalt-size-list-width: 320px;--basalt-size-header: 56px;--basalt-size-tab-bar: 56px;--basalt-size-sidebar-width: 256px;--basalt-size-rail-width: 72px;--basalt-size-page-width: 72rem;--basalt-size-prose-width: 34rem;--basalt-size-gutter: var(--basalt-space-6);--basalt-size-gutter-narrow: var(--basalt-space-4);--basalt-size-breakpoint-md: 720px;--basalt-size-breakpoint-lg: 1024px;--basalt-size-breakpoint-container: 480px;--basalt-size-breakpoint-container-sm: 340px;--basalt-size-breakpoint-container-lg: 640px;--basalt-size-cut: 2px;--basalt-size-hatch-pitch: 4px;--basalt-size-meter-marker: 12px;--basalt-opacity-amount: .72;--basalt-opacity-recede-2: .5;--basalt-opacity-recede-3: .32;--basalt-opacity-recede-4: .2;--basalt-opacity-recede-5: .12;--basalt-opacity-recede-danger: .88;--basalt-opacity-queued: .65;--basalt-font-family-sans: Geist, "Geist Fallback", ui-sans-serif, system-ui, sans-serif;--basalt-font-family-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;--basalt-font-weight-regular: 400;--basalt-font-weight-medium: 500;--basalt-font-weight-semibold: 600;--basalt-text-xs-size: 12px;--basalt-text-xs-line-height: 16px;--basalt-text-xs-tracking: .01em;--basalt-text-sm-size: 13px;--basalt-text-sm-line-height: 18px;--basalt-text-sm-tracking: 0em;--basalt-text-base-size: 14px;--basalt-text-base-line-height: 20px;--basalt-text-base-tracking: 0em;--basalt-text-md-size: 16px;--basalt-text-md-line-height: 24px;--basalt-text-md-tracking: -.005em;--basalt-text-lg-size: 18px;--basalt-text-lg-line-height: 26px;--basalt-text-lg-tracking: -.01em;--basalt-text-xl-size: 20px;--basalt-text-xl-line-height: 28px;--basalt-text-xl-tracking: -.015em;--basalt-text-2xl-size: 24px;--basalt-text-2xl-line-height: 30px;--basalt-text-2xl-tracking: -.02em;--basalt-text-3xl-size: 30px;--basalt-text-3xl-line-height: 36px;--basalt-text-3xl-tracking: -.025em;--basalt-text-4xl-size: 40px;--basalt-text-4xl-line-height: 44px;--basalt-text-4xl-tracking: -.03em;--basalt-text-5xl-size: 56px;--basalt-text-5xl-line-height: 60px;--basalt-text-5xl-tracking: -.035em;--basalt-blur-chrome: 12px;--basalt-duration-instant: 0ms;--basalt-duration-fast: .1s;--basalt-duration-base: .15s;--basalt-duration-slow: .2s;--basalt-duration-slower: .3s;--basalt-duration-confirm: 1.5s;--basalt-duration-figure: .6s;--basalt-duration-stagger: 22ms;--basalt-duration-loop-ring: .64s;--basalt-duration-loop-braille: .8s;--basalt-duration-loop-fade: 1.2s;--basalt-duration-loop-ambient: 6s;--basalt-ease-out: cubic-bezier(.16, 1, .3, 1);--basalt-ease-in-out: cubic-bezier(.65, 0, .35, 1);--basalt-ease-in: cubic-bezier(.4, 0, 1, 1);--basalt-ease-linear: cubic-bezier(0, 0, 1, 1);--basalt-layer-base: 0;--basalt-layer-sticky: 100;--basalt-layer-overlay: 500;--basalt-layer-popover: 600;--basalt-layer-dialog: 700;--basalt-layer-toast: 800;--basalt-layer-tooltip: 1100}:root,[data-theme=light],.light{color-scheme:light;--basalt-status-danger: var(--basalt-status-danger-light);--basalt-status-success: var(--basalt-status-success-light);--basalt-status-warning: var(--basalt-status-warning-light);--basalt-syntax-keyword: oklch(.5 .12 255);--basalt-syntax-string: oklch(.5 .12 150);--basalt-syntax-constant: oklch(.5 .1 70);--basalt-syntax-function: oklch(.5 .12 305);--basalt-syntax-comment: var(--basalt-text-tertiary);--basalt-surface-0: var(--basalt-neutral-98);--basalt-surface-1: var(--basalt-neutral-100);--basalt-surface-2: var(--basalt-neutral-100);--basalt-surface-3: var(--basalt-neutral-100);--basalt-surface-page: var(--basalt-surface-0);--basalt-surface-raised: var(--basalt-surface-1);--basalt-surface-overlay: var(--basalt-surface-2);--basalt-surface-top: var(--basalt-surface-3);--basalt-surface-sunken: var(--basalt-neutral-96);--basalt-surface-well-2: var(--basalt-surface-sunken);--basalt-surface-well-3: var(--basalt-surface-sunken);--basalt-surface-sunken-strong: var(--basalt-neutral-94);--basalt-surface-kbd: var(--basalt-black-6);--basalt-surface-chrome: oklch(.9851 0 0 / .96);--basalt-surface-placeholder: var(--basalt-neutral-94);--basalt-text-primary: var(--basalt-neutral-9);--basalt-text-secondary: var(--basalt-neutral-30);--basalt-text-tertiary: var(--basalt-neutral-42);--basalt-text-disabled: var(--basalt-neutral-64);--basalt-text-inverse: var(--basalt-neutral-100);--basalt-border-rim: var(--basalt-black-8);--basalt-border-rim-top: var(--basalt-black-8);--basalt-border-hairline: var(--basalt-black-8);--basalt-border-hover: var(--basalt-black-16);--basalt-border-divider: var(--basalt-black-8);--basalt-border-input: var(--basalt-black-45);--basalt-border-field: var(--basalt-border-input);--basalt-border-focus: var(--basalt-neutral-30);--basalt-state-hover: var(--basalt-black-4);--basalt-state-selected: var(--basalt-black-7);--basalt-plate-0: oklch(.9325 0 0);--basalt-plate-1: oklch(.9466 0 0);--basalt-plate-2: oklch(.9466 0 0);--basalt-plate-3: oklch(.9466 0 0);--basalt-action-primary: var(--basalt-neutral-9);--basalt-action-primary-hover: var(--basalt-neutral-0);--basalt-action-primary-press: var(--basalt-neutral-20);--basalt-action-primary-text: var(--basalt-neutral-100);--basalt-line-contrast: var(--basalt-black-45);--basalt-ink-contrast: var(--basalt-neutral-30);--basalt-field-contrast: var(--basalt-neutral-30);--basalt-scrim: var(--basalt-black-40);--basalt-shadow-hairline: 0px 0px 0px 1px oklch(0 0 0 / .08), 0px 0px 0px 1px oklch(.9851 0 0);--basalt-shadow-overlay: 0px 4px 8px -4px oklch(0 0 0 / .06), 0px 16px 24px -8px oklch(0 0 0 / .1);--basalt-shadow-modal: 0px 8px 16px -4px oklch(0 0 0 / .06), 0px 24px 32px -8px oklch(0 0 0 / .1)}[data-theme=dark],.dark{color-scheme:dark;--basalt-status-danger: var(--basalt-status-danger-dark);--basalt-status-success: var(--basalt-status-success-dark);--basalt-status-warning: var(--basalt-status-warning-dark);--basalt-syntax-keyword: oklch(.8 .09 255);--basalt-syntax-string: oklch(.8 .09 150);--basalt-syntax-constant: oklch(.8 .09 70);--basalt-syntax-function: oklch(.8 .09 305);--basalt-syntax-comment: var(--basalt-text-tertiary);--basalt-surface-0: var(--basalt-neutral-0);--basalt-surface-1: var(--basalt-neutral-4);--basalt-surface-2: var(--basalt-neutral-7);--basalt-surface-3: var(--basalt-neutral-9);--basalt-surface-page: var(--basalt-surface-0);--basalt-surface-raised: var(--basalt-surface-1);--basalt-surface-overlay: var(--basalt-surface-2);--basalt-surface-top: var(--basalt-surface-3);--basalt-surface-sunken: var(--basalt-surface-1);--basalt-surface-well-2: var(--basalt-surface-2);--basalt-surface-well-3: var(--basalt-surface-3);--basalt-surface-sunken-strong: var(--basalt-surface-2);--basalt-surface-kbd: var(--basalt-white-8);--basalt-surface-chrome: oklch(0 0 0 / .925);--basalt-surface-placeholder: var(--basalt-neutral-9);--basalt-text-primary: var(--basalt-neutral-95-7);--basalt-text-secondary: var(--basalt-neutral-73);--basalt-text-tertiary: var(--basalt-neutral-59);--basalt-text-disabled: var(--basalt-neutral-42-4);--basalt-text-inverse: var(--basalt-neutral-0);--basalt-border-hairline: var(--basalt-white-15);--basalt-border-rim: var(--basalt-white-6);--basalt-border-rim-top: var(--basalt-white-8);--basalt-border-hover: var(--basalt-white-24);--basalt-border-divider: var(--basalt-white-6);--basalt-border-input: var(--basalt-white-38);--basalt-border-field: var(--basalt-border-input);--basalt-border-focus: var(--basalt-text-secondary);--basalt-state-hover: var(--basalt-white-6);--basalt-state-selected: var(--basalt-white-9);--basalt-plate-0: oklch(.2438 0 0);--basalt-plate-1: oklch(.2703 0 0);--basalt-plate-2: oklch(.2926 0 0);--basalt-plate-3: oklch(.2926 0 0);--basalt-action-primary: var(--basalt-neutral-93);--basalt-action-primary-hover: var(--basalt-neutral-100);--basalt-action-primary-press: var(--basalt-neutral-75);--basalt-action-primary-text: var(--basalt-neutral-0);--basalt-line-contrast: var(--basalt-white-38);--basalt-ink-contrast: var(--basalt-text-secondary);--basalt-field-contrast: var(--basalt-text-secondary);--basalt-scrim: var(--basalt-black-80);--basalt-shadow-hairline: 0px 0px 0px 1px oklch(1 0 0 / .145), 0px 0px 0px 1px oklch(0 0 0);--basalt-shadow-overlay: 0px 4px 8px -4px oklch(0 0 0 / .24), 0px 16px 24px -8px oklch(0 0 0 / .4);--basalt-shadow-modal: 0px 8px 16px -4px oklch(0 0 0 / .24), 0px 24px 32px -8px oklch(0 0 0 / .6)}@media(prefers-color-scheme:dark){:root:not([data-theme=light]):not(.light){color-scheme:dark;--basalt-status-danger: var(--basalt-status-danger-dark);--basalt-status-success: var(--basalt-status-success-dark);--basalt-status-warning: var(--basalt-status-warning-dark);--basalt-syntax-keyword: oklch(.8 .09 255);--basalt-syntax-string: oklch(.8 .09 150);--basalt-syntax-constant: oklch(.8 .09 70);--basalt-syntax-function: oklch(.8 .09 305);--basalt-surface-0: var(--basalt-neutral-0);--basalt-surface-1: var(--basalt-neutral-4);--basalt-surface-2: var(--basalt-neutral-7);--basalt-surface-3: var(--basalt-neutral-9);--basalt-surface-sunken: var(--basalt-surface-1);--basalt-surface-well-2: var(--basalt-surface-2);--basalt-surface-well-3: var(--basalt-surface-3);--basalt-surface-sunken-strong: var(--basalt-surface-2);--basalt-surface-kbd: var(--basalt-white-8);--basalt-surface-chrome: oklch(0 0 0 / .925);--basalt-surface-placeholder: var(--basalt-neutral-9);--basalt-text-primary: var(--basalt-neutral-95-7);--basalt-text-secondary: var(--basalt-neutral-73);--basalt-text-tertiary: var(--basalt-neutral-59);--basalt-text-disabled: var(--basalt-neutral-42-4);--basalt-text-inverse: var(--basalt-neutral-0);--basalt-border-hairline: var(--basalt-white-15);--basalt-border-rim: var(--basalt-white-6);--basalt-border-rim-top: var(--basalt-white-8);--basalt-border-hover: var(--basalt-white-24);--basalt-border-divider: var(--basalt-white-6);--basalt-border-input: var(--basalt-white-38);--basalt-border-focus: var(--basalt-text-secondary);--basalt-state-hover: var(--basalt-white-6);--basalt-state-selected: var(--basalt-white-9);--basalt-plate-0: oklch(.2438 0 0);--basalt-plate-1: oklch(.2703 0 0);--basalt-plate-2: oklch(.2926 0 0);--basalt-plate-3: oklch(.2926 0 0);--basalt-action-primary: var(--basalt-neutral-93);--basalt-action-primary-hover: var(--basalt-neutral-100);--basalt-action-primary-press: var(--basalt-neutral-75);--basalt-action-primary-text: var(--basalt-neutral-0);--basalt-line-contrast: var(--basalt-white-38);--basalt-ink-contrast: var(--basalt-text-secondary);--basalt-field-contrast: var(--basalt-text-secondary);--basalt-scrim: var(--basalt-black-80);--basalt-shadow-hairline: 0px 0px 0px 1px oklch(1 0 0 / .145), 0px 0px 0px 1px oklch(0 0 0);--basalt-shadow-overlay: 0px 4px 8px -4px oklch(0 0 0 / .24), 0px 16px 24px -8px oklch(0 0 0 / .4);--basalt-shadow-modal: 0px 8px 16px -4px oklch(0 0 0 / .24), 0px 24px 32px -8px oklch(0 0 0 / .6)}}@media(prefers-contrast:more){:root,[data-theme=light],[data-theme=dark],.light,.dark,:root:not([data-theme=light]):not(.light){--basalt-border-hairline: var(--basalt-line-contrast);--basalt-border-rim: var(--basalt-line-contrast);--basalt-border-rim-top: var(--basalt-line-contrast);--basalt-border-divider: var(--basalt-line-contrast);--basalt-text-tertiary: var(--basalt-ink-contrast);--basalt-border-field: var(--basalt-field-contrast);--basalt-border-hover: var(--basalt-text-secondary);--basalt-shadow-hairline: 0px 0px 0px 1px var(--basalt-line-contrast), 0px 0px 0px 1px var(--basalt-surface-0)}}@media(prefers-reduced-motion:reduce){:root{--basalt-duration-base: .1s;--basalt-duration-slow: .1s;--basalt-duration-slower: .1s;--basalt-duration-figure: .1s;--basalt-duration-stagger: 0ms}}@layer reset,basalt;@layer reset{*,*:before,*:after{box-sizing:border-box}html{background:var(--basalt-surface-0);-webkit-text-size-adjust:100%}body{margin:0;background:var(--basalt-surface-0);color:var(--basalt-text-primary);font:var(--basalt-font-weight-regular) var(--bh-base);-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}b,strong,th{font-weight:var(--basalt-font-weight-semibold)}img,svg,video{max-width:100%}button,input,select,textarea{font:inherit;letter-spacing:inherit;color:inherit;margin:0}a{color:inherit;text-decoration:underline;text-decoration-color:var(--basalt-border-input);text-underline-offset:var(--basalt-size-underline-offset)}a:hover{text-decoration-color:currentColor}h1,h2,h3,h4,p,ul,ol,dl,dd,figure,blockquote{margin:0}h1,h2,h3,h4{font-weight:var(--basalt-font-weight-semibold);color:var(--basalt-text-primary);text-wrap:balance}h5,h6{font-weight:var(--basalt-font-weight-semibold)}h1,.display{font-size:var(--basalt-text-3xl-size);line-height:var(--basalt-text-3xl-line-height);letter-spacing:var(--basalt-text-3xl-tracking)}h2{font-size:var(--basalt-text-2xl-size);line-height:var(--basalt-text-2xl-line-height);letter-spacing:var(--basalt-text-2xl-tracking)}h3{font-size:var(--basalt-text-lg-size);line-height:var(--basalt-text-lg-line-height);letter-spacing:var(--basalt-text-lg-tracking)}h4{font-size:var(--basalt-text-base-size);line-height:var(--basalt-text-base-line-height)}@media(width>=720px){h1,.display{font-size:var(--basalt-text-4xl-size);line-height:var(--basalt-text-4xl-line-height);letter-spacing:var(--basalt-text-4xl-tracking)}}p,li{text-wrap:pretty}code:not(.code code){padding:var(--basalt-size-hairline) var(--basalt-space-1);border-radius:var(--basalt-radius-xs);background:var(--basalt-surface-kbd);font:var(--basalt-font-weight-regular) .92em / 1 var(--basalt-font-family-mono)}pre,code,kbd,samp{font-family:var(--basalt-font-family-mono)}}@layer basalt{:root{--bh-xs: var(--basalt-text-xs-size) / var(--basalt-text-xs-line-height) var(--basalt-font-family-sans);--bh-sm: var(--basalt-text-sm-size) / var(--basalt-text-sm-line-height) var(--basalt-font-family-sans);--bh-base: var(--basalt-text-base-size) / var(--basalt-text-base-line-height) var(--basalt-font-family-sans);--bh-md: var(--basalt-text-md-size) / var(--basalt-text-md-line-height) var(--basalt-font-family-sans);--bh-2xl: var(--basalt-text-2xl-size) / var(--basalt-text-2xl-line-height) var(--basalt-font-family-sans);--bh-xs-mono: var(--basalt-text-xs-size) / var(--basalt-text-xs-line-height) var(--basalt-font-family-mono);--bh-sm-mono: var(--basalt-text-sm-size) / var(--basalt-size-code-line-height) var(--basalt-font-family-mono)}:root{accent-color:var(--basalt-action-primary);--basalt-gutter: var(--basalt-size-gutter)}:root{--bh-inset-left: env(safe-area-inset-left, var(--basalt-space-0));--bh-inset-right: env(safe-area-inset-right, var(--basalt-space-0));--bh-inset-start: var(--bh-inset-left);--bh-inset-end: var(--bh-inset-right)}:root:dir(rtl){--bh-inset-start: var(--bh-inset-right);--bh-inset-end: var(--bh-inset-left)}@media(width<720px){:root{--basalt-gutter: var(--basalt-size-gutter-narrow)}}a,button,summary,[role=tab],.row,.disclosure,.segment button{-webkit-tap-highlight-color:transparent}[hidden]{display:none!important}:focus-visible{outline:var(--basalt-size-focus-width) solid var(--basalt-border-focus);outline-offset:var(--basalt-size-focus-offset)}::selection{background:var(--basalt-state-selected)}svg.icon{flex:none}svg[data-brand]{pointer-events:none}.dot-sep:before{content:"·";content:"·" / ""}.dot-sep[data-spaced]:before{content:" · ";content:" · " / ""}.dot-sep>.visually-hidden{white-space:pre}.display{font-weight:var(--basalt-font-weight-semibold)}.text-5xl{font-size:var(--basalt-text-5xl-size);line-height:var(--basalt-text-5xl-line-height);letter-spacing:var(--basalt-text-5xl-tracking);font-weight:var(--basalt-font-weight-semibold)}.lead{font-size:var(--basalt-text-md-size);line-height:var(--basalt-text-md-line-height);color:var(--basalt-text-secondary);max-width:var(--basalt-size-prose-width);text-wrap:pretty}.eyebrow{font:var(--basalt-font-weight-medium) var(--bh-xs);color:var(--basalt-text-secondary)}.muted{color:var(--basalt-text-secondary)}.faint{color:var(--basalt-text-tertiary)}.small{font-size:var(--basalt-text-sm-size);line-height:var(--basalt-text-sm-line-height)}.mono{font-family:var(--basalt-font-family-mono)}.num{font-variant-numeric:tabular-nums}.prose{max-inline-size:var(--basalt-size-prose-width);margin-inline:0 auto}.prose>*+*{margin-top:var(--basalt-space-4)}.prose>:is(h2,h3){margin-top:var(--basalt-space-8)}.prose>:is(h2,h3)+*{margin-top:var(--basalt-space-2)}.prose :is(ul,ol){padding-inline-start:var(--basalt-space-5)}.prose li+li{margin-top:var(--basalt-space-1)}.prose blockquote{padding-inline-start:var(--basalt-space-4);color:var(--basalt-text-secondary)}.page{width:100%;max-width:var(--basalt-size-page-width);margin-inline:auto;padding:var(--basalt-space-8) var(--basalt-gutter) var(--basalt-space-16)}.page.narrow{max-width:46rem}@media(width<720px){.page{padding-block:var(--basalt-space-6) var(--basalt-space-12)}}.stack{display:flex;flex-direction:column;gap:var(--gap, var(--basalt-space-4));min-width:0}.cluster{display:flex;flex-wrap:wrap;align-items:center;gap:var(--gap, var(--basalt-space-2));min-width:0}.grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(var(--min, 220px),100%),1fr));gap:var(--gap, var(--basalt-space-4))}.split{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:var(--gap, var(--basalt-space-6))}@media(width>=720px){.split.aside{grid-template-columns:minmax(0,var(--basalt-size-list-width)) minmax(0,1fr);align-items:start}}@media(width<720px){.split{grid-template-columns:minmax(0,1fr)}}.spacer{flex:1}@media(width<720px){.hide-narrow{display:none!important}}.section{margin-top:var(--basalt-space-12)}.section>.section-head{margin-bottom:var(--basalt-space-4)}.page>.section>.section-head{--basalt-edge-room: var(--basalt-gutter);--basalt-edge-room-start: initial;--basalt-edge-room-end: initial}.footer{margin-top:var(--basalt-space-16);padding-top:var(--basalt-space-4);border-top:var(--basalt-size-hairline) solid var(--basalt-border-divider);color:var(--basalt-text-secondary);font-size:var(--basalt-text-sm-size)}.footer:not(.page .footer){width:calc(min(100%,var(--basalt-size-page-width)) - 2 * var(--basalt-gutter));margin-top:0;margin-inline:auto;padding-bottom:var(--basalt-space-8)}.skip-link{position:absolute;inset-inline-start:var(--basalt-space-2);top:var(--basalt-space-2);transform:translateY(-200%);padding:var(--basalt-space-2) var(--basalt-space-3);border:var(--basalt-size-hairline) solid var(--basalt-border-rim);border-top-color:var(--basalt-border-rim-top);border-radius:var(--basalt-radius-md);background:var(--basalt-surface-3);color:var(--basalt-text-primary);z-index:var(--basalt-layer-toast)}.skip-link:focus{transform:none;box-shadow:var(--basalt-shadow-overlay)}.visually-hidden{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}:is(.panel,.card,.callout,.code,.table-wrap){--panel-bg: var(--basalt-surface-1);--panel-next: var(--basalt-surface-2);--panel-well: var(--basalt-surface-sunken);--panel-plate: light-dark(var(--basalt-state-selected), color-mix(in srgb, var(--basalt-neutral-100) 9%, var(--panel-next)));position:relative;min-width:0;background-color:var(--panel-bg);color:var(--basalt-text-primary);border:var(--basalt-size-hairline) solid var(--basalt-border-rim);border-top-color:var(--basalt-border-rim-top);border-radius:var(--basalt-radius-lg)}:is(.panel,.card,.callout,.code,.table-wrap) :is(.panel,.card,.callout,.code,.table-wrap){--panel-bg: var(--basalt-surface-2);--panel-next: var(--basalt-surface-3);--panel-well: var(--basalt-surface-well-2)}:is(.panel,.card,.callout,.code,.table-wrap) :is(.panel,.card,.callout,.code,.table-wrap) :is(.panel,.card,.callout,.code,.table-wrap){--panel-bg: var(--basalt-surface-3);--panel-next: var(--basalt-surface-3);--panel-well: var(--basalt-surface-well-3)}@supports not (color: light-dark(white,black)){:root,[data-theme=light],.light{--_dkp: 0%}[data-theme=dark],.dark{--_dkp: 100%}@media(prefers-color-scheme:dark){:root:not([data-theme=light]):not(.light){--_dkp: 100%}}:root,:is(.panel,.card,.callout,.code,.table-wrap){--_dk: color-mix(in srgb, var(--basalt-neutral-100) 9%, var(--panel-next, var(--basalt-surface-1)));--_mx: color-mix(in srgb, var(--_dk) var(--_dkp), color-mix(in srgb, var(--basalt-neutral-0) 7%, var(--panel-bg, var(--basalt-surface-page))));--panel-plate: color-mix(in srgb, var(--_dk) var(--_dkp), var(--basalt-state-selected))}.choice-card.choice-card{--_solid: var(--_mx)}.btn.btn.btn[aria-pressed=true]:not([data-variant=primary],[data-variant=danger]){background:var(--_mx)}.segment.segment{--pill-fill: color-mix(in srgb, color-mix(in srgb, var(--basalt-neutral-100) 9%, var(--basalt-surface-top)) var(--_dkp), var(--basalt-surface-top))}select.input.input{--_pop-plate: color-mix(in srgb, color-mix(in srgb, var(--basalt-neutral-100) 9%, var(--_pop-next)) var(--_dkp), var(--basalt-state-selected))}}.panel-pad,.card{padding:var(--basalt-space-4)}@media(width>=720px){.panel-pad.lg,.card.lg{padding:var(--basalt-space-6)}}.panel-head{display:flex;flex-wrap:wrap;align-items:center;gap:var(--basalt-space-2);padding:var(--basalt-space-3) var(--basalt-space-4);--basalt-edge-room: var(--basalt-space-4);--basalt-edge-room-start: initial;--basalt-edge-room-end: initial;border-bottom:var(--basalt-size-hairline) solid var(--basalt-border-divider);font-weight:var(--basalt-font-weight-medium)}.float{--panel-bg: var(--basalt-surface-1);--panel-next: var(--basalt-surface-2);--panel-well: var(--basalt-surface-sunken);box-shadow:var(--basalt-shadow-overlay)}.float.modal{box-shadow:var(--basalt-shadow-modal);--panel-bg: var(--basalt-surface-1);--panel-next: var(--basalt-surface-2);--panel-well: var(--basalt-surface-sunken)}.float.modal :is(.panel,.card,.callout,.code,.table-wrap){--panel-bg: var(--basalt-surface-2);--panel-next: var(--basalt-surface-3);--panel-well: var(--basalt-surface-well-2)}[data-level="0"]{--panel-next: var(--basalt-surface-1)}[data-level="1"] :is(.panel,.card,.callout,.code,.table-wrap){--panel-bg: var(--basalt-surface-2);--panel-next: var(--basalt-surface-3);--panel-well: var(--basalt-surface-well-2)}[data-level="2"] :is(.panel,.card,.callout,.code,.table-wrap),[data-level="3"] :is(.panel,.card,.callout,.code,.table-wrap){--panel-bg: var(--basalt-surface-3);--panel-next: var(--basalt-surface-3);--panel-well: var(--basalt-surface-well-3)}.divider{display:block;height:var(--basalt-size-hairline);margin:0;border:0;background:var(--basalt-border-divider);flex:none}.divide-y>*+*{border-top:var(--basalt-size-hairline) solid var(--basalt-border-divider)}.btn{position:relative;--_h: var(--basalt-size-control-md);--_px: var(--basalt-space-3);display:inline-flex;align-items:center;justify-content:center;gap:var(--basalt-space-1-5);height:var(--_h);padding:0 var(--_px);margin:0;border:0;border-radius:var(--basalt-radius-sm);font:var(--basalt-font-weight-medium) var(--basalt-text-base-size) / 1 var(--basalt-font-family-sans);white-space:nowrap;text-decoration:none;cursor:pointer;user-select:none;background:var(--basalt-surface-1);color:var(--basalt-text-primary);box-shadow:var(--basalt-shadow-hairline);transition-property:background-color,color,box-shadow,transform;transition-duration:var(--basalt-duration-fast);transition-timing-function:var(--basalt-ease-out)}.btn[data-size=sm]{--_h: var(--basalt-size-control-sm);--_px: var(--basalt-space-2-5);font-size:var(--basalt-text-sm-size)}.btn[data-size=lg]{--_h: var(--basalt-size-control-lg);--_px: var(--basalt-space-3-5);border-radius:var(--basalt-radius-md)}.btn[data-icon-only]{width:var(--_h);padding:0}.btn[data-variant=primary]{background:var(--basalt-action-primary);color:var(--basalt-action-primary-text);box-shadow:none}.btn[data-variant=ghost]{background:transparent;color:var(--basalt-text-secondary);box-shadow:none}.btn[data-variant=danger]{background:transparent;color:var(--basalt-status-danger);box-shadow:inset 0 0 0 var(--basalt-size-hairline) color-mix(in oklch,var(--basalt-status-danger) 45%,transparent)}@media(hover:hover){.btn:hover:not([disabled],[aria-disabled=true]){box-shadow:0 0 0 var(--basalt-size-hairline) var(--basalt-border-hover),0 0 0 var(--basalt-size-hairline) var(--basalt-surface-0)}.btn[data-variant=primary]:hover:not([disabled],[aria-disabled=true]){background:var(--basalt-action-primary-hover);box-shadow:none}.btn[data-variant=ghost]:hover:not([disabled],[aria-disabled=true]){background:var(--basalt-state-hover);color:var(--basalt-text-primary);box-shadow:none}.btn[data-variant=danger]:hover:not([disabled],[aria-disabled=true]){background:var(--basalt-state-hover);box-shadow:inset 0 0 0 var(--basalt-size-hairline) color-mix(in oklch,var(--basalt-status-danger) 70%,transparent)}}.btn:active:not([disabled],[aria-disabled=true]){background:var(--basalt-state-selected)}.btn[data-variant=primary]:active:not([disabled],[aria-disabled=true]){background:var(--basalt-action-primary-press)}.btn:active:not([disabled],[aria-disabled=true],[aria-busy=true]){transform:scale(.98)}.btn:active:not([disabled],[aria-disabled=true],[aria-busy=true]):after{content:"";position:absolute;inset:-1.03%}.btn[disabled],.btn[aria-disabled=true]{cursor:not-allowed;color:var(--basalt-text-disabled);box-shadow:0 0 0 var(--basalt-size-hairline) color-mix(in oklch,var(--basalt-border-hairline) 50%,transparent)}.btn[data-variant=primary][disabled],.btn[data-variant=primary][aria-disabled=true]{background:var(--basalt-state-selected);box-shadow:none}.btn[data-variant=ghost][disabled]{box-shadow:none}.btn[aria-busy=true]{cursor:progress}.btn[aria-busy=true]>*{opacity:0}.btn[aria-busy=true]:after{content:"";position:absolute;inset:0;margin:auto;width:var(--basalt-size-icon-sm);height:var(--basalt-size-icon-sm);border:1.5px solid color-mix(in oklch,currentColor 25%,transparent);border-top-color:currentColor;border-radius:var(--basalt-radius-full);animation:bh-spin var(--basalt-duration-loop-ring) linear infinite}.btn svg{flex:none}.btn{--_drawn: var(--_h);--_glyph: var(--basalt-size-icon-sm)}.btn[data-variant=ghost]:is([data-edge],:is(.panel-head,.section-head)>:last-child){--_inset: var(--_px)}.btn[data-variant=ghost][data-icon-only]:is([data-edge],:is(.panel-head,.section-head)>:last-child){--_inset: calc((var(--_drawn) - var(--_glyph)) / 2)}.btn[data-variant=ghost][data-edge=start]{--_hang: min(var(--_inset), var(--basalt-edge-room-start, var(--basalt-edge-room, var(--basalt-space-0))));margin-inline-start:calc(-1 * var(--_hang))}.btn[data-variant=ghost]:is([data-edge=end],:is(.panel-head,.section-head)>:last-child){--_hang: min(var(--_inset), var(--basalt-edge-room-end, var(--basalt-edge-room, var(--basalt-space-0))));margin-inline-end:calc(-1 * var(--_hang))}.btn[data-variant=ghost][data-edge=start]:focus-visible{outline-offset:clamp(calc(-1 * var(--basalt-size-focus-width)),calc((var(--basalt-edge-room-start, var(--basalt-edge-room, calc(var(--_hang) + var(--basalt-size-tap-min)))) - var(--_hang) - var(--basalt-size-focus-offset) - var(--basalt-size-focus-width)) * 999 + var(--basalt-size-focus-offset)),var(--basalt-size-focus-offset))}.btn[data-variant=ghost]:is([data-edge=end],:is(.panel-head,.section-head)>:last-child):focus-visible{outline-offset:clamp(calc(-1 * var(--basalt-size-focus-width)),calc((var(--basalt-edge-room-end, var(--basalt-edge-room, calc(var(--_hang) + var(--basalt-size-tap-min)))) - var(--_hang) - var(--basalt-size-focus-offset) - var(--basalt-size-focus-width)) * 999 + var(--basalt-size-focus-offset)),var(--basalt-size-focus-offset))}@media(pointer:coarse),(width<720px){.btn{min-height:var(--basalt-size-tap-min);border-radius:var(--basalt-radius-md);--_drawn: max(var(--_h), var(--basalt-size-tap-min))}.btn[data-icon-only]{min-width:var(--basalt-size-tap-min)}.btn[data-variant=ghost]:is([data-edge],:is(.panel-head,.section-head)>:last-child):not([data-icon-only]){--_miss: max(var(--basalt-space-0), calc(var(--basalt-size-tap-min) + 2 * var(--basalt-size-hairline) - 100%));min-width:max(var(--basalt-space-0),min(var(--basalt-size-tap-min),calc(var(--basalt-size-tap-min) + 2 * var(--basalt-size-hairline) - 2 * var(--_reach))))}.btn[data-variant=ghost]:is([data-edge=end],:is(.panel-head,.section-head)>:last-child):not([data-icon-only]){--_reach: calc(var(--basalt-edge-room-end, var(--basalt-edge-room, var(--basalt-space-0))) - var(--_hang))}.btn[data-variant=ghost][data-edge=start]:not([data-icon-only]){--_reach: calc(var(--basalt-edge-room-start, var(--basalt-edge-room, var(--basalt-space-0))) - var(--_hang))}.btn[data-variant=ghost]:is([data-edge],:is(.panel-head,.section-head)>:last-child):not([data-icon-only]):before{content:"";position:absolute;inset-block:min(var(--basalt-space-0),calc((100% - var(--basalt-size-tap-min)) / 2 - var(--basalt-size-hairline)))}.btn[data-variant=ghost]:is([data-edge=end],:is(.panel-head,.section-head)>:last-child):not([data-icon-only]):before{--_out: min(calc(var(--_miss) / 2), calc(var(--basalt-edge-room-end, var(--basalt-edge-room, var(--basalt-space-0))) - var(--_hang)));inset-inline:calc(var(--_out) - var(--_miss)) calc(-1 * var(--_out))}.btn[data-variant=ghost][data-edge=start]:not([data-icon-only]):before{--_out: min(calc(var(--_miss) / 2), calc(var(--basalt-edge-room-start, var(--basalt-edge-room, var(--basalt-space-0))) - var(--_hang)));inset-inline:calc(-1 * var(--_out)) calc(var(--_out) - var(--_miss))}}@media(pointer:coarse),(width<720px){a:not(.btn,.row,.tab,.disclosure,.brand,.skip-link,:is(p,li,.prose,.small,.hint,.error,.callout-body) a),nav a:not(.btn,.site-footer-links-host a),.footer a,.tap{display:inline-flex;align-items:center;min-height:var(--basalt-size-tap-min);margin-block:var(--bh-tap-margin, min( 0lh , calc((1lh - var(--basalt-size-tap-min)) / 2)))}.skip-link{display:inline-flex;align-items:center;min-height:var(--basalt-size-tap-min)}:is(a:not(.btn,.row,.tab,.disclosure,.brand,.skip-link,.topbar-links a,:is(p,li,.prose,.small,.hint,.error,.callout-body) a),.tap){position:relative}:is(a:not(.btn,.row,.tab,.disclosure,.brand,.skip-link,.topbar-links a,:is(p,li,.prose,.small,.hint,.error,.callout-body) a),.tap):after{content:"";position:absolute;inset-block:0;left:50%;width:max(100%,var(--basalt-size-tap-min));transform:translate(-50%)}.stack>a:not(.btn,.row,.tab,.disclosure):has(+a){margin-block-end:0;min-height:calc((var(--basalt-size-tap-min) + 1lh) / 2);align-items:flex-end}.stack>a+a:not(.btn,.row,.tab,.disclosure){margin-block-start:0;min-height:calc((var(--basalt-size-tap-min) + 1lh) / 2);align-items:flex-start}.stack>a+a:not(.btn,.row,.tab,.disclosure):has(+a){min-height:1lh;align-items:center}}@keyframes bh-spin{to{transform:rotate(360deg)}}@keyframes bh-fade{50%{opacity:.55}}@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}.btn[aria-busy=true]:after{animation:bh-fade var(--basalt-duration-loop-fade) var(--basalt-ease-in-out) infinite;border-top-color:color-mix(in oklch,currentColor 25%,transparent)}.btn:active:not([disabled],[aria-disabled=true],[aria-busy=true]){transform:none}.btn{transition-property:background-color,color,box-shadow}}@media(forced-colors:active){:is(.panel,.card,.callout,.code,.table-wrap){border-color:CanvasText}.btn{border:var(--basalt-size-hairline) solid ButtonText}}@media print{.skip-link{display:none}:is(.panel,.card,.callout,.code,.table-wrap){break-inside:avoid}}} diff --git a/.agent/skills/basalt-html/parts/diagram-zoom.css b/.agent/skills/basalt-html/parts/diagram-zoom.css index 8c319c02..4f115ef6 100644 --- a/.agent/skills/basalt-html/parts/diagram-zoom.css +++ b/.agent/skills/basalt-html/parts/diagram-zoom.css @@ -1 +1 @@ -@layer basalt{@media(pointer:coarse){.diagram-expand{min-height:var(--basalt-size-tap-min)}}@media(width>=720px){.dialog[data-form].diagram-viewer,.dialog[data-form][data-held].diagram-viewer{width:calc(100vw - 2 * var(--basalt-space-4));max-width:none;height:calc(100dvh - 2 * var(--basalt-space-4));max-height:none}}.diagram-viewer .sheet-head{flex:none}.diagram-viewer-source{overflow-wrap:break-word}.diagram-stage{--_pad: var(--basalt-space-4);--_travel: var(--basalt-space-1);--_clear: var(--basalt-space-4);--_rest: var(--basalt-duration-slower);position:relative;flex:1 1 auto;display:flex;min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable;touch-action:none;outline:none}@media(width>=720px){.diagram-stage{--_pad: var(--basalt-space-6)}}.diagram-stage:focus-visible{outline:var(--basalt-size-focus-width) solid var(--basalt-border-focus);outline-offset:calc(-1 * var(--basalt-size-focus-width))}.diagram-stage[data-pannable]{cursor:grab}.diagram-stage[data-pannable][data-dragging]{cursor:grabbing}.diagram-stage[data-list]{display:block;touch-action:pan-y}.diagram-probe{position:absolute;top:0;left:0;height:0;visibility:hidden;pointer-events:none}.diagram-probe[data-probe=row]{width:calc(var(--basalt-size-page-width) - 2 * var(--basalt-size-gutter))}.diagram-probe[data-probe=contain]{width:var(--basalt-size-breakpoint-container)}.diagram-sizer{position:relative;flex:none;box-sizing:content-box;margin:auto;padding:var(--_pad)}.diagram-sizer[hidden]{display:none}.diagram-layer{position:absolute;top:var(--_pad);inset-inline-start:var(--_pad);transform-origin:0 0;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}.diagram-layer:dir(rtl){transform-origin:100% 0}.diagram[data-viewer]{gap:0}.diagram[data-viewer]>:is(.diagram-head,.diagram-key,.diagram-hint,.diagram-tap-hint,.diagram-foot,.diagram-list,.diagram-summary){display:none}.diagram-viewer-list{box-sizing:border-box;max-width:calc(var(--basalt-size-page-width) - 2 * var(--basalt-size-gutter) + 2 * var(--_pad));padding:var(--_pad)}.diagram-viewer-foot{display:flex;flex-direction:column;gap:var(--basalt-space-3);padding-block-start:var(--basalt-space-3)}.diagram-viewer-key{--_ground: var(--panel-bg, var(--basalt-surface-overlay))}.diagram-viewer-key .diagram-key{padding-block-start:0;border-top:0}.diagram-viewer-key[data-layout=drawn] .diagram-entry[data-when=stacked],.diagram-viewer-key[data-layout=stacked] .diagram-entry[data-when=drawn],.diagram-viewer-key[data-bare] .diagram-entry[data-line]{display:none}.diagram-viewer-row{display:flex;flex-wrap:wrap;align-items:center;gap:var(--basalt-space-2)}.diagram-zoom{display:flex;align-items:center;gap:var(--basalt-space-1)}.diagram-level{display:inline-grid;justify-items:center;color:var(--basalt-text-secondary);font:var(--basalt-font-weight-regular) var(--basalt-text-sm-size) / var(--basalt-text-sm-line-height) var(--basalt-font-family-sans);font-variant-numeric:tabular-nums}.diagram-level:before{content:attr(data-reserve);grid-area:1 / 1;visibility:hidden}.diagram-level>span{grid-area:1 / 1}.diagram-viewer-hint{flex:1 1 auto;min-width:0}.diagram-viewer-end{display:flex;gap:var(--basalt-space-2);margin-inline-start:auto}@media(pointer:coarse){.diagram-zoom .btn,.diagram-viewer-end .btn{min-height:var(--basalt-size-tap-min);min-width:var(--basalt-size-tap-min)}}@media(forced-colors:active){.diagram-level{color:CanvasText}.diagram-viewer-foot [aria-disabled=true]{color:GrayText}}@media print{.diagram-expand,.diagram-viewer{display:none!important;transition:none!important}}} +@layer basalt{@media(pointer:coarse){.diagram-expand{min-height:var(--basalt-size-tap-min)}}@media(width>=720px){.dialog[data-form].diagram-viewer,.dialog[data-form][data-held].diagram-viewer{width:calc(100vw - 2 * var(--basalt-space-4));max-width:none;height:calc(100dvh - 2 * var(--basalt-space-4));max-height:none}}.diagram-viewer .sheet-head{flex:none}.diagram-viewer-source{overflow-wrap:break-word}.diagram-stage{--_pad: var(--basalt-space-4);--_travel: var(--basalt-space-1);--_clear: var(--basalt-space-4);--_rest: var(--basalt-duration-slower);position:relative;flex:1 1 auto;display:flex;min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable;touch-action:none;outline:none}@media(width>=720px){.diagram-stage{--_pad: var(--basalt-space-6)}}.diagram-stage:focus-visible{outline:var(--basalt-size-focus-width) solid var(--basalt-border-focus);outline-offset:calc(-1 * var(--basalt-size-focus-width))}.diagram-stage[data-pannable]{cursor:grab}.diagram-stage[data-pannable][data-dragging]{cursor:grabbing}.diagram-stage[data-list]{display:block;touch-action:pan-y}.diagram-probe{position:absolute;top:0;left:0;height:0;visibility:hidden;pointer-events:none}.diagram-probe[data-probe=row]{width:calc(var(--basalt-size-page-width) - 2 * var(--basalt-size-gutter))}.diagram-probe[data-probe=contain]{width:var(--basalt-size-breakpoint-container)}.diagram-sizer{position:relative;flex:none;box-sizing:content-box;margin:auto;padding:var(--_pad)}.diagram-sizer[hidden]{display:none}.diagram-layer{position:absolute;top:var(--_pad);inset-inline-start:var(--_pad);transform-origin:0 0;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}.diagram-layer:dir(rtl){transform-origin:100% 0}.diagram[data-viewer]{gap:0}.diagram[data-viewer]>:is(.diagram-head,.diagram-key,.diagram-hint,.diagram-tap-hint,.diagram-foot,.diagram-list,.diagram-summary){display:none}.diagram-viewer-list{box-sizing:border-box;max-width:calc(var(--basalt-size-page-width) - 2 * var(--basalt-size-gutter) + 2 * var(--_pad));padding:var(--_pad)}.diagram-viewer-foot{display:flex;flex-direction:column;gap:var(--basalt-space-3);padding-block-start:var(--basalt-space-3);--basalt-edge-room-start: calc(max(var(--basalt-space-5), var(--bh-inset-start)) - var(--bh-inset-start));--basalt-edge-room: initial;--basalt-edge-room-end: initial}.diagram-viewer-key{--_ground: var(--panel-bg, var(--basalt-surface-overlay))}.diagram-viewer-key .diagram-key{padding-block-start:0;border-top:0}.diagram-viewer-key[data-layout=drawn] .diagram-entry[data-when=stacked],.diagram-viewer-key[data-layout=stacked] .diagram-entry[data-when=drawn],.diagram-viewer-key[data-bare] .diagram-entry[data-line]{display:none}.diagram-viewer-row{display:flex;flex-wrap:wrap;align-items:center;gap:var(--basalt-space-2)}.diagram-zoom{display:flex;align-items:center;gap:var(--basalt-space-1)}.diagram-level{display:inline-grid;justify-items:center;color:var(--basalt-text-secondary);font:var(--basalt-font-weight-regular) var(--basalt-text-sm-size) / var(--basalt-text-sm-line-height) var(--basalt-font-family-sans);font-variant-numeric:tabular-nums}.diagram-level:before{content:attr(data-reserve);grid-area:1 / 1;visibility:hidden}.diagram-level>span{grid-area:1 / 1}.diagram-viewer-hint{flex:1 1 auto;min-width:0}.diagram-viewer-end{display:flex;gap:var(--basalt-space-2);margin-inline-start:auto}@media(pointer:coarse){.diagram-zoom .btn,.diagram-viewer-end .btn{min-height:var(--basalt-size-tap-min);min-width:var(--basalt-size-tap-min)}}@media(forced-colors:active){.diagram-level{color:CanvasText}.diagram-viewer-foot [aria-disabled=true]{color:GrayText}}@media print{.diagram-expand,.diagram-viewer{display:none!important;transition:none!important}}} diff --git a/.agent/skills/basalt-html/parts/diagram-zoom.js b/.agent/skills/basalt-html/parts/diagram-zoom.js index ed356211..b5403fdc 100644 --- a/.agent/skills/basalt-html/parts/diagram-zoom.js +++ b/.agent/skills/basalt-html/parts/diagram-zoom.js @@ -1 +1 @@ -(()=>{var tt="Plus and minus zoom, zero fits the drawing, Escape closes.";function et(s){return[...s.filter(h=>h.keys[0]!=="Esc"),{keys:["+","−"],words:"zoom"},{keys:["0"],words:"fit"},{keys:["Esc"],words:"close"}]}var G=[25,33,50,67,75,100,125,150,200,300,400],j=4,J=2,at=100,Q=25,U=5e-4;function it(s){const{stage:e,sizer:h,layer:p,status:k}=s;let m=0,M=0,a=1,r=1,c=!1,d=!1,y=null,u="",z=0;const T=()=>Number.parseFloat(getComputedStyle(h).paddingTop)||0,A=()=>Math.min(r,1),q=t=>Math.min(j,Math.max(A(),t));function o(){if(!m||!M)return 1;const t=T(),n=e.clientWidth-2*t,x=e.clientHeight-2*t;if(n<=0||x<=0)return Math.min(1,J);const H=Math.min(n/m,x/M);return Math.min(J,Math.floor(H*100+1e-6)/100)}function l(){const t=A();return{zoom:a,level:Math.round(a*100),fit:r,min:t,max:j,atMin:a<=t+U,atMax:a>=j-U,atFit:Math.abs(a-r)<U,listOpen:d}}function w(){s.onChange(l()),e.toggleAttribute("data-pannable",m*a>e.clientWidth-2*T()+.5||M*a>e.clientHeight-2*T()+.5)}function S(){clearTimeout(z);const t=`Zoom ${Math.round(a*100)}%`;z=window.setTimeout(()=>{t!==u&&(u=t,k.textContent=t)},s.rest)}function v(){h.style.width=`${m*a}px`,h.style.height=`${M*a}px`,p.style.transform=`scale(${a})`}function K(t){const n=p.getBoundingClientRect();return{x:(t.x-n.left)/a,y:(t.y-n.top)/a}}function E(t,n){const x=p.getBoundingClientRect();e.scrollLeft+=x.left+t.x*a-n.x,e.scrollTop+=x.top+t.y*a-n.y}const g=()=>{const t=e.getBoundingClientRect();return{x:t.left+e.clientWidth/2,y:t.top+e.clientHeight/2}};function W(t,n=g(),x){if(d)return;const H=q(t);if(Math.abs(H-a)<1e-6){w();return}const st=x??K(n);a=H,v(),E(st,n),w(),S()}function L(t){c=!0;const n=a*100,x=t?G.find(H=>H>n+.5):[...G].reverse().find(H=>H<n-.5);W(x===void 0?t?j:A():x/100)}function _(){d||(c=!1,a=r,v(),e.scrollTop=0,e.scrollLeft=getComputedStyle(e).direction==="rtl"?e.scrollWidth:0,w(),S())}function I(t,n){if(!t||!n)return;const x=c&&m&&M?K(g()):null;m=t,M=n,r=o(),c?(a=q(a),v(),x&&E(x,g())):(a=r,v(),e.scrollTop=0,e.scrollLeft=getComputedStyle(e).direction==="rtl"?e.scrollWidth:0),w()}function R(t){if(d||!(t.ctrlKey||t.metaKey))return;t.preventDefault();const n=t.deltaMode===1?16:t.deltaMode===2?e.clientHeight:1,x=Math.max(-Q,Math.min(Q,t.deltaY*n));c=!0,W(a*2**(-x/at),{x:t.clientX,y:t.clientY})}function D(t){t.defaultPrevented||t.ctrlKey||t.metaKey||t.altKey||d||(t.key==="+"||t.key==="="?(t.preventDefault(),L(!0)):t.key==="-"||t.key==="−"?(t.preventDefault(),L(!1)):t.key==="0"&&(t.preventDefault(),_()))}const f=new Map;let F=null,C=null,O=!1,$=!1,B=null;const V=()=>Number.parseFloat(getComputedStyle(e).getPropertyValue("--_travel"))||4,i=()=>{const[t,n]=[...f.values()];return{x:(t.x+n.x)/2,y:(t.y+n.y)/2}},b=()=>{const[t,n]=[...f.values()];return Math.hypot(t.x-n.x,t.y-n.y)};function Y(t){if(!d&&!(t.pointerType==="mouse"&&t.button!==0)&&(f.set(t.pointerId,{x:t.clientX,y:t.clientY}),f.size===1&&(F={x:t.clientX,y:t.clientY},C=F,O=!1,$=!1),f.size===2&&t.pointerType==="touch")){const n=i();B={d0:b()||1,z0:a,c:K(n)},$=!0,O=!1;try{e.setPointerCapture(t.pointerId)}catch{}}}function N(t){if(!f.has(t.pointerId)||d)return;if(f.set(t.pointerId,{x:t.clientX,y:t.clientY}),B&&f.size>=2){c=!0;const x=q(B.z0*(b()/B.d0)),H=i();Math.abs(x-a)>1e-6&&(a=x,v(),w(),S()),E(B.c,H);return}if(f.size!==1||!F||!C)return;const n={x:t.clientX,y:t.clientY};if(!O){if(Math.hypot(n.x-F.x,n.y-F.y)<=V())return;O=!0,$=!0,e.setAttribute("data-dragging","");try{e.setPointerCapture(t.pointerId)}catch{}}e.scrollLeft-=n.x-C.x,e.scrollTop-=n.y-C.y,C=n,t.preventDefault()}function Z(t){if(f.has(t.pointerId)){if(f.delete(t.pointerId),f.size<2&&(B=null),f.size===1){const[n]=[...f.values()];C=n,F=n,O=!0;return}f.size===0&&(O=!1,e.removeAttribute("data-dragging"),F=C=null)}}function P(t){$&&($=!1,t.preventDefault(),t.stopPropagation())}const X=new ResizeObserver(()=>{if(!m||!M)return;const t=c?K(g()):null;r=o(),c?(a=q(a),v(),t&&E(t,g())):(a=r,v()),w()});return X.observe(e),e.addEventListener("wheel",R,{passive:!1}),e.addEventListener("keydown",D),e.addEventListener("pointerdown",Y),e.addEventListener("pointermove",N),e.addEventListener("pointerup",Z),e.addEventListener("pointercancel",Z),e.addEventListener("click",P,!0),{size:I,zoomIn:()=>L(!0),zoomOut:()=>L(!1),fit:_,state:l,list(t){t!==d&&(t?(y={left:e.scrollLeft,top:e.scrollTop},d=!0,e.setAttribute("data-list",""),e.scrollTop=0):(d=!1,e.removeAttribute("data-list"),v(),y&&(e.scrollLeft=y.left,e.scrollTop=y.top),y=null),w())},travelled:()=>$,destroy(){clearTimeout(z),X.disconnect(),e.removeEventListener("wheel",R),e.removeEventListener("keydown",D),e.removeEventListener("pointerdown",Y),e.removeEventListener("pointermove",N),e.removeEventListener("pointerup",Z),e.removeEventListener("pointercancel",Z),e.removeEventListener("click",P,!0)}}}function rt(s,e,h){const p=s.getBoundingClientRect(),k=e.getBoundingClientRect(),m=p.left+h,M=p.left+s.clientWidth-h,a=p.top+h,r=p.top+s.clientHeight-h;k.left<m?s.scrollLeft-=m-k.left:k.right>M&&(s.scrollLeft+=Math.min(k.right-M,k.left-m)),k.top<a?s.scrollTop-=a-k.top:k.bottom>r&&(s.scrollTop+=Math.min(k.bottom-r,k.top-a))}function nt(s,e){s.memo.art=Math.ceil(e),s.layer.style.width=`${s.memo.art}px`}function ot(s,e,h,p,k,m,M,a){const{layer:r,memo:c,measureFigure:d}=a;if(c.model!==e&&(c.model=e,c.least=void 0,c.art=void 0),e.text){r.style.width=`${c.art??Math.min(a.avail,a.row)}px`;const w=r.style.transform;r.style.transform="none";const S=d(s,e,h,p,k,m,M);return r.style.transform=w,S}const y=w=>{r.style.width=`${Math.max(c.least||w,Math.min(a.avail,a.row))}px`};r.style.width||(r.style.width=`${Math.min(a.avail,a.row)}px`);const u=r.style.transform;r.style.transform="none";const z=r.offsetWidth?r.getBoundingClientRect().width/r.offsetWidth:1,T=Math.abs(z-1)>1e-4?` scale(${1/z})`:"";r.style.transform=T||"none";const A=(s.querySelector(`.${h}-drawing`)??r).getBoundingClientRect(),q=A.left-Math.round(A.left),o=A.top-Math.round(A.top);(q||o)&&(r.style.transform=`translate(${-q/z}px, ${-o/z}px)${T}`);let l=d(s,e,h,p,k,m,c.least===void 0?void 0:M,y);if(l.dyn.layout==="stacked"&&c.least===void 0&&l.least!==void 0){const w=l.dyn,S=g=>{r.style.width=`${g}px`;const W=d(s,e,h,p,w,m);return W.dyn.layout==="drawn"?d(s,e,h,p,W.dyn,m):W},v=Math.max(l.least,Math.min(a.avail,a.row)),K=Math.max(a.row,v)*1.5;let E;for(let g=v+16;g<=K&&E===void 0;g+=16)S(g).dyn.layout==="drawn"&&(E=g);if(E!==void 0){for(let g=E-15;g<E;g++)if(S(g).dyn.layout==="drawn"){E=g;break}}c.least=E??0,l=E!==void 0?S(E):d(s,e,h,p,w,m,M,y)}return l.dyn.layout==="stacked"&&s.clientWidth>a.contain&&(r.style.width=`${a.contain}px`,l=d(s,e,h,p,l.dyn,m,M)),r.style.transform=u,l}(function(s){"use strict";var e=s._,h=0;function p(a){return e.diagramKit.escapeHtml(String(a??""))}function k(a){return'<kbd class="kbd">'+p(a)+"</kbd>"}function m(a,r){return parseFloat(getComputedStyle(a).getPropertyValue(r))||0}function M(a,r,c,d){var y=e.diagramKit,u=Object.assign({},r,{motion:"still"}),z=y.buildModel(u,{placement:Array.isArray(u.placement)?u.placement[0]:u.placement}),T="dgv"+ ++h,A=y.figureKey("diagram",z),q=et(y.hintEntries(z,!0)).map(function(i){return"<span>"+i.keys.map(k).join(" ")+" "+p(i.words)+"</span>"}).join(""),o=document.createElement("dialog");o.className="panel float modal dialog diagram-viewer",o.setAttribute("data-form",""),o.setAttribute("aria-describedby",T+"-summary"),o.innerHTML='<header class="sheet-head"><div class="sheet-head-text"><h2 class="dialog-title" tabindex="-1">'+p(z.title)+"</h2>"+(r.source?'<p class="dialog-description diagram-viewer-source">'+p(r.source)+"</p>":"")+'</div><button type="button" class="btn sheet-close" data-variant="ghost" data-dialog-close aria-label="Close"><svg class="icon" viewBox="0 0 24 24" width="16" height="16" fill="none" aria-hidden="true" focusable="false"><g fill="none" stroke="currentColor" stroke-width="2.25" stroke-linecap="round" stroke-linejoin="round"><path d="M7.05 7.05C10.35 10.35 13.65 13.65 16.95 16.95"/><path d="M16.95 7.05C13.65 10.35 10.35 13.65 7.05 16.95"/></g></svg></button></header><p class="visually-hidden" id="'+T+'-summary">'+p(r.summary)+'</p><div class="diagram-stage" tabindex="0" role="group" aria-label="Zoomed drawing"><span class="diagram-probe" data-probe="row" aria-hidden="true"></span><span class="diagram-probe" data-probe="contain" aria-hidden="true"></span><div class="diagram-sizer"><div class="diagram-layer"><figure class="diagram"></figure></div></div></div><footer class="sheet-foot diagram-viewer-foot">'+(A?'<div class="diagram-viewer-key">'+y.toHtml(A)+"</div>":"")+'<div class="diagram-viewer-row"><div class="diagram-zoom"><button type="button" class="btn" data-variant="ghost" data-size="sm" data-icon-only data-zoom="out" aria-label="Zoom out"><svg class="icon" viewBox="0 0 24 24" width="16" height="16" fill="none" aria-hidden="true" focusable="false"><g fill="none" stroke="currentColor" stroke-width="2.25" stroke-linecap="round" stroke-linejoin="round"><path d="M5 12C9.667 12 14.333 12 19 12"/></g></svg></button><span class="diagram-level" aria-hidden="true" data-reserve="400%"><span>100%</span></span><button type="button" class="btn" data-variant="ghost" data-size="sm" data-icon-only data-zoom="in" aria-label="Zoom in"><svg class="icon" viewBox="0 0 24 24" width="16" height="16" fill="none" aria-hidden="true" focusable="false"><g fill="none" stroke="currentColor" stroke-width="2.25" stroke-linecap="round" stroke-linejoin="round"><path d="M5 12C9.667 12 14.333 12 19 12"/><path d="M12 5C12 9.667 12 14.333 12 19"/></g></svg></button><button type="button" class="btn diagram-fit" data-variant="secondary" data-size="sm" data-zoom="fit"><span>Fit</span></button></div><p class="diagram-hint diagram-viewer-hint" data-kbd-hint aria-hidden="true">'+q+'</p><div class="diagram-viewer-end"><button type="button" class="btn diagram-toggle" data-variant="secondary" data-size="sm" aria-expanded="false"><span>View as list</span></button></div></div><span class="visually-hidden" role="status"></span></footer>',document.body.appendChild(o);var l=o.querySelector(".diagram-stage"),w=o.querySelector(".diagram-sizer"),S=o.querySelector(".diagram-layer"),v=S.firstChild,K=o.querySelector('[role="status"]'),E=o.querySelector(".diagram-level > span"),g=o.querySelector(".diagram-viewer-key"),W=o.querySelector(".diagram-toggle"),L={out:o.querySelector('[data-zoom="out"]'),in:o.querySelector('[data-zoom="in"]'),fit:o.querySelector('[data-zoom="fit"]')},_=null,I=!1,R=!1,D=function(i,b){b?i.setAttribute("aria-disabled","true"):i.removeAttribute("aria-disabled")},f=it({stage:l,sizer:w,layer:S,status:K,rest:m(l,"--_rest")||300,onChange:function(i){E.textContent=i.level+"%",D(L.out,i.listOpen||i.atMin),D(L.in,i.listOpen||i.atMax),D(L.fit,i.listOpen||i.atFit)}}),F={},C={layer:S,avail:0,row:1104,contain:480,memo:F,measureFigure:y.measureFigure,keys:tt,room:function(){var i=parseFloat(getComputedStyle(w).paddingTop)||0;return{w:l.clientWidth-2*i,h:l.clientHeight-2*i}},measure:function(i,b,Y,N,Z,P,X){return ot(i,b,Y,N,Z,P,X,C)},textWidth:function(i){nt(C,i)},onMeasured:function(i,b){l.setAttribute("data-layout",i.dyn.layout||""),g&&(g.setAttribute("data-layout",i.dyn.layout||""),g.toggleAttribute("data-bare",!!i.dyn.bare)),R=!!i.dyn.bare,W.hidden=R,$(I||R),f.size(b.offsetWidth,b.offsetHeight)}};function O(){C.avail=Math.max(0,Math.floor(l.clientWidth-2*(parseFloat(getComputedStyle(w).paddingLeft)||0))),C.row=o.querySelector('[data-probe="row"]').offsetWidth||1104,C.contain=o.querySelector('[data-probe="contain"]').offsetWidth||480}function $(i){i&&!_&&(_=document.createElement("div"),_.className="diagram-list diagram-viewer-list",_.innerHTML=y.figureList("diagram",z).map(function(b){return y.toHtml(b)}).join(""),l.appendChild(_)),i&&f.list(!0),_&&(_.hidden=!i),w.hidden=i,i||f.list(!1)}W.addEventListener("click",function(){I=!I,W.setAttribute("aria-expanded",String(I)),W.firstElementChild.textContent=I?"Hide the list":"View as list",$(I||R)}),L.out.addEventListener("click",function(){L.out.hasAttribute("aria-disabled")||f.zoomOut()}),L.in.addEventListener("click",function(){L.in.hasAttribute("aria-disabled")||f.zoomIn()}),L.fit.addEventListener("click",function(){L.fit.hasAttribute("aria-disabled")||f.fit()}),o.addEventListener("click",function(i){var b=i.target.closest&&i.target.closest("a.diagram-node[href]");!b||!o.contains(b)||i.defaultPrevented||i.button!==0||i.metaKey||i.ctrlKey||i.shiftKey||i.altKey||b.target&&b.target!=="_self"||o.open&&o.close()}),l.addEventListener("focusin",function(i){var b=i.target.closest&&i.target.closest(".diagram-node");b&&l.contains(b)&&rt(l,b,m(l,"--_clear")||16)}),r.export===!0&&typeof e.diagramExport=="function"&&e.diagramExport(o.querySelector(".diagram-viewer-end"),v),s.openDialog(o,d),O(),y.draw(v,u,!1,C),setTimeout(function(){l.focus({preventScroll:!0})},0);var B=l.clientWidth,V=new ResizeObserver(function(){Math.abs(l.clientWidth-B)<.5||(B=l.clientWidth,O(),v.__diagram&&v.__diagram.layout())});V.observe(l),o.addEventListener("transitionend",function(i){i.target===o&&i.propertyName==="transform"&&o.open&&v.__diagram&&v.__diagram.layout()}),a.setAttribute("data-viewing",""),c.animated&&c.settle(),o.addEventListener("close",function(){V.disconnect(),f.destroy(),v.__diagram&&v.__diagram.stop(),a.removeAttribute("data-viewing"),setTimeout(function(){o.remove()},m(o,"--_dur")*.75||300)})}e.diagramZoom=function(a,r,c){var d=a.querySelector(":scope > .diagram-foot");if(!d)return null;var y=d.querySelector(".diagram-expand");y&&y.remove();var u=document.createElement("button");u.type="button",u.className="btn diagram-expand",u.setAttribute("data-variant","secondary"),u.setAttribute("data-size","sm"),u.setAttribute("aria-haspopup","dialog"),u.innerHTML="<span>Expand</span>";var z=d.querySelector(".diagram-toggle");z&&z.nextSibling?d.insertBefore(u,z.nextSibling):d.appendChild(u);var T=function(){M(a,r,c,u)};return u.addEventListener("click",T),{destroy:function(){u.removeEventListener("click",T),u.remove()}}}})(window.Basalt)})(); +(()=>{var tt="Plus and minus zoom, zero fits the drawing, Escape closes.";function et(s){return[...s.filter(y=>y.keys[0]!=="Esc"),{keys:["+","−"],words:"zoom"},{keys:["0"],words:"fit"},{keys:["Esc"],words:"close"}]}var G=[25,33,50,67,75,100,125,150,200,300,400],j=4,J=2,at=100,Q=25,U=5e-4;function it(s){const{stage:e,sizer:y,layer:p,status:k}=s;let m=0,M=0,a=1,n=1,c=!1,d=!1,h=null,u="",z=0;const T=()=>Number.parseFloat(getComputedStyle(y).paddingTop)||0,A=()=>Math.min(n,1),q=t=>Math.min(j,Math.max(A(),t));function o(){if(!m||!M)return 1;const t=T(),r=e.clientWidth-2*t,x=e.clientHeight-2*t;if(r<=0||x<=0)return Math.min(1,J);const H=Math.min(r/m,x/M);return Math.min(J,Math.floor(H*100+1e-6)/100)}function l(){const t=A();return{zoom:a,level:Math.round(a*100),fit:n,min:t,max:j,atMin:a<=t+U,atMax:a>=j-U,atFit:Math.abs(a-n)<U,listOpen:d}}function w(){s.onChange(l()),e.toggleAttribute("data-pannable",m*a>e.clientWidth-2*T()+.5||M*a>e.clientHeight-2*T()+.5)}function S(){clearTimeout(z);const t=`Zoom ${Math.round(a*100)}%`;z=window.setTimeout(()=>{t!==u&&(u=t,k.textContent=t)},s.rest)}function v(){y.style.width=`${m*a}px`,y.style.height=`${M*a}px`,p.style.transform=`scale(${a})`}function K(t){const r=p.getBoundingClientRect();return{x:(t.x-r.left)/a,y:(t.y-r.top)/a}}function E(t,r){const x=p.getBoundingClientRect();e.scrollLeft+=x.left+t.x*a-r.x,e.scrollTop+=x.top+t.y*a-r.y}const g=()=>{const t=e.getBoundingClientRect();return{x:t.left+e.clientWidth/2,y:t.top+e.clientHeight/2}};function W(t,r=g(),x){if(d)return;const H=q(t);if(Math.abs(H-a)<1e-6){w();return}const st=x??K(r);a=H,v(),E(st,r),w(),S()}function L(t){c=!0;const r=a*100,x=t?G.find(H=>H>r+.5):[...G].reverse().find(H=>H<r-.5);W(x===void 0?t?j:A():x/100)}function _(){d||(c=!1,a=n,v(),e.scrollTop=0,e.scrollLeft=getComputedStyle(e).direction==="rtl"?e.scrollWidth:0,w(),S())}function I(t,r){if(!t||!r)return;const x=c&&m&&M?K(g()):null;m=t,M=r,n=o(),c?(a=q(a),v(),x&&E(x,g())):(a=n,v(),e.scrollTop=0,e.scrollLeft=getComputedStyle(e).direction==="rtl"?e.scrollWidth:0),w()}function R(t){if(d||!(t.ctrlKey||t.metaKey))return;t.preventDefault();const r=t.deltaMode===1?16:t.deltaMode===2?e.clientHeight:1,x=Math.max(-Q,Math.min(Q,t.deltaY*r));c=!0,W(a*2**(-x/at),{x:t.clientX,y:t.clientY})}function D(t){t.defaultPrevented||t.ctrlKey||t.metaKey||t.altKey||d||(t.key==="+"||t.key==="="?(t.preventDefault(),L(!0)):t.key==="-"||t.key==="−"?(t.preventDefault(),L(!1)):t.key==="0"&&(t.preventDefault(),_()))}const f=new Map;let F=null,C=null,O=!1,$=!1,B=null;const V=()=>Number.parseFloat(getComputedStyle(e).getPropertyValue("--_travel"))||4,i=()=>{const[t,r]=[...f.values()];return{x:(t.x+r.x)/2,y:(t.y+r.y)/2}},b=()=>{const[t,r]=[...f.values()];return Math.hypot(t.x-r.x,t.y-r.y)};function Y(t){if(!d&&!(t.pointerType==="mouse"&&t.button!==0)&&(f.set(t.pointerId,{x:t.clientX,y:t.clientY}),f.size===1&&(F={x:t.clientX,y:t.clientY},C=F,O=!1,$=!1),f.size===2&&t.pointerType==="touch")){const r=i();B={d0:b()||1,z0:a,c:K(r)},$=!0,O=!1;try{e.setPointerCapture(t.pointerId)}catch{}}}function N(t){if(!f.has(t.pointerId)||d)return;if(f.set(t.pointerId,{x:t.clientX,y:t.clientY}),B&&f.size>=2){c=!0;const x=q(B.z0*(b()/B.d0)),H=i();Math.abs(x-a)>1e-6&&(a=x,v(),w(),S()),E(B.c,H);return}if(f.size!==1||!F||!C)return;const r={x:t.clientX,y:t.clientY};if(!O){if(Math.hypot(r.x-F.x,r.y-F.y)<=V())return;O=!0,$=!0,e.setAttribute("data-dragging","");try{e.setPointerCapture(t.pointerId)}catch{}}e.scrollLeft-=r.x-C.x,e.scrollTop-=r.y-C.y,C=r,t.preventDefault()}function Z(t){if(f.has(t.pointerId)){if(f.delete(t.pointerId),f.size<2&&(B=null),f.size===1){const[r]=[...f.values()];C=r,F=r,O=!0;return}f.size===0&&(O=!1,e.removeAttribute("data-dragging"),F=C=null)}}function P(t){$&&($=!1,t.preventDefault(),t.stopPropagation())}const X=new ResizeObserver(()=>{if(!m||!M)return;const t=c?K(g()):null;n=o(),c?(a=q(a),v(),t&&E(t,g())):(a=n,v()),w()});return X.observe(e),e.addEventListener("wheel",R,{passive:!1}),e.addEventListener("keydown",D),e.addEventListener("pointerdown",Y),e.addEventListener("pointermove",N),e.addEventListener("pointerup",Z),e.addEventListener("pointercancel",Z),e.addEventListener("click",P,!0),{size:I,zoomIn:()=>L(!0),zoomOut:()=>L(!1),fit:_,state:l,list(t){t!==d&&(t?(h={left:e.scrollLeft,top:e.scrollTop},d=!0,e.setAttribute("data-list",""),e.scrollTop=0):(d=!1,e.removeAttribute("data-list"),v(),h&&(e.scrollLeft=h.left,e.scrollTop=h.top),h=null),w())},travelled:()=>$,destroy(){clearTimeout(z),X.disconnect(),e.removeEventListener("wheel",R),e.removeEventListener("keydown",D),e.removeEventListener("pointerdown",Y),e.removeEventListener("pointermove",N),e.removeEventListener("pointerup",Z),e.removeEventListener("pointercancel",Z),e.removeEventListener("click",P,!0)}}}function nt(s,e,y){const p=s.getBoundingClientRect(),k=e.getBoundingClientRect(),m=p.left+y,M=p.left+s.clientWidth-y,a=p.top+y,n=p.top+s.clientHeight-y;k.left<m?s.scrollLeft-=m-k.left:k.right>M&&(s.scrollLeft+=Math.min(k.right-M,k.left-m)),k.top<a?s.scrollTop-=a-k.top:k.bottom>n&&(s.scrollTop+=Math.min(k.bottom-n,k.top-a))}function rt(s,e){s.memo.art=Math.ceil(e),s.layer.style.width=`${s.memo.art}px`}function ot(s,e,y,p,k,m,M,a){const{layer:n,memo:c,measureFigure:d}=a;if(c.model!==e&&(c.model=e,c.least=void 0,c.art=void 0),e.text){n.style.width=`${c.art??Math.min(a.avail,a.row)}px`;const w=n.style.transform;n.style.transform="none";const S=d(s,e,y,p,k,m,M);return n.style.transform=w,S}const h=w=>{n.style.width=`${Math.max(c.least||w,Math.min(a.avail,a.row))}px`};n.style.width||(n.style.width=`${Math.min(a.avail,a.row)}px`);const u=n.style.transform;n.style.transform="none";const z=n.offsetWidth?n.getBoundingClientRect().width/n.offsetWidth:1,T=Math.abs(z-1)>1e-4?` scale(${1/z})`:"";n.style.transform=T||"none";const A=(s.querySelector(`.${y}-drawing`)??n).getBoundingClientRect(),q=A.left-Math.round(A.left),o=A.top-Math.round(A.top);(q||o)&&(n.style.transform=`translate(${-q/z}px, ${-o/z}px)${T}`);let l=d(s,e,y,p,k,m,c.least===void 0?void 0:M,h);if(l.dyn.layout==="stacked"&&c.least===void 0&&l.least!==void 0){const w=l.dyn,S=g=>{n.style.width=`${g}px`;const W=d(s,e,y,p,w,m);return W.dyn.layout==="drawn"?d(s,e,y,p,W.dyn,m):W},v=Math.max(l.least,Math.min(a.avail,a.row)),K=Math.max(a.row,v)*1.5;let E;for(let g=v+16;g<=K&&E===void 0;g+=16)S(g).dyn.layout==="drawn"&&(E=g);if(E!==void 0){for(let g=E-15;g<E;g++)if(S(g).dyn.layout==="drawn"){E=g;break}}c.least=E??0,l=E!==void 0?S(E):d(s,e,y,p,w,m,M,h)}return l.dyn.layout==="stacked"&&s.clientWidth>a.contain&&(n.style.width=`${a.contain}px`,l=d(s,e,y,p,l.dyn,m,M)),n.style.transform=u,l}(function(s){"use strict";var e=s._,y=0;function p(a){return e.diagramKit.escapeHtml(String(a??""))}function k(a){return'<kbd class="kbd">'+p(a)+"</kbd>"}function m(a,n){return parseFloat(getComputedStyle(a).getPropertyValue(n))||0}function M(a,n,c,d){var h=e.diagramKit,u=Object.assign({},n,{motion:"still"}),z=h.buildModel(u,{placement:Array.isArray(u.placement)?u.placement[0]:u.placement}),T="dgv"+ ++y,A=h.figureKey("diagram",z),q=et(h.hintEntries(z,!0)).map(function(i){return"<span>"+i.keys.map(k).join(" ")+" "+p(i.words)+"</span>"}).join(""),o=document.createElement("dialog");o.className="panel float modal dialog diagram-viewer",o.setAttribute("data-form",""),o.setAttribute("aria-describedby",T+"-summary"),o.innerHTML='<header class="sheet-head"><div class="sheet-head-text"><h2 class="dialog-title" tabindex="-1">'+p(z.title)+"</h2>"+(n.source?'<p class="dialog-description diagram-viewer-source">'+p(n.source)+"</p>":"")+'</div><button type="button" class="btn sheet-close" data-variant="ghost" data-icon-only data-edge="end" data-dialog-close aria-label="Close"><svg class="icon" viewBox="0 0 24 24" width="16" height="16" fill="none" aria-hidden="true" focusable="false"><g fill="none" stroke="currentColor" stroke-width="2.25" stroke-linecap="round" stroke-linejoin="round"><path d="M7.05 7.05C10.35 10.35 13.65 13.65 16.95 16.95"/><path d="M16.95 7.05C13.65 10.35 10.35 13.65 7.05 16.95"/></g></svg></button></header><p class="visually-hidden" id="'+T+'-summary">'+p(n.summary)+'</p><div class="diagram-stage" tabindex="0" role="group" aria-label="Zoomed drawing"><span class="diagram-probe" data-probe="row" aria-hidden="true"></span><span class="diagram-probe" data-probe="contain" aria-hidden="true"></span><div class="diagram-sizer"><div class="diagram-layer"><figure class="diagram"></figure></div></div></div><footer class="sheet-foot diagram-viewer-foot">'+(A?'<div class="diagram-viewer-key">'+h.toHtml(A)+"</div>":"")+'<div class="diagram-viewer-row"><div class="diagram-zoom"><button type="button" class="btn" data-variant="ghost" data-size="sm" data-icon-only data-edge="start" data-zoom="out" aria-label="Zoom out"><svg class="icon" viewBox="0 0 24 24" width="16" height="16" fill="none" aria-hidden="true" focusable="false"><g fill="none" stroke="currentColor" stroke-width="2.25" stroke-linecap="round" stroke-linejoin="round"><path d="M5 12C9.667 12 14.333 12 19 12"/></g></svg></button><span class="diagram-level" aria-hidden="true" data-reserve="400%"><span>100%</span></span><button type="button" class="btn" data-variant="ghost" data-size="sm" data-icon-only data-zoom="in" aria-label="Zoom in"><svg class="icon" viewBox="0 0 24 24" width="16" height="16" fill="none" aria-hidden="true" focusable="false"><g fill="none" stroke="currentColor" stroke-width="2.25" stroke-linecap="round" stroke-linejoin="round"><path d="M5 12C9.667 12 14.333 12 19 12"/><path d="M12 5C12 9.667 12 14.333 12 19"/></g></svg></button><button type="button" class="btn diagram-fit" data-variant="secondary" data-size="sm" data-zoom="fit"><span>Fit</span></button></div><p class="diagram-hint diagram-viewer-hint" data-kbd-hint aria-hidden="true">'+q+'</p><div class="diagram-viewer-end"><button type="button" class="btn diagram-toggle" data-variant="secondary" data-size="sm" aria-expanded="false"><span>View as list</span></button></div></div><span class="visually-hidden" role="status"></span></footer>',document.body.appendChild(o);var l=o.querySelector(".diagram-stage"),w=o.querySelector(".diagram-sizer"),S=o.querySelector(".diagram-layer"),v=S.firstChild,K=o.querySelector('[role="status"]'),E=o.querySelector(".diagram-level > span"),g=o.querySelector(".diagram-viewer-key"),W=o.querySelector(".diagram-toggle"),L={out:o.querySelector('[data-zoom="out"]'),in:o.querySelector('[data-zoom="in"]'),fit:o.querySelector('[data-zoom="fit"]')},_=null,I=!1,R=!1,D=function(i,b){b?i.setAttribute("aria-disabled","true"):i.removeAttribute("aria-disabled")},f=it({stage:l,sizer:w,layer:S,status:K,rest:m(l,"--_rest")||300,onChange:function(i){E.textContent=i.level+"%",D(L.out,i.listOpen||i.atMin),D(L.in,i.listOpen||i.atMax),D(L.fit,i.listOpen||i.atFit)}}),F={},C={layer:S,avail:0,row:1104,contain:480,memo:F,measureFigure:h.measureFigure,keys:tt,room:function(){var i=parseFloat(getComputedStyle(w).paddingTop)||0;return{w:l.clientWidth-2*i,h:l.clientHeight-2*i}},measure:function(i,b,Y,N,Z,P,X){return ot(i,b,Y,N,Z,P,X,C)},textWidth:function(i){rt(C,i)},onMeasured:function(i,b){l.setAttribute("data-layout",i.dyn.layout||""),g&&(g.setAttribute("data-layout",i.dyn.layout||""),g.toggleAttribute("data-bare",!!i.dyn.bare)),R=!!i.dyn.bare,W.hidden=R,$(I||R),f.size(b.offsetWidth,b.offsetHeight)}};function O(){C.avail=Math.max(0,Math.floor(l.clientWidth-2*(parseFloat(getComputedStyle(w).paddingLeft)||0))),C.row=o.querySelector('[data-probe="row"]').offsetWidth||1104,C.contain=o.querySelector('[data-probe="contain"]').offsetWidth||480}function $(i){i&&!_&&(_=document.createElement("div"),_.className="diagram-list diagram-viewer-list",_.innerHTML=h.figureList("diagram",z).map(function(b){return h.toHtml(b)}).join(""),l.appendChild(_)),i&&f.list(!0),_&&(_.hidden=!i),w.hidden=i,i||f.list(!1)}W.addEventListener("click",function(){I=!I,W.setAttribute("aria-expanded",String(I)),W.firstElementChild.textContent=I?"Hide the list":"View as list",$(I||R)}),L.out.addEventListener("click",function(){L.out.hasAttribute("aria-disabled")||f.zoomOut()}),L.in.addEventListener("click",function(){L.in.hasAttribute("aria-disabled")||f.zoomIn()}),L.fit.addEventListener("click",function(){L.fit.hasAttribute("aria-disabled")||f.fit()}),o.addEventListener("click",function(i){var b=i.target.closest&&i.target.closest("a.diagram-node[href]");!b||!o.contains(b)||i.defaultPrevented||i.button!==0||i.metaKey||i.ctrlKey||i.shiftKey||i.altKey||b.target&&b.target!=="_self"||o.open&&o.close()}),l.addEventListener("focusin",function(i){var b=i.target.closest&&i.target.closest(".diagram-node");b&&l.contains(b)&&nt(l,b,m(l,"--_clear")||16)}),n.export===!0&&typeof e.diagramExport=="function"&&e.diagramExport(o.querySelector(".diagram-viewer-end"),v),s.openDialog(o,d),O(),h.draw(v,u,!1,C),setTimeout(function(){l.focus({preventScroll:!0})},0);var B=l.clientWidth,V=new ResizeObserver(function(){Math.abs(l.clientWidth-B)<.5||(B=l.clientWidth,O(),v.__diagram&&v.__diagram.layout())});V.observe(l),o.addEventListener("transitionend",function(i){i.target===o&&i.propertyName==="transform"&&o.open&&v.__diagram&&v.__diagram.layout()}),a.setAttribute("data-viewing",""),c.animated&&c.settle(),o.addEventListener("close",function(){V.disconnect(),f.destroy(),v.__diagram&&v.__diagram.stop(),a.removeAttribute("data-viewing"),setTimeout(function(){o.remove()},m(o,"--_dur")*.75||300)})}e.diagramZoom=function(a,n,c){var d=a.querySelector(":scope > .diagram-foot");if(!d)return null;var h=d.querySelector(".diagram-expand");h&&h.remove();var u=document.createElement("button");u.type="button",u.className="btn diagram-expand",u.setAttribute("data-variant","secondary"),u.setAttribute("data-size","sm"),u.setAttribute("aria-haspopup","dialog"),u.innerHTML="<span>Expand</span>";var z=d.querySelector(".diagram-toggle");z&&z.nextSibling?d.insertBefore(u,z.nextSibling):d.appendChild(u);var T=function(){M(a,n,c,u)};return u.addEventListener("click",T),{destroy:function(){u.removeEventListener("click",T),u.remove()}}}})(window.Basalt)})(); diff --git a/.agent/skills/basalt-html/parts/filter.css b/.agent/skills/basalt-html/parts/filter.css index 7dd7aede..8902ffa9 100644 --- a/.agent/skills/basalt-html/parts/filter.css +++ b/.agent/skills/basalt-html/parts/filter.css @@ -1 +1 @@ -@layer basalt{.filter{display:flex;flex-direction:column;gap:var(--basalt-space-2);min-width:0}.filter-head{display:flex;align-items:center;gap:var(--basalt-space-2);min-height:var(--basalt-size-control-sm)}.filter-label{font:var(--basalt-font-weight-medium) var(--bh-sm);color:var(--basalt-text-primary)}.filter-count{font:var(--basalt-font-weight-regular) var(--bh-sm);color:var(--basalt-text-tertiary);font-variant-numeric:tabular-nums}.filter-count[data-reserved]{display:inline-grid}.filter-count[data-reserved]>.filter-count-value{grid-area:1 / 1}.filter-count[data-reserved]:before,.filter-count[data-reserved]:after{grid-area:1 / 1;height:0;overflow:hidden;visibility:hidden;user-select:none;pointer-events:none}.filter-count[data-reserved]:before{content:attr(data-any)}.filter-count[data-reserved]:after{content:attr(data-widest)}.filter-chips{display:flex;flex-wrap:wrap;gap:var(--basalt-space-2)}.chip{position:relative;box-sizing:border-box;display:inline-flex;align-items:center;gap:var(--basalt-space-1-5);height:var(--basalt-size-control-md);margin:0;padding:0 calc(var(--basalt-space-3) - var(--basalt-size-hairline)) 0 calc(var(--basalt-space-2) - var(--basalt-size-hairline));border:var(--basalt-size-hairline) solid var(--basalt-border-hairline);border-radius:var(--basalt-radius-sm);background:transparent;color:var(--basalt-text-secondary);font:var(--basalt-font-weight-medium) var(--bh-sm);white-space:nowrap;cursor:pointer;user-select:none;-webkit-tap-highlight-color:transparent;transition-property:background-color,color,border-color;transition-duration:var(--basalt-duration-fast);transition-timing-function:var(--basalt-ease-out)}.chip>.chip-input{appearance:none;position:absolute;inset:0;width:100%;height:100%;margin:0;padding:0;border-radius:inherit;opacity:0;cursor:inherit}.chip>.chip-input:focus-visible{outline:none}.chip-seat{position:relative;flex:none;width:var(--basalt-size-icon-sm);height:var(--basalt-size-icon-sm);color:var(--basalt-text-tertiary);transition:color var(--basalt-duration-fast) var(--basalt-ease-out)}.chip-seat>svg{position:absolute;inset:0;transition:opacity var(--basalt-duration-fast) var(--basalt-ease-out)}.chip-check,.chip:has(>.chip-input:checked) .chip-plus{opacity:0}.chip:has(>.chip-input:checked) .chip-check{opacity:1}.chip:has(>.chip-input:checked){background:var(--basalt-state-selected);color:var(--basalt-text-primary)}.chip:has(>.chip-input:checked) .chip-seat{color:var(--basalt-text-primary)}@media(hover:hover){.chip:hover:not(:has(>.chip-input:disabled)){color:var(--basalt-text-primary);border-color:var(--basalt-border-hover);transition-duration:var(--basalt-duration-instant)}.chip:hover:not(:has(>.chip-input:disabled,>.chip-input:checked)) .chip-seat{color:var(--basalt-text-secondary)}}.chip:active:not(:has(>.chip-input:disabled)){background:var(--basalt-state-hover)}.chip:has(>.chip-input:checked):active:not(:has(>.chip-input:disabled)){background:var(--basalt-state-selected)}.chip:has(>.chip-input:focus-visible){outline:var(--basalt-size-focus-width) solid var(--basalt-border-focus);outline-offset:var(--basalt-size-focus-offset)}.chip:has(>.chip-input:disabled){color:var(--basalt-text-disabled);border-color:var(--basalt-border-divider);cursor:not-allowed;background:transparent}.chip:has(>.chip-input:disabled) .chip-seat{color:var(--basalt-text-disabled)}@media(pointer:coarse),(width<720px){.chip{height:var(--basalt-size-control-lg);border-radius:var(--basalt-radius-md);font-size:var(--basalt-text-base-size)}.chip:before{content:"";position:absolute;inset:calc((var(--basalt-size-control-lg) - var(--basalt-size-tap-min)) / 2 - var(--basalt-size-hairline)) 0}}.filter-clear[aria-disabled=true]{box-shadow:none}.filter[data-popup]{flex-direction:row;align-items:center}.filter-trigger-value{color:var(--basalt-text-secondary)}.filter-trigger[data-active] .filter-trigger-value{color:var(--basalt-text-primary)}.filter-trigger[data-active]:not(:active){background:var(--basalt-state-selected)}.filter-trigger-value:has(>.filter-trigger-sizer){display:inline-grid;justify-items:start}.filter-trigger-value>*{grid-area:1 / 1}.filter-trigger-sizer{visibility:hidden;user-select:none}.filter-trigger-label-wrap{display:inline-flex;align-items:center;gap:var(--basalt-space-1-5)}.filter-popup{min-width:var(--basalt-size-select-min);max-height:var(--available-height, 100vh);overflow-y:auto;padding:var(--basalt-space-0-5) var(--basalt-space-1)}.filter-row{--_h: var(--basalt-size-menu-row);--_inset: var(--basalt-space-0-5);box-sizing:border-box;position:relative;isolation:isolate;display:flex;align-items:center;gap:var(--basalt-space-2-5);width:100%;height:calc(var(--_h) + 2 * var(--_inset));margin:0;padding:0 var(--basalt-space-3);background:transparent;color:var(--basalt-text-secondary);font:var(--basalt-font-weight-regular) var(--bh-base);cursor:default;user-select:none;transition:color var(--basalt-duration-fast) var(--basalt-ease-out)}.filter-row:before{content:"";position:absolute;inset:var(--_inset) 0;z-index:-1;border-radius:var(--basalt-radius-md);background-color:transparent;transition:background-color var(--basalt-duration-fast) var(--basalt-ease-out)}.filter-row input:focus-visible{outline:none}.filter-row[hidden]{display:none}.filter-row-label{flex:1;min-width:0}.filter-row[data-highlighted]{color:var(--basalt-text-primary);transition-duration:var(--basalt-duration-instant)}.filter-row[data-highlighted]:before{background-color:var(--panel-plate);transition-duration:var(--basalt-duration-instant)}.filter-row:has(>input:disabled){color:var(--basalt-text-disabled)}@media(pointer:coarse),(width<720px){.filter-row{height:max(calc(var(--_h) + 2 * var(--_inset)),var(--basalt-size-menu-row-touch))}}.filter-foot{display:flex;align-items:center;justify-content:space-between;gap:var(--basalt-space-3);padding:var(--basalt-space-1-5) var(--basalt-space-3);border-top:var(--basalt-size-hairline) solid var(--basalt-border-divider);margin:var(--basalt-space-0-5) calc(-1 * var(--basalt-space-1)) 0}.filter-rows{max-height:var(--basalt-size-popup-max-height);margin-inline:calc(-1 * var(--basalt-space-1));padding-inline:var(--basalt-space-1);overflow-y:auto;overscroll-behavior:contain}.filter-band{box-sizing:border-box;display:flex;align-items:center;gap:var(--basalt-space-2-5);height:var(--basalt-size-control-xl);margin:calc(-1 * var(--basalt-space-0-5)) calc(-1 * var(--basalt-space-1)) var(--basalt-space-0-5);padding:0 var(--basalt-space-3);background:var(--panel-next);border-bottom:var(--basalt-size-hairline) solid var(--basalt-border-divider);color:var(--basalt-text-tertiary)}.filter-band:has(.filter-band-input:focus-visible){outline:var(--basalt-size-focus-width) solid var(--basalt-border-focus);outline-offset:calc(-1 * var(--basalt-size-focus-width))}.filter-band-input{flex:1;min-width:0;height:100%;margin:0;padding:0;border:0;background:transparent;color:var(--basalt-text-primary);font:var(--basalt-font-weight-regular) var(--bh-base);outline:none}.filter-band-input::placeholder{color:var(--basalt-text-tertiary);opacity:1}@media(pointer:coarse){.filter-band-input{font-size:var(--basalt-text-md-size)}}.filter-none{margin:0;padding:var(--basalt-space-3);font:var(--basalt-font-weight-regular) var(--bh-sm);color:var(--basalt-text-secondary)}.filter-none[hidden]{display:none}.filter-result{margin:0;font:var(--basalt-font-weight-regular) var(--bh-sm);color:var(--basalt-text-secondary);font-variant-numeric:tabular-nums}@media(prefers-reduced-motion:no-preference)and (forced-colors:none)and (hover:hover)and (pointer:fine){.filter-popup[data-glide] .filter-row[data-highlighted]:before{background-color:transparent}}@media(forced-colors:active){.chip{color:ButtonText}.chip:has(>.chip-input:checked),.chip:has(>.chip-input:checked):hover,.chip:has(>.chip-input:checked):active{forced-color-adjust:none;background:Highlight;border-color:Highlight;color:HighlightText}.chip:has(>.chip-input:checked) :is(.chip-label,.chip-seat,svg){color:HighlightText}.chip:has(>.chip-input:disabled),.chip:has(>.chip-input:disabled) .chip-seat{color:GrayText;border-color:GrayText}.filter-count,.filter-result{color:CanvasText}.filter-row:has(>input:disabled){color:GrayText}.filter-row[data-highlighted]{forced-color-adjust:none;color:HighlightText}.filter-row[data-highlighted]:before{background-color:Highlight}.filter-row[data-highlighted] .filter-row-label{color:HighlightText}}} +@layer basalt{.filter{display:flex;flex-direction:column;gap:var(--basalt-space-2);min-width:0}.filter-head{display:flex;align-items:center;gap:var(--basalt-space-2);min-height:var(--basalt-size-control-sm)}.filter-label{font:var(--basalt-font-weight-medium) var(--bh-sm);color:var(--basalt-text-primary)}.filter-count{font:var(--basalt-font-weight-regular) var(--bh-sm);color:var(--basalt-text-tertiary);font-variant-numeric:tabular-nums}.filter-count[data-reserved]{display:inline-grid}.filter-count[data-reserved]>.filter-count-value{grid-area:1 / 1}.filter-count[data-reserved]:before,.filter-count[data-reserved]:after{grid-area:1 / 1;height:0;overflow:hidden;visibility:hidden;user-select:none;pointer-events:none}.filter-count[data-reserved]:before{content:attr(data-any)}.filter-count[data-reserved]:after{content:attr(data-widest)}.filter-chips{display:flex;flex-wrap:wrap;gap:var(--basalt-space-2)}.chip{position:relative;box-sizing:border-box;display:inline-flex;align-items:center;gap:var(--basalt-space-1-5);height:var(--basalt-size-control-md);margin:0;padding-block:0;padding-inline:calc(var(--basalt-space-2) - var(--basalt-size-hairline)) calc(var(--basalt-space-3) - var(--basalt-size-hairline));border:var(--basalt-size-hairline) solid var(--basalt-border-hairline);border-radius:var(--basalt-radius-sm);background:transparent;color:var(--basalt-text-secondary);font:var(--basalt-font-weight-medium) var(--bh-sm);white-space:nowrap;cursor:pointer;user-select:none;-webkit-tap-highlight-color:transparent;transition-property:background-color,color,border-color;transition-duration:var(--basalt-duration-fast);transition-timing-function:var(--basalt-ease-out)}.chip>.chip-input{appearance:none;position:absolute;inset:0;width:100%;height:100%;margin:0;padding:0;border-radius:inherit;opacity:0;cursor:inherit}.chip>.chip-input:focus-visible{outline:none}.chip-seat{position:relative;flex:none;width:var(--basalt-size-icon-sm);height:var(--basalt-size-icon-sm);color:var(--basalt-text-tertiary);transition:color var(--basalt-duration-fast) var(--basalt-ease-out)}.chip-seat>svg{position:absolute;inset:0;transition:opacity var(--basalt-duration-fast) var(--basalt-ease-out)}.chip-check,.chip:has(>.chip-input:checked) .chip-plus{opacity:0}.chip:has(>.chip-input:checked) .chip-check{opacity:1}.chip:has(>.chip-input:checked){background:var(--basalt-state-selected);color:var(--basalt-text-primary)}.chip:has(>.chip-input:checked) .chip-seat{color:var(--basalt-text-primary)}@media(hover:hover){.chip:hover:not(:has(>.chip-input:disabled)){color:var(--basalt-text-primary);border-color:var(--basalt-border-hover);transition-duration:var(--basalt-duration-instant)}.chip:hover:not(:has(>.chip-input:disabled,>.chip-input:checked)) .chip-seat{color:var(--basalt-text-secondary)}}.chip:active:not(:has(>.chip-input:disabled)){background:var(--basalt-state-hover)}.chip:has(>.chip-input:checked):active:not(:has(>.chip-input:disabled)){background:var(--basalt-state-selected)}.chip:has(>.chip-input:focus-visible){outline:var(--basalt-size-focus-width) solid var(--basalt-border-focus);outline-offset:var(--basalt-size-focus-offset)}.chip:has(>.chip-input:disabled){color:var(--basalt-text-disabled);border-color:var(--basalt-border-divider);cursor:not-allowed;background:transparent}.chip:has(>.chip-input:disabled) .chip-seat{color:var(--basalt-text-disabled)}@media(pointer:coarse),(width<720px){.chip{height:var(--basalt-size-control-lg);border-radius:var(--basalt-radius-md);font-size:var(--basalt-text-base-size)}.chip:before{content:"";position:absolute;inset:calc((var(--basalt-size-control-lg) - var(--basalt-size-tap-min)) / 2 - var(--basalt-size-hairline)) 0}}.filter-clear[aria-disabled=true]{box-shadow:none}.filter[data-popup]{flex-direction:row;align-items:center}.filter-trigger-value{color:var(--basalt-text-secondary)}.filter-trigger[data-active] .filter-trigger-value{color:var(--basalt-text-primary)}.filter-trigger[data-active]:not(:active){background:var(--basalt-state-selected)}.filter-trigger-value:has(>.filter-trigger-sizer){display:inline-grid;justify-items:start}.filter-trigger-value>*{grid-area:1 / 1}.filter-trigger-sizer{visibility:hidden;user-select:none}.filter-trigger-label-wrap{display:inline-flex;align-items:center;gap:var(--basalt-space-1-5)}.filter-popup{min-width:var(--basalt-size-select-min);max-height:var(--available-height, 100vh);overflow-y:auto;padding:var(--basalt-space-0-5) var(--basalt-space-1)}.filter-row{--_h: var(--basalt-size-menu-row);--_inset: var(--basalt-space-0-5);box-sizing:border-box;position:relative;isolation:isolate;display:flex;align-items:center;gap:var(--basalt-space-2-5);width:100%;height:calc(var(--_h) + 2 * var(--_inset));margin:0;padding:0 var(--basalt-space-3);background:transparent;color:var(--basalt-text-secondary);font:var(--basalt-font-weight-regular) var(--bh-base);cursor:default;user-select:none;transition:color var(--basalt-duration-fast) var(--basalt-ease-out)}.filter-row:before{content:"";position:absolute;inset:var(--_inset) 0;z-index:-1;border-radius:var(--basalt-radius-md);background-color:transparent;transition:background-color var(--basalt-duration-fast) var(--basalt-ease-out)}.filter-row input:focus-visible{outline:none}.filter-row[hidden]{display:none}.filter-row-label{flex:1;min-width:0}.filter-row[data-highlighted]{color:var(--basalt-text-primary);transition-duration:var(--basalt-duration-instant)}.filter-row[data-highlighted]:before{background-color:var(--panel-plate);transition-duration:var(--basalt-duration-instant)}.filter-row:has(>input:disabled){color:var(--basalt-text-disabled)}@media(pointer:coarse),(width<720px){.filter-row{height:max(calc(var(--_h) + 2 * var(--_inset)),var(--basalt-size-menu-row-touch))}}.filter-foot{display:flex;align-items:center;justify-content:space-between;gap:var(--basalt-space-3);padding-block:var(--basalt-space-1-5);padding-inline:var(--basalt-space-4);--basalt-edge-room: var(--basalt-space-4);--basalt-edge-room-start: initial;--basalt-edge-room-end: initial;border-top:var(--basalt-size-hairline) solid var(--basalt-border-divider);margin:var(--basalt-space-0-5) calc(-1 * var(--basalt-space-1)) 0}.filter-rows{max-height:var(--basalt-size-popup-max-height);margin-inline:calc(-1 * var(--basalt-space-1));padding-inline:var(--basalt-space-1);overflow-y:auto;overscroll-behavior:contain}.filter-band{box-sizing:border-box;display:flex;align-items:center;gap:var(--basalt-space-2-5);height:var(--basalt-size-control-xl);margin:calc(-1 * var(--basalt-space-0-5)) calc(-1 * var(--basalt-space-1)) var(--basalt-space-0-5);padding:0 var(--basalt-space-3);background:var(--panel-next);border-bottom:var(--basalt-size-hairline) solid var(--basalt-border-divider);color:var(--basalt-text-tertiary)}.filter-band:has(.filter-band-input:focus-visible){outline:var(--basalt-size-focus-width) solid var(--basalt-border-focus);outline-offset:calc(-1 * var(--basalt-size-focus-width))}.filter-band-input{flex:1;min-width:0;height:100%;margin:0;padding:0;border:0;background:transparent;color:var(--basalt-text-primary);font:var(--basalt-font-weight-regular) var(--bh-base);outline:none}.filter-band-input::placeholder{color:var(--basalt-text-tertiary);opacity:1}@media(pointer:coarse){.filter-band-input{font-size:var(--basalt-text-md-size)}}.filter-none{margin:0;padding:var(--basalt-space-3);font:var(--basalt-font-weight-regular) var(--bh-sm);color:var(--basalt-text-secondary)}.filter-none[hidden]{display:none}.filter-result{margin:0;font:var(--basalt-font-weight-regular) var(--bh-sm);color:var(--basalt-text-secondary);font-variant-numeric:tabular-nums}@media(prefers-reduced-motion:no-preference)and (forced-colors:none)and (hover:hover)and (pointer:fine){.filter-popup[data-glide] .filter-row[data-highlighted]:before{background-color:transparent}}@media(forced-colors:active){.chip{color:ButtonText}.chip:has(>.chip-input:checked),.chip:has(>.chip-input:checked):hover,.chip:has(>.chip-input:checked):active{forced-color-adjust:none;background:Highlight;border-color:Highlight;color:HighlightText}.chip:has(>.chip-input:checked) :is(.chip-label,.chip-seat,svg){color:HighlightText}.chip:has(>.chip-input:disabled),.chip:has(>.chip-input:disabled) .chip-seat{color:GrayText;border-color:GrayText}.filter-count,.filter-result{color:CanvasText}.filter-row:has(>input:disabled){color:GrayText}.filter-row[data-highlighted]{forced-color-adjust:none;color:HighlightText}.filter-row[data-highlighted]:before{background-color:Highlight}.filter-row[data-highlighted] .filter-row-label{color:HighlightText}}} diff --git a/.agent/skills/basalt-html/parts/filter.js b/.agent/skills/basalt-html/parts/filter.js index ed728b17..c3923757 100644 --- a/.agent/skills/basalt-html/parts/filter.js +++ b/.agent/skills/basalt-html/parts/filter.js @@ -1 +1 @@ -(function(_){"use strict";var y=_._,K=6,P=10,j=0,E="mouse";function i(r,a,n,d){var s=document.createElement(r);a&&(s.className=a);for(var p in n||{})s.setAttribute(p,n[p]);return d!=null&&(s.innerHTML=d),s}function x(r,a,n,d){r.__bhResult||(r.__bhResult=!0,r.innerHTML='<span aria-hidden="true"></span><span role="status" aria-live="polite" aria-atomic="true" class="visually-hidden"></span>',r.lastChild.textContent=a),r.firstChild.textContent=a,clearTimeout(r.__bhTimer);var s=n??(Number(r.getAttribute("data-delay"))||400);d?r.lastChild.textContent=a:r.__bhTimer=setTimeout(function(){r.lastChild.textContent=a},s)}_.filterResult=x;function k(r,a){var n=document.getElementById(r),d=n&&(n.tagName==="TABLE"?n:n.querySelector("table"));if(!(!d||!d.tBodies[0])){var s=Array.prototype.filter.call(document.querySelectorAll('.filter[data-for="'+r+'"]'),function(c){return c.__bhFilter}),p=Array.prototype.filter.call(d.tBodies[0].rows,function(c){return!c.hasAttribute("data-empty")}),u=0;p.forEach(function(c){var m=s.every(function(g){return g.__bhFilter.pass(c)});c.hidden=!m,m&&u++}),d.querySelectorAll("tr[data-empty]").forEach(function(c){c.hidden=u!==0}),document.querySelectorAll('.filter-result[data-for="'+r+'"]').forEach(function(c){x(c,"Showing "+u+" of "+p.length+" "+(c.getAttribute("data-noun")||"rows"),null,a)})}}_.refreshFilter=k;function T(r){return Array.prototype.slice.call(r.querySelectorAll("input:not(:disabled)")).filter(function(a){return!a.closest("[hidden]")})}function z(r){var a=Array.prototype.slice.call(r.querySelectorAll("label")),n=a.map(function(e){var t=e.querySelector('input[type="checkbox"]');return{input:t,label:e.textContent.trim()}}).filter(function(e){return e.input});if(n.length){var d=++j,s=r.getAttribute("data-label")||"Filter",p=s.toLowerCase(),u={label:"bh-filter-label-"+d,count:"bh-filter-count-"+d,pop:"bh-filter-pop-"+d,rows:"bh-filter-rows-"+d},c=r.hasAttribute("data-toolbar")||n.length>K,m=function(){return n.filter(function(e){return e.input.checked})},g=i("button","btn filter-clear",{type:"button","data-variant":"ghost","data-size":"sm"},"Clear"),f={head:null,count:null,value:null,trigger:null,foot:null};if(r.textContent="",c){r.setAttribute("data-popup","");var W=n.length>=P;if(f.trigger=i("button","btn filter-trigger",{type:"button",popovertarget:u.pop},'<span class="filter-trigger-label-wrap"><span class="filter-trigger-label"></span> <span class="filter-trigger-value"></span></span><svg class="icon" viewBox="0 0 24 24" width="16" height="16" fill="none" aria-hidden="true" focusable="false"><g fill="none" stroke="currentColor" stroke-width="2.25" stroke-linecap="round" stroke-linejoin="round"><path d="M18 9C16 11 14 13 12 15"/><path d="M12 15C10 13 8 11 6 9"/></g></svg>'),f.trigger.querySelector(".filter-trigger-label").textContent=s,f.value=f.trigger.querySelector(".filter-trigger-value"),r.hasAttribute("data-toolbar")){var B=f.value;f.value=B.appendChild(i("span","filter-trigger-now")),["Any"].concat(n.map(function(e){return e.label+(n.length>1?" +"+(n.length-1):"")})).forEach(function(e){B.appendChild(i("span","filter-trigger-sizer",{"aria-hidden":"true"})).textContent=e})}var b=i("div","panel float filter-popup",{popover:"",id:u.pop,role:"dialog","aria-labelledby":u.label,tabindex:"-1"}),D=i("span","plate",{"aria-hidden":"true"});b.appendChild(D),b.appendChild(i("span","visually-hidden",{id:u.label})).textContent=s;var o=null;if(W){var H=i("div","filter-band",null,'<svg class="icon" viewBox="0 0 24 24" width="16" height="16" fill="none" aria-hidden="true" focusable="false"><g fill="none" stroke="currentColor" stroke-width="2.25" stroke-linecap="round" stroke-linejoin="round"><path d="M5.831 5.831C8.271 3.39 12.229 3.39 14.669 5.831"/><path d="M14.669 5.831C17.11 8.271 17.11 12.229 14.669 14.669"/><path d="M14.669 14.669C12.229 17.11 8.271 17.11 5.831 14.669"/><path d="M5.831 14.669C3.39 12.229 3.39 8.271 5.831 5.831"/><path d="M17.675 17.675C18.616 18.616 19.558 19.558 20.5 20.5"/></g></svg>');o=H.appendChild(i("input","filter-band-input",{type:"text",role:"searchbox","aria-label":"Search "+p,"aria-controls":u.rows,placeholder:"Search "+p,autocomplete:"off",autocorrect:"off",spellcheck:"false"})),b.appendChild(H)}var h=i("div","filter-rows",{id:u.rows,role:"group","aria-labelledby":u.label,"aria-describedby":u.count});n.forEach(function(e){var t=i("label","filter-row");t.appendChild(e.input),t.appendChild(i("span","filter-row-label")).textContent=e.label,e.row=t,h.appendChild(t)});var L=i("p","filter-none",{hidden:""});L.textContent="No "+p+" matches.",h.appendChild(L),b.appendChild(h),f.count=i("span","filter-count",{id:u.count});var S=i("div","filter-foot");S.appendChild(f.count),S.appendChild(g),b.appendChild(S),r.appendChild(f.trigger),r.appendChild(b);var C=null,w=function(e){C!==e&&(C&&C.removeAttribute("data-highlighted"),C=e,e&&e.setAttribute("data-highlighted",""))};h.addEventListener("pointermove",function(e){var t=e.target.closest(".filter-row");t&&w(t)}),h.addEventListener("pointerout",function(e){var t=e.target.closest(".filter-row");t&&t===C&&!t.contains(e.relatedTarget)&&w(null)}),h.addEventListener("focusin",function(e){var t=e.target.closest(".filter-row");t&&w(t)}),h.addEventListener("focusout",function(e){var t=e.target.closest(".filter-row");t&&t===C&&w(null)}),h.addEventListener("keydown",function(e){if(o&&e.key.length===1&&e.key!==" "&&!e.ctrlKey&&!e.metaKey&&!e.altKey){o.focus();return}var t={ArrowDown:1,ArrowUp:-1,Home:-1/0,End:1/0}[e.key];if(t!==void 0){var l=T(h);if(l.length){e.preventDefault();var v=l.indexOf(document.activeElement);if(o&&t===-1&&v<=0){o.focus();return}var F=isFinite(t)?Math.min(l.length-1,Math.max(0,v+t)):t<0?0:l.length-1;l[F].focus()}}});var q=function(){var e=o?o.value.trim().toLowerCase():"",t=!1;n.forEach(function(l){var v=e!==""&&l.label.toLowerCase().indexOf(e)<0;l.row.hidden=v,v||(t=!0)}),L.hidden=t};o&&(o.addEventListener("input",q),o.addEventListener("keydown",function(e){if(e.key==="ArrowDown"){var t=T(h)[0];t&&(e.preventDefault(),t.focus())}else e.key==="Escape"&&o.value&&(e.preventDefault(),e.stopPropagation(),o.value="",q())})),b.__bhFilter={plate:D,band:o,reset:function(){o&&(o.value="",q()),w(null)}}}else{var A=i("div","filter-head");A.appendChild(i("span","filter-label",{id:u.label},null)).textContent=s;var N=i("span","filter-count",{id:u.count,"data-reserved":"","data-any":"Any","data-widest":n.length+" of "+n.length});f.value=N.appendChild(i("span","filter-count-value")),A.appendChild(N),A.appendChild(g);var R=i("div","filter-chips",{role:"group","aria-labelledby":u.label,"aria-describedby":u.count});n.forEach(function(e){var t=i("label","chip");e.input.className="chip-input",t.appendChild(e.input);var l=t.appendChild(i("span","chip-seat",{"aria-hidden":"true"},y.glyph("plus")+y.glyph("check")));l.children[0].classList.add("chip-plus"),l.children[1].classList.add("chip-check"),t.appendChild(i("span","chip-label")).textContent=e.label,R.appendChild(t)}),r.appendChild(A),r.appendChild(R)}var I=Number(r.getAttribute("data-column"))-1,O=r.getAttribute("data-for");r.__bhFilter={pass:function(e){var t=m();if(!t.length||!(I>=0))return!0;var l=e.children[I],v=l?(l.hasAttribute("data-value")?l.getAttribute("data-value"):l.textContent.trim()).toLowerCase():"";return t.some(function(F){return F.input.value.toLowerCase()===v})}};var M=function(e){var t=m(),l=t.length===0?"Any":t.length+" of "+n.length;c?(f.count.textContent=l,f.value.textContent=t.length===0?"Any":t.length===1?t[0].label:t[0].label+" +"+(t.length-1),f.trigger.toggleAttribute("data-active",t.length>0)):f.value.textContent=l,t.length===0?g.setAttribute("aria-disabled","true"):g.removeAttribute("aria-disabled"),O&&k(O,!e),e&&r.dispatchEvent(new CustomEvent("filterchange",{bubbles:!0,detail:{values:t.map(function(v){return v.input.value})}}))};r.addEventListener("change",function(e){e.target.matches&&e.target.matches('input[type="checkbox"]')&&M(!0)}),g.addEventListener("click",function(){g.getAttribute("aria-disabled")!=="true"&&(n.forEach(function(e){e.input.checked=!1}),M(!0))}),M(!1)}}y.step(75,"filter",function(){document.querySelectorAll(".filter-result").forEach(function(a){a.__bhResult||x(a,a.textContent)}),document.querySelectorAll(".filter").forEach(function(a){a.__bhFilter||z(a)});var r={};document.querySelectorAll(".filter[data-for]").forEach(function(a){var n=a.getAttribute("data-for");r[n]||(r[n]=1,k(n,!0))})}),y.step(130,"filterPopup",function(){document.documentElement.__bhFilterWired||(document.documentElement.__bhFilterWired=!0,document.addEventListener("pointerdown",function(r){E=r.pointerType},!0),document.addEventListener("keydown",function(){E="keyboard"},!0),document.addEventListener("toggle",function(r){var a=r.target,n=a.__bhFilter;!n||!a.matches||!a.matches(".filter-popup")||(r.newState==="open"?(a.__unglide=y.glide(a,n.plate,{active:"[data-highlighted]",attr:"data-highlighted"}),n.band&&E==="touch"&&a.focus({preventScroll:!0})):(a.__unglide&&(a.__unglide(),a.__unglide=null),n.reset()))},!0))})})(window.Basalt); +(function(_){"use strict";var y=_._,K=6,P=10,j=0,E="mouse";function i(r,a,n,d){var s=document.createElement(r);a&&(s.className=a);for(var p in n||{})s.setAttribute(p,n[p]);return d!=null&&(s.innerHTML=d),s}function x(r,a,n,d){r.__bhResult||(r.__bhResult=!0,r.innerHTML='<span aria-hidden="true"></span><span role="status" aria-live="polite" aria-atomic="true" class="visually-hidden"></span>',r.lastChild.textContent=a),r.firstChild.textContent=a,clearTimeout(r.__bhTimer);var s=n??(Number(r.getAttribute("data-delay"))||400);d?r.lastChild.textContent=a:r.__bhTimer=setTimeout(function(){r.lastChild.textContent=a},s)}_.filterResult=x;function k(r,a){var n=document.getElementById(r),d=n&&(n.tagName==="TABLE"?n:n.querySelector("table"));if(!(!d||!d.tBodies[0])){var s=Array.prototype.filter.call(document.querySelectorAll('.filter[data-for="'+r+'"]'),function(c){return c.__bhFilter}),p=Array.prototype.filter.call(d.tBodies[0].rows,function(c){return!c.hasAttribute("data-empty")}),u=0;p.forEach(function(c){var m=s.every(function(v){return v.__bhFilter.pass(c)});c.hidden=!m,m&&u++}),d.querySelectorAll("tr[data-empty]").forEach(function(c){c.hidden=u!==0}),document.querySelectorAll('.filter-result[data-for="'+r+'"]').forEach(function(c){x(c,"Showing "+u+" of "+p.length+" "+(c.getAttribute("data-noun")||"rows"),null,a)})}}_.refreshFilter=k;function T(r){return Array.prototype.slice.call(r.querySelectorAll("input:not(:disabled)")).filter(function(a){return!a.closest("[hidden]")})}function z(r){var a=Array.prototype.slice.call(r.querySelectorAll("label")),n=a.map(function(e){var t=e.querySelector('input[type="checkbox"]');return{input:t,label:e.textContent.trim()}}).filter(function(e){return e.input});if(n.length){var d=++j,s=r.getAttribute("data-label")||"Filter",p=s.toLowerCase(),u={label:"bh-filter-label-"+d,count:"bh-filter-count-"+d,pop:"bh-filter-pop-"+d,rows:"bh-filter-rows-"+d},c=r.hasAttribute("data-toolbar")||n.length>K,m=function(){return n.filter(function(e){return e.input.checked})},v=i("button","btn filter-clear",{type:"button","data-variant":"ghost","data-size":"sm"},"Clear"),f={head:null,count:null,value:null,trigger:null,foot:null};if(r.textContent="",c){r.setAttribute("data-popup","");var W=n.length>=P;if(f.trigger=i("button","btn filter-trigger",{type:"button",popovertarget:u.pop},'<span class="filter-trigger-label-wrap"><span class="filter-trigger-label"></span> <span class="filter-trigger-value"></span></span><svg class="icon" viewBox="0 0 24 24" width="16" height="16" fill="none" aria-hidden="true" focusable="false"><g fill="none" stroke="currentColor" stroke-width="2.25" stroke-linecap="round" stroke-linejoin="round"><path d="M18 9C16 11 14 13 12 15"/><path d="M12 15C10 13 8 11 6 9"/></g></svg>'),f.trigger.querySelector(".filter-trigger-label").textContent=s,f.value=f.trigger.querySelector(".filter-trigger-value"),r.hasAttribute("data-toolbar")){var B=f.value;f.value=B.appendChild(i("span","filter-trigger-now")),["Any"].concat(n.map(function(e){return e.label+(n.length>1?" +"+(n.length-1):"")})).forEach(function(e){B.appendChild(i("span","filter-trigger-sizer",{"aria-hidden":"true"})).textContent=e})}var b=i("div","panel float filter-popup",{popover:"",id:u.pop,role:"dialog","aria-labelledby":u.label,tabindex:"-1"}),D=i("span","plate",{"aria-hidden":"true"});b.appendChild(D),b.appendChild(i("span","visually-hidden",{id:u.label})).textContent=s;var o=null;if(W){var H=i("div","filter-band",null,'<svg class="icon" viewBox="0 0 24 24" width="16" height="16" fill="none" aria-hidden="true" focusable="false"><g fill="none" stroke="currentColor" stroke-width="2.25" stroke-linecap="round" stroke-linejoin="round"><path d="M5.831 5.831C8.271 3.39 12.229 3.39 14.669 5.831"/><path d="M14.669 5.831C17.11 8.271 17.11 12.229 14.669 14.669"/><path d="M14.669 14.669C12.229 17.11 8.271 17.11 5.831 14.669"/><path d="M5.831 14.669C3.39 12.229 3.39 8.271 5.831 5.831"/><path d="M17.675 17.675C18.616 18.616 19.558 19.558 20.5 20.5"/></g></svg>');o=H.appendChild(i("input","filter-band-input",{type:"text",role:"searchbox","aria-label":"Search "+p,"aria-controls":u.rows,placeholder:"Search "+p,autocomplete:"off",autocorrect:"off",spellcheck:"false"})),b.appendChild(H)}var h=i("div","filter-rows",{id:u.rows,role:"group","aria-labelledby":u.label,"aria-describedby":u.count});n.forEach(function(e){var t=i("label","filter-row");t.appendChild(e.input),t.appendChild(i("span","filter-row-label")).textContent=e.label,e.row=t,h.appendChild(t)});var L=i("p","filter-none",{hidden:""});L.textContent="No "+p+" matches.",h.appendChild(L),b.appendChild(h),f.count=i("span","filter-count",{id:u.count});var S=i("div","filter-foot");v.setAttribute("data-edge","end"),S.appendChild(f.count),S.appendChild(v),b.appendChild(S),r.appendChild(f.trigger),r.appendChild(b);var C=null,w=function(e){C!==e&&(C&&C.removeAttribute("data-highlighted"),C=e,e&&e.setAttribute("data-highlighted",""))};h.addEventListener("pointermove",function(e){var t=e.target.closest(".filter-row");t&&w(t)}),h.addEventListener("pointerout",function(e){var t=e.target.closest(".filter-row");t&&t===C&&!t.contains(e.relatedTarget)&&w(null)}),h.addEventListener("focusin",function(e){var t=e.target.closest(".filter-row");t&&w(t)}),h.addEventListener("focusout",function(e){var t=e.target.closest(".filter-row");t&&t===C&&w(null)}),h.addEventListener("keydown",function(e){if(o&&e.key.length===1&&e.key!==" "&&!e.ctrlKey&&!e.metaKey&&!e.altKey){o.focus();return}var t={ArrowDown:1,ArrowUp:-1,Home:-1/0,End:1/0}[e.key];if(t!==void 0){var l=T(h);if(l.length){e.preventDefault();var g=l.indexOf(document.activeElement);if(o&&t===-1&&g<=0){o.focus();return}var F=isFinite(t)?Math.min(l.length-1,Math.max(0,g+t)):t<0?0:l.length-1;l[F].focus()}}});var q=function(){var e=o?o.value.trim().toLowerCase():"",t=!1;n.forEach(function(l){var g=e!==""&&l.label.toLowerCase().indexOf(e)<0;l.row.hidden=g,g||(t=!0)}),L.hidden=t};o&&(o.addEventListener("input",q),o.addEventListener("keydown",function(e){if(e.key==="ArrowDown"){var t=T(h)[0];t&&(e.preventDefault(),t.focus())}else e.key==="Escape"&&o.value&&(e.preventDefault(),e.stopPropagation(),o.value="",q())})),b.__bhFilter={plate:D,band:o,reset:function(){o&&(o.value="",q()),w(null)}}}else{var A=i("div","filter-head");A.appendChild(i("span","filter-label",{id:u.label},null)).textContent=s;var N=i("span","filter-count",{id:u.count,"data-reserved":"","data-any":"Any","data-widest":n.length+" of "+n.length});f.value=N.appendChild(i("span","filter-count-value")),A.appendChild(v),A.appendChild(N);var R=i("div","filter-chips",{role:"group","aria-labelledby":u.label,"aria-describedby":u.count});n.forEach(function(e){var t=i("label","chip");e.input.className="chip-input",t.appendChild(e.input);var l=t.appendChild(i("span","chip-seat",{"aria-hidden":"true"},y.glyph("plus")+y.glyph("check")));l.children[0].classList.add("chip-plus"),l.children[1].classList.add("chip-check"),t.appendChild(i("span","chip-label")).textContent=e.label,R.appendChild(t)}),r.appendChild(A),r.appendChild(R)}var I=Number(r.getAttribute("data-column"))-1,O=r.getAttribute("data-for");r.__bhFilter={pass:function(e){var t=m();if(!t.length||!(I>=0))return!0;var l=e.children[I],g=l?(l.hasAttribute("data-value")?l.getAttribute("data-value"):l.textContent.trim()).toLowerCase():"";return t.some(function(F){return F.input.value.toLowerCase()===g})}};var M=function(e){var t=m(),l=t.length===0?"Any":t.length+" of "+n.length;c?(f.count.textContent=l,f.value.textContent=t.length===0?"Any":t.length===1?t[0].label:t[0].label+" +"+(t.length-1),f.trigger.toggleAttribute("data-active",t.length>0)):f.value.textContent=l,t.length===0?v.setAttribute("aria-disabled","true"):v.removeAttribute("aria-disabled"),O&&k(O,!e),e&&r.dispatchEvent(new CustomEvent("filterchange",{bubbles:!0,detail:{values:t.map(function(g){return g.input.value})}}))};r.addEventListener("change",function(e){e.target.matches&&e.target.matches('input[type="checkbox"]')&&M(!0)}),v.addEventListener("click",function(){v.getAttribute("aria-disabled")!=="true"&&(n.forEach(function(e){e.input.checked=!1}),M(!0))}),M(!1)}}y.step(75,"filter",function(){document.querySelectorAll(".filter-result").forEach(function(a){a.__bhResult||x(a,a.textContent)}),document.querySelectorAll(".filter").forEach(function(a){a.__bhFilter||z(a)});var r={};document.querySelectorAll(".filter[data-for]").forEach(function(a){var n=a.getAttribute("data-for");r[n]||(r[n]=1,k(n,!0))})}),y.step(130,"filterPopup",function(){document.documentElement.__bhFilterWired||(document.documentElement.__bhFilterWired=!0,document.addEventListener("pointerdown",function(r){E=r.pointerType},!0),document.addEventListener("keydown",function(){E="keyboard"},!0),document.addEventListener("toggle",function(r){var a=r.target,n=a.__bhFilter;!n||!a.matches||!a.matches(".filter-popup")||(r.newState==="open"?(a.__unglide=y.glide(a,n.plate,{active:"[data-highlighted]",attr:"data-highlighted"}),n.band&&E==="touch"&&a.focus({preventScroll:!0})):(a.__unglide&&(a.__unglide(),a.__unglide=null),n.reset()))},!0))})})(window.Basalt); diff --git a/.agent/skills/basalt-html/parts/forms.css b/.agent/skills/basalt-html/parts/forms.css index ca977eb0..82875544 100644 --- a/.agent/skills/basalt-html/parts/forms.css +++ b/.agent/skills/basalt-html/parts/forms.css @@ -1 +1 @@ -@layer basalt{.field{display:flex;flex-direction:column;gap:var(--basalt-space-1-5);min-width:0}.field>label{align-self:start}.field>label,.label{font:var(--basalt-font-weight-medium) var(--bh-sm);color:var(--basalt-text-primary)}.necessity{margin-inline-start:var(--basalt-space-1-5);font:var(--basalt-font-weight-regular) var(--bh-xs);color:var(--basalt-text-tertiary)}.hint,.error{font-size:var(--basalt-text-sm-size);line-height:var(--basalt-text-sm-line-height);color:var(--basalt-text-secondary)}.error{color:var(--basalt-status-danger)}.input{width:100%;height:var(--basalt-size-control-md);margin:0;padding:0 var(--basalt-space-2-5);border:0;border-radius:var(--basalt-radius-sm);background:var(--basalt-surface-1);box-shadow:inset 0 0 0 var(--basalt-size-hairline) var(--basalt-border-field);color:var(--basalt-text-primary);font:var(--basalt-font-weight-regular) var(--basalt-text-base-size) / normal var(--basalt-font-family-sans);transition:box-shadow var(--basalt-duration-fast) var(--basalt-ease-out)}textarea.input{height:auto;min-height:calc(var(--basalt-text-base-line-height) * 2 + var(--basalt-space-4));padding-block:var(--basalt-space-2);line-height:var(--basalt-text-base-line-height);resize:vertical}.input::placeholder{color:var(--basalt-text-tertiary);opacity:1}.input[aria-invalid=true]{box-shadow:inset 0 0 0 var(--basalt-size-hairline) var(--basalt-status-danger)}.input:disabled{color:var(--basalt-text-disabled);background:var(--basalt-surface-sunken);cursor:not-allowed}@media(pointer:coarse){.input{font-size:var(--basalt-text-md-size)}}.input[type=number]{appearance:textfield}.input[type=number]::-webkit-inner-spin-button,.input[type=number]::-webkit-outer-spin-button{appearance:none;margin:0}.input[type=search]::-webkit-search-cancel-button{appearance:none;width:var(--basalt-size-control-xs);height:var(--basalt-size-control-xs);margin:0;background:var(--basalt-text-secondary);mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7.050252531694167 7.050252531694168L16.949747468305834 16.94974746830583M16.94974746830583 7.050252531694167L7.050252531694168 16.949747468305834' fill='none' stroke='black' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / var(--basalt-size-icon-sm) no-repeat;cursor:pointer}input[type=file]{max-width:100%;color:var(--basalt-text-secondary);font:var(--basalt-font-weight-regular) var(--bh-base)}input[type=file]::file-selector-button{height:var(--basalt-size-control-md);margin:0 var(--basalt-space-2) 0 0;padding:0 var(--basalt-space-3);border:var(--basalt-size-hairline) solid var(--basalt-border-hairline);border-radius:var(--basalt-radius-sm);background:var(--basalt-surface-1);color:var(--basalt-text-primary);font:var(--basalt-font-weight-medium) var(--basalt-text-base-size) / 1 var(--basalt-font-family-sans);cursor:pointer}input[type=file]:disabled,input[type=file]:disabled::file-selector-button{color:var(--basalt-text-disabled);cursor:not-allowed}@media(pointer:coarse),(width<720px){.input{height:var(--basalt-size-tap-min);border-radius:var(--basalt-radius-md)}.input[type=search]::-webkit-search-cancel-button{width:var(--basalt-size-tap-min);height:var(--basalt-size-tap-min)}input[type=file]::file-selector-button{min-height:var(--basalt-size-tap-min)}}@media(forced-colors:active){.input{border:var(--basalt-size-hairline) solid ButtonText;box-shadow:none}.input:disabled{border-color:GrayText;color:GrayText}}} +@layer basalt{.field{display:flex;flex-direction:column;gap:var(--basalt-space-1-5);min-width:0}.field>label{align-self:start}.field>label,.label{font:var(--basalt-font-weight-medium) var(--bh-sm);color:var(--basalt-text-primary)}.necessity{margin-inline-start:var(--basalt-space-1-5);font:var(--basalt-font-weight-regular) var(--bh-xs);color:var(--basalt-text-tertiary)}.hint,.error{font-size:var(--basalt-text-sm-size);line-height:var(--basalt-text-sm-line-height);color:var(--basalt-text-secondary)}.error{color:var(--basalt-status-danger)}.input{width:100%;height:var(--basalt-size-control-md);margin:0;padding:0 var(--basalt-space-2-5);border:0;border-radius:var(--basalt-radius-sm);background:var(--basalt-surface-1);box-shadow:inset 0 0 0 var(--basalt-size-hairline) var(--basalt-border-field);color:var(--basalt-text-primary);font:var(--basalt-font-weight-regular) var(--basalt-text-base-size) / normal var(--basalt-font-family-sans);transition:box-shadow var(--basalt-duration-fast) var(--basalt-ease-out)}textarea.input{height:auto;min-height:calc(var(--basalt-text-base-line-height) * 2 + var(--basalt-space-4));padding-block:var(--basalt-space-2);line-height:var(--basalt-text-base-line-height);resize:vertical}.input::placeholder{color:var(--basalt-text-tertiary);opacity:1}.input[aria-invalid=true]{box-shadow:inset 0 0 0 var(--basalt-size-hairline) var(--basalt-status-danger)}.input:disabled{color:var(--basalt-text-disabled);background:var(--basalt-surface-sunken);cursor:not-allowed}@media(pointer:coarse){.input{font-size:var(--basalt-text-md-size)}}.input[type=number]{appearance:textfield}.input[type=number]::-webkit-inner-spin-button,.input[type=number]::-webkit-outer-spin-button{appearance:none;margin:0}.input[type=search]::-webkit-search-cancel-button{appearance:none;width:var(--basalt-size-control-xs);height:var(--basalt-size-control-xs);margin:0;background:var(--basalt-text-secondary);mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7.050252531694167 7.050252531694168L16.949747468305834 16.94974746830583M16.94974746830583 7.050252531694167L7.050252531694168 16.949747468305834' fill='none' stroke='black' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / var(--basalt-size-icon-sm) no-repeat;cursor:pointer}input[type=file]{max-width:100%;color:var(--basalt-text-secondary);font:var(--basalt-font-weight-regular) var(--bh-base)}input[type=file]::file-selector-button{height:var(--basalt-size-control-md);margin-block:0;margin-inline:0 var(--basalt-space-2);padding:0 var(--basalt-space-3);border:var(--basalt-size-hairline) solid var(--basalt-border-hairline);border-radius:var(--basalt-radius-sm);background:var(--basalt-surface-1);color:var(--basalt-text-primary);font:var(--basalt-font-weight-medium) var(--basalt-text-base-size) / 1 var(--basalt-font-family-sans);cursor:pointer}input[type=file]:disabled,input[type=file]:disabled::file-selector-button{color:var(--basalt-text-disabled);cursor:not-allowed}@media(pointer:coarse),(width<720px){.input{height:var(--basalt-size-tap-min);border-radius:var(--basalt-radius-md)}.input[type=search]::-webkit-search-cancel-button{width:var(--basalt-size-tap-min);height:var(--basalt-size-tap-min)}input[type=file]::file-selector-button{min-height:var(--basalt-size-tap-min)}}@media(forced-colors:active){.input{border:var(--basalt-size-hairline) solid ButtonText;box-shadow:none}.input:disabled{border-color:GrayText;color:GrayText}}} diff --git a/.agent/skills/basalt-html/parts/links.css b/.agent/skills/basalt-html/parts/links.css index 446d04a3..1773becf 100644 --- a/.agent/skills/basalt-html/parts/links.css +++ b/.agent/skills/basalt-html/parts/links.css @@ -1 +1 @@ -@layer basalt{.ext{white-space:nowrap;color:var(--basalt-text-secondary);transition:color var(--basalt-duration-fast) var(--basalt-ease-out)}.ext>svg{display:inline-block;width:var(--basalt-size-icon-sm);height:var(--basalt-size-icon-sm);vertical-align:-.15em;margin-block:calc(-1 * var(--basalt-space-1))}a:is(:hover,:focus-visible) .ext{color:inherit}.btn>.ext{display:inline-flex;align-items:center;color:inherit}.btn>.ext>svg{vertical-align:baseline;margin-block:0}.links{display:flex;flex-wrap:wrap;align-items:center;column-gap:var(--basalt-space-4);row-gap:var(--basalt-space-1);margin:0;padding:0;list-style:none}.links[data-icon-only]{column-gap:var(--basalt-space-1)}.links>li{display:flex}.links>li>a:not(.btn){display:inline-flex;align-items:center;gap:var(--basalt-space-1-5);border-radius:var(--basalt-radius-sm);color:var(--basalt-text-secondary);white-space:nowrap;transition:color var(--basalt-duration-fast) var(--basalt-ease-out)}.links>li>a:not(.btn):is(:hover,:focus-visible){color:var(--basalt-text-primary)}.links[data-size="20"]>li>a>svg:not(.ext>svg){width:var(--basalt-size-icon-md);height:var(--basalt-size-icon-md)}.links>li>a:not(.btn)>.ext{margin-inline-start:calc(-1 * var(--basalt-space-1-5))}@media(pointer:coarse),(width<720px){.links:not([data-icon-only]){gap:0;margin-inline:calc(-1 * var(--basalt-space-2))}.links:not([data-icon-only])>li>a{min-width:var(--basalt-size-tap-min);min-height:var(--basalt-size-tap-min);justify-content:center;margin-block:0;padding-inline:var(--basalt-space-2)}}@media(forced-colors:active){.ext,.links>li>a:not(.btn)>svg{color:inherit}}} +@layer basalt{.ext{white-space:nowrap;color:var(--basalt-text-secondary);transition:color var(--basalt-duration-fast) var(--basalt-ease-out)}.ext>svg{display:inline-block;width:var(--basalt-size-icon-sm);height:var(--basalt-size-icon-sm);vertical-align:-.15em;margin-block:calc(-1 * var(--basalt-space-1))}a:is(:hover,:focus-visible) .ext{color:inherit}.btn>.ext{display:inline-flex;align-items:center;color:inherit}.btn>.ext>svg{vertical-align:baseline;margin-block:0}.links{display:flex;flex-wrap:wrap;align-items:center;column-gap:var(--basalt-space-4);row-gap:var(--basalt-space-1);margin:0;padding:0;list-style:none}.links[data-icon-only]{column-gap:var(--basalt-space-1)}.links>li{display:flex}.links>li>a:not(.btn){display:inline-flex;align-items:center;gap:var(--basalt-space-1-5);border-radius:var(--basalt-radius-sm);color:var(--basalt-text-secondary);white-space:nowrap;transition:color var(--basalt-duration-fast) var(--basalt-ease-out)}.links>li>a:not(.btn):is(:hover,:focus-visible){color:var(--basalt-text-primary)}.links[data-size="20"]>li>a>svg:not(.ext>svg){width:var(--basalt-size-icon-md);height:var(--basalt-size-icon-md)}.links[data-size="20"] .btn{--_glyph: var(--basalt-size-icon-md)}.card>.links[data-icon-only]{--basalt-edge-room: var(--basalt-space-4);--basalt-edge-room-start: initial;--basalt-edge-room-end: initial}.card>.links[data-icon-only]:last-child{margin-block-end:calc((var(--basalt-size-icon-sm) - var(--basalt-size-control-md)) / 2)}.links>li>a:not(.btn)>.ext{margin-inline-start:calc(-1 * var(--basalt-space-1-5))}@media(pointer:coarse),(width<720px){.links:not([data-icon-only]){gap:0;margin-inline:calc(-1 * var(--basalt-space-2))}.links:not([data-icon-only])>li>a{min-width:var(--basalt-size-tap-min);min-height:var(--basalt-size-tap-min);justify-content:center;margin-block:0;padding-inline:var(--basalt-space-2)}.card>.links[data-icon-only]:last-child{margin-block-end:calc((var(--basalt-size-icon-sm) - var(--basalt-size-tap-min)) / 2)}}@media(forced-colors:active){.ext,.links>li>a:not(.btn)>svg{color:inherit}}} diff --git a/.agent/skills/basalt-html/parts/links.js b/.agent/skills/basalt-html/parts/links.js index 4681c35d..5c2fca30 100644 --- a/.agent/skills/basalt-html/parts/links.js +++ b/.agent/skills/basalt-html/parts/links.js @@ -1 +1 @@ -(function(n){"use strict";var r=n._,s='<svg class="icon" viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="2.25" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="M7 17L17 7M9.5 7L17 7M17 7L17 14.5"/></svg>';function a(u){(u||document).querySelectorAll('a[target="_blank"]:not([data-new-tab])').forEach(function(e){e.setAttribute("data-new-tab","");var t=(e.getAttribute("rel")||"").split(/\s+/).filter(Boolean);["noopener","noreferrer"].forEach(function(l){t.indexOf(l)<0&&t.push(l)}),e.setAttribute("rel",t.join(" "));var i=" "+(e.getAttribute("data-new-tab-label")||"(opens in a new tab)"),o=e.getAttribute("aria-label"),d=e.textContent.trim()!=="";d&&!/^mailto:/i.test(e.getAttribute("href")||"")&&(e.querySelector(".row-label, .dir-name")||e).insertAdjacentHTML("beforeend",'<span class="ext" aria-hidden="true">⁠'+s+"</span>"),o?e.setAttribute("aria-label",o+i):e.insertAdjacentHTML("beforeend",'<span class="visually-hidden">'+r.esc(i)+"</span>")})}n.newTabCue=a,r.step(50,"newTabCue",function(){a()})})(window.Basalt); +(function(r){"use strict";var a=r._,u='<svg class="icon" viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="2.25" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="M7 17L17 7M9.5 7L17 7M17 7L17 14.5"/></svg>';function i(t){(t||document).querySelectorAll('a[target="_blank"]:not([data-new-tab])').forEach(function(e){e.setAttribute("data-new-tab","");var n=(e.getAttribute("rel")||"").split(/\s+/).filter(Boolean);["noopener","noreferrer"].forEach(function(s){n.indexOf(s)<0&&n.push(s)}),e.setAttribute("rel",n.join(" "));var o=" "+(e.getAttribute("data-new-tab-label")||"(opens in a new tab)"),l=e.getAttribute("aria-label"),d=e.textContent.trim()!=="";d&&!/^mailto:/i.test(e.getAttribute("href")||"")&&(e.querySelector(".row-label, .dir-name")||e).insertAdjacentHTML("beforeend",'<span class="ext" aria-hidden="true">⁠'+u+"</span>"),l?e.setAttribute("aria-label",l+o):e.insertAdjacentHTML("beforeend",'<span class="visually-hidden">'+a.esc(o)+"</span>")})}r.newTabCue=i,a.step(50,"newTabCue",function(){i(),document.querySelectorAll(".links[data-icon-only] > li:first-child > .btn:not([data-edge])").forEach(function(t){t.setAttribute("data-edge","start")})})})(window.Basalt); diff --git a/.agent/skills/basalt-html/parts/manifest.json b/.agent/skills/basalt-html/parts/manifest.json index e37b5a8b..fc6b29ca 100644 --- a/.agent/skills/basalt-html/parts/manifest.json +++ b/.agent/skills/basalt-html/parts/manifest.json @@ -1,8 +1,8 @@ { - "$comment": "Which parts of the skill's CSS and JS a page gets. The core is always in. A module is in when the page's body has one of its classes, attributes or tags, matches one of its text patterns, or is named in a <!-- basalt:use name --> comment, and when another module needs it (requires). Modules are added in the order listed here, which is the order of the source files' cascade. classes: every class the module's CSS styles (the test checks them against the CSS and against SKILL.md). budget: the most bytes its minified CSS and JS may reach together. budgets: skillMd (SKILL.md, the context an agent pays: never above what it was), core (the CSS and JS of every page). icons: Phosphor names the module's script draws itself. Raised in the first parity PR (the owner's \"bring up the parity\"): forms (the number-input, search-clear and file-input chrome), disclosure (the native details marker), status (the accent reader and the forced-colours badge border), spinner (a fixed 16px ring), and the new number, range and accent modules. skillMd rose 10555 to 10900 for the new rules (number field, native chrome, the braille rule, the accent). Raised in the second parity PR (popup rows, levels and the segment's pill): segment 1400 to 3700 (the shared sliding pill: its script, 1.5 KB, and its CSS with the pill's two fallbacks), rows 3600 to 4300 (#27's plate-in-a-row geometry, the plate per level, the glide's shared plate and the forced-colours lit row, net of the removed bar), palette 9400 to 11300 (the glide's script, 2.4 KB: it follows the lit row, travels on a pointer, snaps on a key, and fades in place on leaving). The art module (DECISIONS 101 and 104) is the token groups only some pages name, taken out of the core so the core stays under its cap: the chart roles and lengths, the art colours, the aspect ratios and the stage headroom, in both themes (2087 bytes at 2100; it grows only when a token of those groups is added). A page gets it when its body names one of them, a var() in its own style included. The every-module page has no cap of its own (owner, DECISIONS 79): each part is capped, and a page carries only the parts it uses. usage: the most bytes of a module's usage text (src/usage/NAME.md; core.usage for core.md), which compose.mjs --usage prints on demand. It is context an agent pays only for the modules its page uses, so it is capped per part as SKILL.md and the CSS and script are (DECISIONS 79 and 109). Each is set a little above what its text was when the usage moved out of SKILL.md (DECISIONS 109); raising one needs a reason in the PR, and a rise of 40 to 50% is the owner's. textWords: each text pattern said in words, which compose.mjs --usage prints instead of the regular expression (one for each entry of text, in order). builds: modules a module requires whose markup its script writes, so --usage prints a line saying so instead of their usage text (the palette builds its own rows and key chips). The council's clarity check of the usage texts (all three: not yet clear) raised eight caps because the texts gained what an agent had to guess: callout 200 to 700 (the icon and one wrapper div around the title and body as markup, the four status icons, the role React's Callout renders), palette 1100 to 1300 (an item shown whole, keys as an array, keywords), stats 450 to 800 (a snippet of the figures and of the dl), tabs 500 to 650 (the unselected panels), code 250 to 450 (the markup and what each token class means), segment 150 to 300 (a click does not switch it), progress 150 to 350 (the empty span that paints the fill), theme 250 to 400 (leave the button empty), and accent 250 to 300. Topbar went down, 700 to 500, as its build detail was cut. Raised in the usage PR (the council's clarity check): palette 11300 to 11450 (the module grew 11283 to 11448, +165, about 1.5%), for the guard that makes a string `keys` warn and draw no chip instead of throwing in `keys.filter`, which the palette's usage already promised. Round 2 of the clarity check: tabs 650 to 750 (the panel's top space shown in the snippet, and that the script selects a tab on click). Raised in the site-icons and status PR (skill-parity part A, DECISIONS 106 and 107): status 1650 to 1900 (the neutral, pending and running marks, the badge's real border, and the forced-colours disc, net of the red danger word it drops) and its usage 400 to 1000 (every status in words, the word alone, running, forced colours); rows 4300 to 4450 (the profile list's seat rule and the status parts on a lit row) and its usage 300 to 600 (the profile list, with the one mistake: never an empty element for the seat). New: the links module (2671 bytes: the social row, the new-tab arrow's CSS and the script that draws it; budget 2750) and its usage (1746 bytes; cap 1850), which carries the social link, the glyph set, icon only and the new tab. Dropping Regular halves icons.json. Added in the overlay PR (skill-parity-4, batch 7 step 2, DECISIONS 108): the shared plate leaves palette.js for a glide module (the palette, a menu and the notification centre all call it), so the palette's cap went down, 11450 to 9250, and rows 4450 to 3850 (the plate's CSS moved to glide); and the overlay layer comes in as seven modules a page carries only when it uses them, each with its own cap and usage cap set a little above its size: popover (the native popup shell), menu, dialog (the dialog and alert dialog), sheet (on every side, the top one the site header's narrow menu), tooltip, toast and notifications (the centre). skillMd is unchanged in its cap (the eight new index lines fit within it); the core is unchanged in bytes. Added in the figures and charts PR (skill-parity-5, batch 7 step 3, DECISIONS 108): four modules a page carries only when it uses them, each with its own cap and usage cap set a little above its size: meter (React's Meter, CSS only, 2581 bytes), dlist (the description list, CSS only, 1265), terminal (the code block's transcript: its CSS, 3242, and the script that draws the gutter, the copy button and the replay, 4824) and chart (React's TimeChart and ChartGroup: 7313 of CSS and 23262 of script, which port chart.tsx's scale, layout, lane, labels, sentences, keyboard and table; it needs the art tokens, the table and the kbd chips, and a page without a chart carries none of it). Stats grew for the source line (budget 700 to 850, 798 bytes; its usage 800 to 950, 675 to 899 bytes, +33%, under the owner's 40 to 50%). skillMd is unchanged in its cap (four index lines fit within it); the core is unchanged in bytes. Added in the forms and selection PR (skill-parity-6, batch 7 step 4, DECISIONS 108): six modules a page carries only when it uses them, each with its own cap and usage cap set a little above its size: select (React's Select: the native select's closed trigger in every browser and, where `appearance: base-select` is shipped, the styled list with its two-line rows; a small script that says which input lit a row, 7740 bytes before it, choice (Checkbox, Radio, RadioGroup and Switch as styled native inputs; CSS only, with the first-frame rule), choice-card (ChoiceCard; CSS only), toggle (the pressed toggle's plate and check seat on .btn; CSS only), selection (a table's checkbox column: its fixed width and the script that sets aria-selected, the mixed header box and the count) and loops (the page-level hold on every loop with its switch: the held look and the script that stores it). The select's styles left forms, whose budget fell 3650 to 3250. skillMd rose 8621 to the size of its six new index lines, within its cap; the core is unchanged in bytes; compose adds the stored-hold line to the head of a page that has the loops module. Revised in the same PR (the lead's review of the build): the select gains select.js (one row is lit at a time, by whichever of the pointer and the keys moved last), and choice, toggle, selection and loops carry the first-frame rule, so a state a script sets on load (a mixed header box, the stored hold) paints at once with no crossfade. Added in the navigation and layout PR (skill-parity-7, batch 7 step 5, DECISIONS 108): five modules a page carries only when it uses them, each with its own cap and usage cap set a little above its size: glyph (Basalt's core glyphs drawn by name, at rest and selected, from a table the build works out from the drawn set; a page carries only the glyphs it names, and the drawing of a core glyph from data-glyph left the sheet module, which draws none now), nav (React's Nav: the sidebar's, the narrow menu's and More's rows, with the shared hugging pill), topbar-nav (the site header's links, one action and narrow menu, built by script from the bar's markup), app-shell (the shell, its sidebar and rail, and the app header) and tab-bar (the phone tab bar). The topbar module became the site header's bar (React's SiteHeader, DECISIONS 108: 56px with its line inside, the 44 by 44 brand target, the narrow-screen buttons, the derived sticky offset), budget 1600 to 3200 because its rules gained the app header's shared smoke, and its usage 500 to 750 (+50%) for the lockup's markup (the links, action and menu are topbar-nav's usage). Glide 3700 to 3950: the navigation's pill is a shape inside the row that the plate follows (about 200 bytes). The core's usage 2000 to 2100 (+5%): h2 is the Section step, the prose column's measure, and a link already 44px tall needs no margin. skillMd rose 9317 to 9863 for five index lines, under its cap; the core CSS grew 38 bytes (the layout tokens replace raw lengths, the gutter is one derived property, h2, .prose and .lead follow foundations) and the core script is unchanged. A module's media query writes %bp-md%, %bp-lg% or %bp-container% and the build substitutes the breakpoint tokens. Added in the tables and filters PR (skill-parity-8, batch 7 step 6, DECISIONS 108): the existing table module gains React's table additions (DECISIONS 95: the row header, \"Not observed\", the row density and the scroll hint with its small script), budget 1400 to 3000 (it was 1134 bytes of CSS; it is 2168 of CSS and 693 of script) and its usage 700 to 950 (+36%); and two modules a page carries only when it uses them, each with its own cap and usage cap set a little above its size: still-table (React's Table with `columns`: the fixed layout from a colgroup, the whole header cell as the sort button with its reserved seat, aria-sort, the pinned columns and their divider, the empty row; 4767 of CSS and 3264 of script, budget 8200) and filter (React's MultiSelect and FilterResult: the chips, the trigger and checklist with the search band from ten values, Clear held in place, the one debounced result line, and the narrowing of a table by `data-column`; 8240 of CSS and 7978 of script, budget 16400; it needs the popover, glide, glyph and choice modules). The core is unchanged in bytes. skillMd rose 9863 to 10128 for two index lines and the CaretUpDown icon's name, within its cap. Added in the commands PR (skill-parity-9, batch 7 step 7, DECISIONS 103 and 108): one new module a page carries only when it uses it, command-list (React's CommandList: the command panel set in the page, list plus preview, the push; it extends the palette and needs rows, kbd and glide; 5229 of CSS and 8734 of script, budget 14000, usage 2150). Two-line rows come to the existing modules: rows 3850 to 5350 (the described row's grid and description line, the push's chevron: 1481 bytes of CSS, the same rules React's menu rows carry), palette 9250 to 9900 (its rows are one function the list shares, with the description and the two-tier ranking of title matches over keyword and description matches; +636) and its usage 1300 to 1350, rows' usage 600 to 800, and glide 3950 to 4000 (a host that is idle counts as having no lit row, +54). skillMd rose 10128 to 10259 for one index line, within its cap; the core's CSS grew 24 bytes (.split.aside takes size-list-width in place of its raw 20rem: the same 320px, so no pixel moves) and the core script is unchanged. Added in the art PR (skill-parity-10, batch 7 step 8, DECISIONS 104 and 108): two modules a page carries only when it uses them, each with its own cap and usage cap set a little above its size: stage (React's Stage and PairedArt: full-bleed art under the site header, the pull-up by the sticky offset, the headroom, the paired art that follows the page's theme, and the forced-colours and print rules; CSS only, 1179 bytes) and framed-art (React's FramedArt: the figure, its rim and radius, the reserved box, the placeholder and the failed alt, the caption and credit; 2208 bytes of CSS and the 733-byte script that sets the frame's phase); both need the art tokens. The bar stays smoked over a stage: React clears it only over a stage that passed the headroom test helper, and a page has no test run (DECISIONS 108's note), so the skill builds no clear state. skillMd rose 10259 to 10500 for two index lines, within its cap; the core is unchanged in bytes. The callout gained the status rim in the same PR (DECISIONS 82, D8's status callouts): success, warning and danger draw their border in the status colour at 45% mixed in sRGB over the callout's own level, one solid colour on every side, and CanvasText in forced colours with the icon; the status colour is now one property the icon and the rim read. Its budget rose 900 to 1150 (the module is 1089 bytes, from 792: +297, about 37%); its usage is unchanged. Added in the overlays-and-the-rest PR (skill-parity-11, batch 7 step 9, DECISIONS 90 and 108): the last two parts of D8's part 5, each a module a page carries only when it uses it, with its own cap and usage cap set a little above its size: combobox (React's Combobox: the input with its caret button inside, the popup of the menu's rows with the glide's shared plate and two-line options, the filtering, the keys, the hidden value, the empty message and the check; 4342 of CSS and 6423 of script, budget 10900, usage 2150; it needs forms, popover and glide, and builds the last two) and sparkline (React's Sparkline: the label and latest value, the line, the axis, the empty sentence and the loading line that breathes; 1609 of CSS and 1874 of script, budget 3600, usage 950). The combobox copies the menu's row rules, as the select's list does, because React's Combobox renders MenuItem rows (a 40px hit area, a 36px plate) and the skill's .row is the palette's 44px: it carries no menu script. popover.js gains the combobox popup in the list of popups that keep focus where it is (+21 bytes, within its cap). skillMd rose 10500 to 10724 for two index lines, within its cap; the core is unchanged in bytes. Added in the motion-rules PR (DECISIONS 136 and 139): one module, ambient (a page's one ambient loop: CSS 828 bytes, script 433, budget 1300, usage 800), taken out of loops so the hold's own module grows only by the icon toggle's glyph swap (loops 2000 to 2200, +10%; its usage 1300 to 1650 for the icon form and the new settings-row sentence, +27%); and the chart's entrance (`entrance: true`: the marks' animations, their conditions and the redraw that restarts them at the elapsed time, 23262 to 25299 bytes of script; budget 30700 to 32800, +7%, usage 2500 to 2950, +18%). The core grew by the three tokens (27704 to 27862 bytes of CSS, under its cap). its stage usage gained the ambient art's line (1650 to 1750, +6%). skillMd rose 10724 to the size of the ambient index line, within its cap. Raised again in the motion-rules amendment (DECISIONS 143): chart 32800 to 33800 (script 25299 to 26375 bytes, +4%; +10% over the 30700 it began with) for the glide a new data set makes mid-entrance, print settling it, and `Basalt.pageChange()`; its usage 2950 to 3150 (+26% over the 2500 it began with). Raised in the second motion-rules amendment (DECISIONS 148): chart 33800 to 34400 (script 26375 to 26970 bytes: a line and its markers glide from their drawn geometry, and `beforeprint` settles the entrance; +12% over the 30700 it began with); topbar-nav 6900 to 7500 (+8.7%: the narrow menu's pause row, its CSS and 275 bytes of script, DECISIONS 148 item 2); loops usage 1650 to 1800 (+38% over the 1300 it began with, for the icon form's `title` and the menu row). Raised in the audit-design-b PR (DECISIONS 138 and 139): still-table 8200 to 13400 (+63%: the module was 7927 bytes and is 13311; the cut cell's plate, its focus stops and its dismissal, ported from React's cell-peek.ts, are 4273 bytes of script and 1111 of CSS; a still table that truncates needs them). The same PR: core usage 2100 to 2250 (+7%: the skip link, one bullet), forms usage 350 to 480 (+37%: the required mark), still-table usage 1950 to 2150 (+10%: the cut cell and the width rule), notifications usage 1050 to 1100 (+5%: the 44px entry on touch). The skip link's rim and radius took the core 30457 to 30609 bytes, under its cap (the rules that hang it under the bar are the topbar module's: 3200 to 3600, +12.5%); core 30720 to 31050 (+1.1%, DECISIONS 147: also the bar's links left out of the rule: the pseudo-element that makes a short standalone link a 44 by 44 target), skip-link script in the topbar module (3200 to 4150 over this PR, +30%: the rules that hang the link under the bar, 3600, and the script that reads the bar's real edge, 4150), sparkline 3600 to 4050 (+12.5%: React's ticker structure, so the value copies once on its line, and in forced colours the strips go and the number is plain text), forms budget 3250 to 3500 (+7.7%: the necessity word), notifications 9050 to 9250 (+2.2%: the 44px entry). Raised in the audit-design-b PR's E2 port (DECISIONS 138 and 139: the core set draws check, close, the chevrons, copy, plus, minus and search wherever a component draws them): the modules that drew a Phosphor icon for one of those now carry the core glyph's whole SVG, written in at build time (`%glyph-svg:name%`, the markup the glyph module's `_.glyph(name)` returns, so no module needs the glyph module and a page pays for nothing it does not use), and the Phosphor path of the same icon leaves the page. Each module's own bytes rose by that markup, and a page's total moved by what the Phosphor path it no longer carries saves: menu 8600 to 8900 (+303), combobox 10900 to 11200 (+303), copy 1900 to 2400 (+640), terminal 8100 to 8850 (+761), toast 13850 to 14150 (+325), number 2900 to 3400 (+557), filter 16400 to 17050 (+785), palette 9900 to 10450 (+536); the command list shares the palette's search drawing and fell 20 bytes. Set in integration-nov15, where the type-layout, motion-rules and audit-design-b branches meet: the combined tree measured SKILL.md 10959 bytes (each side's cap was 10900: both added index lines), core 31192 bytes (caps 30720 and 31050: the page-row and display rules, the three motion tokens and the skip link and 44px target rules all land in the core CSS) and core usage 2348 bytes (caps 2300 and 2250: type-layout's line and the skip-link bullet), so each is set to the measured bytes rounded up to the next 50: skillMd 10900 to 11000, core 31050 to 31200, core usage 2300 to 2350. Raised in the audit-design PR (decisions 138 and 139, parts A, D and C11): core 30720 to 31600 (+2.9%: the more-contrast block and its three aliases, and the field boundary token, every page carries as React does; the shadow-pill token is gone; the script gained `reserve`, 240 bytes), segment 3700 to 4100 and tabs 2300 to 2700 (the chosen label is 600 against 400, its width reserved by a span that carries its own copy, drawn unseen at 600; the pill's drop shadow is gone), and the segment's usage 300 to 380 (the weight and the glyph-only button). Raised again in the audit-design-a amendment (decision 145): core 31600 to 32300 (reserve() also reserves a label that is not plain text), segment 4100 to 5100 and tabs 2700 to 3500 (the second copy of such a label, and an icon drawn in both its forms), glyph 1100 to 1300 (a glyph in a segment or tab is drawn in both forms). Raised in the second audit-design-a amendment (decision 149): core 32300 to 32800 (reserve() builds the second copy of a label without any id, name, reference or hidden control, and does not copy a frame or media), segment 5100 to 5400 and its usage 380 to 500 (the 600 is on the label, the one-line rule and the usage text); the still-table cap is back at 8200, as the wash is on every cell again. Return 3 of the audit-design-a build (decision 149): tabs 3500 to 3700 (a tab the script has not reserved is 600 itself when selected, and one it declined is marked; the same two lines are in segment, which stays under 5400). Raised in the audit-fix-c2 PR (engineering, no pixel changes): toast 13850 to 14350 (the module was 13789 bytes and is 14288, +499, 3.6%) for F6, which focuses the Notifications region and Shift+Tab or Escape from it (or from the first toast) leaves it for where focus came from (and keeps a dialog's focus trap from wrapping it), as Base UI's viewport does in React, and for placing the region from focus (in the modal that holds it, or in the body), so a toast is never under a backdrop or in an inert modal whatever order the modals opened in (A3-09); the palette module grew 9864 to 9897 of its 9900 so that a palette opened over a modal sits inside it; topbar 3200 to 3250 (3123 to 3233, +110) for the scroll margin on what the bar holds, so a Tab into the bar from a scrolled page does not scroll the page (React's rule from PR #66); stage usage 1650 to 1750 (1580 to 1713, +8%) for the art's new place in the markup, after the content (A1-09), the stage's own CSS rising 1179 to 1208 within its 1250. skillMd rose 10724 to 10876 for the sentence that says a body may carry head tags, within its 10900. compose.mjs, the tool an agent runs, has no cap here (it is never in a page): it grew 21673 to 38153 bytes for the tokenizer that reads a body as HTML does and the head tags. Raised in the site-parts PR (DECISIONS 146, round 39), which folds each new part into the module it belongs with, so SKILL.md gains no index line (it has 41 bytes under its cap and a new module needs about 100): topbar 4150 to 17600 (+13450: the site footer and its disclosures, the lockup by pixel density, and a bar that arrives or leaves and returns, with its observer; a page that has a .topbar and no footer carries them too: the alternative, a module for each, needs its own index line and so SKILL.md bytes) and its usage 950 to 2900 (the footer's markup, the lockup's and the phase's); theme 650 to 4550 (the three-word theme choice: its CSS 2230 bytes and its script, 2277, with arrows, storage and the system listener) and its usage 400 to 1150 (the choice's markup written in full, so the right word is chosen before any script); segment 3700 to 3800 (a radio group's checked state besides a pressed button); stage 1250 to 2150 (its first script, 768 bytes, for fit and anchor) and its usage 1750 to 2000; framed-art 3000 to 3900 (drawn art in the frame: fit, anchor, no scaling strokes) and its usage 1250 to 1400. SKILL.md rose 10959 to 10992 (the topbar and theme index lines name .site-footer and .theme-choice). The head's theme line also writes data-theme-choice. Raised in site-parts return 2 (DECISIONS 146 B1 and B4): theme 4550 to 5350 (+800: the icon form of the theme choice, [data-theme-menu], whose button shows the theme in use, is named for the choice and opens the page's own .menu of three radio rows, in the theme script's 3073 bytes; the menu and popover modules are the page's, brought by its markup, so no module line was added and SKILL.md is 10993 of 11000) and its usage 1150 to 2200 (+91%: the menu's markup is written in full, and the deprecated toggle is said once); app-shell usage 2000 to 2100 and topbar-nav usage 1900 to 1950 (the theme control leaves the bar's text; the tools and the end cluster come in). The two example bodies still carry the deprecated data-theme-toggle. Return 2, F3 (DECISIONS 146 F): stage 2150 to 2250 (script 842 bytes: slice is the stage's default, as a frame's, and a drawing's own preserveAspectRatio stands unless the stage names data-fit or data-anchor) and its usage 2000 to 2150. framed-art 3900 to 4000 (a drawing's own preserveAspectRatio stands unless the figure names data-fit or data-anchor, +101 bytes). Return 3: theme 5350 to 5900 (script +569 bytes: who wrote data-theme, so System follows the system's change live and a theme the page set by hand, or a .dark or .light root, survives it). Raised in the controls port (DECISIONS 154): skillMd 11000 to 11200 for two index lines (link-tabs and option-chips, 214 bytes together), and core 31200 to 31600 for the nine tokens the port adds to every page's token CSS (the control rungs 44 to 64, two container widths, the confirm hold and the amount's opacity, 311 bytes). New modules (DECISIONS 154): link-tabs 2700 (its sizes, the 640 container step, the forced-colours underline, and the select that replaces the row under 720 with its 590-byte script, A15; it requires the select module), option-chips 5700 (the chip's states each written for a native radio inside a label, which needs :has on every one, plus the 1 KB script that keeps an aria-disabled chip reachable and never chosen). Return 3 (DECISIONS 154 conformance): link-tabs 2700 to 3100 and its usage 1650 to 1850 (the select's height for each row size, and a script that reads aria-current when it is needed and watches it move: 3,048 bytes), option-chips 5700 to 6700 (each state written twice, as a state attribute and as :has(), so no browser needs :has(): 4,975 CSS and 1,623 script). Return 4 (DECISIONS 158, Q2): link-tabs 3100 to 4300 and its usage 1850 to 2400 (the \"Go to\" label drawn at the select's start with its measured clearance, the select's accessible name kept as the words and the chosen page's, and the key hold that keeps a letter or an arrow on the closed select from navigating: 4,174 bytes, CSS 2,951 and script 1,223). Raised in the links-and-rows port (DECISIONS 152; the owner's approval is the lead's to confirm): the new link-rows module (5050 bytes of CSS, 50 of them for Castle's big-row arrow stepping colour over duration-fast, return 1, 1500 of usage: the directory's and the big rows' CSS, whose arrow is a core glyph drawn as a mask, and their tokens, size-row taken out of the core like type-layout's), disclosure 1550 to 3500 (Show all: the track, the clip and the settle, 1.5 KB of script and 1.8 KB of CSS), copy 2400 to 3500 (the form with words: the one cell and its script). SKILL.md rose 10959 to 10997 for one line, within its 11000 cap. Raised in the charts port PR (DECISIONS 153, D7a): chart 34400 to 34650 (script 26970 to 27270 bytes, +1.1% on the 34283 it was: `Basalt.trailingMean`, the trend maths React exports as `trailingMean`, 300 bytes), its usage 3150 to 3350 (+6%: one line for it). The tokens the batch adds (chart-lit-top, -mid and -base in both themes, size-chart-plot-sm, size-chart-row, size-meter-marker and radius-2xs) took the art module 2087 to 2546 bytes (budget 2100 to 2600, +24%: the chart tokens are its group) and the core 31192 to 31250 (cap 31200 to 31300, +0.3%: radius-2xs). Only D7a names a skill module in the charts ballot; the lit marks, the headline frame, the phase chart, the share bar, the coverage strip, the marks row and the range meter are React-only in this batch. Added in the overlays-and-search PR (DECISIONS 155, D10b and D13a): the sheet gains React's head, body and foot (the 44px close, the 20/28 title over a 13px count, the divider and the safe areas; its CSS 3.6 to 5.2 KB, budget 4050 to 5250, +30%) and its usage 1050 to 1450 (+38%: the anatomy and the step's focus, two bullets); and one new module a page carries only when it uses it, search (React's SearchDialog: the form, the field's -2 outline, the count line, the fixed-height results area and the rows with their picture slots and full-bleed hover wash; CSS only, 4368 bytes, budget 4400, usage 2050; it requires the dialog). The dialog's title draws no ring when script focuses it. skillMd rose 10959 to 11079 for the search line (the sheet's line is unchanged: its usage carries the anatomy), so its cap rose 11000 to 11100 (+0.9%). The core's CSS grew 31192 to 31421 bytes for the six new size tokens (the wide dialog, the search trigger and the logo and picture slots of a search result): its cap rose 31200 to 31450 (+0.8%). The two 44px values (the sheet's close and the search field) are local to their modules, with a lint exception that says they join the controls batch's size token (DECISIONS 154). Set in integration-nov15b, where audit-design-a, audit-fix-c2, site-parts, port-controls, port-links-rows, port-charts and port-overlays-search meet: the combined tree measured SKILL.md 11560 bytes (the caps were 11000, 11100 and 11200: each side added index lines), core 34086 bytes (caps 31300 to 33550: every side's rules land in the core CSS and script), topbar 17660 (17600 from site-parts, plus audit-fix-c2's skip-link and focus work), number 3453 (3400), palette 11379 (11000, audit-fix-c2's hosted scrim plus the core search glyph), dialog 5120 (5100), toast 15692 (15400) and stage usage 2248 (2150), each over every side's cap, so each is set to the measured bytes rounded up to the next 50: skillMd 11200 to 11600, core 33550 to 34100, topbar 17600 to 17700, number 3400 to 3500, palette 11000 to 11400, dialog 5100 to 5150, toast 15400 to 15700, stage usage 2150 to 2250. The segment cap is the base's 5400 plus port-controls' 100 (5500), unchanged by the merge. Raised in integration-nov15b, join 2 (a link tab takes the selected state, DECISIONS 138 A, 145, 149 and 154's D12 row): link-tabs 4300 to 5750 (+34%: the module was 4174 bytes and is 5736; the 600 against 400, the reserved width and the second copy of a composed label, an icon drawn in both its forms, the same rules a tab carries, 1,530 bytes of CSS and script) and its usage 2400 to 2550 (+6%: one bullet). The cap is the measured bytes rounded up to the next 50; a module that needs the tab's rules carries them as the segment and tabs modules do, so a page without link tabs pays nothing. Raised in the panels, art and parts port (DECISIONS 162): table 3000 to 3150 and its usage 950 to 1450 (the flat form and the two-line cell), stage 2250 to 2600 and its usage 2250 to 3100 (the closing block: its held art, forced colours and print; its section gap is type-layout's --basalt-section-gap, which a page with data-closing brings), the new app-tile 4300 (a 120-point polygon clip and the hairline's mask of the same outline), captioned 2000 and period 1400; skillMd 11600 to 11950 for one index line each for captioned, app-tile and period (358 bytes; the file is 11918). Raised in the logs, status and forms port (DECISIONS 162): core 34100 to 34200 (the new size-field-label-inline token, 80px, is written into every page's tokens: 25 bytes); dlist 1300 to 1900 and its usage 950 to 1060 (the stacked form, R9 and R10: a title over its text, 20px between entries, no divider; one usage line). Raised in audit-fix-c6 (the owner's cap, raised by the builder and for the owner to confirm): glyph 1300 to 1900, for redrawing a glyph when its ancestor's aria-current or data-current moves (the lists that hold glyphs are watched). Raised in the colour-ink-ladder build (DECISIONS 166): core 34200 to 34350 (the four lifted dark inks are four new primitives, each written into every page's tokens: the core measured 34307). Raised in the audit-2-design build (DECISIONS 167, Q7a): disclosure 3500 to 3800 (the core chevron drawn as a mask in place of two borders: the module measured 3755). Joined in the integration of c7 (#86) and c10 (#91): option-chips 6750 to 6850 (c7's reset resync and c10's data-ready together measure 6839). Raised in table-sort-3 (DECISIONS 257 and 261, the owner's pick: three sort states, the arrow after the label, explainers on column titles): still-table 13400 to 14650 (+9.3%: the module was 13343 bytes and is 14602; the end-aligned label's move by a transform, its right-to-left sign and the indicator that waits for it on a fine pointer, 912 bytes of CSS; the third state, the sort from the table's own order and a .explainer kept out of the button, 347 bytes of script) and its usage 2150 to 2250 (2197: the third state and the own order); the new explainer module 5850 (5842: a manual native popover opened from the sort button on hover, keyboard focus and a long press, placed above the header or beside it, 1752 bytes of CSS and 4090 of script; a page without explainers pays nothing) and its usage 900; skillMd 12250 to 12400 for the explainer's index line (113 bytes; the file is 12352). Each cap is the measured bytes rounded up to the next 50. Raised in table-sort-3's fix pass (Astra's review): explainer 5850 to 6900 (+18%: 5842 to 6864 bytes; the gap between the header and the card kept while a pointer crosses it, the close when its header leaves the view whatever has focus, the dismissal held until pointer and focus have both left, and its page-wide listeners and timers scoped to an open card and stopped when the table leaves the page, 1,022 bytes of script). Raised in cimip-gaps-2 batch B5 (the touch sizes under 720 whatever the pointer: each coarse-pointer target rule also answers a window under 720, about 20 bytes a rule; forms merged its three into one and stays under 3500): select 9000 to 9100 (measured 9064), selection 1480 to 1500 (1486), filter 17450 to 17500 (17473), option-chips 6850 to 6900 (6853), menu 8900 to 8950 (8902). B5 fix pass 1 (Astra): core 34550 to 34950 (measured 34911: 30762 CSS and 4149 JS) for stacked links in a column, each giving up the side of its 44px box that meets a neighbour, so a tap on a link's words is always that link's; core had 12 bytes free. DECISIONS 274 (the owner's pick: under 720 the toast stack hangs from the bar): toast 15700 to 16050 (measured 16035; 8 bytes were free; the stack's direction became one sign variable, trimming 585 of the 920 bytes the phone form first took). B5 merged with main (5ad5345a): main's own core measured 34930 against its 34550 cap before B5; with B5 (the touch sizes under 720 and stacked links in a column) it is 35331, so core is 35350; nav 5350 to 5400 (measured 5364: B4's nav plus the touch size under 720). The full run after the stream (DECISIONS 246): the site footer's links keep their own flex column under 720, as React's, out of the bare-link touch rule (26 bytes), so core is 35400 (measured 35357); sheet 5250 to 5400 (measured 5368: React's B5 ring room, ported: the held actions reach space-1-5 above their band, clipped, and the body keeps space-1-5 at each end). Raised for diagram motion and service marks (DECISIONS 292): skillMd 12550 to 12650 for the diagram-motion module's one line; diagram 87200 to 91000 for what a still diagram now carries (a card's mark and its seat, the pending frame, the comparison that writes a drawing only when it changed, and the print rule), and its usage 2600 to 4300 for the decision's four lines and the list of mark ids; the new diagram-motion module (the motion engine, its stylesheet and the motion tokens, in a page only when a diagram is animated) at 26200. Raised when the diagram tests were first run (DECISIONS 298): diagram 91000 to 91250 and diagram-motion 26200 to 26850. Raised in batch A of the diagrams backlog (DECISIONS 301): diagram 91250 to 92400, for the engine fixes it bundles (a decision kept no taller than it is wide, labels on whole pixels, slots beside a straight line, a one-column schema's turn-back); the skill keeps the development checks a production React build now drops. Raised again in that batch's review fixes: diagram 92400 to 92650, for the drawn layout refusing two lines laid on one another (Neon's blocking finding 1 on #126). Fix round 1 of #124 had already taken them to 91205 and 26621 with the tests unrun; this round added 1 byte (every focal node prints its fill; a one-form mark's dark form falls back to its light one) and 180 (the entrance keeps its own clock when it is drawn again while paused). DECISIONS 320 (versions and release notes): the release module is new (budget 15900 at first, usage 2400); topbar, app-shell and tab-bar gain the version link's classes (budgets: topbar 17700 to 19900, app-shell 4300 to 5200 with the rail's tooltip for it, tab-bar 4850 to 5200), their usage caps rising 2900 to 3100, 2600 to 2850 and 2250 to 2400 for its one line each; skillMd rose 12650 to 12800 for the release module's line and .version-link in topbar's. The code review of round 68 adds data-focus-self to the popover module (its Tab walk; budget 4950 to 5600, usage cap 950 to 1100) and logical start and end for its alignment; the release module's header grid and the Sources panel's touch rows take it to 16900. The spacing sweep of round 68 (DECISIONS 326: Copy link's words on the edge, the callout's last change, its reference column, the last release, the touch rows' end and the whole code chip) takes the release module to 17400. The ruling on where a release ends (DECISIONS 331: no padding under the last change in a release, a release-ending fold's hang, an arrived change keeping its padding, the panel holding its first margin, Build details 44 on touch and a closed Fixed panel taking no room) takes it to 19000. The code recheck of round 68 (recheck 5) has the popover's Tab walk follow Safari's own rule (Tab skips links on Apple's WebKit, Option-Tab reaches them): popover 5600 to 5900. The pixel recheck of round 68 has the Sources panel's touch rows keep their 20px lines with the link's box as hit area, space-3 rows and space-6 between two linked values (recheck-pixels 4), and the release's whole header take the arrival's plate: release 19000 to 19600. Merging #127 (stages, DECISIONS 316 and 328) into the versioning branch: both had raised skillMd from 12650 to 12800 for their own module's line, and together they came to 12886; SKILL.md was tightened in its wording (no rule dropped) to stay within 12800. Raised in diagram batch B's fix round (DECISIONS 318, the owner's diagram raise; and 326's sweep), each to its measured size: diagram 137700 to 144100 (the two reviews' fixes in the shared engine: right to left frames and self-calls, the corridors' and lanes' development words, the unusable-placement check, the transcript's hanging lines, the text art's frame widening, the frame-side fit check, the sequence's layers, the stacked group's turn room), diagram-motion 28450 to 30450 (the text sequence's build by ink and its colour-only run, moved into the motion module), diagram-zoom 17000 to 17600 (a linked card closes the viewer; the text art's own width; a placed model for the key hint), diagram-export 7850 to 10450 (an export at rest: sized drawing SVGs, no reveal masks, the pseudo-element rules, the lines under the cards, a viewer's figure read at 100% with its head and key, the rim's lit top). Raised at the batch B re-check (the decider's four rulings): diagram 144100 to 145100 (5.1's first list reported as errors apart from the warnings, a turn's label lines on the group entered by it and the seats beside its turn, the bare stack applied, the text art's reset of the core's inline code chip). Merging main (#127 and #128) into diagram batch B: skillMd keeps main's 12800 (batch B had raised it to 12950 for its diagram lines); SKILL.md was tightened in its wording to stay within it, no rule dropped; core takes main's 35550.Raised in the repo review (23 Nov 2026; budgets are soft, the owner's word): notifications 12450 to 12700 (a link is written only when relative, http, https or mailto, and side and align are checked before they reach the markup), combobox 11200 to 11350 (a disabled field's hidden input is disabled too, now and later), tooltip 3200 to 3550 (the gap to the opener is the tooltip's own, and hover and keyboard focus each hold it open; WCAG 1.4.13), chart 34750 to 34800 (the scale's step search and gridlines are bounded, so extreme values cannot hang the page), spinner 650 to 720 (its held rule moved in from loops, so a ring-only page keeps a stored hold), kbd 2900 to 2950, palette 11400 to 11500 (and its usage text 1350 to 1400, for the Mod line) and toast 16050 to 16200 (Mod in a palette item's keys is bound as it is drawn, and a toast action's aria-keyshortcuts resolves Mod). The safe-sinks rule (decided by the owner, Fable, Astra and Muse, 23 Nov 2026): skillMd 12650 to 12900, and 13050 with main's own raise merged in (one line: data goes in as textContent, a link passes Basalt.safeHref, an option comes from a fixed list), core 35400 to 35650, and 35800 with main's own raise merged in, and its usage 2950 to 3200 (one safeHref, published as Basalt.safeHref, and _.pick, in place of a copy in each module; esc escapes the apostrophe), link-tabs 5750 to 5900 (a refused link dispatches no event), diagram 92650 to 93000 (a card's mark is a relative path, https or a data: image). Merging #129 into diagram batch B: diagram keeps batch B's 145100 plus #129's mark check, set to its measure, and batch B's usage 4600.", + "$comment": "Which parts of the skill's CSS and JS a page gets. The core is always in. A module is in when the page's body has one of its classes, attributes or tags, matches one of its text patterns, or is named in a <!-- basalt:use name --> comment, and when another module needs it (requires). Modules are added in the order listed here, which is the order of the source files' cascade. classes: every class the module's CSS styles (the test checks them against the CSS and against SKILL.md). budget: the most bytes its minified CSS and JS may reach together. budgets: skillMd (SKILL.md, the context an agent pays: never above what it was), core (the CSS and JS of every page). icons: Phosphor names the module's script draws itself. Raised in the first parity PR (the owner's \"bring up the parity\"): forms (the number-input, search-clear and file-input chrome), disclosure (the native details marker), status (the accent reader and the forced-colours badge border), spinner (a fixed 16px ring), and the new number, range and accent modules. skillMd rose 10555 to 10900 for the new rules (number field, native chrome, the braille rule, the accent). Raised in the second parity PR (popup rows, levels and the segment's pill): segment 1400 to 3700 (the shared sliding pill: its script, 1.5 KB, and its CSS with the pill's two fallbacks), rows 3600 to 4300 (#27's plate-in-a-row geometry, the plate per level, the glide's shared plate and the forced-colours lit row, net of the removed bar), palette 9400 to 11300 (the glide's script, 2.4 KB: it follows the lit row, travels on a pointer, snaps on a key, and fades in place on leaving). The art module (DECISIONS 101 and 104) is the token groups only some pages name, taken out of the core so the core stays under its cap: the chart roles and lengths, the art colours, the aspect ratios and the stage headroom, in both themes (2087 bytes at 2100; it grows only when a token of those groups is added). A page gets it when its body names one of them, a var() in its own style included. The every-module page has no cap of its own (owner, DECISIONS 79): each part is capped, and a page carries only the parts it uses. usage: the most bytes of a module's usage text (src/usage/NAME.md; core.usage for core.md), which compose.mjs --usage prints on demand. It is context an agent pays only for the modules its page uses, so it is capped per part as SKILL.md and the CSS and script are (DECISIONS 79 and 109). Each is set a little above what its text was when the usage moved out of SKILL.md (DECISIONS 109); raising one needs a reason in the PR, and a rise of 40 to 50% is the owner's. textWords: each text pattern said in words, which compose.mjs --usage prints instead of the regular expression (one for each entry of text, in order). builds: modules a module requires whose markup its script writes, so --usage prints a line saying so instead of their usage text (the palette builds its own rows and key chips). The council's clarity check of the usage texts (all three: not yet clear) raised eight caps because the texts gained what an agent had to guess: callout 200 to 700 (the icon and one wrapper div around the title and body as markup, the four status icons, the role React's Callout renders), palette 1100 to 1300 (an item shown whole, keys as an array, keywords), stats 450 to 800 (a snippet of the figures and of the dl), tabs 500 to 650 (the unselected panels), code 250 to 450 (the markup and what each token class means), segment 150 to 300 (a click does not switch it), progress 150 to 350 (the empty span that paints the fill), theme 250 to 400 (leave the button empty), and accent 250 to 300. Topbar went down, 700 to 500, as its build detail was cut. Raised in the usage PR (the council's clarity check): palette 11300 to 11450 (the module grew 11283 to 11448, +165, about 1.5%), for the guard that makes a string `keys` warn and draw no chip instead of throwing in `keys.filter`, which the palette's usage already promised. Round 2 of the clarity check: tabs 650 to 750 (the panel's top space shown in the snippet, and that the script selects a tab on click). Raised in the site-icons and status PR (skill-parity part A, DECISIONS 106 and 107): status 1650 to 1900 (the neutral, pending and running marks, the badge's real border, and the forced-colours disc, net of the red danger word it drops) and its usage 400 to 1000 (every status in words, the word alone, running, forced colours); rows 4300 to 4450 (the profile list's seat rule and the status parts on a lit row) and its usage 300 to 600 (the profile list, with the one mistake: never an empty element for the seat). New: the links module (2671 bytes: the social row, the new-tab arrow's CSS and the script that draws it; budget 2750) and its usage (1746 bytes; cap 1850), which carries the social link, the glyph set, icon only and the new tab. Dropping Regular halves icons.json. Added in the overlay PR (skill-parity-4, batch 7 step 2, DECISIONS 108): the shared plate leaves palette.js for a glide module (the palette, a menu and the notification centre all call it), so the palette's cap went down, 11450 to 9250, and rows 4450 to 3850 (the plate's CSS moved to glide); and the overlay layer comes in as seven modules a page carries only when it uses them, each with its own cap and usage cap set a little above its size: popover (the native popup shell), menu, dialog (the dialog and alert dialog), sheet (on every side, the top one the site header's narrow menu), tooltip, toast and notifications (the centre). skillMd is unchanged in its cap (the eight new index lines fit within it); the core is unchanged in bytes. Added in the figures and charts PR (skill-parity-5, batch 7 step 3, DECISIONS 108): four modules a page carries only when it uses them, each with its own cap and usage cap set a little above its size: meter (React's Meter, CSS only, 2581 bytes), dlist (the description list, CSS only, 1265), terminal (the code block's transcript: its CSS, 3242, and the script that draws the gutter, the copy button and the replay, 4824) and chart (React's TimeChart and ChartGroup: 7313 of CSS and 23262 of script, which port chart.tsx's scale, layout, lane, labels, sentences, keyboard and table; it needs the art tokens, the table and the kbd chips, and a page without a chart carries none of it). Stats grew for the source line (budget 700 to 850, 798 bytes; its usage 800 to 950, 675 to 899 bytes, +33%, under the owner's 40 to 50%). skillMd is unchanged in its cap (four index lines fit within it); the core is unchanged in bytes. Added in the forms and selection PR (skill-parity-6, batch 7 step 4, DECISIONS 108): six modules a page carries only when it uses them, each with its own cap and usage cap set a little above its size: select (React's Select: the native select's closed trigger in every browser and, where `appearance: base-select` is shipped, the styled list with its two-line rows; a small script that says which input lit a row, 7740 bytes before it, choice (Checkbox, Radio, RadioGroup and Switch as styled native inputs; CSS only, with the first-frame rule), choice-card (ChoiceCard; CSS only), toggle (the pressed toggle's plate and check seat on .btn; CSS only), selection (a table's checkbox column: its fixed width and the script that sets aria-selected, the mixed header box and the count) and loops (the page-level hold on every loop with its switch: the held look and the script that stores it). The select's styles left forms, whose budget fell 3650 to 3250. skillMd rose 8621 to the size of its six new index lines, within its cap; the core is unchanged in bytes; compose adds the stored-hold line to the head of a page that has the loops module. Revised in the same PR (the lead's review of the build): the select gains select.js (one row is lit at a time, by whichever of the pointer and the keys moved last), and choice, toggle, selection and loops carry the first-frame rule, so a state a script sets on load (a mixed header box, the stored hold) paints at once with no crossfade. Added in the navigation and layout PR (skill-parity-7, batch 7 step 5, DECISIONS 108): five modules a page carries only when it uses them, each with its own cap and usage cap set a little above its size: glyph (Basalt's core glyphs drawn by name, at rest and selected, from a table the build works out from the drawn set; a page carries only the glyphs it names, and the drawing of a core glyph from data-glyph left the sheet module, which draws none now), nav (React's Nav: the sidebar's, the narrow menu's and More's rows, with the shared hugging pill), topbar-nav (the site header's links, one action and narrow menu, built by script from the bar's markup), app-shell (the shell, its sidebar and rail, and the app header) and tab-bar (the phone tab bar). The topbar module became the site header's bar (React's SiteHeader, DECISIONS 108: 56px with its line inside, the 44 by 44 brand target, the narrow-screen buttons, the derived sticky offset), budget 1600 to 3200 because its rules gained the app header's shared smoke, and its usage 500 to 750 (+50%) for the lockup's markup (the links, action and menu are topbar-nav's usage). Glide 3700 to 3950: the navigation's pill is a shape inside the row that the plate follows (about 200 bytes). The core's usage 2000 to 2100 (+5%): h2 is the Section step, the prose column's measure, and a link already 44px tall needs no margin. skillMd rose 9317 to 9863 for five index lines, under its cap; the core CSS grew 38 bytes (the layout tokens replace raw lengths, the gutter is one derived property, h2, .prose and .lead follow foundations) and the core script is unchanged. A module's media query writes %bp-md%, %bp-lg% or %bp-container% and the build substitutes the breakpoint tokens. Added in the tables and filters PR (skill-parity-8, batch 7 step 6, DECISIONS 108): the existing table module gains React's table additions (DECISIONS 95: the row header, \"Not observed\", the row density and the scroll hint with its small script), budget 1400 to 3000 (it was 1134 bytes of CSS; it is 2168 of CSS and 693 of script) and its usage 700 to 950 (+36%); and two modules a page carries only when it uses them, each with its own cap and usage cap set a little above its size: still-table (React's Table with `columns`: the fixed layout from a colgroup, the whole header cell as the sort button with its reserved seat, aria-sort, the pinned columns and their divider, the empty row; 4767 of CSS and 3264 of script, budget 8200) and filter (React's MultiSelect and FilterResult: the chips, the trigger and checklist with the search band from ten values, Clear held in place, the one debounced result line, and the narrowing of a table by `data-column`; 8240 of CSS and 7978 of script, budget 16400; it needs the popover, glide, glyph and choice modules). The core is unchanged in bytes. skillMd rose 9863 to 10128 for two index lines and the CaretUpDown icon's name, within its cap. Added in the commands PR (skill-parity-9, batch 7 step 7, DECISIONS 103 and 108): one new module a page carries only when it uses it, command-list (React's CommandList: the command panel set in the page, list plus preview, the push; it extends the palette and needs rows, kbd and glide; 5229 of CSS and 8734 of script, budget 14000, usage 2150). Two-line rows come to the existing modules: rows 3850 to 5350 (the described row's grid and description line, the push's chevron: 1481 bytes of CSS, the same rules React's menu rows carry), palette 9250 to 9900 (its rows are one function the list shares, with the description and the two-tier ranking of title matches over keyword and description matches; +636) and its usage 1300 to 1350, rows' usage 600 to 800, and glide 3950 to 4000 (a host that is idle counts as having no lit row, +54). skillMd rose 10128 to 10259 for one index line, within its cap; the core's CSS grew 24 bytes (.split.aside takes size-list-width in place of its raw 20rem: the same 320px, so no pixel moves) and the core script is unchanged. Added in the art PR (skill-parity-10, batch 7 step 8, DECISIONS 104 and 108): two modules a page carries only when it uses them, each with its own cap and usage cap set a little above its size: stage (React's Stage and PairedArt: full-bleed art under the site header, the pull-up by the sticky offset, the headroom, the paired art that follows the page's theme, and the forced-colours and print rules; CSS only, 1179 bytes) and framed-art (React's FramedArt: the figure, its rim and radius, the reserved box, the placeholder and the failed alt, the caption and credit; 2208 bytes of CSS and the 733-byte script that sets the frame's phase); both need the art tokens. The bar stays smoked over a stage: React clears it only over a stage that passed the headroom test helper, and a page has no test run (DECISIONS 108's note), so the skill builds no clear state. skillMd rose 10259 to 10500 for two index lines, within its cap; the core is unchanged in bytes. The callout gained the status rim in the same PR (DECISIONS 82, D8's status callouts): success, warning and danger draw their border in the status colour at 45% mixed in sRGB over the callout's own level, one solid colour on every side, and CanvasText in forced colours with the icon; the status colour is now one property the icon and the rim read. Its budget rose 900 to 1150 (the module is 1089 bytes, from 792: +297, about 37%); its usage is unchanged. Added in the overlays-and-the-rest PR (skill-parity-11, batch 7 step 9, DECISIONS 90 and 108): the last two parts of D8's part 5, each a module a page carries only when it uses it, with its own cap and usage cap set a little above its size: combobox (React's Combobox: the input with its caret button inside, the popup of the menu's rows with the glide's shared plate and two-line options, the filtering, the keys, the hidden value, the empty message and the check; 4342 of CSS and 6423 of script, budget 10900, usage 2150; it needs forms, popover and glide, and builds the last two) and sparkline (React's Sparkline: the label and latest value, the line, the axis, the empty sentence and the loading line that breathes; 1609 of CSS and 1874 of script, budget 3600, usage 950). The combobox copies the menu's row rules, as the select's list does, because React's Combobox renders MenuItem rows (a 40px hit area, a 36px plate) and the skill's .row is the palette's 44px: it carries no menu script. popover.js gains the combobox popup in the list of popups that keep focus where it is (+21 bytes, within its cap). skillMd rose 10500 to 10724 for two index lines, within its cap; the core is unchanged in bytes. Added in the motion-rules PR (DECISIONS 136 and 139): one module, ambient (a page's one ambient loop: CSS 828 bytes, script 433, budget 1300, usage 800), taken out of loops so the hold's own module grows only by the icon toggle's glyph swap (loops 2000 to 2200, +10%; its usage 1300 to 1650 for the icon form and the new settings-row sentence, +27%); and the chart's entrance (`entrance: true`: the marks' animations, their conditions and the redraw that restarts them at the elapsed time, 23262 to 25299 bytes of script; budget 30700 to 32800, +7%, usage 2500 to 2950, +18%). The core grew by the three tokens (27704 to 27862 bytes of CSS, under its cap). its stage usage gained the ambient art's line (1650 to 1750, +6%). skillMd rose 10724 to the size of the ambient index line, within its cap. Raised again in the motion-rules amendment (DECISIONS 143): chart 32800 to 33800 (script 25299 to 26375 bytes, +4%; +10% over the 30700 it began with) for the glide a new data set makes mid-entrance, print settling it, and `Basalt.pageChange()`; its usage 2950 to 3150 (+26% over the 2500 it began with). Raised in the second motion-rules amendment (DECISIONS 148): chart 33800 to 34400 (script 26375 to 26970 bytes: a line and its markers glide from their drawn geometry, and `beforeprint` settles the entrance; +12% over the 30700 it began with); topbar-nav 6900 to 7500 (+8.7%: the narrow menu's pause row, its CSS and 275 bytes of script, DECISIONS 148 item 2); loops usage 1650 to 1800 (+38% over the 1300 it began with, for the icon form's `title` and the menu row). Raised in the audit-design-b PR (DECISIONS 138 and 139): still-table 8200 to 13400 (+63%: the module was 7927 bytes and is 13311; the cut cell's plate, its focus stops and its dismissal, ported from React's cell-peek.ts, are 4273 bytes of script and 1111 of CSS; a still table that truncates needs them). The same PR: core usage 2100 to 2250 (+7%: the skip link, one bullet), forms usage 350 to 480 (+37%: the required mark), still-table usage 1950 to 2150 (+10%: the cut cell and the width rule), notifications usage 1050 to 1100 (+5%: the 44px entry on touch). The skip link's rim and radius took the core 30457 to 30609 bytes, under its cap (the rules that hang it under the bar are the topbar module's: 3200 to 3600, +12.5%); core 30720 to 31050 (+1.1%, DECISIONS 147: also the bar's links left out of the rule: the pseudo-element that makes a short standalone link a 44 by 44 target), skip-link script in the topbar module (3200 to 4150 over this PR, +30%: the rules that hang the link under the bar, 3600, and the script that reads the bar's real edge, 4150), sparkline 3600 to 4050 (+12.5%: React's ticker structure, so the value copies once on its line, and in forced colours the strips go and the number is plain text), forms budget 3250 to 3500 (+7.7%: the necessity word), notifications 9050 to 9250 (+2.2%: the 44px entry). Raised in the audit-design-b PR's E2 port (DECISIONS 138 and 139: the core set draws check, close, the chevrons, copy, plus, minus and search wherever a component draws them): the modules that drew a Phosphor icon for one of those now carry the core glyph's whole SVG, written in at build time (`%glyph-svg:name%`, the markup the glyph module's `_.glyph(name)` returns, so no module needs the glyph module and a page pays for nothing it does not use), and the Phosphor path of the same icon leaves the page. Each module's own bytes rose by that markup, and a page's total moved by what the Phosphor path it no longer carries saves: menu 8600 to 8900 (+303), combobox 10900 to 11200 (+303), copy 1900 to 2400 (+640), terminal 8100 to 8850 (+761), toast 13850 to 14150 (+325), number 2900 to 3400 (+557), filter 16400 to 17050 (+785), palette 9900 to 10450 (+536); the command list shares the palette's search drawing and fell 20 bytes. Set in integration-nov15, where the type-layout, motion-rules and audit-design-b branches meet: the combined tree measured SKILL.md 10959 bytes (each side's cap was 10900: both added index lines), core 31192 bytes (caps 30720 and 31050: the page-row and display rules, the three motion tokens and the skip link and 44px target rules all land in the core CSS) and core usage 2348 bytes (caps 2300 and 2250: type-layout's line and the skip-link bullet), so each is set to the measured bytes rounded up to the next 50: skillMd 10900 to 11000, core 31050 to 31200, core usage 2300 to 2350. Raised in the audit-design PR (decisions 138 and 139, parts A, D and C11): core 30720 to 31600 (+2.9%: the more-contrast block and its three aliases, and the field boundary token, every page carries as React does; the shadow-pill token is gone; the script gained `reserve`, 240 bytes), segment 3700 to 4100 and tabs 2300 to 2700 (the chosen label is 600 against 400, its width reserved by a span that carries its own copy, drawn unseen at 600; the pill's drop shadow is gone), and the segment's usage 300 to 380 (the weight and the glyph-only button). Raised again in the audit-design-a amendment (decision 145): core 31600 to 32300 (reserve() also reserves a label that is not plain text), segment 4100 to 5100 and tabs 2700 to 3500 (the second copy of such a label, and an icon drawn in both its forms), glyph 1100 to 1300 (a glyph in a segment or tab is drawn in both forms). Raised in the second audit-design-a amendment (decision 149): core 32300 to 32800 (reserve() builds the second copy of a label without any id, name, reference or hidden control, and does not copy a frame or media), segment 5100 to 5400 and its usage 380 to 500 (the 600 is on the label, the one-line rule and the usage text); the still-table cap is back at 8200, as the wash is on every cell again. Return 3 of the audit-design-a build (decision 149): tabs 3500 to 3700 (a tab the script has not reserved is 600 itself when selected, and one it declined is marked; the same two lines are in segment, which stays under 5400). Raised in the audit-fix-c2 PR (engineering, no pixel changes): toast 13850 to 14350 (the module was 13789 bytes and is 14288, +499, 3.6%) for F6, which focuses the Notifications region and Shift+Tab or Escape from it (or from the first toast) leaves it for where focus came from (and keeps a dialog's focus trap from wrapping it), as Base UI's viewport does in React, and for placing the region from focus (in the modal that holds it, or in the body), so a toast is never under a backdrop or in an inert modal whatever order the modals opened in (A3-09); the palette module grew 9864 to 9897 of its 9900 so that a palette opened over a modal sits inside it; topbar 3200 to 3250 (3123 to 3233, +110) for the scroll margin on what the bar holds, so a Tab into the bar from a scrolled page does not scroll the page (React's rule from PR #66); stage usage 1650 to 1750 (1580 to 1713, +8%) for the art's new place in the markup, after the content (A1-09), the stage's own CSS rising 1179 to 1208 within its 1250. skillMd rose 10724 to 10876 for the sentence that says a body may carry head tags, within its 10900. compose.mjs, the tool an agent runs, has no cap here (it is never in a page): it grew 21673 to 38153 bytes for the tokenizer that reads a body as HTML does and the head tags. Raised in the site-parts PR (DECISIONS 146, round 39), which folds each new part into the module it belongs with, so SKILL.md gains no index line (it has 41 bytes under its cap and a new module needs about 100): topbar 4150 to 17600 (+13450: the site footer and its disclosures, the lockup by pixel density, and a bar that arrives or leaves and returns, with its observer; a page that has a .topbar and no footer carries them too: the alternative, a module for each, needs its own index line and so SKILL.md bytes) and its usage 950 to 2900 (the footer's markup, the lockup's and the phase's); theme 650 to 4550 (the three-word theme choice: its CSS 2230 bytes and its script, 2277, with arrows, storage and the system listener) and its usage 400 to 1150 (the choice's markup written in full, so the right word is chosen before any script); segment 3700 to 3800 (a radio group's checked state besides a pressed button); stage 1250 to 2150 (its first script, 768 bytes, for fit and anchor) and its usage 1750 to 2000; framed-art 3000 to 3900 (drawn art in the frame: fit, anchor, no scaling strokes) and its usage 1250 to 1400. SKILL.md rose 10959 to 10992 (the topbar and theme index lines name .site-footer and .theme-choice). The head's theme line also writes data-theme-choice. Raised in site-parts return 2 (DECISIONS 146 B1 and B4): theme 4550 to 5350 (+800: the icon form of the theme choice, [data-theme-menu], whose button shows the theme in use, is named for the choice and opens the page's own .menu of three radio rows, in the theme script's 3073 bytes; the menu and popover modules are the page's, brought by its markup, so no module line was added and SKILL.md is 10993 of 11000) and its usage 1150 to 2200 (+91%: the menu's markup is written in full, and the deprecated toggle is said once); app-shell usage 2000 to 2100 and topbar-nav usage 1900 to 1950 (the theme control leaves the bar's text; the tools and the end cluster come in). The two example bodies still carry the deprecated data-theme-toggle. Return 2, F3 (DECISIONS 146 F): stage 2150 to 2250 (script 842 bytes: slice is the stage's default, as a frame's, and a drawing's own preserveAspectRatio stands unless the stage names data-fit or data-anchor) and its usage 2000 to 2150. framed-art 3900 to 4000 (a drawing's own preserveAspectRatio stands unless the figure names data-fit or data-anchor, +101 bytes). Return 3: theme 5350 to 5900 (script +569 bytes: who wrote data-theme, so System follows the system's change live and a theme the page set by hand, or a .dark or .light root, survives it). Raised in the controls port (DECISIONS 154): skillMd 11000 to 11200 for two index lines (link-tabs and option-chips, 214 bytes together), and core 31200 to 31600 for the nine tokens the port adds to every page's token CSS (the control rungs 44 to 64, two container widths, the confirm hold and the amount's opacity, 311 bytes). New modules (DECISIONS 154): link-tabs 2700 (its sizes, the 640 container step, the forced-colours underline, and the select that replaces the row under 720 with its 590-byte script, A15; it requires the select module), option-chips 5700 (the chip's states each written for a native radio inside a label, which needs :has on every one, plus the 1 KB script that keeps an aria-disabled chip reachable and never chosen). Return 3 (DECISIONS 154 conformance): link-tabs 2700 to 3100 and its usage 1650 to 1850 (the select's height for each row size, and a script that reads aria-current when it is needed and watches it move: 3,048 bytes), option-chips 5700 to 6700 (each state written twice, as a state attribute and as :has(), so no browser needs :has(): 4,975 CSS and 1,623 script). Return 4 (DECISIONS 158, Q2): link-tabs 3100 to 4300 and its usage 1850 to 2400 (the \"Go to\" label drawn at the select's start with its measured clearance, the select's accessible name kept as the words and the chosen page's, and the key hold that keeps a letter or an arrow on the closed select from navigating: 4,174 bytes, CSS 2,951 and script 1,223). Raised in the links-and-rows port (DECISIONS 152; the owner's approval is the lead's to confirm): the new link-rows module (5050 bytes of CSS, 50 of them for Castle's big-row arrow stepping colour over duration-fast, return 1, 1500 of usage: the directory's and the big rows' CSS, whose arrow is a core glyph drawn as a mask, and their tokens, size-row taken out of the core like type-layout's), disclosure 1550 to 3500 (Show all: the track, the clip and the settle, 1.5 KB of script and 1.8 KB of CSS), copy 2400 to 3500 (the form with words: the one cell and its script). SKILL.md rose 10959 to 10997 for one line, within its 11000 cap. Raised in the charts port PR (DECISIONS 153, D7a): chart 34400 to 34650 (script 26970 to 27270 bytes, +1.1% on the 34283 it was: `Basalt.trailingMean`, the trend maths React exports as `trailingMean`, 300 bytes), its usage 3150 to 3350 (+6%: one line for it). The tokens the batch adds (chart-lit-top, -mid and -base in both themes, size-chart-plot-sm, size-chart-row, size-meter-marker and radius-2xs) took the art module 2087 to 2546 bytes (budget 2100 to 2600, +24%: the chart tokens are its group) and the core 31192 to 31250 (cap 31200 to 31300, +0.3%: radius-2xs). Only D7a names a skill module in the charts ballot; the lit marks, the headline frame, the phase chart, the share bar, the coverage strip, the marks row and the range meter are React-only in this batch. Added in the overlays-and-search PR (DECISIONS 155, D10b and D13a): the sheet gains React's head, body and foot (the 44px close, the 20/28 title over a 13px count, the divider and the safe areas; its CSS 3.6 to 5.2 KB, budget 4050 to 5250, +30%) and its usage 1050 to 1450 (+38%: the anatomy and the step's focus, two bullets); and one new module a page carries only when it uses it, search (React's SearchDialog: the form, the field's -2 outline, the count line, the fixed-height results area and the rows with their picture slots and full-bleed hover wash; CSS only, 4368 bytes, budget 4400, usage 2050; it requires the dialog). The dialog's title draws no ring when script focuses it. skillMd rose 10959 to 11079 for the search line (the sheet's line is unchanged: its usage carries the anatomy), so its cap rose 11000 to 11100 (+0.9%). The core's CSS grew 31192 to 31421 bytes for the six new size tokens (the wide dialog, the search trigger and the logo and picture slots of a search result): its cap rose 31200 to 31450 (+0.8%). The two 44px values (the sheet's close and the search field) are local to their modules, with a lint exception that says they join the controls batch's size token (DECISIONS 154). Set in integration-nov15b, where audit-design-a, audit-fix-c2, site-parts, port-controls, port-links-rows, port-charts and port-overlays-search meet: the combined tree measured SKILL.md 11560 bytes (the caps were 11000, 11100 and 11200: each side added index lines), core 34086 bytes (caps 31300 to 33550: every side's rules land in the core CSS and script), topbar 17660 (17600 from site-parts, plus audit-fix-c2's skip-link and focus work), number 3453 (3400), palette 11379 (11000, audit-fix-c2's hosted scrim plus the core search glyph), dialog 5120 (5100), toast 15692 (15400) and stage usage 2248 (2150), each over every side's cap, so each is set to the measured bytes rounded up to the next 50: skillMd 11200 to 11600, core 33550 to 34100, topbar 17600 to 17700, number 3400 to 3500, palette 11000 to 11400, dialog 5100 to 5150, toast 15400 to 15700, stage usage 2150 to 2250. The segment cap is the base's 5400 plus port-controls' 100 (5500), unchanged by the merge. Raised in integration-nov15b, join 2 (a link tab takes the selected state, DECISIONS 138 A, 145, 149 and 154's D12 row): link-tabs 4300 to 5750 (+34%: the module was 4174 bytes and is 5736; the 600 against 400, the reserved width and the second copy of a composed label, an icon drawn in both its forms, the same rules a tab carries, 1,530 bytes of CSS and script) and its usage 2400 to 2550 (+6%: one bullet). The cap is the measured bytes rounded up to the next 50; a module that needs the tab's rules carries them as the segment and tabs modules do, so a page without link tabs pays nothing. Raised in the panels, art and parts port (DECISIONS 162): table 3000 to 3150 and its usage 950 to 1450 (the flat form and the two-line cell), stage 2250 to 2600 and its usage 2250 to 3100 (the closing block: its held art, forced colours and print; its section gap is type-layout's --basalt-section-gap, which a page with data-closing brings), the new app-tile 4300 (a 120-point polygon clip and the hairline's mask of the same outline), captioned 2000 and period 1400; skillMd 11600 to 11950 for one index line each for captioned, app-tile and period (358 bytes; the file is 11918). Raised in the logs, status and forms port (DECISIONS 162): core 34100 to 34200 (the new size-field-label-inline token, 80px, is written into every page's tokens: 25 bytes); dlist 1300 to 1900 and its usage 950 to 1060 (the stacked form, R9 and R10: a title over its text, 20px between entries, no divider; one usage line). Raised in audit-fix-c6 (the owner's cap, raised by the builder and for the owner to confirm): glyph 1300 to 1900, for redrawing a glyph when its ancestor's aria-current or data-current moves (the lists that hold glyphs are watched). Raised in the colour-ink-ladder build (DECISIONS 166): core 34200 to 34350 (the four lifted dark inks are four new primitives, each written into every page's tokens: the core measured 34307). Raised in the audit-2-design build (DECISIONS 167, Q7a): disclosure 3500 to 3800 (the core chevron drawn as a mask in place of two borders: the module measured 3755). Joined in the integration of c7 (#86) and c10 (#91): option-chips 6750 to 6850 (c7's reset resync and c10's data-ready together measure 6839). Raised in table-sort-3 (DECISIONS 257 and 261, the owner's pick: three sort states, the arrow after the label, explainers on column titles): still-table 13400 to 14650 (+9.3%: the module was 13343 bytes and is 14602; the end-aligned label's move by a transform, its right-to-left sign and the indicator that waits for it on a fine pointer, 912 bytes of CSS; the third state, the sort from the table's own order and a .explainer kept out of the button, 347 bytes of script) and its usage 2150 to 2250 (2197: the third state and the own order); the new explainer module 5850 (5842: a manual native popover opened from the sort button on hover, keyboard focus and a long press, placed above the header or beside it, 1752 bytes of CSS and 4090 of script; a page without explainers pays nothing) and its usage 900; skillMd 12250 to 12400 for the explainer's index line (113 bytes; the file is 12352). Each cap is the measured bytes rounded up to the next 50. Raised in table-sort-3's fix pass (Astra's review): explainer 5850 to 6900 (+18%: 5842 to 6864 bytes; the gap between the header and the card kept while a pointer crosses it, the close when its header leaves the view whatever has focus, the dismissal held until pointer and focus have both left, and its page-wide listeners and timers scoped to an open card and stopped when the table leaves the page, 1,022 bytes of script). Raised in cimip-gaps-2 batch B5 (the touch sizes under 720 whatever the pointer: each coarse-pointer target rule also answers a window under 720, about 20 bytes a rule; forms merged its three into one and stays under 3500): select 9000 to 9100 (measured 9064), selection 1480 to 1500 (1486), filter 17450 to 17500 (17473), option-chips 6850 to 6900 (6853), menu 8900 to 8950 (8902). B5 fix pass 1 (Astra): core 34550 to 34950 (measured 34911: 30762 CSS and 4149 JS) for stacked links in a column, each giving up the side of its 44px box that meets a neighbour, so a tap on a link's words is always that link's; core had 12 bytes free. DECISIONS 274 (the owner's pick: under 720 the toast stack hangs from the bar): toast 15700 to 16050 (measured 16035; 8 bytes were free; the stack's direction became one sign variable, trimming 585 of the 920 bytes the phone form first took). B5 merged with main (5ad5345a): main's own core measured 34930 against its 34550 cap before B5; with B5 (the touch sizes under 720 and stacked links in a column) it is 35331, so core is 35350; nav 5350 to 5400 (measured 5364: B4's nav plus the touch size under 720). The full run after the stream (DECISIONS 246): the site footer's links keep their own flex column under 720, as React's, out of the bare-link touch rule (26 bytes), so core is 35400 (measured 35357); sheet 5250 to 5400 (measured 5368: React's B5 ring room, ported: the held actions reach space-1-5 above their band, clipped, and the body keeps space-1-5 at each end). Raised for diagram motion and service marks (DECISIONS 292): skillMd 12550 to 12650 for the diagram-motion module's one line; diagram 87200 to 91000 for what a still diagram now carries (a card's mark and its seat, the pending frame, the comparison that writes a drawing only when it changed, and the print rule), and its usage 2600 to 4300 for the decision's four lines and the list of mark ids; the new diagram-motion module (the motion engine, its stylesheet and the motion tokens, in a page only when a diagram is animated) at 26200. Raised when the diagram tests were first run (DECISIONS 298): diagram 91000 to 91250 and diagram-motion 26200 to 26850. Raised in batch A of the diagrams backlog (DECISIONS 301): diagram 91250 to 92400, for the engine fixes it bundles (a decision kept no taller than it is wide, labels on whole pixels, slots beside a straight line, a one-column schema's turn-back); the skill keeps the development checks a production React build now drops. Raised again in that batch's review fixes: diagram 92400 to 92650, for the drawn layout refusing two lines laid on one another (Neon's blocking finding 1 on #126). Fix round 1 of #124 had already taken them to 91205 and 26621 with the tests unrun; this round added 1 byte (every focal node prints its fill; a one-form mark's dark form falls back to its light one) and 180 (the entrance keeps its own clock when it is drawn again while paused). DECISIONS 320 (versions and release notes): the release module is new (budget 15900 at first, usage 2400); topbar, app-shell and tab-bar gain the version link's classes (budgets: topbar 17700 to 19900, app-shell 4300 to 5200 with the rail's tooltip for it, tab-bar 4850 to 5200), their usage caps rising 2900 to 3100, 2600 to 2850 and 2250 to 2400 for its one line each; skillMd rose 12650 to 12800 for the release module's line and .version-link in topbar's. The code review of round 68 adds data-focus-self to the popover module (its Tab walk; budget 4950 to 5600, usage cap 950 to 1100) and logical start and end for its alignment; the release module's header grid and the Sources panel's touch rows take it to 16900. The spacing sweep of round 68 (DECISIONS 326: Copy link's words on the edge, the callout's last change, its reference column, the last release, the touch rows' end and the whole code chip) takes the release module to 17400. The ruling on where a release ends (DECISIONS 331: no padding under the last change in a release, a release-ending fold's hang, an arrived change keeping its padding, the panel holding its first margin, Build details 44 on touch and a closed Fixed panel taking no room) takes it to 19000. The code recheck of round 68 (recheck 5) has the popover's Tab walk follow Safari's own rule (Tab skips links on Apple's WebKit, Option-Tab reaches them): popover 5600 to 5900. The pixel recheck of round 68 has the Sources panel's touch rows keep their 20px lines with the link's box as hit area, space-3 rows and space-6 between two linked values (recheck-pixels 4), and the release's whole header take the arrival's plate: release 19000 to 19600. Merging #127 (stages, DECISIONS 316 and 328) into the versioning branch: both had raised skillMd from 12650 to 12800 for their own module's line, and together they came to 12886; SKILL.md was tightened in its wording (no rule dropped) to stay within 12800. Raised in diagram batch B's fix round (DECISIONS 318, the owner's diagram raise; and 326's sweep), each to its measured size: diagram 137700 to 144100 (the two reviews' fixes in the shared engine: right to left frames and self-calls, the corridors' and lanes' development words, the unusable-placement check, the transcript's hanging lines, the text art's frame widening, the frame-side fit check, the sequence's layers, the stacked group's turn room), diagram-motion 28450 to 30450 (the text sequence's build by ink and its colour-only run, moved into the motion module), diagram-zoom 17000 to 17600 (a linked card closes the viewer; the text art's own width; a placed model for the key hint), diagram-export 7850 to 10450 (an export at rest: sized drawing SVGs, no reveal masks, the pseudo-element rules, the lines under the cards, a viewer's figure read at 100% with its head and key, the rim's lit top). Raised at the batch B re-check (the decider's four rulings): diagram 144100 to 145100 (5.1's first list reported as errors apart from the warnings, a turn's label lines on the group entered by it and the seats beside its turn, the bare stack applied, the text art's reset of the core's inline code chip). Merging main (#127 and #128) into diagram batch B: skillMd keeps main's 12800 (batch B had raised it to 12950 for its diagram lines); SKILL.md was tightened in its wording to stay within it, no rule dropped; core takes main's 35550.Raised in the repo review (23 Nov 2026; budgets are soft, the owner's word): notifications 12450 to 12700 (a link is written only when relative, http, https or mailto, and side and align are checked before they reach the markup), combobox 11200 to 11350 (a disabled field's hidden input is disabled too, now and later), tooltip 3200 to 3550 (the gap to the opener is the tooltip's own, and hover and keyboard focus each hold it open; WCAG 1.4.13), chart 34750 to 34800 (the scale's step search and gridlines are bounded, so extreme values cannot hang the page), spinner 650 to 720 (its held rule moved in from loops, so a ring-only page keeps a stored hold), kbd 2900 to 2950, palette 11400 to 11500 (and its usage text 1350 to 1400, for the Mod line) and toast 16050 to 16200 (Mod in a palette item's keys is bound as it is drawn, and a toast action's aria-keyshortcuts resolves Mod). The safe-sinks rule (decided by the owner, Fable, Astra and Muse, 23 Nov 2026): skillMd 12650 to 12900, and 13050 with main's own raise merged in (one line: data goes in as textContent, a link passes Basalt.safeHref, an option comes from a fixed list), core 35400 to 35650, and 35800 with main's own raise merged in, and its usage 2950 to 3200 (one safeHref, published as Basalt.safeHref, and _.pick, in place of a copy in each module; esc escapes the apostrophe), link-tabs 5750 to 5900 (a refused link dispatches no event), diagram 92650 to 93000 (a card's mark is a relative path, https or a data: image). Merging #129 into diagram batch B: diagram keeps batch B's 145100 plus #129's mark check, set to its measure, and batch B's usage 4600. The fix round after both reviews of 421348e8 sets them to the measured sizes again: core 38950 to 39600 (every room says all three forms, and a hung word's box grows by a short room's shortfall), search to 5700 (it places its top again on a resize and with the keyboard; an empty list holds no padding), command-list to 14700 (it keeps the taller of its two heights), notifications to 12950 (the bell's edge), pane to 1950 (the page column's room), chart to 34950 (the date line's reason), and code, diagram-zoom, filter, links, sheet, still-table, tab-bar and topbar each by under 150 bytes (the three forms of a room; the selection column's width however given). Merged with main at db0bc418 (#129 to #131), DECISIONS 336's caps are set to the measured sizes again: core 35800 to 38950 and its usage 3200 to 3650, toast 16200 to 16750, terminal to 12700 (13050 with the open items' ruling: both copy buttons draw their three glyphs once, so a refused copy shows the close with no markup written after), diagram-zoom 17600 to 17750 (its viewer's Close and Zoom out hung, and the foot's room). Raised in DECISIONS 336 (reserved room across every component, claude/reserved-room), each to its measured size: core 35550 to 38700 (the edge rule a ghost .btn hangs by at a head, its ring and touch hit area, the side insets by direction, the .panel-head and page section-head that hang their last button by themselves) and its usage 2950 to 3450 (how data-edge and --basalt-edge-room are written); search 4400 to 5200 (search.js, the held top), terminal 11950 to 12550 (the close glyph for a refused copy, the edge on both copies), links 2750 to 3300 (the first icon link hung, the card room, the 20px glyph), toast 16050 to 16650 (the 46px hit areas on touch), selection 1500 to 1650 and still-table 14650 to 15000 (the 44px select column), command-list 14000 to 14350 (the panel hugs, the room is page), menu 8950 to 9150 (the column every row keeps when any row has a check or a glyph), notifications 12450 to 12600, filter 17500 to 17600, forms 3500 to 3550, sheet 5400 to 5450, topbar-nav 7550 to 7600 and app-shell 5200 to 5250 (logical sides, the edge and the room); topbar's usage 3100 to 3200 (a bar's last ghost control takes data-edge); command-list's usage 2150 to 2300 (the panel hugs; the room is page, and only on the page); dialog-form's usage 1300 to 1350 (its Close is written data-icon-only data-edge=\"end\"). Raised in the polish ruling of 336 (the selection box keeps to the cell's line): selection 1650 to 1750 (the box's start margin, min(space-4, half the spare room): 1710 measured) and its usage 1150 to 1350 (the rule's sentence: 1313 measured).", "budgets": { "skillMd": 13050, - "core": 35800 + "core": 39600 }, "core": { "classes": [ @@ -44,7 +44,7 @@ "btn", "icon" ], - "usage": 3200 + "usage": 3650 }, "modules": { "glyph": { @@ -83,8 +83,8 @@ "version-link-date", "site-footer-legal-row" ], - "budget": 19900, - "usage": 3100, + "budget": 19950, + "usage": 3200, "attrs": [ "data-phase-after" ] @@ -138,7 +138,7 @@ "select", "textarea" ], - "budget": 3500, + "budget": 3550, "usage": 480 }, "number": { @@ -251,7 +251,7 @@ "text": [ "\\btarget\\s*=\\s*[\"']?_blank\\b" ], - "budget": 2750, + "budget": 3350, "usage": 1850, "textWords": [ "a link with target=\"_blank\"" @@ -352,8 +352,8 @@ "table", "choice" ], - "budget": 1500, - "usage": 1150 + "budget": 1750, + "usage": 1350 }, "still-table": { "classes": [ @@ -375,7 +375,7 @@ "arrow-up", "arrow-down" ], - "budget": 14650, + "budget": 15150, "usage": 2250, "builds": [ "glyph" @@ -407,7 +407,7 @@ "plus", "check" ], - "budget": 17500, + "budget": 17700, "usage": 1650, "builds": [ "popover", @@ -441,7 +441,7 @@ "tok-f", "tok-c" ], - "budget": 1000, + "budget": 1050, "usage": 450 }, "callout": { @@ -637,7 +637,7 @@ "XCircle", "Prohibit" ], - "budget": 11950, + "budget": 13050, "usage": 1800, "builds": [ "braille" @@ -732,7 +732,7 @@ "table", "kbd" ], - "budget": 34800, + "budget": 34950, "usage": 3350, "builds": [ "table", @@ -882,7 +882,7 @@ "dialog-form", "sheet" ], - "budget": 17600, + "budget": 17800, "usage": 900, "builds": [ "dialog", @@ -1003,8 +1003,8 @@ "kbd", "glide" ], - "budget": 14000, - "usage": 2150, + "budget": 14700, + "usage": 2300, "textWords": [ "a call to Basalt.commandList" ], @@ -1118,7 +1118,7 @@ "popover", "glide" ], - "budget": 8950, + "budget": 9150, "usage": 2000, "builds": [ "glide" @@ -1192,7 +1192,7 @@ "requires": [ "dialog" ], - "budget": 5400, + "budget": 5550, "usage": 1450 }, "dialog-form": { @@ -1204,7 +1204,7 @@ "sheet" ], "budget": 2200, - "usage": 1300 + "usage": 1350 }, "search": { "classes": [ @@ -1225,7 +1225,7 @@ "requires": [ "dialog" ], - "budget": 4400, + "budget": 5700, "usage": 2050 }, "tooltip": { @@ -1265,7 +1265,7 @@ "Warning", "XCircle" ], - "budget": 16200, + "budget": 16750, "budgetReason": "audit-fix-c2 Sol build: 14288 to 14780 bytes (+492); observe focus before the first toast, retain the last live modal on blur, release the viewport before modal closure, preserve real keyboard composition state and keep a toast action's Escape from cancelling its native host. Cap 14350 to 14780. Return 1: 14780 to 14866 bytes (+86) for ordinary reverse Tab, clearing stale F6 returns and observing mutations only while hosted; cap 14780 to 15100, leaving 234 bytes. Return 3 and DECISIONS 156: 15031 to 15367 bytes (+336) for distinct pointer/keyboard focus restoration and the front-toast control ring while the region holds focus. Cap 15100 to 15400 (+300), leaving 33 bytes.", "usage": 1100, "builds": [ @@ -1313,7 +1313,7 @@ "XCircle", "Circle" ], - "budget": 12700, + "budget": 12950, "usage": 1100, "builds": [ "popover", @@ -1359,7 +1359,7 @@ "close", "pause" ], - "budget": 7550, + "budget": 7600, "usage": 1950, "builds": [ "glide", @@ -1393,7 +1393,7 @@ "tooltip" ], "viewportFit": true, - "budget": 5200, + "budget": 5250, "usage": 2850 }, "pane": { @@ -1403,7 +1403,7 @@ "pane-page", "pane" ], - "budget": 1700, + "budget": 1950, "usage": 1000 }, "release": { @@ -1476,7 +1476,7 @@ "tab-bar-version" ], "viewportFit": true, - "budget": 5200, + "budget": 5250, "usage": 2400 } } diff --git a/.agent/skills/basalt-html/parts/menu.css b/.agent/skills/basalt-html/parts/menu.css index 3860df2d..3251d7d4 100644 --- a/.agent/skills/basalt-html/parts/menu.css +++ b/.agent/skills/basalt-html/parts/menu.css @@ -1 +1 @@ -@layer basalt{.menu{min-width:var(--basalt-size-menu-min);max-height:var(--available-height, 100vh);overflow-y:auto;padding:var(--basalt-space-0-5) var(--basalt-space-1)}.menu-item{--_h: var(--basalt-size-menu-row);--_inset: var(--basalt-space-0-5);--_gap: var(--basalt-space-2-5);box-sizing:border-box;position:relative;isolation:isolate;display:flex;align-items:center;gap:var(--_gap);width:100%;height:calc(var(--_h) + 2 * var(--_inset));margin:0;padding:0 var(--basalt-space-3);border:0;border-radius:0;background:transparent;color:var(--basalt-text-secondary);font:var(--basalt-font-weight-regular) var(--bh-base);text-align:start;text-decoration:none;cursor:default;user-select:none;outline:none;transition:color var(--basalt-duration-fast) var(--basalt-ease-out)}.menu-item:before{content:"";position:absolute;inset:var(--_inset) 0;z-index:-1;border-radius:var(--basalt-radius-md);background-color:transparent;transition:background-color var(--basalt-duration-fast) var(--basalt-ease-out)}.menu-item svg{flex:none}.menu-item-label{flex:1;min-width:0}.menu-item .kbd-group{margin-inline-start:var(--basalt-space-4)}.menu-item[data-highlighted]{color:var(--basalt-text-primary);transition-duration:var(--basalt-duration-instant)}.menu-item[data-highlighted]:before{background-color:var(--panel-plate);transition-duration:var(--basalt-duration-instant)}.menu-item[data-danger],.menu-item[data-danger][data-highlighted]{color:var(--basalt-status-danger)}.menu-item:is([disabled],[aria-disabled=true]){color:var(--basalt-text-disabled)}.menu-check{display:inline-flex;align-items:center;justify-content:center;width:var(--basalt-size-icon-sm);flex:none;color:var(--basalt-text-primary)}.menu-check>*{visibility:hidden}[aria-checked=true]>.menu-check>*{visibility:visible}.menu-radio-dot{display:block;width:var(--basalt-space-1-5);height:var(--basalt-space-1-5);border-radius:var(--basalt-radius-full);background:currentColor}.menu-item:has(>.menu-item-description){--_line: var(--basalt-text-base-line-height);--_desc: var(--basalt-text-sm-line-height);display:grid;grid-template-columns:auto minmax(0,1fr) auto auto;grid-template-rows:var(--_line) auto;align-items:center;align-content:center;gap:0;height:auto;min-height:calc(var(--_h) + var(--_desc) + 2 * var(--_inset));padding-block:calc(var(--_inset) + (var(--_h) - var(--_line)) / 2)}.menu-item:has(>.menu-item-description)>:is(svg,.menu-check){grid-column:1;grid-row:1;margin-inline-end:var(--_gap)}.menu-item:has(>.menu-item-description)>.menu-item-label{grid-column:2;grid-row:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.menu-item:has(>.menu-item-description)>.menu-item-description{grid-column:2 / -1;grid-row:2}.menu-item:has(>.menu-item-description)>.kbd-group{grid-column:3;grid-row:1}.menu-item-description{min-width:0;white-space:normal;overflow-wrap:break-word;text-wrap:pretty;font-size:var(--basalt-text-sm-size);line-height:var(--basalt-text-sm-line-height);color:var(--basalt-text-tertiary);transition:color var(--basalt-duration-fast) var(--basalt-ease-out)}.menu-item[data-highlighted] .menu-item-description{color:var(--basalt-text-secondary);transition-duration:var(--basalt-duration-instant)}.menu-item:is([disabled],[aria-disabled=true]) .menu-item-description{color:var(--basalt-text-disabled)}.menu:has(.menu-item-description){width:max-content;max-width:min(var(--basalt-size-popover-max),calc(100vw - 2 * var(--basalt-space-4)))}@media(pointer:coarse),(width<720px){.menu-item{height:max(calc(var(--_h) + 2 * var(--_inset)),var(--basalt-size-menu-row-touch))}.menu-item:has(>.menu-item-description){height:auto;min-height:max(calc(var(--_h) + var(--_desc) + 2 * var(--_inset)),var(--basalt-size-menu-row-touch))}}.menu-separator{height:var(--basalt-size-hairline);margin:var(--basalt-space-0-5) calc(-1 * var(--basalt-space-1));background:var(--basalt-border-divider)}.menu-group-label{padding:var(--basalt-space-2) var(--basalt-space-3) var(--basalt-space-0-5);font:var(--basalt-font-weight-medium) var(--bh-xs);color:var(--basalt-text-tertiary)}@media(prefers-reduced-motion:no-preference)and (forced-colors:none)and (hover:hover)and (pointer:fine){.menu[data-glide] .menu-item[data-highlighted]:before{background-color:transparent}}@media(forced-colors:active){.menu-item:is([disabled],[aria-disabled=true]){color:GrayText}.menu-item[data-highlighted]{forced-color-adjust:none;color:HighlightText}.menu-item[data-highlighted]:before{background-color:Highlight}.menu-item[data-highlighted] :is(svg,.menu-item-label,.menu-item-description,.menu-check){color:HighlightText}.menu-item[data-highlighted] .kbd{background:Highlight;border-color:HighlightText;color:HighlightText}.menu-item[data-danger][data-highlighted]{color:HighlightText}.menu-radio-dot{box-sizing:border-box;border:calc(var(--basalt-size-dot) / 2) solid;background:none}}} +@layer basalt{.menu{min-width:var(--basalt-size-menu-min);max-height:var(--available-height, 100vh);overflow-y:auto;padding:var(--basalt-space-0-5) var(--basalt-space-1)}.menu-item{--_h: var(--basalt-size-menu-row);--_inset: var(--basalt-space-0-5);--_gap: var(--basalt-space-2-5);box-sizing:border-box;position:relative;isolation:isolate;display:flex;align-items:center;gap:var(--_gap);width:100%;height:calc(var(--_h) + 2 * var(--_inset));margin:0;padding:0 var(--basalt-space-3);border:0;border-radius:0;background:transparent;color:var(--basalt-text-secondary);font:var(--basalt-font-weight-regular) var(--bh-base);text-align:start;text-decoration:none;cursor:default;user-select:none;outline:none;transition:color var(--basalt-duration-fast) var(--basalt-ease-out)}.menu-item:before{content:"";position:absolute;inset:var(--_inset) 0;z-index:-1;border-radius:var(--basalt-radius-md);background-color:transparent;transition:background-color var(--basalt-duration-fast) var(--basalt-ease-out)}.menu-item svg{flex:none}.menu-item-label{flex:1;min-width:0}.menu-item .kbd-group{margin-inline-start:var(--basalt-space-4)}.menu-item[data-highlighted]{color:var(--basalt-text-primary);transition-duration:var(--basalt-duration-instant)}.menu-item[data-highlighted]:before{background-color:var(--panel-plate);transition-duration:var(--basalt-duration-instant)}.menu-item[data-danger],.menu-item[data-danger][data-highlighted]{color:var(--basalt-status-danger)}.menu-item:is([disabled],[aria-disabled=true]){color:var(--basalt-text-disabled)}.menu-check{display:inline-flex;align-items:center;justify-content:center;width:var(--basalt-size-icon-sm);flex:none;color:var(--basalt-text-primary)}.menu:has(.menu-item>:is(svg,.menu-check,[data-glyph],[data-icon]):first-child) .menu-item:not(:has(>:is(svg,.menu-check,[data-glyph],[data-icon]):first-child)){padding-inline-start:calc(var(--basalt-space-3) + var(--basalt-size-icon-sm) + var(--_gap))}.menu-check>*{visibility:hidden}[aria-checked=true]>.menu-check>*{visibility:visible}.menu-radio-dot{display:block;width:var(--basalt-space-1-5);height:var(--basalt-space-1-5);border-radius:var(--basalt-radius-full);background:currentColor}.menu-item:has(>.menu-item-description){--_line: var(--basalt-text-base-line-height);--_desc: var(--basalt-text-sm-line-height);display:grid;grid-template-columns:auto minmax(0,1fr) auto auto;grid-template-rows:var(--_line) auto;align-items:center;align-content:center;gap:0;height:auto;min-height:calc(var(--_h) + var(--_desc) + 2 * var(--_inset));padding-block:calc(var(--_inset) + (var(--_h) - var(--_line)) / 2)}.menu-item:has(>.menu-item-description)>:is(svg,.menu-check){grid-column:1;grid-row:1;margin-inline-end:var(--_gap)}.menu-item:has(>.menu-item-description)>.menu-item-label{grid-column:2;grid-row:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.menu-item:has(>.menu-item-description)>.menu-item-description{grid-column:2 / -1;grid-row:2}.menu-item:has(>.menu-item-description)>.kbd-group{grid-column:3;grid-row:1}.menu-item-description{min-width:0;white-space:normal;overflow-wrap:break-word;text-wrap:pretty;font-size:var(--basalt-text-sm-size);line-height:var(--basalt-text-sm-line-height);color:var(--basalt-text-tertiary);transition:color var(--basalt-duration-fast) var(--basalt-ease-out)}.menu-item[data-highlighted] .menu-item-description{color:var(--basalt-text-secondary);transition-duration:var(--basalt-duration-instant)}.menu-item:is([disabled],[aria-disabled=true]) .menu-item-description{color:var(--basalt-text-disabled)}.menu:has(.menu-item-description){width:max-content;max-width:min(var(--basalt-size-popover-max),calc(100vw - 2 * var(--basalt-space-4)))}@media(pointer:coarse),(width<720px){.menu-item{height:max(calc(var(--_h) + 2 * var(--_inset)),var(--basalt-size-menu-row-touch))}.menu-item:has(>.menu-item-description){height:auto;min-height:max(calc(var(--_h) + var(--_desc) + 2 * var(--_inset)),var(--basalt-size-menu-row-touch))}}.menu-separator{height:var(--basalt-size-hairline);margin:var(--basalt-space-0-5) calc(-1 * var(--basalt-space-1));background:var(--basalt-border-divider)}.menu-group-label{padding:var(--basalt-space-2) var(--basalt-space-3) var(--basalt-space-0-5);font:var(--basalt-font-weight-medium) var(--bh-xs);color:var(--basalt-text-tertiary)}@media(prefers-reduced-motion:no-preference)and (forced-colors:none)and (hover:hover)and (pointer:fine){.menu[data-glide] .menu-item[data-highlighted]:before{background-color:transparent}}@media(forced-colors:active){.menu-item:is([disabled],[aria-disabled=true]){color:GrayText}.menu-item[data-highlighted]{forced-color-adjust:none;color:HighlightText}.menu-item[data-highlighted]:before{background-color:Highlight}.menu-item[data-highlighted] :is(svg,.menu-item-label,.menu-item-description,.menu-check){color:HighlightText}.menu-item[data-highlighted] .kbd{background:Highlight;border-color:HighlightText;color:HighlightText}.menu-item[data-danger][data-highlighted]{color:HighlightText}.menu-radio-dot{box-sizing:border-box;border:calc(var(--basalt-size-dot) / 2) solid;background:none}}} diff --git a/.agent/skills/basalt-html/parts/notifications.css b/.agent/skills/basalt-html/parts/notifications.css index 445b41fa..593eb411 100644 --- a/.agent/skills/basalt-html/parts/notifications.css +++ b/.agent/skills/basalt-html/parts/notifications.css @@ -1 +1 @@ -@layer basalt{.notifications-dot{position:absolute;top:var(--basalt-space-1-5);right:var(--basalt-space-1-5);width:var(--basalt-size-dot);height:var(--basalt-size-dot);border-radius:var(--basalt-radius-full);background:var(--basalt-text-primary);pointer-events:none}.popover.notifications:popover-open{display:flex}.popover.notifications{flex-direction:column;width:min(var(--basalt-size-toast-width),calc(100vw - 2 * var(--basalt-space-4)));max-width:none;max-height:var(--available-height, 100vh);padding:0;overflow:hidden}.notifications-head{display:flex;align-items:center;gap:var(--basalt-space-2);padding:var(--basalt-space-2-5) var(--basalt-space-2-5) var(--basalt-space-2-5) var(--basalt-space-4);border-bottom:var(--basalt-size-hairline) solid var(--basalt-border-divider)}.notifications-title{flex:none;line-height:var(--basalt-text-base-line-height)}.notifications-count{flex:1;min-width:0;font-size:var(--basalt-text-sm-size);line-height:var(--basalt-text-sm-line-height);color:var(--basalt-text-secondary);font-variant-numeric:tabular-nums}.notifications-mark{flex:none}.notifications-foot{display:flex;justify-content:flex-end;padding:var(--basalt-space-2-5);border-top:var(--basalt-size-hairline) solid var(--basalt-border-divider)}.notifications-clear{margin-inline-end:auto}.notifications-empty{margin:0;padding:var(--basalt-space-6) var(--basalt-space-4);text-align:center;color:var(--basalt-text-secondary)}.notifications-scroll{position:relative;flex:1;min-height:0;overflow-y:auto}.notifications-list{margin:0;padding:var(--basalt-space-1-5);list-style:none}.notification{--_inset: var(--basalt-space-0-5);box-sizing:border-box;position:relative;isolation:isolate;display:grid;grid-template-columns:var(--basalt-size-dot) var(--basalt-size-icon-sm) minmax(0,1fr) auto;align-items:start;column-gap:var(--basalt-space-2-5);width:100%;margin:0;padding:calc(var(--basalt-space-2) + var(--_inset)) var(--basalt-space-3);border:0;border-radius:calc(var(--basalt-radius-md) + var(--_inset));background:none;color:var(--basalt-text-secondary);font:var(--basalt-font-weight-regular) var(--bh-base);text-align:start;text-decoration:none;cursor:pointer;user-select:none}@media(pointer:coarse),(width<720px){.notification{min-height:var(--basalt-size-tap-min);align-content:center}}.notification:before{content:"";position:absolute;inset:var(--_inset) 0;z-index:-1;border-radius:var(--basalt-radius-md);background-color:transparent;transition:background-color var(--basalt-duration-fast) var(--basalt-ease-out)}.notification:hover:before{background-color:var(--panel-plate);transition-duration:var(--basalt-duration-instant)}.notifications-scroll[data-keys] .notification:hover:before{background-color:transparent}.notification:focus-visible{outline:var(--basalt-size-focus-width) solid var(--basalt-border-focus);outline-offset:calc(var(--basalt-size-focus-offset) - var(--_inset))}.notification-dot{width:var(--basalt-size-dot);height:var(--basalt-size-dot);margin-top:calc((var(--basalt-text-base-line-height) - var(--basalt-size-dot)) / 2);border-radius:var(--basalt-radius-full)}.notification[data-unread] .notification-dot{background:var(--basalt-text-primary)}.notification-mark{display:grid;place-items:center;width:var(--basalt-size-icon-sm);height:var(--basalt-size-icon-sm);margin-top:calc((var(--basalt-text-base-line-height) - var(--basalt-size-icon-sm)) / 2)}.notification[data-status=success] .notification-mark{color:var(--basalt-status-success)}.notification[data-status=warning] .notification-mark{color:var(--basalt-status-warning)}.notification[data-status=danger] .notification-mark{color:var(--basalt-status-danger)}.notification-text{display:flex;flex-direction:column;min-width:0}.notification-title,.notification-line{display:block;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.notification[data-unread] .notification-title,.notification:hover .notification-title{color:var(--basalt-text-primary)}.notification-line{font-size:var(--basalt-text-sm-size);line-height:var(--basalt-text-sm-line-height);color:var(--basalt-text-tertiary)}.notification-time{margin-top:calc(var(--basalt-space-0-5) / 2);font-size:var(--basalt-text-sm-size);line-height:var(--basalt-text-sm-line-height);font-variant-numeric:tabular-nums;white-space:nowrap;color:var(--basalt-text-tertiary)}.notification:hover .notification-line,.notification:hover .notification-time,.notification[data-status=pending] .notification-mark{color:var(--basalt-text-secondary)}.notification[data-current] .notification-title{color:var(--basalt-text-primary);font-weight:var(--basalt-font-weight-semibold)}.notification-head{display:flex;align-items:center;min-width:0}.notification-head>.notification-title{position:relative;flex:0 1 auto}.notification-count{flex:none;margin-inline-start:var(--basalt-space-1-5);font-variant-numeric:tabular-nums;color:var(--basalt-text-secondary)}.notification-caret{flex:none;margin-inline-start:var(--basalt-space-1);color:var(--basalt-text-secondary)}.notification[aria-expanded=true] .notification-caret{transform:rotate(90deg)}.notification[aria-expanded=false] .notification-caret:dir(rtl){transform:scaleX(-1)}.notification-entries{margin:0;padding:0;padding-inline-start:calc(var(--basalt-size-dot) + var(--basalt-size-icon-sm) + 2 * var(--basalt-space-2-5));list-style:none}@media(prefers-reduced-motion:no-preference)and (forced-colors:none)and (hover:hover)and (pointer:fine){.notifications-scroll[data-glide] .notification:before{background-color:transparent}}@media(forced-colors:active){.notifications-dot,.notification[data-unread] .notification-dot{box-sizing:border-box;border:calc(var(--basalt-size-dot) / 2) solid;background:none}.notification[data-status] .notification-mark{color:CanvasText}.notification:hover{forced-color-adjust:none;background:Highlight;color:HighlightText}.notification:hover:before{background-color:transparent}.notification-count,.notification-caret{color:CanvasText}.notification:hover :is(.notification-title,.notification-line,.notification-time,.notification-mark,.notification-count,.notification-caret){color:HighlightText}}} +@layer basalt{.notifications-dot{position:absolute;top:var(--basalt-space-1-5);right:var(--basalt-space-1-5);width:var(--basalt-size-dot);height:var(--basalt-size-dot);border-radius:var(--basalt-radius-full);background:var(--basalt-text-primary);pointer-events:none}.popover.notifications:popover-open{display:flex}.popover.notifications{flex-direction:column;width:min(var(--basalt-size-toast-width),calc(100vw - 2 * var(--basalt-space-4)));max-width:none;max-height:var(--available-height, 100vh);padding:0;overflow:hidden}.notifications-head{display:flex;align-items:center;gap:var(--basalt-space-2);padding-block:var(--basalt-space-2-5);padding-inline:var(--basalt-space-4);--basalt-edge-room: var(--basalt-space-4);--basalt-edge-room-start: initial;--basalt-edge-room-end: initial;border-bottom:var(--basalt-size-hairline) solid var(--basalt-border-divider)}.notifications-title{flex:none;line-height:var(--basalt-text-base-line-height)}.notifications-count{flex:1;min-width:0;font-size:var(--basalt-text-sm-size);line-height:var(--basalt-text-sm-line-height);color:var(--basalt-text-secondary);font-variant-numeric:tabular-nums}.notifications-mark{flex:none}.notifications-foot{display:flex;justify-content:flex-end;padding-block:var(--basalt-space-2-5);padding-inline:var(--basalt-space-4);--basalt-edge-room: var(--basalt-space-4);--basalt-edge-room-start: initial;--basalt-edge-room-end: initial;border-top:var(--basalt-size-hairline) solid var(--basalt-border-divider)}.notifications-clear{margin-inline-end:auto}.notifications-empty{margin:0;padding:var(--basalt-space-6) var(--basalt-space-4);text-align:center;color:var(--basalt-text-secondary)}.notifications-scroll{position:relative;flex:1;min-height:0;overflow-y:auto}.notifications-list{margin:0;padding:var(--basalt-space-1-5);list-style:none}.notification{--_inset: var(--basalt-space-0-5);box-sizing:border-box;position:relative;isolation:isolate;display:grid;grid-template-columns:var(--basalt-size-dot) var(--basalt-size-icon-sm) minmax(0,1fr) auto;align-items:start;column-gap:var(--basalt-space-2-5);width:100%;margin:0;padding:calc(var(--basalt-space-2) + var(--_inset)) var(--basalt-space-3);border:0;border-radius:calc(var(--basalt-radius-md) + var(--_inset));background:none;color:var(--basalt-text-secondary);font:var(--basalt-font-weight-regular) var(--bh-base);text-align:start;text-decoration:none;cursor:pointer;user-select:none}@media(pointer:coarse),(width<720px){.notification{min-height:var(--basalt-size-tap-min);align-content:center}}.notification:before{content:"";position:absolute;inset:var(--_inset) 0;z-index:-1;border-radius:var(--basalt-radius-md);background-color:transparent;transition:background-color var(--basalt-duration-fast) var(--basalt-ease-out)}.notification:hover:before{background-color:var(--panel-plate);transition-duration:var(--basalt-duration-instant)}.notifications-scroll[data-keys] .notification:hover:before{background-color:transparent}.notification:focus-visible{outline:var(--basalt-size-focus-width) solid var(--basalt-border-focus);outline-offset:calc(var(--basalt-size-focus-offset) - var(--_inset))}.notification-dot{width:var(--basalt-size-dot);height:var(--basalt-size-dot);margin-top:calc((var(--basalt-text-base-line-height) - var(--basalt-size-dot)) / 2);border-radius:var(--basalt-radius-full)}.notification[data-unread] .notification-dot{background:var(--basalt-text-primary)}.notification-mark{display:grid;place-items:center;width:var(--basalt-size-icon-sm);height:var(--basalt-size-icon-sm);margin-top:calc((var(--basalt-text-base-line-height) - var(--basalt-size-icon-sm)) / 2)}.notification[data-status=success] .notification-mark{color:var(--basalt-status-success)}.notification[data-status=warning] .notification-mark{color:var(--basalt-status-warning)}.notification[data-status=danger] .notification-mark{color:var(--basalt-status-danger)}.notification-text{display:flex;flex-direction:column;min-width:0}.notification-title,.notification-line{display:block;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.notification[data-unread] .notification-title,.notification:hover .notification-title{color:var(--basalt-text-primary)}.notification-line{font-size:var(--basalt-text-sm-size);line-height:var(--basalt-text-sm-line-height);color:var(--basalt-text-tertiary)}.notification-time{margin-top:calc(var(--basalt-space-0-5) / 2);font-size:var(--basalt-text-sm-size);line-height:var(--basalt-text-sm-line-height);font-variant-numeric:tabular-nums;white-space:nowrap;color:var(--basalt-text-tertiary)}.notification:hover .notification-line,.notification:hover .notification-time,.notification[data-status=pending] .notification-mark{color:var(--basalt-text-secondary)}.notification[data-current] .notification-title{color:var(--basalt-text-primary);font-weight:var(--basalt-font-weight-semibold)}.notification-head{display:flex;align-items:center;min-width:0}.notification-head>.notification-title{position:relative;flex:0 1 auto}.notification-count{flex:none;margin-inline-start:var(--basalt-space-1-5);font-variant-numeric:tabular-nums;color:var(--basalt-text-secondary)}.notification-caret{flex:none;margin-inline-start:var(--basalt-space-1);color:var(--basalt-text-secondary)}.notification[aria-expanded=true] .notification-caret{transform:rotate(90deg)}.notification[aria-expanded=false] .notification-caret:dir(rtl){transform:scaleX(-1)}.notification-entries{margin:0;padding:0;padding-inline-start:calc(var(--basalt-size-dot) + var(--basalt-size-icon-sm) + 2 * var(--basalt-space-2-5));list-style:none}@media(prefers-reduced-motion:no-preference)and (forced-colors:none)and (hover:hover)and (pointer:fine){.notifications-scroll[data-glide] .notification:before{background-color:transparent}}@media(forced-colors:active){.notifications-dot,.notification[data-unread] .notification-dot{box-sizing:border-box;border:calc(var(--basalt-size-dot) / 2) solid;background:none}.notification[data-status] .notification-mark{color:CanvasText}.notification:hover{forced-color-adjust:none;background:Highlight;color:HighlightText}.notification:hover:before{background-color:transparent}.notification-count,.notification-caret{color:CanvasText}.notification:hover :is(.notification-title,.notification-line,.notification-time,.notification-mark,.notification-count,.notification-caret){color:HighlightText}}} diff --git a/.agent/skills/basalt-html/parts/notifications.js b/.agent/skills/basalt-html/parts/notifications.js index fd760bbe..96e89a41 100644 --- a/.agent/skills/basalt-html/parts/notifications.js +++ b/.agent/skills/basalt-html/parts/notifications.js @@ -1 +1 @@ -(function(M){"use strict";var r=M._,z=0,L={success:"CheckCircle",warning:"Warning",danger:"XCircle",pending:"Circle"},B='<svg class="icon notification-caret" viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="2.25" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M9 6L15 12M15 12L9 18"/></svg>',R='<svg class="icon" viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="2.25" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="M6.5 11C6.5 7.962433875930637 8.962433875930635 5.500000000000001 11.999999999999998 5.5M11.999999999999998 5.5C15.037566124069361 5.499999999999999 17.5 7.9624338759306355 17.5 10.999999999999998M17.5 11C17.5 14.5 18.25 16.25 19.5 17.25M19.5 17.25L4.5 17.25M4.5 17.25C5.75 16.25 6.5 14.5 6.5 11M9.5 20.5L14.5 20.5M12 5.5L12 2.75"/></svg>';function h(o){return!!(o.entries&&o.entries.length)}var S=r.safeHref;function q(o){var f=[];return o.forEach(function(e){if(!h(e))return f.push(e);var c=e.entries.filter(function(d){return d.status!=="danger"});c.length&&f.push(c.length===e.entries.length?e:Object.assign({},e,{entries:c})),e.entries.forEach(function(d){d.status==="danger"&&f.push(d)})}),f}function V(o,f){var e=f||{};typeof o=="string"&&(o=document.querySelector(o));var c="bh-notes-"+ ++z,d=e.label||"Notifications",u=q(e.entries||[]),A={},I=r.pick(e.side,["top","bottom","left","right"],"bottom"),P=r.pick(e.align,["start","center","end"],"end"),x=S(e.viewAllHref);o.innerHTML='<button type="button" class="btn" data-variant="ghost" data-icon-only popovertarget="'+c+'" aria-haspopup="dialog">'+R+'<span class="notifications-dot" aria-hidden="true" hidden></span></button><div class="panel float popover notifications" popover id="'+c+'" data-side="'+I+'" data-align="'+P+'" aria-labelledby="'+c+'-title"><div class="notifications-head"><h2 class="popover-title notifications-title" id="'+c+'-title">'+r.esc(d)+'</h2><span class="notifications-count"></span><button type="button" class="btn notifications-mark" data-variant="ghost" data-size="sm">Mark all as read</button></div><p class="notifications-empty" hidden>Nothing yet.</p><div class="notifications-scroll"><span class="plate" aria-hidden="true"></span><ul class="notifications-list"></ul></div><div class="notifications-foot"></div></div>';var b=o.firstElementChild,s=o.lastElementChild,U=b.querySelector(".notifications-dot"),_=s.querySelector(".notifications-count"),g=s.querySelector(".notifications-mark"),G=s.querySelector(".notifications-empty"),w=s.querySelector(".notifications-scroll"),m=s.querySelector(".notifications-list"),H=s.querySelector(".notifications-foot");H.innerHTML=(e.onClearAll?'<button type="button" class="btn notifications-clear" data-variant="ghost" data-size="sm">Clear all</button>':"")+(x?'<a class="btn" data-variant="ghost" data-size="sm" href="'+r.esc(x)+'"><span>View all</span></a>':'<button type="button" class="btn" data-variant="ghost" data-size="sm"><span>View all</span></button>');var K=H.lastElementChild,v=s.querySelector(".notifications-clear"),y;function C(){s.matches(":popover-open")&&s.hidePopover()}function O(t){return h(t)?t.entries.some(function(n){return!!n.unread}):!!t.unread}function E(t,n,i){var a=t.status||"neutral",l=i?null:S(t.href),p=l?"a":"button",k=O(t),T=i?Number.isInteger(t.count)&&t.count>0?t.count:t.entries.length:0,j='<span class="notification-title">'+(k?'<span class="visually-hidden">Unread: </span>':"")+r.esc(t.title)+(i?'<span class="visually-hidden">, '+T+" times</span>":"")+"</span>";return"<"+p+(p==="a"?' href="'+r.esc(l)+'"':' type="button"')+' class="notification" data-index="'+n+'" data-id="'+r.esc(t.id)+'"'+(k?" data-unread":"")+' data-status="'+r.esc(a)+'"'+(t.current?' data-current aria-current="'+(p==="a"?"page":"true")+'"':"")+(i?' data-group aria-expanded="'+!!A[t.id]+'" aria-controls="'+i+'"':"")+'><span class="notification-dot" aria-hidden="true"></span><span class="notification-mark" aria-hidden="true">'+(L[a]?r.icon(L[a]):"")+'</span><span class="notification-text">'+(i?'<span class="notification-head">'+j+'<span class="notification-count" aria-hidden="true">×'+T+"</span>"+B+"</span>":j)+(t.description?'<span class="notification-line">'+r.esc(t.description)+"</span>":"")+'</span><time class="notification-time"'+(t.dateTime?' datetime="'+r.esc(t.dateTime)+'"':"")+">"+r.esc(t.time)+"</time></"+p+">"}function N(){var t=m.contains(document.activeElement)&&document.activeElement.dataset.id,n=u.reduce(function(i,a){return i+(h(a)?a.entries.filter(function(l){return l.unread}).length:a.unread?1:0)},0);b.setAttribute("aria-label",n>0?d+", "+n+" unread":d),U.hidden=n===0,_.textContent=n+" unread",n===0?g.setAttribute("aria-disabled","true"):g.removeAttribute("aria-disabled"),v&&(u.length===0?v.setAttribute("aria-disabled","true"):v.removeAttribute("aria-disabled")),G.hidden=u.length>0,w.hidden=u.length===0,m.innerHTML=u.map(function(i,a){if(!h(i))return"<li>"+E(i,a)+"</li>";var l=c+"-g"+a;return"<li>"+E(i,a,l)+'<ul class="notification-entries" id="'+l+'"'+(A[i.id]?"":" hidden")+">"+i.entries.map(function(p,k){return"<li>"+E(p,a+"."+k)+"</li>"}).join("")+"</ul></li>"}).join(""),t&&[].some.call(m.querySelectorAll(".notification"),function(i){return i.dataset.id===t&&(i.focus(),!0)})}return m.addEventListener("click",function(t){var n=t.target.closest(".notification");if(n){var i=n.dataset.index.split(".");if(n.hasAttribute("data-group")){var a=n.getAttribute("aria-expanded")!=="true";A[u[Number(i[0])].id]=a,n.setAttribute("aria-expanded",String(a)),document.getElementById(n.getAttribute("aria-controls")).hidden=!a;return}var l=u[Number(i[0])];e.onSelect&&e.onSelect(i.length>1?l.entries[Number(i[1])]:l),C()}}),g.addEventListener("click",function(){g.getAttribute("aria-disabled")!=="true"&&e.onMarkAllRead&&e.onMarkAllRead()}),v&&v.addEventListener("click",function(){v.getAttribute("aria-disabled")!=="true"&&e.onClearAll()}),K.addEventListener("click",function(){e.onViewAll&&e.onViewAll(),C()}),s.addEventListener("toggle",function(t){t.newState==="open"?y=r.glide(w,w.firstElementChild,{active:".notification[data-hovered]",item:".notification"}):y&&(y(),y=null)}),N(),{element:s,button:b,setEntries:function(t){u=q(t||[]),N()},open:function(){s.showPopover({source:b})},close:C}}M.notifications=V})(window.Basalt); +(function(M){"use strict";var r=M._,B=0,L={success:"CheckCircle",warning:"Warning",danger:"XCircle",pending:"Circle"},R='<svg class="icon notification-caret" viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="2.25" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M9 6L15 12M15 12L9 18"/></svg>',V='<svg class="icon" viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="2.25" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="M6.5 11C6.5 7.962433875930637 8.962433875930635 5.500000000000001 11.999999999999998 5.5M11.999999999999998 5.5C15.037566124069361 5.499999999999999 17.5 7.9624338759306355 17.5 10.999999999999998M17.5 11C17.5 14.5 18.25 16.25 19.5 17.25M19.5 17.25L4.5 17.25M4.5 17.25C5.75 16.25 6.5 14.5 6.5 11M9.5 20.5L14.5 20.5M12 5.5L12 2.75"/></svg>';function h(s){return!!(s.entries&&s.entries.length)}var S=r.safeHref;function q(s){var f=[];return s.forEach(function(e){if(!h(e))return f.push(e);var d=e.entries.filter(function(c){return c.status!=="danger"});d.length&&f.push(d.length===e.entries.length?e:Object.assign({},e,{entries:d})),e.entries.forEach(function(c){c.status==="danger"&&f.push(c)})}),f}function I(s,f){var e=f||{};typeof s=="string"&&(s=document.querySelector(s));var d="bh-notes-"+ ++B,c=e.label||"Notifications",u=q(e.entries||[]),A={},P=r.pick(e.side,["top","bottom","left","right"],"bottom"),U=r.pick(e.align,["start","center","end"],"end"),x=S(e.viewAllHref),H=r.pick(e.edge||s.getAttribute("data-edge"),["start","end"],"");s.innerHTML='<button type="button" class="btn" data-variant="ghost" data-icon-only'+(H?' data-edge="'+H+'"':"")+' popovertarget="'+d+'" aria-haspopup="dialog">'+V+'<span class="notifications-dot" aria-hidden="true" hidden></span></button><div class="panel float popover notifications" popover id="'+d+'" data-side="'+P+'" data-align="'+U+'" aria-labelledby="'+d+'-title"><div class="notifications-head"><h2 class="popover-title notifications-title" id="'+d+'-title">'+r.esc(c)+'</h2><span class="notifications-count"></span><button type="button" class="btn notifications-mark" data-variant="ghost" data-size="sm" data-edge="end">Mark all as read</button></div><p class="notifications-empty" hidden>Nothing yet.</p><div class="notifications-scroll"><span class="plate" aria-hidden="true"></span><ul class="notifications-list"></ul></div><div class="notifications-foot"></div></div>';var g=s.firstElementChild,o=s.lastElementChild,_=g.querySelector(".notifications-dot"),G=o.querySelector(".notifications-count"),b=o.querySelector(".notifications-mark"),K=o.querySelector(".notifications-empty"),w=o.querySelector(".notifications-scroll"),m=o.querySelector(".notifications-list"),N=o.querySelector(".notifications-foot");N.innerHTML=(e.onClearAll?'<button type="button" class="btn notifications-clear" data-variant="ghost" data-size="sm" data-edge="start">Clear all</button>':"")+(x?'<a class="btn" data-variant="ghost" data-size="sm" data-edge="end" href="'+r.esc(x)+'"><span>View all</span></a>':'<button type="button" class="btn" data-variant="ghost" data-size="sm" data-edge="end"><span>View all</span></button>');var O=N.lastElementChild,v=o.querySelector(".notifications-clear"),k;function C(){o.matches(":popover-open")&&o.hidePopover()}function W(t){return h(t)?t.entries.some(function(n){return!!n.unread}):!!t.unread}function E(t,n,i){var a=t.status||"neutral",l=i?null:S(t.href),p=l?"a":"button",y=W(t),j=i?Number.isInteger(t.count)&&t.count>0?t.count:t.entries.length:0,z='<span class="notification-title">'+(y?'<span class="visually-hidden">Unread: </span>':"")+r.esc(t.title)+(i?'<span class="visually-hidden">, '+j+" times</span>":"")+"</span>";return"<"+p+(p==="a"?' href="'+r.esc(l)+'"':' type="button"')+' class="notification" data-index="'+n+'" data-id="'+r.esc(t.id)+'"'+(y?" data-unread":"")+' data-status="'+r.esc(a)+'"'+(t.current?' data-current aria-current="'+(p==="a"?"page":"true")+'"':"")+(i?' data-group aria-expanded="'+!!A[t.id]+'" aria-controls="'+i+'"':"")+'><span class="notification-dot" aria-hidden="true"></span><span class="notification-mark" aria-hidden="true">'+(L[a]?r.icon(L[a]):"")+'</span><span class="notification-text">'+(i?'<span class="notification-head">'+z+'<span class="notification-count" aria-hidden="true">×'+j+"</span>"+R+"</span>":z)+(t.description?'<span class="notification-line">'+r.esc(t.description)+"</span>":"")+'</span><time class="notification-time"'+(t.dateTime?' datetime="'+r.esc(t.dateTime)+'"':"")+">"+r.esc(t.time)+"</time></"+p+">"}function T(){var t=m.contains(document.activeElement)&&document.activeElement.dataset.id,n=u.reduce(function(i,a){return i+(h(a)?a.entries.filter(function(l){return l.unread}).length:a.unread?1:0)},0);g.setAttribute("aria-label",n>0?c+", "+n+" unread":c),_.hidden=n===0,G.textContent=n+" unread",n===0?b.setAttribute("aria-disabled","true"):b.removeAttribute("aria-disabled"),v&&(u.length===0?v.setAttribute("aria-disabled","true"):v.removeAttribute("aria-disabled")),K.hidden=u.length>0,w.hidden=u.length===0,m.innerHTML=u.map(function(i,a){if(!h(i))return"<li>"+E(i,a)+"</li>";var l=d+"-g"+a;return"<li>"+E(i,a,l)+'<ul class="notification-entries" id="'+l+'"'+(A[i.id]?"":" hidden")+">"+i.entries.map(function(p,y){return"<li>"+E(p,a+"."+y)+"</li>"}).join("")+"</ul></li>"}).join(""),t&&[].some.call(m.querySelectorAll(".notification"),function(i){return i.dataset.id===t&&(i.focus(),!0)})}return m.addEventListener("click",function(t){var n=t.target.closest(".notification");if(n){var i=n.dataset.index.split(".");if(n.hasAttribute("data-group")){var a=n.getAttribute("aria-expanded")!=="true";A[u[Number(i[0])].id]=a,n.setAttribute("aria-expanded",String(a)),document.getElementById(n.getAttribute("aria-controls")).hidden=!a;return}var l=u[Number(i[0])];e.onSelect&&e.onSelect(i.length>1?l.entries[Number(i[1])]:l),C()}}),b.addEventListener("click",function(){b.getAttribute("aria-disabled")!=="true"&&e.onMarkAllRead&&e.onMarkAllRead()}),v&&v.addEventListener("click",function(){v.getAttribute("aria-disabled")!=="true"&&e.onClearAll()}),O.addEventListener("click",function(){e.onViewAll&&e.onViewAll(),C()}),o.addEventListener("toggle",function(t){t.newState==="open"?k=r.glide(w,w.firstElementChild,{active:".notification[data-hovered]",item:".notification"}):k&&(k(),k=null)}),T(),{element:o,button:g,setEntries:function(t){u=q(t||[]),T()},open:function(){o.showPopover({source:g})},close:C}}M.notifications=I})(window.Basalt); diff --git a/.agent/skills/basalt-html/parts/option-chips.css b/.agent/skills/basalt-html/parts/option-chips.css index a74f7cf3..c3c3033f 100644 --- a/.agent/skills/basalt-html/parts/option-chips.css +++ b/.agent/skills/basalt-html/parts/option-chips.css @@ -1 +1 @@ -@layer basalt{.option-chips{min-width:0;margin:0;padding:0;border:0}.option-chips-legend{display:block;padding:0;margin-bottom:var(--basalt-space-3);color:var(--basalt-text-primary);font:var(--basalt-font-weight-medium) var(--bh-base)}.option-chips-count{margin-inline-start:var(--basalt-space-1);color:var(--basalt-text-tertiary);font:var(--basalt-font-weight-regular) var(--bh-sm)}.option-chips-list{display:flex;flex-wrap:wrap;gap:var(--basalt-space-2)}.option-chip{position:relative;box-sizing:border-box;display:inline-flex;align-items:center;gap:var(--basalt-space-2);min-height:var(--basalt-size-control-2xl);margin:0;padding:0 calc(var(--basalt-space-3-5) - var(--basalt-size-hairline)) 0 calc(var(--basalt-space-2-5) - var(--basalt-size-hairline));border:var(--basalt-size-hairline) solid var(--basalt-border-field);border-radius:var(--basalt-radius-md);background:transparent;color:var(--basalt-text-secondary);font:var(--basalt-font-weight-regular) var(--basalt-text-md-size) / var(--basalt-text-md-line-height) var(--basalt-font-family-sans);cursor:pointer;user-select:none;-webkit-tap-highlight-color:transparent;transition-property:background-color,border-color,color;transition-duration:var(--basalt-duration-fast);transition-timing-function:var(--basalt-ease-out)}.option-chip>.option-chip-input{appearance:none;position:absolute;inset:0;width:100%;height:100%;margin:0;padding:0;border-radius:inherit;opacity:0;cursor:inherit}.option-chip>.option-chip-input:focus-visible{outline:none}.option-chip-seat{box-sizing:border-box;display:grid;place-items:center;flex:none;width:var(--basalt-size-choice);height:var(--basalt-size-choice);border-radius:var(--basalt-radius-full);box-shadow:inset 0 0 0 var(--basalt-size-hairline) var(--basalt-border-input);color:var(--basalt-action-primary-text);transition-property:background-color,box-shadow;transition-duration:var(--basalt-duration-fast);transition-timing-function:var(--basalt-ease-out)}.option-chip-seat>svg{width:var(--basalt-size-choice-mark);height:var(--basalt-size-choice-mark);opacity:0;transition:opacity var(--basalt-duration-fast) var(--basalt-ease-out)}.option-chip:is([data-checked],:has(>.option-chip-input:checked)){background:var(--basalt-state-selected);color:var(--basalt-text-primary)}.option-chip:is([data-checked],:has(>.option-chip-input:checked)) .option-chip-seat{background:var(--basalt-action-primary);box-shadow:none}.option-chip:is([data-checked],:has(>.option-chip-input:checked)) .option-chip-seat>svg{opacity:1}.option-chip-note{font-size:var(--basalt-text-sm-size);line-height:var(--basalt-text-sm-line-height)}@media(hover:hover){.option-chip:hover:not(:is([data-unavailable],:has(>.option-chip-input:is(:disabled,[aria-disabled=true])))){color:var(--basalt-text-primary);border-color:var(--basalt-text-secondary);transition-duration:var(--basalt-duration-instant)}}.option-chips:not([data-ready]) .option-chip:has(>.option-chip-input[aria-disabled=true]){pointer-events:none}.option-chip:active:not(:is([data-unavailable],:has(>.option-chip-input:is(:disabled,[aria-disabled=true])))){background:var(--basalt-state-hover)}.option-chip:is([data-checked],:has(>.option-chip-input:checked)):active:not(:is([data-unavailable],:has(>.option-chip-input:is(:disabled,[aria-disabled=true])))){background:var(--basalt-state-selected)}.option-chip:is([data-focus],:has(>.option-chip-input:focus-visible)){outline:var(--basalt-size-focus-width) solid var(--basalt-border-focus);outline-offset:var(--basalt-size-focus-offset)}.option-chip:is([data-unavailable],:has(>.option-chip-input:is(:disabled,[aria-disabled=true]))){color:var(--basalt-text-disabled);border-color:var(--basalt-border-divider);cursor:not-allowed}.option-chip:is([data-unavailable],:has(>.option-chip-input:is(:disabled,[aria-disabled=true]))) .option-chip-seat{box-shadow:inset 0 0 0 var(--basalt-size-hairline) var(--basalt-border-divider)}.option-chip:is([data-checked][data-unavailable],:has(>.option-chip-input:disabled:checked)){background:transparent}@media(pointer:coarse),(width<720px){.option-chip{min-height:var(--basalt-size-tap-min)}}@media(forced-colors:active){.option-chip{border-color:ButtonText;color:ButtonText}.option-chip-seat{box-shadow:none;border:var(--basalt-size-hairline) solid ButtonText;color:ButtonText}.option-chip:is([data-checked],:has(>.option-chip-input:checked)),.option-chip:is([data-checked],:has(>.option-chip-input:checked)):hover,.option-chip:is([data-checked],:has(>.option-chip-input:checked)):active{forced-color-adjust:none;background:Highlight;border-color:Highlight;color:HighlightText}.option-chip:is([data-checked],:has(>.option-chip-input:checked)) .option-chip-seat{background:HighlightText;border-color:HighlightText;color:Highlight}.option-chip:is([data-checked],:has(>.option-chip-input:checked)) .option-chip-seat>svg{color:Highlight}.option-chip:is([data-unavailable],:has(>.option-chip-input:is(:disabled,[aria-disabled=true]))),.option-chip:is([data-unavailable],:has(>.option-chip-input:is(:disabled,[aria-disabled=true]))) .option-chip-seat{border-color:GrayText;color:GrayText}}} +@layer basalt{.option-chips{min-width:0;margin:0;padding:0;border:0}.option-chips-legend{display:block;padding:0;margin-bottom:var(--basalt-space-3);color:var(--basalt-text-primary);font:var(--basalt-font-weight-medium) var(--bh-base)}.option-chips-count{margin-inline-start:var(--basalt-space-1);color:var(--basalt-text-tertiary);font:var(--basalt-font-weight-regular) var(--bh-sm)}.option-chips-list{display:flex;flex-wrap:wrap;gap:var(--basalt-space-2)}.option-chip{position:relative;box-sizing:border-box;display:inline-flex;align-items:center;gap:var(--basalt-space-2);min-height:var(--basalt-size-control-2xl);margin:0;padding-block:0;padding-inline:calc(var(--basalt-space-3) - var(--basalt-size-hairline));border:var(--basalt-size-hairline) solid var(--basalt-border-field);border-radius:var(--basalt-radius-md);background:transparent;color:var(--basalt-text-secondary);font:var(--basalt-font-weight-regular) var(--basalt-text-md-size) / var(--basalt-text-md-line-height) var(--basalt-font-family-sans);cursor:pointer;user-select:none;-webkit-tap-highlight-color:transparent;transition-property:background-color,border-color,color;transition-duration:var(--basalt-duration-fast);transition-timing-function:var(--basalt-ease-out)}.option-chip>.option-chip-input{appearance:none;position:absolute;inset:0;width:100%;height:100%;margin:0;padding:0;border-radius:inherit;opacity:0;cursor:inherit}.option-chip>.option-chip-input:focus-visible{outline:none}.option-chip-seat{box-sizing:border-box;display:grid;place-items:center;flex:none;width:var(--basalt-size-choice);height:var(--basalt-size-choice);border-radius:var(--basalt-radius-full);box-shadow:inset 0 0 0 var(--basalt-size-hairline) var(--basalt-border-input);color:var(--basalt-action-primary-text);transition-property:background-color,box-shadow;transition-duration:var(--basalt-duration-fast);transition-timing-function:var(--basalt-ease-out)}.option-chip-seat>svg{width:var(--basalt-size-choice-mark);height:var(--basalt-size-choice-mark);opacity:0;transition:opacity var(--basalt-duration-fast) var(--basalt-ease-out)}.option-chip:is([data-checked],:has(>.option-chip-input:checked)){background:var(--basalt-state-selected);color:var(--basalt-text-primary)}.option-chip:is([data-checked],:has(>.option-chip-input:checked)) .option-chip-seat{background:var(--basalt-action-primary);box-shadow:none}.option-chip:is([data-checked],:has(>.option-chip-input:checked)) .option-chip-seat>svg{opacity:1}.option-chip-note{font-size:var(--basalt-text-sm-size);line-height:var(--basalt-text-sm-line-height)}@media(hover:hover){.option-chip:hover:not(:is([data-unavailable],:has(>.option-chip-input:is(:disabled,[aria-disabled=true])))){color:var(--basalt-text-primary);border-color:var(--basalt-text-secondary);transition-duration:var(--basalt-duration-instant)}}.option-chips:not([data-ready]) .option-chip:has(>.option-chip-input[aria-disabled=true]){pointer-events:none}.option-chip:active:not(:is([data-unavailable],:has(>.option-chip-input:is(:disabled,[aria-disabled=true])))){background:var(--basalt-state-hover)}.option-chip:is([data-checked],:has(>.option-chip-input:checked)):active:not(:is([data-unavailable],:has(>.option-chip-input:is(:disabled,[aria-disabled=true])))){background:var(--basalt-state-selected)}.option-chip:is([data-focus],:has(>.option-chip-input:focus-visible)){outline:var(--basalt-size-focus-width) solid var(--basalt-border-focus);outline-offset:var(--basalt-size-focus-offset)}.option-chip:is([data-unavailable],:has(>.option-chip-input:is(:disabled,[aria-disabled=true]))){color:var(--basalt-text-disabled);border-color:var(--basalt-border-divider);cursor:not-allowed}.option-chip:is([data-unavailable],:has(>.option-chip-input:is(:disabled,[aria-disabled=true]))) .option-chip-seat{box-shadow:inset 0 0 0 var(--basalt-size-hairline) var(--basalt-border-divider)}.option-chip:is([data-checked][data-unavailable],:has(>.option-chip-input:disabled:checked)){background:transparent}@media(pointer:coarse),(width<720px){.option-chip{min-height:var(--basalt-size-tap-min)}}@media(forced-colors:active){.option-chip{border-color:ButtonText;color:ButtonText}.option-chip-seat{box-shadow:none;border:var(--basalt-size-hairline) solid ButtonText;color:ButtonText}.option-chip:is([data-checked],:has(>.option-chip-input:checked)),.option-chip:is([data-checked],:has(>.option-chip-input:checked)):hover,.option-chip:is([data-checked],:has(>.option-chip-input:checked)):active{forced-color-adjust:none;background:Highlight;border-color:Highlight;color:HighlightText}.option-chip:is([data-checked],:has(>.option-chip-input:checked)) .option-chip-seat{background:HighlightText;border-color:HighlightText;color:Highlight}.option-chip:is([data-checked],:has(>.option-chip-input:checked)) .option-chip-seat>svg{color:Highlight}.option-chip:is([data-unavailable],:has(>.option-chip-input:is(:disabled,[aria-disabled=true]))),.option-chip:is([data-unavailable],:has(>.option-chip-input:is(:disabled,[aria-disabled=true]))) .option-chip-seat{border-color:GrayText;color:GrayText}}} diff --git a/.agent/skills/basalt-html/parts/pane.css b/.agent/skills/basalt-html/parts/pane.css index d6049600..4dfc41fe 100644 --- a/.agent/skills/basalt-html/parts/pane.css +++ b/.agent/skills/basalt-html/parts/pane.css @@ -1 +1 @@ -@layer basalt{.pane-layout{container-type:inline-size;min-width:0}.pane-grid{display:grid;grid-template-columns:minmax(0,1fr);row-gap:var(--basalt-space-8)}:is(.pane-page,.pane){min-width:0}.pane:focus-visible{outline:var(--basalt-size-focus-width) solid var(--basalt-border-focus);outline-offset:var(--basalt-size-focus-offset)}@container (width >= 920px){.pane-grid{grid-template-columns:minmax(0,1fr) var(--basalt-size-sidebar-width);column-gap:var(--basalt-size-gutter);align-items:start}.pane{position:sticky;top:calc(var(--basalt-sticky-offset, var(--basalt-space-0)) + var(--basalt-space-6) - var(--basalt-space-1-5));box-sizing:border-box;max-height:calc(100dvh - var(--basalt-sticky-offset, var(--basalt-space-0)) - (var(--basalt-space-6) - var(--basalt-space-1-5)) - (var(--basalt-space-16) - var(--basalt-space-1-5)) - var(--basalt-bottom-offset, var(--basalt-space-0)));margin:calc(-1 * var(--basalt-space-1-5));padding:var(--basalt-space-1-5);overflow-y:auto;overscroll-behavior:contain}}@media print{.pane{position:static;max-height:none;overflow:visible}}} +@layer basalt{.pane-layout{container-type:inline-size;min-width:0}.pane-grid{display:grid;grid-template-columns:minmax(0,1fr);row-gap:var(--basalt-space-8)}:is(.pane-page,.pane){min-width:0}.page .pane-page>.release-notes{--basalt-edge-room: var(--basalt-gutter);--basalt-edge-room-start: initial;--basalt-edge-room-end: initial}.pane:focus-visible{outline:var(--basalt-size-focus-width) solid var(--basalt-border-focus);outline-offset:var(--basalt-size-focus-offset)}@container (width >= 920px){.pane-grid{grid-template-columns:minmax(0,1fr) var(--basalt-size-sidebar-width);column-gap:var(--basalt-size-gutter);align-items:start}.page .pane-page>.release-notes{--basalt-edge-room: initial;--basalt-edge-room-start: var(--basalt-gutter);--basalt-edge-room-end: var(--basalt-size-gutter)}.pane{position:sticky;top:calc(var(--basalt-sticky-offset, var(--basalt-space-0)) + var(--basalt-space-6) - var(--basalt-space-1-5));box-sizing:border-box;max-height:calc(100dvh - var(--basalt-sticky-offset, var(--basalt-space-0)) - (var(--basalt-space-6) - var(--basalt-space-1-5)) - (var(--basalt-space-16) - var(--basalt-space-1-5)) - var(--basalt-bottom-offset, var(--basalt-space-0)));margin:calc(-1 * var(--basalt-space-1-5));padding:var(--basalt-space-1-5);overflow-y:auto;overscroll-behavior:contain}}@media print{.pane{position:static;max-height:none;overflow:visible}}} diff --git a/.agent/skills/basalt-html/parts/release.css b/.agent/skills/basalt-html/parts/release.css index 4a08027c..bf3be9d9 100644 --- a/.agent/skills/basalt-html/parts/release.css +++ b/.agent/skills/basalt-html/parts/release.css @@ -1 +1 @@ -@layer basalt{.release-notes{--basalt-plate: var(--basalt-plate-0)}.release-action{--basalt-plate: var(--basalt-plate-1)}.release-fold{justify-content:space-between;gap:var(--basalt-space-3)}.release-fold:after{background:var(--basalt-text-secondary)}.release-word{display:none;margin-bottom:var(--basalt-space-1);color:var(--basalt-text-secondary);font:var(--basalt-font-weight-regular) var(--bh-xs);letter-spacing:var(--basalt-text-xs-tracking);white-space:nowrap;opacity:0;visibility:hidden;transition:opacity calc(var(--basalt-duration-slow) * .75) var(--basalt-ease-in),visibility var(--basalt-duration-instant) linear calc(var(--basalt-duration-slow) * .75)}:is(.release-entry[data-arrival]>.release-word,.release[data-arrival]>.release-head .release-word){display:block}:is(.release-entry[data-arrived]>.release-word,.release[data-arrived]>.release-head .release-word){opacity:1;visibility:visible;transition-duration:var(--basalt-duration-instant);transition-delay:var(--basalt-duration-instant)}@media(forced-colors:active){.release-word{color:CanvasText}}@media(prefers-reduced-motion:reduce){.release-word,.release-entry:before,.release-head:before{transition-property:none}}.release-notes{min-width:0;font-family:var(--basalt-font-family-sans);color:var(--basalt-text-primary)}.release{container-type:inline-size;max-width:calc(var(--basalt-size-prose-width) + var(--basalt-space-6) + var(--basalt-size-sidebar-width));padding-block:var(--basalt-space-10);border-top:var(--basalt-size-hairline) solid var(--basalt-border-divider);scroll-margin-top:calc(var(--basalt-sticky-offset, var(--basalt-space-0)) + var(--basalt-space-4))}.release:first-of-type{padding-top:0;border-top:0}.release:last-of-type{padding-bottom:0}.release-notes>.release-build:first-child{max-width:calc(var(--basalt-size-prose-width) + var(--basalt-space-6) + var(--basalt-size-sidebar-width));margin:0 0 var(--basalt-space-6)}.release:focus,.release-entry:focus{outline:none}.release-head{position:relative;isolation:isolate;display:grid;grid-template-columns:minmax(0,1fr) auto;column-gap:var(--basalt-space-4);align-items:center}.release-head-text{display:contents}.release-head-text>*{grid-column:1 / -1;min-width:0}.release-head-text>.release-word{grid-row:1}.release-head-text>:is(.release-number-line,.release-heading:not([data-headline])){grid-column:1;grid-row:2}.release-head-text>.release-heading[data-headline]{grid-row:3}.release-head-text>.release-heading[data-headline]~.release-meta{grid-row:4}.release-head-text>.release-heading:not([data-headline])~.release-meta{grid-row:3}.release-head-text>:not(.release-word)~*{margin-top:var(--basalt-space-1)}.release-head>.release-copy{grid-column:2;grid-row:2;align-self:center;margin-block:calc(-1 * var(--basalt-size-tap-min));margin-inline-end:calc(-1 * var(--basalt-space-2-5))}.release-heading{margin:0;font:var(--basalt-font-weight-semibold) var(--basalt-text-2xl-size) / var(--basalt-text-2xl-line-height) var(--basalt-font-family-sans);letter-spacing:var(--basalt-text-2xl-tracking);text-wrap:balance;overflow-wrap:break-word}.release-version{font-family:var(--basalt-font-family-mono);letter-spacing:0;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}.release-version[data-words]{font-family:var(--basalt-font-family-sans);letter-spacing:var(--basalt-text-2xl-tracking)}.release-meta{margin:0;color:var(--basalt-text-secondary);font:var(--basalt-font-weight-regular) var(--basalt-text-sm-size) / var(--basalt-text-sm-line-height) var(--basalt-font-family-sans);letter-spacing:var(--basalt-text-sm-tracking);font-variant-numeric:tabular-nums}.release-badges{display:inline-flex;gap:var(--basalt-space-2);margin-inline-start:var(--basalt-space-2);vertical-align:middle}.release-action-link{position:relative;z-index:1;color:inherit;text-decoration:underline;text-decoration-color:var(--basalt-border-input);text-decoration-thickness:var(--basalt-size-hairline);text-underline-offset:var(--basalt-size-underline-offset);border-radius:var(--basalt-radius-xs)}.release-action-link:hover{color:var(--basalt-text-primary);text-decoration-color:currentColor}.release-action-link:focus-visible{outline:var(--basalt-size-focus-width) solid var(--basalt-border-focus);outline-offset:var(--basalt-size-focus-offset)}.release-copy{flex:none}.release-summary,.release-paragraph{margin:0;max-width:var(--basalt-size-prose-width);font-size:var(--basalt-text-md-size);line-height:var(--basalt-text-md-line-height);letter-spacing:var(--basalt-text-md-tracking);text-wrap:pretty}.release-summary{margin-top:var(--basalt-space-4)}.release-audience{display:grid;gap:var(--basalt-space-1);margin-top:var(--basalt-space-4)}.release-audience-title{margin:0;font:var(--basalt-font-weight-semibold) var(--basalt-text-md-size) / var(--basalt-text-md-line-height) var(--basalt-font-family-sans);letter-spacing:var(--basalt-text-md-tracking)}.release-action{margin-top:var(--basalt-space-6)}.release-action>div{flex:1;min-width:0}.release-action .release-list{grid-template-columns:minmax(0,calc(var(--basalt-size-prose-width) - var(--basalt-size-hairline) - var(--basalt-space-4) - var(--basalt-size-icon-sm) - var(--basalt-space-3))) minmax(0,max-content)}.release-callout-title{margin:0;font:inherit;letter-spacing:inherit}.release-action .callout-body{color:var(--basalt-text-primary)}.release-upgrade{margin:0 0 var(--basalt-space-2);color:var(--basalt-text-secondary)}.release-section,.release-all{margin-top:var(--basalt-space-6)}.release-section-title{margin:0 0 var(--basalt-space-2);font:var(--basalt-font-weight-semibold) var(--basalt-text-md-size) / var(--basalt-text-md-line-height) var(--basalt-font-family-sans);letter-spacing:var(--basalt-text-md-tracking)}.release-count{margin-inline-start:var(--basalt-space-1);color:var(--basalt-text-tertiary);font-weight:var(--basalt-font-weight-regular);font-variant-numeric:tabular-nums}.release-action .release-count{color:var(--basalt-text-secondary)}.release-all .release-summary,.release-all .release-section:first-child{margin-top:var(--basalt-space-2)}.release-all .release-summary+.release-section{margin-top:var(--basalt-space-4)}.release-all .release-section-title{font-size:var(--basalt-text-base-size);line-height:var(--basalt-text-base-line-height);letter-spacing:var(--basalt-text-base-tracking)}.release-fold{min-height:var(--basalt-text-md-line-height);padding:0;font:var(--basalt-font-weight-semibold) var(--basalt-text-md-size) / var(--basalt-text-md-line-height) var(--basalt-font-family-sans);letter-spacing:var(--basalt-text-md-tracking)}.release-fold-title{margin:0}.release-fold-panel[hidden=until-found]{display:block!important;content-visibility:hidden}.release-section[data-folded] .release-fold-panel:not([hidden]){padding-top:var(--basalt-space-2)}.release-build{margin-top:var(--basalt-space-2)}.release-build .release-fold{min-height:var(--basalt-size-control-xs);font:var(--basalt-font-weight-regular) var(--basalt-text-base-size) / var(--basalt-text-base-line-height) var(--basalt-font-family-sans);letter-spacing:var(--basalt-text-base-tracking)}.release-build-list{margin-block:var(--basalt-space-3)}.release-fold-panel{display:flow-root}.release>.release-build:last-child{margin-bottom:calc((var(--basalt-text-base-line-height) - var(--basalt-size-control-xs)) / 2)}.release>.release-build:last-child>.release-fold-panel:not([hidden]){padding-bottom:calc((var(--basalt-size-control-xs) - var(--basalt-text-base-line-height)) / 2)}.release-list{display:grid;grid-template-columns:minmax(0,var(--basalt-size-prose-width)) minmax(0,max-content);justify-content:start;column-gap:var(--basalt-space-6);margin:0;padding:0;list-style:none}.release-entry{position:relative;display:grid;grid-template-columns:subgrid;grid-column:1 / -1;align-items:baseline;--_release-entry-pad: var(--basalt-space-1-5);padding-block:var(--_release-entry-pad);scroll-margin-top:calc(var(--basalt-sticky-offset, var(--basalt-space-0)) + var(--basalt-space-8))}:where(.release-action .release-list,.release>.release-section:not([data-folded]):last-child>.release-list,.release>.release-all:last-child>.release-fold-panel>.release-section:last-child>.release-list,.release>.release-section[data-folded]:last-child>.release-fold-panel>.release-list)>.release-entry:last-child{padding-bottom:0}.release-word{grid-column:1 / -1}.release-entry-words{grid-column:1;display:grid;justify-items:start;gap:var(--basalt-space-1);min-width:0}.release-entry-text{margin:0;color:var(--basalt-text-primary);font-size:var(--basalt-text-base-size);line-height:var(--basalt-text-base-line-height);letter-spacing:var(--basalt-text-base-tracking);text-wrap:pretty;overflow-wrap:break-word}.release-entry-text code{display:inline-block;max-inline-size:100%}.release-area{font-weight:var(--basalt-font-weight-medium)}.release-migrate{position:relative;font-size:var(--basalt-text-base-size);line-height:var(--basalt-text-base-line-height)}.release-source-cell{grid-column:2;justify-self:start;min-width:0}.release-source-cell:empty{display:none}.release-source{position:relative;margin:0;padding-inline:0;border:0;border-radius:var(--basalt-radius-xs);background:none;color:var(--basalt-text-secondary);text-align:start;cursor:pointer;transition:color var(--basalt-duration-fast) var(--basalt-ease-out)}.release-source:hover{color:var(--basalt-text-primary)}.release-source:focus-visible{outline:var(--basalt-size-focus-width) solid var(--basalt-border-focus);outline-offset:var(--basalt-size-focus-offset)}.release-source{display:inline;baseline-source:first;padding-block:var(--basalt-space-0-5);margin-block:calc(-1 * var(--basalt-space-0-5));font-family:var(--basalt-font-family-mono);font-size:var(--basalt-text-sm-size);line-height:var(--basalt-text-base-line-height);letter-spacing:0}.release-id{display:inline-block;max-width:100%;overflow-wrap:anywhere;vertical-align:top;text-decoration:underline;text-decoration-color:var(--basalt-border-input);text-decoration-thickness:var(--basalt-size-hairline);text-underline-offset:var(--basalt-size-underline-offset);transition:text-decoration-color var(--basalt-duration-fast) var(--basalt-ease-out)}.release-source:hover .release-id{text-decoration-color:currentColor}.release-action-link{white-space:nowrap}.release-sources{width:var(--basalt-size-popover-max)}.release-sources-list{margin-block:var(--basalt-space-2) var(--basalt-space-4)}.release-mono{font-family:var(--basalt-font-family-mono);font-size:var(--basalt-text-sm-size)}@container (width < 640px){.release-list,.release-action .release-list{grid-template-columns:minmax(0,1fr)}.release-entry{row-gap:var(--basalt-space-0-5);--_release-entry-pad: var(--basalt-space-2)}.release-source-cell{grid-column:1}.release-source{padding-block:calc((var(--basalt-size-control-xs) - var(--basalt-text-sm-line-height)) / 2);margin-block:calc((var(--basalt-text-sm-line-height) - var(--basalt-size-control-xs)) / 2);line-height:var(--basalt-text-sm-line-height);white-space:normal}}@media(pointer:coarse){.release-entry{--_release-entry-pad: var(--basalt-space-3)}.release-source{line-height:var(--basalt-text-base-line-height)}.release-source:before,.release-action-link:after,.release-migrate:after{content:"";position:absolute;top:50%;left:50%;width:max(100%,var(--basalt-size-tap-min));height:var(--basalt-size-tap-min);transform:translate(-50%,-50%)}.release-fold,.release-build .release-fold{min-height:var(--basalt-size-tap-min)}.release>:is(.release-all,.release-section[data-folded]):last-child{margin-bottom:calc((var(--basalt-text-md-line-height) - var(--basalt-size-tap-min)) / 2)}.release>:is(.release-all,.release-section[data-folded]):last-child>.release-fold-panel:not([hidden]){padding-bottom:calc((var(--basalt-size-tap-min) - var(--basalt-text-md-line-height)) / 2)}.release>.release-build:last-child{margin-bottom:calc((var(--basalt-text-base-line-height) - var(--basalt-size-tap-min)) / 2)}.release>.release-build:last-child>.release-fold-panel:not([hidden]){padding-bottom:calc((var(--basalt-size-tap-min) - var(--basalt-text-base-line-height)) / 2)}@container (width < 640px){.release-source{padding-block:calc((var(--basalt-size-control-xs) - var(--basalt-text-base-line-height)) / 2);margin-block:calc((var(--basalt-text-base-line-height) - var(--basalt-size-control-xs)) / 2);line-height:var(--basalt-text-base-line-height)}.release-entry[data-link]:has(.release-source){row-gap:var(--basalt-space-6)}}}@media(pointer:coarse),(width<720px){.release-sources .dlist>div{padding-block:var(--basalt-space-3)}.release-sources .dlist>div:first-child{padding-top:0}.release-sources .dlist>div:last-child{padding-bottom:0}.release-sources dd a{position:relative;display:inline;min-width:0;min-height:0;margin-block:0}.release-sources dd a:after{content:"";position:absolute;inset-block:auto;top:50%;left:50%;width:max(100%,var(--basalt-size-tap-min));height:var(--basalt-size-tap-min);transform:translate(-50%,-50%)}.release-sources dd:has(a)+dd:has(a){margin-top:var(--basalt-space-6)}@container (width < 480px){.release-sources dd:has(a)+dd:has(a){margin-top:calc(var(--basalt-space-6) - var(--basalt-space-0-5))}}}.release-entry[data-arrival]{isolation:isolate}.release .release-entry[data-arrival]{padding-bottom:var(--_release-entry-pad)}:is(.release-entry[data-arrival],.release[data-arrival]>.release-head):before{content:"";position:absolute;z-index:-1;inset:calc(-1 * var(--basalt-space-1)) calc(-1 * var(--basalt-space-2));border-radius:var(--basalt-radius-md);pointer-events:none;background-color:transparent;transition:background-color calc(var(--basalt-duration-slow) * .75) var(--basalt-ease-in)}:is(.release-entry[data-arrived],.release[data-arrived]>.release-head):before{background-color:var(--basalt-plate);transition-duration:var(--basalt-duration-instant)}:is(.release-entry[data-arrived],.release[data-arrived]>.release-head) .release-count{color:var(--basalt-text-secondary)}@media(forced-colors:active){:is(.release-entry[data-arrival],.release[data-arrival]>.release-head):before{display:none}}.release-index-title{margin:0 0 var(--basalt-space-2);font:var(--basalt-font-weight-medium) var(--basalt-text-sm-size) / var(--basalt-text-sm-line-height) var(--basalt-font-family-sans);letter-spacing:var(--basalt-text-sm-tracking)}.release-index-list{display:grid;margin:0;padding:0;list-style:none}.release-index-link{display:flex;align-items:baseline;justify-content:space-between;gap:var(--basalt-space-4);padding-block:var(--basalt-space-1-5);border-radius:var(--basalt-radius-xs);color:var(--basalt-text-secondary);font:var(--basalt-font-weight-regular) var(--basalt-text-sm-size) / var(--basalt-text-sm-line-height) var(--basalt-font-family-sans);font-variant-numeric:tabular-nums;text-decoration:none}.release-index-number{color:var(--basalt-text-primary);font-family:var(--basalt-font-family-mono);letter-spacing:0;overflow-wrap:anywhere}.release-index-number[data-words]{font-family:var(--basalt-font-family-sans)}.release-index-link time{flex:none;color:var(--basalt-text-tertiary)}.release-index-link:hover .release-index-number{text-decoration:underline;text-decoration-thickness:var(--basalt-size-hairline);text-underline-offset:var(--basalt-size-underline-offset)}.release-index-link:focus-visible{outline:var(--basalt-size-focus-width) solid var(--basalt-border-focus);outline-offset:var(--basalt-size-focus-offset)}.release-index[data-release-form=fold]{margin-bottom:var(--basalt-space-8)}.release-index[data-release-form=fold] .release-fold{font:var(--basalt-font-weight-medium) var(--basalt-text-sm-size) / var(--basalt-text-sm-line-height) var(--basalt-font-family-sans)}@media(pointer:coarse){.release-index-link{align-items:center;min-height:var(--basalt-size-tap-min);padding-block:0}}.release-index[data-release-form=fold]{display:none}@container (width < 920px){.pane-layout .release-index[data-release-form=fold]{display:block}.pane:has(>.release-index[data-release-form=pane]){display:none}}@media print{:is(.release-notes,.release-index) .release-fold-panel{content-visibility:visible}:is(.release-notes,.release-index) .release-fold-panel[hidden]{display:flow-root!important;content-visibility:visible}.release-section[data-folded] .release-fold-panel[hidden]{padding-top:var(--basalt-space-2)}.release-copy,.release-notes [data-copy-text],.release-sources,.release-build .btn{display:none}.release-id{text-decoration:none}}} +@layer basalt{.release-notes{--basalt-plate: var(--basalt-plate-0)}.release-action{--basalt-plate: var(--basalt-plate-1)}.release-fold{justify-content:space-between;gap:var(--basalt-space-3)}.release-fold:after{background:var(--basalt-text-secondary)}.release-word{display:none;margin-bottom:var(--basalt-space-1);color:var(--basalt-text-secondary);font:var(--basalt-font-weight-regular) var(--bh-xs);letter-spacing:var(--basalt-text-xs-tracking);white-space:nowrap;opacity:0;visibility:hidden;transition:opacity calc(var(--basalt-duration-slow) * .75) var(--basalt-ease-in),visibility var(--basalt-duration-instant) linear calc(var(--basalt-duration-slow) * .75)}:is(.release-entry[data-arrival]>.release-word,.release[data-arrival]>.release-head .release-word){display:block}:is(.release-entry[data-arrived]>.release-word,.release[data-arrived]>.release-head .release-word){opacity:1;visibility:visible;transition-duration:var(--basalt-duration-instant);transition-delay:var(--basalt-duration-instant)}@media(forced-colors:active){.release-word{color:CanvasText}}@media(prefers-reduced-motion:reduce){.release-word,.release-entry:before,.release-head:before{transition-property:none}}.release-notes{min-width:0;font-family:var(--basalt-font-family-sans);color:var(--basalt-text-primary)}.release{container-type:inline-size;max-width:calc(var(--basalt-size-prose-width) + var(--basalt-space-6) + var(--basalt-size-sidebar-width));padding-block:var(--basalt-space-10);border-top:var(--basalt-size-hairline) solid var(--basalt-border-divider);scroll-margin-top:calc(var(--basalt-sticky-offset, var(--basalt-space-0)) + var(--basalt-space-4))}.release:first-of-type{padding-top:0;border-top:0}.release:last-of-type{padding-bottom:0}.release-notes>.release-build:first-child{max-width:calc(var(--basalt-size-prose-width) + var(--basalt-space-6) + var(--basalt-size-sidebar-width));margin:0 0 var(--basalt-space-6)}.release:focus,.release-entry:focus{outline:none}.release-head{position:relative;isolation:isolate;display:grid;grid-template-columns:minmax(0,1fr) auto;column-gap:var(--basalt-space-4);align-items:center}.release-head-text{display:contents}.release-head-text>*{grid-column:1 / -1;min-width:0}.release-head-text>.release-word{grid-row:1}.release-head-text>:is(.release-number-line,.release-heading:not([data-headline])){grid-column:1;grid-row:2}.release-head-text>.release-heading[data-headline]{grid-row:3}.release-head-text>.release-heading[data-headline]~.release-meta{grid-row:4}.release-head-text>.release-heading:not([data-headline])~.release-meta{grid-row:3}.release-head-text>:not(.release-word)~*{margin-top:var(--basalt-space-1)}.release-head>.release-copy{grid-column:2;grid-row:2;align-self:center;margin-block:calc(-1 * var(--basalt-size-tap-min))}:is(.page,.page>.section)>.release-notes{--basalt-edge-room: var(--basalt-gutter);--basalt-edge-room-start: initial;--basalt-edge-room-end: initial}.release-heading{margin:0;font:var(--basalt-font-weight-semibold) var(--basalt-text-2xl-size) / var(--basalt-text-2xl-line-height) var(--basalt-font-family-sans);letter-spacing:var(--basalt-text-2xl-tracking);text-wrap:balance;overflow-wrap:break-word}.release-version{font-family:var(--basalt-font-family-mono);letter-spacing:0;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}.release-version[data-words]{font-family:var(--basalt-font-family-sans);letter-spacing:var(--basalt-text-2xl-tracking)}.release-meta{margin:0;color:var(--basalt-text-secondary);font:var(--basalt-font-weight-regular) var(--basalt-text-sm-size) / var(--basalt-text-sm-line-height) var(--basalt-font-family-sans);letter-spacing:var(--basalt-text-sm-tracking);font-variant-numeric:tabular-nums}.release-badges{display:inline-flex;gap:var(--basalt-space-2);margin-inline-start:var(--basalt-space-2);vertical-align:middle}.release-action-link{position:relative;z-index:1;color:inherit;text-decoration:underline;text-decoration-color:var(--basalt-border-input);text-decoration-thickness:var(--basalt-size-hairline);text-underline-offset:var(--basalt-size-underline-offset);border-radius:var(--basalt-radius-xs)}.release-action-link:hover{color:var(--basalt-text-primary);text-decoration-color:currentColor}.release-action-link:focus-visible{outline:var(--basalt-size-focus-width) solid var(--basalt-border-focus);outline-offset:var(--basalt-size-focus-offset)}.release-copy{flex:none}.release-summary,.release-paragraph{margin:0;max-width:var(--basalt-size-prose-width);font-size:var(--basalt-text-md-size);line-height:var(--basalt-text-md-line-height);letter-spacing:var(--basalt-text-md-tracking);text-wrap:pretty}.release-summary{margin-top:var(--basalt-space-4)}.release-audience{display:grid;gap:var(--basalt-space-1);margin-top:var(--basalt-space-4)}.release-audience-title{margin:0;font:var(--basalt-font-weight-semibold) var(--basalt-text-md-size) / var(--basalt-text-md-line-height) var(--basalt-font-family-sans);letter-spacing:var(--basalt-text-md-tracking)}.release-action{margin-top:var(--basalt-space-6)}.release-action>div{flex:1;min-width:0}.release-action .release-list{grid-template-columns:minmax(0,calc(var(--basalt-size-prose-width) - var(--basalt-size-hairline) - var(--basalt-space-4) - var(--basalt-size-icon-sm) - var(--basalt-space-3))) minmax(0,max-content)}.release-callout-title{margin:0;font:inherit;letter-spacing:inherit}.release-action .callout-body{color:var(--basalt-text-primary)}.release-upgrade{margin:0 0 var(--basalt-space-2);color:var(--basalt-text-secondary)}.release-section,.release-all{margin-top:var(--basalt-space-6)}.release-section-title{margin:0 0 var(--basalt-space-2);font:var(--basalt-font-weight-semibold) var(--basalt-text-md-size) / var(--basalt-text-md-line-height) var(--basalt-font-family-sans);letter-spacing:var(--basalt-text-md-tracking)}.release-count{margin-inline-start:var(--basalt-space-1);color:var(--basalt-text-tertiary);font-weight:var(--basalt-font-weight-regular);font-variant-numeric:tabular-nums}.release-action .release-count{color:var(--basalt-text-secondary)}.release-all .release-summary,.release-all .release-section:first-child{margin-top:var(--basalt-space-2)}.release-all .release-summary+.release-section{margin-top:var(--basalt-space-4)}.release-all .release-section-title{font-size:var(--basalt-text-base-size);line-height:var(--basalt-text-base-line-height);letter-spacing:var(--basalt-text-base-tracking)}.release-fold{min-height:var(--basalt-text-md-line-height);padding:0;font:var(--basalt-font-weight-semibold) var(--basalt-text-md-size) / var(--basalt-text-md-line-height) var(--basalt-font-family-sans);letter-spacing:var(--basalt-text-md-tracking)}.release-fold-title{margin:0}.release-fold-panel[hidden=until-found]{display:block!important;content-visibility:hidden}.release-section[data-folded] .release-fold-panel:not([hidden]){padding-top:var(--basalt-space-2)}.release-build{margin-top:var(--basalt-space-2)}.release-build .release-fold{min-height:var(--basalt-size-control-xs);font:var(--basalt-font-weight-regular) var(--basalt-text-base-size) / var(--basalt-text-base-line-height) var(--basalt-font-family-sans);letter-spacing:var(--basalt-text-base-tracking)}.release-build-list{margin-block:var(--basalt-space-3)}.release-fold-panel{display:flow-root}.release>.release-build:last-child{margin-bottom:calc((var(--basalt-text-base-line-height) - var(--basalt-size-control-xs)) / 2)}.release>.release-build:last-child>.release-fold-panel:not([hidden]){padding-bottom:calc((var(--basalt-size-control-xs) - var(--basalt-text-base-line-height)) / 2)}.release-list{display:grid;grid-template-columns:minmax(0,var(--basalt-size-prose-width)) minmax(0,max-content);justify-content:start;column-gap:var(--basalt-space-6);margin:0;padding:0;list-style:none}.release-entry{position:relative;display:grid;grid-template-columns:subgrid;grid-column:1 / -1;align-items:baseline;--_release-entry-pad: var(--basalt-space-1-5);padding-block:var(--_release-entry-pad);scroll-margin-top:calc(var(--basalt-sticky-offset, var(--basalt-space-0)) + var(--basalt-space-8))}:where(.release-action .release-list,.release>.release-section:not([data-folded]):last-child>.release-list,.release>.release-all:last-child>.release-fold-panel>.release-section:last-child>.release-list,.release>.release-section[data-folded]:last-child>.release-fold-panel>.release-list)>.release-entry:last-child{padding-bottom:0}.release-word{grid-column:1 / -1}.release-entry-words{grid-column:1;display:grid;justify-items:start;gap:var(--basalt-space-1);min-width:0}.release-entry-text{margin:0;color:var(--basalt-text-primary);font-size:var(--basalt-text-base-size);line-height:var(--basalt-text-base-line-height);letter-spacing:var(--basalt-text-base-tracking);text-wrap:pretty;overflow-wrap:break-word}.release-entry-text code{display:inline-block;max-inline-size:100%}.release-area{font-weight:var(--basalt-font-weight-medium)}.release-migrate{position:relative;font-size:var(--basalt-text-base-size);line-height:var(--basalt-text-base-line-height)}.release-source-cell{grid-column:2;justify-self:start;min-width:0}.release-source-cell:empty{display:none}.release-source{position:relative;margin:0;padding-inline:0;border:0;border-radius:var(--basalt-radius-xs);background:none;color:var(--basalt-text-secondary);text-align:start;cursor:pointer;transition:color var(--basalt-duration-fast) var(--basalt-ease-out)}.release-source:hover{color:var(--basalt-text-primary)}.release-source:focus-visible{outline:var(--basalt-size-focus-width) solid var(--basalt-border-focus);outline-offset:var(--basalt-size-focus-offset)}.release-source{display:inline;baseline-source:first;padding-block:var(--basalt-space-0-5);margin-block:calc(-1 * var(--basalt-space-0-5));font-family:var(--basalt-font-family-mono);font-size:var(--basalt-text-sm-size);line-height:var(--basalt-text-base-line-height);letter-spacing:0}.release-id{display:inline-block;max-width:100%;overflow-wrap:anywhere;vertical-align:top;text-decoration:underline;text-decoration-color:var(--basalt-border-input);text-decoration-thickness:var(--basalt-size-hairline);text-underline-offset:var(--basalt-size-underline-offset);transition:text-decoration-color var(--basalt-duration-fast) var(--basalt-ease-out)}.release-source:hover .release-id{text-decoration-color:currentColor}.release-action-link{white-space:nowrap}.release-sources{width:var(--basalt-size-popover-max)}.release-sources-list{margin-block:var(--basalt-space-2) var(--basalt-space-4)}.release-mono{font-family:var(--basalt-font-family-mono);font-size:var(--basalt-text-sm-size)}@container (width < 640px){.release-list,.release-action .release-list{grid-template-columns:minmax(0,1fr)}.release-entry{row-gap:var(--basalt-space-0-5);--_release-entry-pad: var(--basalt-space-2)}.release-source-cell{grid-column:1}.release-source{padding-block:calc((var(--basalt-size-control-xs) - var(--basalt-text-sm-line-height)) / 2);margin-block:calc((var(--basalt-text-sm-line-height) - var(--basalt-size-control-xs)) / 2);line-height:var(--basalt-text-sm-line-height);white-space:normal}}@media(pointer:coarse){.release-entry{--_release-entry-pad: var(--basalt-space-3)}.release-source{line-height:var(--basalt-text-base-line-height)}.release-source:before,.release-action-link:after,.release-migrate:after{content:"";position:absolute;top:50%;left:50%;width:max(100%,var(--basalt-size-tap-min));height:var(--basalt-size-tap-min);transform:translate(-50%,-50%)}.release-fold,.release-build .release-fold{min-height:var(--basalt-size-tap-min)}.release>:is(.release-all,.release-section[data-folded]):last-child{margin-bottom:calc((var(--basalt-text-md-line-height) - var(--basalt-size-tap-min)) / 2)}.release>:is(.release-all,.release-section[data-folded]):last-child>.release-fold-panel:not([hidden]){padding-bottom:calc((var(--basalt-size-tap-min) - var(--basalt-text-md-line-height)) / 2)}.release>.release-build:last-child{margin-bottom:calc((var(--basalt-text-base-line-height) - var(--basalt-size-tap-min)) / 2)}.release>.release-build:last-child>.release-fold-panel:not([hidden]){padding-bottom:calc((var(--basalt-size-tap-min) - var(--basalt-text-base-line-height)) / 2)}@container (width < 640px){.release-source{padding-block:calc((var(--basalt-size-control-xs) - var(--basalt-text-base-line-height)) / 2);margin-block:calc((var(--basalt-text-base-line-height) - var(--basalt-size-control-xs)) / 2);line-height:var(--basalt-text-base-line-height)}.release-entry[data-link]:has(.release-source){row-gap:var(--basalt-space-6)}}}@media(pointer:coarse),(width<720px){.release-sources .dlist>div{padding-block:var(--basalt-space-3)}.release-sources .dlist>div:first-child{padding-top:0}.release-sources .dlist>div:last-child{padding-bottom:0}.release-sources dd a{position:relative;display:inline;min-width:0;min-height:0;margin-block:0}.release-sources dd a:after{content:"";position:absolute;inset-block:auto;top:50%;left:50%;width:max(100%,var(--basalt-size-tap-min));height:var(--basalt-size-tap-min);transform:translate(-50%,-50%)}.release-sources dd:has(a)+dd:has(a){margin-top:var(--basalt-space-6)}@container (width < 480px){.release-sources dd:has(a)+dd:has(a){margin-top:calc(var(--basalt-space-6) - var(--basalt-space-0-5))}}}.release-entry[data-arrival]{isolation:isolate}.release .release-entry[data-arrival]{padding-bottom:var(--_release-entry-pad)}:is(.release-entry[data-arrival],.release[data-arrival]>.release-head):before{content:"";position:absolute;z-index:-1;inset:calc(-1 * var(--basalt-space-1)) calc(-1 * var(--basalt-space-2));border-radius:var(--basalt-radius-md);pointer-events:none;background-color:transparent;transition:background-color calc(var(--basalt-duration-slow) * .75) var(--basalt-ease-in)}:is(.release-entry[data-arrived],.release[data-arrived]>.release-head):before{background-color:var(--basalt-plate);transition-duration:var(--basalt-duration-instant)}:is(.release-entry[data-arrived],.release[data-arrived]>.release-head) .release-count{color:var(--basalt-text-secondary)}@media(forced-colors:active){:is(.release-entry[data-arrival],.release[data-arrival]>.release-head):before{display:none}}.release-index-title{margin:0 0 var(--basalt-space-2);font:var(--basalt-font-weight-medium) var(--basalt-text-sm-size) / var(--basalt-text-sm-line-height) var(--basalt-font-family-sans);letter-spacing:var(--basalt-text-sm-tracking)}.release-index-list{display:grid;margin:0;padding:0;list-style:none}.release-index-link{display:flex;align-items:baseline;justify-content:space-between;gap:var(--basalt-space-4);padding-block:var(--basalt-space-1-5);border-radius:var(--basalt-radius-xs);color:var(--basalt-text-secondary);font:var(--basalt-font-weight-regular) var(--basalt-text-sm-size) / var(--basalt-text-sm-line-height) var(--basalt-font-family-sans);font-variant-numeric:tabular-nums;text-decoration:none}.release-index-number{color:var(--basalt-text-primary);font-family:var(--basalt-font-family-mono);letter-spacing:0;overflow-wrap:anywhere}.release-index-number[data-words]{font-family:var(--basalt-font-family-sans)}.release-index-link time{flex:none;color:var(--basalt-text-tertiary)}.release-index-link:hover .release-index-number{text-decoration:underline;text-decoration-thickness:var(--basalt-size-hairline);text-underline-offset:var(--basalt-size-underline-offset)}.release-index-link:focus-visible{outline:var(--basalt-size-focus-width) solid var(--basalt-border-focus);outline-offset:var(--basalt-size-focus-offset)}.release-index[data-release-form=fold]{margin-bottom:var(--basalt-space-8)}.release-index[data-release-form=fold] .release-fold{font:var(--basalt-font-weight-medium) var(--basalt-text-sm-size) / var(--basalt-text-sm-line-height) var(--basalt-font-family-sans)}@media(pointer:coarse){.release-index-link{align-items:center;min-height:var(--basalt-size-tap-min);padding-block:0}}.release-index[data-release-form=fold]{display:none}@container (width < 920px){.pane-layout .release-index[data-release-form=fold]{display:block}.pane:has(>.release-index[data-release-form=pane]){display:none}}@media print{:is(.release-notes,.release-index) .release-fold-panel{content-visibility:visible}:is(.release-notes,.release-index) .release-fold-panel[hidden]{display:flow-root!important;content-visibility:visible}.release-section[data-folded] .release-fold-panel[hidden]{padding-top:var(--basalt-space-2)}.release-copy,.release-notes [data-copy-text],.release-sources,.release-build .btn{display:none}.release-id{text-decoration:none}}} diff --git a/.agent/skills/basalt-html/parts/search.css b/.agent/skills/basalt-html/parts/search.css index 93479876..548b118e 100644 --- a/.agent/skills/basalt-html/parts/search.css +++ b/.agent/skills/basalt-html/parts/search.css @@ -1 +1 @@ -@layer basalt{.search{--_control-44: var(--basalt-size-control-2xl)}dialog.search[open]{display:flex;flex-direction:column;width:min(var(--basalt-size-command-width),calc(100vw - 2 * var(--basalt-space-4)));padding:0;overflow:hidden}.search-form{box-sizing:border-box;flex:none;display:flex;align-items:center;gap:var(--basalt-space-1);margin:0;padding:var(--basalt-space-2) var(--basalt-space-2) var(--basalt-space-2) var(--basalt-space-4);border-bottom:var(--basalt-size-hairline) solid var(--basalt-border-divider);border-start-start-radius:var(--basalt-radius-lg);border-start-end-radius:var(--basalt-radius-lg)}.search-form:has(.search-input:focus-visible){outline:var(--basalt-size-focus-width) solid var(--basalt-border-focus);outline-offset:calc(-1 * var(--basalt-size-focus-width))}.search-field{flex:1;min-width:0;display:flex;align-items:center;gap:var(--basalt-space-2-5);color:var(--basalt-text-tertiary)}.search-input{flex:1;min-width:0;height:var(--_control-44);margin:0;padding:0;border:0;border-radius:0;background:transparent;color:var(--basalt-text-primary);font:var(--basalt-font-weight-regular) var(--basalt-text-md-size) / var(--basalt-text-md-line-height) var(--basalt-font-family-sans);outline:none;-webkit-appearance:none;appearance:none}.search-input::placeholder{color:var(--basalt-text-tertiary);opacity:1}.search-input::-webkit-search-cancel-button,.search-input::-webkit-search-decoration,.search-input::-webkit-search-results-button{-webkit-appearance:none;appearance:none;display:none}.search-input::-ms-clear{display:none}.search-close{--_h: var(--_control-44);border-radius:var(--basalt-radius-md);flex:none}.search-count{box-sizing:border-box;flex:none;min-height:calc(var(--basalt-space-3) + var(--basalt-text-sm-line-height) + var(--basalt-space-1));margin:0;padding:var(--basalt-space-3) var(--basalt-space-4) var(--basalt-space-1);font-size:var(--basalt-text-sm-size);line-height:var(--basalt-text-sm-line-height);color:var(--basalt-text-tertiary)}.search-results{--_floor: var(--basalt-space-12);--_logo-row: max(var(--_floor), calc(var(--basalt-size-search-logo-height) + 2 * var(--basalt-space-1-5)));--_pack-row: max(var(--_floor), calc(var(--basalt-size-search-pack-height) + 2 * var(--basalt-space-1-5)));box-sizing:border-box;flex:0 1 auto;min-height:0;height:calc(var(--basalt-space-1) + var(--basalt-space-2-5) + var(--_logos, 3) * var(--_logo-row) + var(--_packs, 5) * var(--_pack-row) + var(--_alls, 1) * var(--_floor));margin:0;padding:var(--basalt-space-1) var(--basalt-space-2) var(--basalt-space-2-5);list-style:none;overflow-y:auto;overscroll-behavior:contain;scroll-padding-block:var(--basalt-space-1-5)}.search-results>li{margin:0;padding:0;list-style:none}.search-result{position:relative;isolation:isolate;box-sizing:border-box;display:flex;align-items:center;gap:var(--basalt-space-3);min-height:var(--basalt-space-12);padding:var(--basalt-space-1-5) var(--basalt-space-2);border-radius:var(--basalt-radius-md);color:var(--basalt-text-primary);font:var(--basalt-font-weight-medium) var(--basalt-text-md-size) / var(--basalt-text-md-line-height) var(--basalt-font-family-sans);text-decoration:none}.search-result:before{content:"";position:absolute;z-index:-1;inset-block:0;inset-inline:calc(-1 * var(--basalt-space-2))}@media(hover:hover){.search-result:hover:before{background:var(--basalt-state-hover)}}.search-result:focus-visible{outline:var(--basalt-size-focus-width) solid var(--basalt-border-focus);outline-offset:var(--basalt-size-focus-offset)}.search-media{position:relative;flex:none;display:block;width:var(--basalt-size-search-pack-width);height:var(--basalt-size-search-pack-height)}.search-media[data-shape=logo]{width:var(--basalt-size-search-logo-width);height:var(--basalt-size-search-logo-height)}.search-name{flex:1;min-width:0;display:flex;flex-direction:column}.search-title,.search-detail{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.search-detail{font-size:var(--basalt-text-sm-size);line-height:var(--basalt-text-sm-line-height);font-weight:var(--basalt-font-weight-regular);color:var(--basalt-text-tertiary)}.search-trailing{flex:none;font-weight:var(--basalt-font-weight-regular);font-variant-numeric:tabular-nums}.search-result[data-centered]{justify-content:center}.search-result[data-centered] .search-name{flex:none}} +@layer basalt{.search{--_control-44: var(--basalt-size-control-2xl)}dialog.search[data-held]{inset-block:var(--_top) auto;margin-block:0;max-height:calc(var(--_room, 100dvh) - var(--_top) - var(--basalt-space-4))}dialog.search[open]{display:flex;flex-direction:column;width:min(var(--basalt-size-command-width),calc(100vw - 2 * var(--basalt-space-4)));padding:0;overflow:hidden}.search-form{box-sizing:border-box;flex:none;display:flex;align-items:center;gap:var(--basalt-space-1);margin:0;padding-block:var(--basalt-space-2);padding-inline:var(--basalt-space-4);--basalt-edge-room: var(--basalt-space-4);--basalt-edge-room-start: initial;--basalt-edge-room-end: initial;border-bottom:var(--basalt-size-hairline) solid var(--basalt-border-divider);border-start-start-radius:var(--basalt-radius-lg);border-start-end-radius:var(--basalt-radius-lg)}.search-form:has(.search-input:focus-visible){outline:var(--basalt-size-focus-width) solid var(--basalt-border-focus);outline-offset:calc(-1 * var(--basalt-size-focus-width))}.search-field{flex:1;min-width:0;display:flex;align-items:center;gap:var(--basalt-space-2-5);color:var(--basalt-text-tertiary)}.search-input{flex:1;min-width:0;height:var(--_control-44);margin:0;padding:0;border:0;border-radius:0;background:transparent;color:var(--basalt-text-primary);font:var(--basalt-font-weight-regular) var(--basalt-text-md-size) / var(--basalt-text-md-line-height) var(--basalt-font-family-sans);outline:none;-webkit-appearance:none;appearance:none}.search-input::placeholder{color:var(--basalt-text-tertiary);opacity:1}.search-input::-webkit-search-cancel-button,.search-input::-webkit-search-decoration,.search-input::-webkit-search-results-button{-webkit-appearance:none;appearance:none;display:none}.search-input::-ms-clear{display:none}.search-close{--_h: var(--_control-44);border-radius:var(--basalt-radius-md);flex:none}.search-count{box-sizing:border-box;flex:none;min-height:calc(var(--basalt-space-3) + var(--basalt-text-sm-line-height) + var(--basalt-space-1));margin:0;padding:var(--basalt-space-3) var(--basalt-space-4) var(--basalt-space-1);font-size:var(--basalt-text-sm-size);line-height:var(--basalt-text-sm-line-height);color:var(--basalt-text-tertiary)}.search-results{--_floor: var(--basalt-space-12);--_logo-row: max(var(--_floor), calc(var(--basalt-size-search-logo-height) + 2 * var(--basalt-space-1-5)));--_pack-row: max(var(--_floor), calc(var(--basalt-size-search-pack-height) + 2 * var(--basalt-space-1-5)));box-sizing:border-box;flex:0 1 auto;min-height:0;max-height:calc(var(--basalt-space-1) + var(--basalt-space-2-5) + var(--_logos, 3) * var(--_logo-row) + var(--_packs, 5) * var(--_pack-row) + var(--_alls, 1) * var(--_floor));margin:0;padding:var(--basalt-space-1) var(--basalt-space-2) var(--basalt-space-2-5);list-style:none;overflow-y:auto;overscroll-behavior:contain;scroll-padding-block:var(--basalt-space-1-5)}.search-results:not(:has(>li)){padding-block:0}.search-results>li{margin:0;padding:0;list-style:none}.search-result{position:relative;isolation:isolate;box-sizing:border-box;display:flex;align-items:center;gap:var(--basalt-space-3);min-height:var(--basalt-space-12);padding:var(--basalt-space-1-5) var(--basalt-space-2);border-radius:var(--basalt-radius-md);color:var(--basalt-text-primary);font:var(--basalt-font-weight-medium) var(--basalt-text-md-size) / var(--basalt-text-md-line-height) var(--basalt-font-family-sans);text-decoration:none}.search-result:before{content:"";position:absolute;z-index:-1;inset-block:0;inset-inline:calc(-1 * var(--basalt-space-2))}@media(hover:hover){.search-result:hover:before{background:var(--basalt-state-hover)}}.search-result:focus-visible{outline:var(--basalt-size-focus-width) solid var(--basalt-border-focus);outline-offset:var(--basalt-size-focus-offset)}.search-media{position:relative;flex:none;display:block;width:var(--basalt-size-search-pack-width);height:var(--basalt-size-search-pack-height)}.search-media[data-shape=logo]{width:var(--basalt-size-search-logo-width);height:var(--basalt-size-search-logo-height)}.search-name{flex:1;min-width:0;display:flex;flex-direction:column}.search-title,.search-detail{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.search-detail{font-size:var(--basalt-text-sm-size);line-height:var(--basalt-text-sm-line-height);font-weight:var(--basalt-font-weight-regular);color:var(--basalt-text-tertiary)}.search-trailing{flex:none;font-weight:var(--basalt-font-weight-regular);font-variant-numeric:tabular-nums}.search-result[data-centered]{justify-content:center}.search-result[data-centered] .search-name{flex:none}} diff --git a/.agent/skills/basalt-html/parts/search.js b/.agent/skills/basalt-html/parts/search.js new file mode 100644 index 00000000..afa14eda --- /dev/null +++ b/.agent/skills/basalt-html/parts/search.js @@ -0,0 +1 @@ +(function(s){"use strict";function l(){return window.visualViewport?window.visualViewport.height:innerHeight}function a(e){e.removeAttribute("data-held"),e.style.removeProperty("--_top"),e.style.removeProperty("--_room");var t=l(),r=Math.min(parseFloat(getComputedStyle(e).maxHeight)||t,t),o=e.querySelector(".search-results"),n=o?parseFloat(getComputedStyle(o).maxHeight)-o.offsetHeight:0,u=Math.min(e.offsetHeight+(n>0?n:0),r),h=Math.max((t-r)/2,Math.round((t-u)/2));e.style.setProperty("--_top",Math.max(0,Math.min(h,t-u))+"px"),e.style.setProperty("--_room",t+"px"),e.setAttribute("data-held","")}function i(){document.querySelectorAll("dialog.search[open]").forEach(a)}s._.step(131,"searchTop",function(){new MutationObserver(function(e){e.forEach(function(t){var r=t.target;r.matches("dialog.search")&&r.open&&t.oldValue===null&&a(r)})}).observe(document.documentElement,{subtree:!0,attributes:!0,attributeFilter:["open"],attributeOldValue:!0}),addEventListener("resize",i),window.visualViewport&&window.visualViewport.addEventListener("resize",i)})})(window.Basalt); diff --git a/.agent/skills/basalt-html/parts/selection.css b/.agent/skills/basalt-html/parts/selection.css index 6cca8cd4..e3496d7d 100644 --- a/.agent/skills/basalt-html/parts/selection.css +++ b/.agent/skills/basalt-html/parts/selection.css @@ -1 +1 @@ -@layer basalt{.select-col{box-sizing:border-box;width:var(--basalt-size-control-md);padding-inline:var(--basalt-space-2)}.select-col input[type=checkbox]{display:flex}@media(pointer:coarse),(width<720px){.select-col input[type=checkbox]{position:relative}.select-col input[type=checkbox]:after{content:"";position:absolute;inset:calc((var(--basalt-size-choice) - var(--basalt-size-tap-min)) / 2)}}} +@layer basalt{:root{--basalt-select-column: var(--basalt-size-control-md)}@media(pointer:coarse),(width<720px){:root{--basalt-select-column: var(--basalt-size-tap-min)}}.select-col{box-sizing:border-box;width:var(--basalt-select-column);padding-inline:0}.select-col input[type=checkbox]{display:flex;margin-inline:min(var(--basalt-space-4),calc((100% - var(--basalt-size-choice)) / 2)) auto}@media(pointer:coarse),(width<720px){.select-col input[type=checkbox]{position:relative}.select-col input[type=checkbox]:after{content:"";position:absolute;inset:calc((var(--basalt-size-choice) - var(--basalt-size-tap-min)) / 2)}}} diff --git a/.agent/skills/basalt-html/parts/sheet.css b/.agent/skills/basalt-html/parts/sheet.css index 87dc8a42..f85c4453 100644 --- a/.agent/skills/basalt-html/parts/sheet.css +++ b/.agent/skills/basalt-html/parts/sheet.css @@ -1 +1 @@ -@layer basalt{dialog.sheet{--_dur: var(--basalt-duration-slower);--_bin: var(--basalt-duration-slow);--_bout: calc(var(--basalt-duration-slower) * .75);--_safe-top: env(safe-area-inset-top, var(--basalt-space-0));--_pad: var(--basalt-space-6);margin:0;height:auto;max-height:none;padding:max(var(--_pad),var(--_safe-top)) max(var(--_pad),env(safe-area-inset-right,var(--basalt-space-0))) max(var(--_pad),env(safe-area-inset-bottom,var(--basalt-space-0))) max(var(--_pad),env(safe-area-inset-left,var(--basalt-space-0)));border:0;border-radius:0;opacity:1}dialog.sheet[open]{display:flex;flex-direction:column}.sheet[data-side=right],.sheet[data-side=left]{top:0;bottom:0;width:min(var(--basalt-size-sheet-width),100%)}.sheet[data-side=right]{inset-inline:auto 0;border-left:var(--basalt-size-hairline) solid var(--basalt-border-rim);transform:translate(100%)}.sheet[data-side=left]{inset-inline:0 auto;border-right:var(--basalt-size-hairline) solid var(--basalt-border-rim);transform:translate(-100%)}.sheet[data-side=bottom]{inset:auto 0 0;width:auto;max-height:90dvh;border-radius:var(--basalt-radius-xl) var(--basalt-radius-xl) 0 0;border-top:var(--basalt-size-hairline) solid var(--basalt-border-rim-top);transform:translateY(100%)}.sheet[open]{transform:none}@starting-style{dialog.sheet[open]{opacity:1;transform:translate(100%)}}@starting-style{dialog.sheet[data-side=left][open]{transform:translate(-100%)}}@starting-style{dialog.sheet[data-side=bottom][open]{transform:translateY(100%)}}dialog.sheet[data-side=top]{--_reach: calc(-1 * var(--basalt-space-16));--_bin: var(--basalt-duration-slower);inset:0 0 auto;width:auto;max-height:100dvh;padding:0;padding-top:var(--_safe-top);overscroll-behavior:contain;border-bottom:var(--basalt-size-hairline) solid var(--basalt-border-rim);border-radius:0 0 var(--basalt-radius-xl) var(--basalt-radius-xl);transform:none;clip-path:inset(0 var(--_reach) calc(100% - var(--basalt-size-header) - var(--_safe-top)) var(--_reach))}dialog.sheet[data-side=top][open]{clip-path:inset(0 var(--_reach) var(--_reach) var(--_reach))}@starting-style{dialog.sheet[data-side=top][open]{opacity:1;transform:none;clip-path:inset(0 var(--_reach) calc(100% - var(--basalt-size-header) - var(--_safe-top)) var(--_reach))}}.sheet-band{box-sizing:border-box;display:flex;align-items:center;flex:none;height:var(--basalt-size-header);padding:var(--basalt-size-hairline) max(var(--basalt-gutter),env(safe-area-inset-right,var(--basalt-space-0))) 0 max(var(--basalt-gutter),env(safe-area-inset-left,var(--basalt-space-0)));border-bottom:var(--basalt-size-hairline) solid var(--basalt-border-divider)}.sheet>.dialog-actions{position:sticky;bottom:calc(-1*max(var(--_pad),env(safe-area-inset-bottom,var(--basalt-space-0))));margin:auto calc(-1 * var(--_pad)) calc(-1*max(var(--_pad),env(safe-area-inset-bottom,var(--basalt-space-0))));padding:calc(var(--basalt-space-4) + var(--basalt-space-1-5)) var(--_pad) max(var(--_pad),env(safe-area-inset-bottom,var(--basalt-space-0)));background:var(--panel-bg);box-shadow:inset 0 calc(var(--basalt-space-1-5) + var(--basalt-size-hairline)) 0 var(--basalt-border-divider);clip-path:inset(var(--basalt-space-1-5) 0 0 0)}.sheet-head{--_control-44: var(--basalt-size-control-2xl)}dialog.sheet:has(>.sheet-head,>.sheet-body,>.sheet-foot){padding:0;overflow:hidden}.sheet-head{box-sizing:border-box;flex:none;display:flex;align-items:center;justify-content:space-between;gap:var(--basalt-space-3);padding:max(var(--basalt-space-3),env(safe-area-inset-top,var(--basalt-space-0))) max(var(--basalt-space-3),env(safe-area-inset-right,var(--basalt-space-0))) var(--basalt-space-3) max(var(--basalt-space-5),env(safe-area-inset-left,var(--basalt-space-0)));border-bottom:var(--basalt-size-hairline) solid var(--basalt-border-divider)}.sheet-head-text{flex:1;min-width:0}.sheet-head .dialog-title{font:var(--basalt-font-weight-semibold) var(--basalt-text-xl-size) / var(--basalt-text-xl-line-height) var(--basalt-font-family-sans);letter-spacing:var(--basalt-text-xl-tracking)}.sheet-head .dialog-description{margin:0;font-size:var(--basalt-text-sm-size);line-height:var(--basalt-text-sm-line-height);color:var(--basalt-text-tertiary)}.sheet-close{--_h: var(--_control-44);border-radius:var(--basalt-radius-md);flex:none}.sheet-body{flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding-inline:max(var(--basalt-space-5),env(safe-area-inset-left,var(--basalt-space-0))) max(var(--basalt-space-5),env(safe-area-inset-right,var(--basalt-space-0)));padding-block:var(--basalt-space-1-5)}.sheet-foot{box-sizing:border-box;flex:none;padding:var(--basalt-space-4) max(var(--basalt-space-5),env(safe-area-inset-right,var(--basalt-space-0))) max(var(--basalt-space-5),env(safe-area-inset-bottom,var(--basalt-space-0))) max(var(--basalt-space-5),env(safe-area-inset-left,var(--basalt-space-0)));border-top:var(--basalt-size-hairline) solid var(--basalt-border-divider)}@media(prefers-reduced-motion:reduce){dialog.sheet{transform:none;opacity:0;clip-path:none}dialog.sheet[open]{opacity:1}@starting-style{dialog.sheet[open],dialog.sheet[data-side][open]{transform:none;opacity:0;clip-path:none}}dialog.sheet[data-side=top],dialog.sheet[data-side=top][open]{clip-path:none}}@media(forced-colors:active){.sheet-band,.sheet-head{border-bottom-color:CanvasText}.sheet-foot{border-top-color:CanvasText}}} +@layer basalt{dialog.sheet{--_dur: var(--basalt-duration-slower);--_bin: var(--basalt-duration-slow);--_bout: calc(var(--basalt-duration-slower) * .75);--_safe-top: env(safe-area-inset-top, var(--basalt-space-0));--_pad: var(--basalt-space-6);margin:0;height:auto;max-height:none;padding-block:max(var(--_pad),var(--_safe-top)) max(var(--_pad),env(safe-area-inset-bottom,var(--basalt-space-0)));padding-inline:max(var(--_pad),var(--bh-inset-start)) max(var(--_pad),var(--bh-inset-end));border:0;border-radius:0;opacity:1}dialog.sheet[open]{display:flex;flex-direction:column}.sheet[data-side=right],.sheet[data-side=left]{top:0;bottom:0;width:min(var(--basalt-size-sheet-width),100%)}.sheet[data-side=right]{inset-inline:auto 0;border-left:var(--basalt-size-hairline) solid var(--basalt-border-rim);transform:translate(100%)}.sheet[data-side=left]{inset-inline:0 auto;border-right:var(--basalt-size-hairline) solid var(--basalt-border-rim);transform:translate(-100%)}.sheet[data-side=bottom]{inset:auto 0 0;width:auto;max-height:90dvh;border-radius:var(--basalt-radius-xl) var(--basalt-radius-xl) 0 0;border-top:var(--basalt-size-hairline) solid var(--basalt-border-rim-top);transform:translateY(100%)}.sheet[open]{transform:none}@starting-style{dialog.sheet[open]{opacity:1;transform:translate(100%)}}@starting-style{dialog.sheet[data-side=left][open]{transform:translate(-100%)}}@starting-style{dialog.sheet[data-side=bottom][open]{transform:translateY(100%)}}dialog.sheet[data-side=top]{--_reach: calc(-1 * var(--basalt-space-16));--_bin: var(--basalt-duration-slower);inset:0 0 auto;width:auto;max-height:100dvh;padding:0;padding-top:var(--_safe-top);overscroll-behavior:contain;border-bottom:var(--basalt-size-hairline) solid var(--basalt-border-rim);border-radius:0 0 var(--basalt-radius-xl) var(--basalt-radius-xl);transform:none;clip-path:inset(0 var(--_reach) calc(100% - var(--basalt-size-header) - var(--_safe-top)) var(--_reach))}dialog.sheet[data-side=top][open]{clip-path:inset(0 var(--_reach) var(--_reach) var(--_reach))}@starting-style{dialog.sheet[data-side=top][open]{opacity:1;transform:none;clip-path:inset(0 var(--_reach) calc(100% - var(--basalt-size-header) - var(--_safe-top)) var(--_reach))}}.sheet-band{box-sizing:border-box;display:flex;align-items:center;flex:none;height:var(--basalt-size-header);padding-block:var(--basalt-size-hairline) 0;padding-inline:max(var(--basalt-gutter),var(--bh-inset-start)) max(var(--basalt-gutter),var(--bh-inset-end));--basalt-edge-room-end: calc(max(var(--basalt-gutter), var(--bh-inset-end)) - var(--bh-inset-end));--basalt-edge-room: initial;--basalt-edge-room-start: initial;border-bottom:var(--basalt-size-hairline) solid var(--basalt-border-divider)}.sheet>.dialog-actions{position:sticky;bottom:calc(-1*max(var(--_pad),env(safe-area-inset-bottom,var(--basalt-space-0))));margin:auto calc(-1 * var(--_pad)) calc(-1*max(var(--_pad),env(safe-area-inset-bottom,var(--basalt-space-0))));padding:calc(var(--basalt-space-4) + var(--basalt-space-1-5)) var(--_pad) max(var(--_pad),env(safe-area-inset-bottom,var(--basalt-space-0)));background:var(--panel-bg);box-shadow:inset 0 calc(var(--basalt-space-1-5) + var(--basalt-size-hairline)) 0 var(--basalt-border-divider);clip-path:inset(var(--basalt-space-1-5) 0 0 0)}.sheet-head{--_control-44: var(--basalt-size-control-2xl)}dialog.sheet:has(>.sheet-head,>.sheet-body,>.sheet-foot){padding:0;overflow:hidden}.sheet-head{box-sizing:border-box;flex:none;display:flex;align-items:center;justify-content:space-between;gap:var(--basalt-space-3);padding-block:max(var(--basalt-space-3),env(safe-area-inset-top,var(--basalt-space-0))) var(--basalt-space-3);padding-inline:max(var(--basalt-space-5),var(--bh-inset-start)) max(var(--basalt-space-5),var(--bh-inset-end));--basalt-edge-room-end: calc(max(var(--basalt-space-5), var(--bh-inset-end)) - var(--bh-inset-end));--basalt-edge-room: initial;--basalt-edge-room-start: initial;border-bottom:var(--basalt-size-hairline) solid var(--basalt-border-divider)}.sheet-head-text{flex:1;min-width:0}.sheet-head .dialog-title{font:var(--basalt-font-weight-semibold) var(--basalt-text-xl-size) / var(--basalt-text-xl-line-height) var(--basalt-font-family-sans);letter-spacing:var(--basalt-text-xl-tracking)}.sheet-head .dialog-description{margin:0;font-size:var(--basalt-text-sm-size);line-height:var(--basalt-text-sm-line-height);color:var(--basalt-text-tertiary)}.sheet-close{--_h: var(--_control-44);width:var(--_h);padding:0;border-radius:var(--basalt-radius-md);flex:none}.sheet-body{flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding-inline:max(var(--basalt-space-5),var(--bh-inset-start)) max(var(--basalt-space-5),var(--bh-inset-end));padding-block:var(--basalt-space-1-5)}.sheet-foot{box-sizing:border-box;flex:none;padding-block:var(--basalt-space-4) max(var(--basalt-space-5),env(safe-area-inset-bottom,var(--basalt-space-0)));padding-inline:max(var(--basalt-space-5),var(--bh-inset-start)) max(var(--basalt-space-5),var(--bh-inset-end));border-top:var(--basalt-size-hairline) solid var(--basalt-border-divider)}@media(prefers-reduced-motion:reduce){dialog.sheet{transform:none;opacity:0;clip-path:none}dialog.sheet[open]{opacity:1}@starting-style{dialog.sheet[open],dialog.sheet[data-side][open]{transform:none;opacity:0;clip-path:none}}dialog.sheet[data-side=top],dialog.sheet[data-side=top][open]{clip-path:none}}@media(forced-colors:active){.sheet-band,.sheet-head{border-bottom-color:CanvasText}.sheet-foot{border-top-color:CanvasText}}} diff --git a/.agent/skills/basalt-html/parts/still-table.js b/.agent/skills/basalt-html/parts/still-table.js index 08ecef2b..dfac83a6 100644 --- a/.agent/skills/basalt-html/parts/still-table.js +++ b/.agent/skills/basalt-html/parts/still-table.js @@ -1 +1 @@ -(function(k){"use strict";var w=k._;function W(n,f){var r=n.children[f];if(!r||r.hasAttribute("data-not-observed"))return null;var i=r.hasAttribute("data-value")?r.getAttribute("data-value"):r.textContent.trim();return i===""?null:i}function S(n){var f=n.__bhN||0;Array.prototype.forEach.call(n.tBodies[0]?n.tBodies[0].rows:[],function(r){r.__bhI==null&&(r.__bhI=f++)}),n.__bhN=f}function O(n,f,r,i){var a=n.tBodies[0];if(a){S(n);var p=Array.prototype.filter.call(a.rows,function(o){return!o.hasAttribute("data-empty")}),l=Array.prototype.filter.call(a.rows,function(o){return o.hasAttribute("data-empty")}),u=r==="ascending"?1:-1,c=new Intl.Collator(void 0,{numeric:!0,sensitivity:"base"}),v=p.map(function(o){var s=r?W(o,f):null;return{row:o,i:o.__bhI,v:s,n:i&&s!==null?parseFloat(String(s).replace(/[^\d.eE+-]/g,"")):NaN}});v.sort(function(o,s){if(o.v===null||s.v===null)return o.v===s.v?o.i-s.i:o.v===null?1:-1;var m=i&&!isNaN(o.n)&&!isNaN(s.n)?o.n-s.n:c.compare(o.v,s.v);return m?u*m:o.i-s.i}),v.forEach(function(o){a.appendChild(o.row)}),l.forEach(function(o){a.appendChild(o)})}}function F(n){var f=n.tHead&&n.tHead.rows[0];f&&Array.prototype.forEach.call(f.cells,function(r,i){if(!(!r.hasAttribute("data-sortable")||r.__bhSort)){r.__bhSort=!0,r.hasAttribute("scope")||r.setAttribute("scope","col");var a=document.createElement("button");a.type="button",a.className="sort";var p=document.createElement("span");p.className="sort-label",Array.prototype.slice.call(r.childNodes).forEach(function(u){u.classList&&u.classList.contains("explainer")||p.appendChild(u)});var l=document.createElement("span");l.className="sort-seat",l.setAttribute("aria-hidden","true"),l.innerHTML=w.icon("CaretUpDown")+w.glyph("arrow-up")+w.glyph("arrow-down"),["sort-caret","sort-up","sort-down"].forEach(function(u,c){l.children[c].classList.add(u)}),a.appendChild(p),a.appendChild(l),r.insertBefore(a,r.firstChild),a.addEventListener("click",function(){var u=r.getAttribute("aria-sort"),c=r.getAttribute("data-first-sort")||(r.hasAttribute("data-numeric")?"descending":"ascending"),v=u?u===c?c==="ascending"?"descending":"ascending":null:c,o=r.dispatchEvent(new CustomEvent("sortchange",{bubbles:!0,cancelable:!0,detail:{index:i,direction:v}}));Array.prototype.forEach.call(f.cells,function(s){s.removeAttribute("aria-sort")}),v&&r.setAttribute("aria-sort",v),o&&O(n,i,v,r.hasAttribute("data-numeric"))})}})}function H(n){var f=parseInt(n.getAttribute("data-pinned"),10),r=n.closest(".table-wrap"),i=n.rows[0];if(!(!(f>0)||!r||!i)){var a=function(){for(var l=0,u=1;u<=f;u++)l+=i.children[u-1].getBoundingClientRect().width,n.style.setProperty(u===f?"--_pin-end":"--_pin-"+u,l+"px");r.style.scrollPaddingInlineStart=l+"px"};a(),new ResizeObserver(a).observe(n);var p=function(){r.toggleAttribute("data-scrolled",Math.abs(r.scrollLeft)>0)};p(),r.addEventListener("scroll",p,{passive:!0}),r.addEventListener("focusin",function(l){if(l.target.matches(":focus-visible")){var u=l.target.closest&&l.target.closest("td, th"),c=u&&u.parentElement;if(!(!u||!c||c.hasAttribute("data-empty")||Array.prototype.indexOf.call(c.children,u)<f)){var v=c.children[f-1].getBoundingClientRect(),o=u.getBoundingClientRect(),s=getComputedStyle(r).direction==="rtl"?-1:1,m=r.getBoundingClientRect(),h=s===1?v.right-o.left:o.right-v.left,A=s===1?o.right-(m.left+r.clientLeft+r.clientWidth):m.left+r.clientLeft-o.left;h>0?r.scrollLeft-=s*h:A>0&&(r.scrollLeft+=s*Math.min(A,-h))}}})}}function I(n){var f='a[href], button, input, select, textarea, summary, [tabindex], [role="checkbox"], [role="button"]',r=["fontFamily","fontSize","fontWeight","fontVariantNumeric","letterSpacing","wordSpacing","lineHeight","color"],i=null,a=null,p=null,l=null,u=0,c=0,v=0,o=-1e9,s=!1;function m(t){var e=t.children.length===1&&t.childNodes.length===1?t.children[0]:null;return e&&getComputedStyle(e).display==="block"&&getComputedStyle(e).overflowX!=="visible"?e:t}var h=null;function A(t){var e=m(t),d=getComputedStyle(e);return e.scrollWidth>e.clientWidth?!0:(h=h||document.createRange(),h.selectNodeContents(e),h.getBoundingClientRect().width>e.clientWidth-parseFloat(d.paddingLeft)-parseFloat(d.paddingRight)+.5)}function N(){v=0,n.querySelectorAll("tbody > tr:not([data-empty]) > :is(td, th), thead > tr > th:not([data-sortable])").forEach(function(t){var e=t.hasAttribute("tabindex")&&!t.hasAttribute("data-cut")||t.querySelector(f);if(!e){var d=A(t);d&&!t.hasAttribute("data-cut")?(t.setAttribute("data-cut",""),t.setAttribute("tabindex","0")):!d&&t.hasAttribute("data-cut")&&(t.removeAttribute("data-cut"),t.removeAttribute("tabindex"),a===t&&C())}})}function b(){v||(v=requestAnimationFrame(N))}function z(){return i||(i=document.createElement("div"),i.className="cell-peek",i.setAttribute("aria-hidden","true"),i.addEventListener("pointerenter",function(){clearTimeout(c),s=!0}),i.addEventListener("pointerleave",function(t){s=!1,t.relatedTarget instanceof Node&&a&&a.contains(t.relatedTarget)||(p=null),L()}),document.body.appendChild(i),i)}function T(){if(!(!i||!a)){var t=a.getBoundingClientRect(),e=(a.closest(".table-wrap")||n).getBoundingClientRect(),d=getComputedStyle(a).direction==="rtl",g=document.documentElement,y="var(--basalt-space-2)",R="calc("+g.clientWidth+"px - 2 * "+y+")";i.style.minWidth="min("+t.width+"px, "+R+")",i.style.minHeight=t.height+"px",i.style.maxWidth="min(max("+t.width+"px, "+(d?t.right-e.left:e.right-t.left)+"px), "+R+")",i.style.left="0px",i.style.top="0px";var _=i.getBoundingClientRect();i.style.left="max("+y+", min("+(d?t.right-_.width:t.left)+"px, calc("+(g.clientWidth-_.width)+"px - "+y+")))",i.style.top="max("+y+", min("+t.top+"px, calc("+(g.clientHeight-_.height)+"px - "+y+")))"}}function E(t){if(clearTimeout(u),clearTimeout(c),l!==t){var e=getComputedStyle(t),d=z();d.textContent=t.textContent.trim(),r.forEach(function(g){d.style[g]=e[g]}),d.style.paddingInline="calc("+e.paddingLeft+" - var(--basalt-size-hairline)) calc("+e.paddingRight+" - var(--basalt-size-hairline))",d.style.paddingBlock="0px",d.toggleAttribute("data-focus",document.activeElement===t&&t.matches(":focus-visible")),a=t,T(),d.setAttribute("data-open","")}}function C(){if(clearTimeout(u),clearTimeout(c),!a||!i){a=null;return}i.removeAttribute("data-open"),i.removeAttribute("data-focus"),a=null,o=performance.now()}function L(){clearTimeout(c),c=setTimeout(function(){var t=document.activeElement,e=t&&t.hasAttribute&&t.hasAttribute("data-cut")&&n.contains(t)?t:null;if(e){a!==e&&E(e);return}p&&a===p||s||C()},100)}function x(t){var e=t instanceof Element?t.closest("[data-cut]"):null;return e&&n.contains(e)?e:null}n.addEventListener("pointerover",function(t){var e=x(t.target);!e||e===p||(p=e,clearTimeout(u),clearTimeout(c),a!==e&&(a||performance.now()-o<400?E(e):u=setTimeout(function(){E(e)},600)))}),n.addEventListener("pointerout",function(t){var e=x(t.target);if(!(!e||e!==p)){var d=t.relatedTarget;d instanceof Node&&(e.contains(d)||i&&i.contains(d))||(p=null,clearTimeout(u),l===e&&(l=null),L())}}),n.addEventListener("focusin",function(t){var e=x(t.target);e&&(l&&l!==e&&(l=null),E(e))}),n.addEventListener("focusout",function(t){var e=x(t.target);e&&(l===e&&(l=null),L())}),window.addEventListener("keydown",function(t){t.key!=="Escape"||!a||(l=a,C(),t.stopPropagation())},!0),window.addEventListener("scroll",function(){a&&T()},{capture:!0,passive:!0}),new ResizeObserver(b).observe(n),new MutationObserver(b).observe(n,{childList:!0,subtree:!0,characterData:!0});var B=new MutationObserver(b);B.observe(document.head,{childList:!0,subtree:!0,characterData:!0}),B.observe(document.documentElement,{attributes:!0,attributeFilter:["style","class","lang","dir"]}),window.addEventListener("resize",b),document.fonts&&document.fonts.ready.then(b),N()}w.step(65,"stillTable",function(){document.querySelectorAll("table[data-fixed]").forEach(function(n){n.__bhStill||(n.__bhStill=!0,S(n),F(n),H(n),I(n))})})})(window.Basalt); +(function(k){"use strict";var w=k._;function H(n,c){var r=n.children[c];if(!r||r.hasAttribute("data-not-observed"))return null;var a=r.hasAttribute("data-value")?r.getAttribute("data-value"):r.textContent.trim();return a===""?null:a}function _(n){var c=n.__bhN||0;Array.prototype.forEach.call(n.tBodies[0]?n.tBodies[0].rows:[],function(r){r.__bhI==null&&(r.__bhI=c++)}),n.__bhN=c}function O(n,c,r,a){var i=n.tBodies[0];if(i){_(n);var d=Array.prototype.filter.call(i.rows,function(l){return!l.hasAttribute("data-empty")}),o=Array.prototype.filter.call(i.rows,function(l){return l.hasAttribute("data-empty")}),u=r==="ascending"?1:-1,f=new Intl.Collator(void 0,{numeric:!0,sensitivity:"base"}),v=d.map(function(l){var s=r?H(l,c):null;return{row:l,i:l.__bhI,v:s,n:a&&s!==null?parseFloat(String(s).replace(/[^\d.eE+-]/g,"")):NaN}});v.sort(function(l,s){if(l.v===null||s.v===null)return l.v===s.v?l.i-s.i:l.v===null?1:-1;var m=a&&!isNaN(l.n)&&!isNaN(s.n)?l.n-s.n:f.compare(l.v,s.v);return m?u*m:l.i-s.i}),v.forEach(function(l){i.appendChild(l.row)}),o.forEach(function(l){i.appendChild(l)})}}function W(n){var c=n.tHead&&n.tHead.rows[0];c&&Array.prototype.forEach.call(c.cells,function(r,a){if(!(!r.hasAttribute("data-sortable")||r.__bhSort)){r.__bhSort=!0,r.hasAttribute("scope")||r.setAttribute("scope","col");var i=document.createElement("button");i.type="button",i.className="sort";var d=document.createElement("span");d.className="sort-label",Array.prototype.slice.call(r.childNodes).forEach(function(u){u.classList&&u.classList.contains("explainer")||d.appendChild(u)});var o=document.createElement("span");o.className="sort-seat",o.setAttribute("aria-hidden","true"),o.innerHTML=w.icon("CaretUpDown")+w.glyph("arrow-up")+w.glyph("arrow-down"),["sort-caret","sort-up","sort-down"].forEach(function(u,f){o.children[f].classList.add(u)}),i.appendChild(d),i.appendChild(o),r.insertBefore(i,r.firstChild),i.addEventListener("click",function(){var u=r.getAttribute("aria-sort"),f=r.getAttribute("data-first-sort")||(r.hasAttribute("data-numeric")?"descending":"ascending"),v=u?u===f?f==="ascending"?"descending":"ascending":null:f,l=r.dispatchEvent(new CustomEvent("sortchange",{bubbles:!0,cancelable:!0,detail:{index:a,direction:v}}));Array.prototype.forEach.call(c.cells,function(s){s.removeAttribute("aria-sort")}),v&&r.setAttribute("aria-sort",v),l&&O(n,a,v,r.hasAttribute("data-numeric"))})}})}function I(n){var c=parseInt(n.getAttribute("data-pinned"),10),r=n.closest(".table-wrap"),a=n.rows[0];if(!(!(c>0)||!r||!a)){var i=function(){for(var o=0,u=1;u<=c;u++)o+=a.children[u-1].getBoundingClientRect().width,n.style.setProperty(u===c?"--_pin-end":"--_pin-"+u,o+"px");r.style.scrollPaddingInlineStart=o+"px"};i(),new ResizeObserver(i).observe(n);var d=function(){r.toggleAttribute("data-scrolled",Math.abs(r.scrollLeft)>0)};d(),r.addEventListener("scroll",d,{passive:!0}),r.addEventListener("focusin",function(o){if(o.target.matches(":focus-visible")){var u=o.target.closest&&o.target.closest("td, th"),f=u&&u.parentElement;if(!(!u||!f||f.hasAttribute("data-empty")||Array.prototype.indexOf.call(f.children,u)<c)){var v=f.children[c-1].getBoundingClientRect(),l=u.getBoundingClientRect(),s=getComputedStyle(r).direction==="rtl"?-1:1,m=r.getBoundingClientRect(),h=s===1?v.right-l.left:l.right-v.left,A=s===1?l.right-(m.left+r.clientLeft+r.clientWidth):m.left+r.clientLeft-l.left;h>0?r.scrollLeft-=s*h:A>0&&(r.scrollLeft+=s*Math.min(A,-h))}}})}}function F(n){var c='a[href], button, input, select, textarea, summary, [tabindex], [role="checkbox"], [role="button"]',r=["fontFamily","fontSize","fontWeight","fontVariantNumeric","letterSpacing","wordSpacing","lineHeight","color"],a=null,i=null,d=null,o=null,u=0,f=0,v=0,l=-1e9,s=!1;function m(t){var e=t.children.length===1&&t.childNodes.length===1?t.children[0]:null;return e&&getComputedStyle(e).display==="block"&&getComputedStyle(e).overflowX!=="visible"?e:t}var h=null;function A(t){var e=m(t),p=getComputedStyle(e);return e.scrollWidth>e.clientWidth?!0:(h=h||document.createRange(),h.selectNodeContents(e),h.getBoundingClientRect().width>e.clientWidth-parseFloat(p.paddingLeft)-parseFloat(p.paddingRight)+.5)}function N(){v=0,n.querySelectorAll("tbody > tr:not([data-empty]) > :is(td, th), thead > tr > th:not([data-sortable])").forEach(function(t){var e=t.hasAttribute("tabindex")&&!t.hasAttribute("data-cut")||t.querySelector(c);if(!e){var p=A(t);p&&!t.hasAttribute("data-cut")?(t.setAttribute("data-cut",""),t.setAttribute("tabindex","0")):!p&&t.hasAttribute("data-cut")&&(t.removeAttribute("data-cut"),t.removeAttribute("tabindex"),i===t&&C())}})}function y(){v||(v=requestAnimationFrame(N))}function P(){return a||(a=document.createElement("div"),a.className="cell-peek",a.setAttribute("aria-hidden","true"),a.addEventListener("pointerenter",function(){clearTimeout(f),s=!0}),a.addEventListener("pointerleave",function(t){s=!1,t.relatedTarget instanceof Node&&i&&i.contains(t.relatedTarget)||(d=null),L()}),document.body.appendChild(a),a)}function T(){if(!(!a||!i)){var t=i.getBoundingClientRect(),e=(i.closest(".table-wrap")||n).getBoundingClientRect(),p=getComputedStyle(i).direction==="rtl",g=document.documentElement,b="var(--basalt-space-2)",R="calc("+g.clientWidth+"px - 2 * "+b+")";a.style.minWidth="min("+t.width+"px, "+R+")",a.style.minHeight=t.height+"px",a.style.maxWidth="min(max("+t.width+"px, "+(p?t.right-e.left:e.right-t.left)+"px), "+R+")",a.style.left="0px",a.style.top="0px";var S=a.getBoundingClientRect();a.style.left="max("+b+", min("+(p?t.right-S.width:t.left)+"px, calc("+(g.clientWidth-S.width)+"px - "+b+")))",a.style.top="max("+b+", min("+t.top+"px, calc("+(g.clientHeight-S.height)+"px - "+b+")))"}}function x(t){if(clearTimeout(u),clearTimeout(f),o!==t){var e=getComputedStyle(t),p=P();p.textContent=t.textContent.trim(),r.forEach(function(g){p.style[g]=e[g]}),p.style.paddingInline="calc("+e.paddingLeft+" - var(--basalt-size-hairline)) calc("+e.paddingRight+" - var(--basalt-size-hairline))",p.style.paddingBlock="0px",p.toggleAttribute("data-focus",document.activeElement===t&&t.matches(":focus-visible")),i=t,T(),p.setAttribute("data-open","")}}function C(){if(clearTimeout(u),clearTimeout(f),!i||!a){i=null;return}a.removeAttribute("data-open"),a.removeAttribute("data-focus"),i=null,l=performance.now()}function L(){clearTimeout(f),f=setTimeout(function(){var t=document.activeElement,e=t&&t.hasAttribute&&t.hasAttribute("data-cut")&&n.contains(t)?t:null;if(e){i!==e&&x(e);return}d&&i===d||s||C()},100)}function E(t){var e=t instanceof Element?t.closest("[data-cut]"):null;return e&&n.contains(e)?e:null}n.addEventListener("pointerover",function(t){var e=E(t.target);!e||e===d||(d=e,clearTimeout(u),clearTimeout(f),i!==e&&(i||performance.now()-l<400?x(e):u=setTimeout(function(){x(e)},600)))}),n.addEventListener("pointerout",function(t){var e=E(t.target);if(!(!e||e!==d)){var p=t.relatedTarget;p instanceof Node&&(e.contains(p)||a&&a.contains(p))||(d=null,clearTimeout(u),o===e&&(o=null),L())}}),n.addEventListener("focusin",function(t){var e=E(t.target);e&&(o&&o!==e&&(o=null),x(e))}),n.addEventListener("focusout",function(t){var e=E(t.target);e&&(o===e&&(o=null),L())}),window.addEventListener("keydown",function(t){t.key!=="Escape"||!i||(o=i,C(),t.stopPropagation())},!0),window.addEventListener("scroll",function(){i&&T()},{capture:!0,passive:!0}),new ResizeObserver(y).observe(n),new MutationObserver(y).observe(n,{childList:!0,subtree:!0,characterData:!0});var B=new MutationObserver(y);B.observe(document.head,{childList:!0,subtree:!0,characterData:!0}),B.observe(document.documentElement,{attributes:!0,attributeFilter:["style","class","lang","dir"]}),window.addEventListener("resize",y),document.fonts&&document.fonts.ready.then(y),N()}function z(n){var c=n.tHead&&n.tHead.rows[0],r=c?Array.prototype.slice.call(c.cells):[],a=r.findIndex(function(u){return u.classList.contains("select-col")}),i=a<0?null:n.querySelectorAll(":scope > colgroup > col")[a];if(!(!i||i.style.width.indexOf("--basalt-select-column")>=0)){var d=i.getAttribute("width"),o=i.style.width||(d&&/^\d+(\.\d+)?$/.test(d)?d+"px":d)||getComputedStyle(i).width;(!o||o==="auto"||!/^\d+(\.\d+)?(px)?$/.test(o))&&(o="0px"),i.style.width="max("+o+", var(--basalt-select-column))"}}w.step(65,"stillTable",function(){document.querySelectorAll("table[data-fixed]").forEach(function(n){n.__bhStill||(n.__bhStill=!0,_(n),z(n),W(n),I(n),F(n))})})})(window.Basalt); diff --git a/.agent/skills/basalt-html/parts/tab-bar.css b/.agent/skills/basalt-html/parts/tab-bar.css index 6717f9c0..e20c6b9d 100644 --- a/.agent/skills/basalt-html/parts/tab-bar.css +++ b/.agent/skills/basalt-html/parts/tab-bar.css @@ -1 +1 @@ -@layer basalt{:root{--bh-inset-bottom: max(env(safe-area-inset-bottom, var(--basalt-space-0)), var(--bh-inset-bottom-sim, var(--basalt-space-0)));--bh-inset-left: env(safe-area-inset-left, var(--basalt-space-0));--bh-inset-right: env(safe-area-inset-right, var(--basalt-space-0));--basalt-bottom-offset: var(--basalt-space-0)}@media(width<720px){:root:has(.tab-bar){--basalt-bottom-offset: calc(var(--basalt-size-tab-bar) + var(--bh-inset-bottom));scroll-padding-bottom:calc(var(--basalt-bottom-offset) + var(--basalt-space-4))}}.tab-bar{display:none}@media(width<720px){.tab-bar{--bh-tap-margin: 0;position:fixed;inset-inline:0;bottom:0;z-index:var(--basalt-layer-sticky);box-sizing:border-box;display:block;padding-bottom:var(--bh-inset-bottom);padding-inline:var(--bh-inset-left) var(--bh-inset-right);border-top:var(--basalt-size-hairline) solid var(--basalt-border-hairline);background:var(--basalt-surface-page);color:var(--basalt-text-primary);font-family:var(--basalt-font-family-sans)}}@media print{.tab-bar{display:none}}.tab-bar-list{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(0,1fr);height:calc(var(--basalt-size-tab-bar) - var(--basalt-size-hairline));margin:0;padding:0;list-style:none}.tab-bar-list>li{display:flex;min-width:0;margin:0;padding:0}.tab-bar-item{box-sizing:border-box;flex:1;min-width:0;height:100%;min-height:0;margin:0;padding:var(--basalt-space-0-5) var(--basalt-space-0-5) 0;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;gap:var(--basalt-space-0-5);border:0;background:none;color:var(--basalt-text-primary);font:inherit;text-decoration:none;outline:none;cursor:pointer;-webkit-tap-highlight-color:transparent}.tab-bar-glyph{position:relative;flex:none;display:flex;align-items:center;justify-content:center;width:var(--basalt-size-control-md);height:var(--basalt-size-control-md);border-radius:var(--basalt-radius-full);transition:background-color var(--basalt-duration-fast) var(--basalt-ease-out)}.tab-bar-label{display:inline-flex;flex-direction:column;align-items:center;max-width:100%;font:var(--basalt-font-weight-regular) var(--bh-xs);letter-spacing:var(--basalt-text-xs-tracking);white-space:nowrap}.tab-bar-label[data-label]:after{content:attr(data-label);height:0;overflow:hidden;visibility:hidden;font-weight:var(--basalt-font-weight-semibold);user-select:none;pointer-events:none}.tab-bar-item:is([aria-current=page],[data-current]) .tab-bar-label{font-weight:var(--basalt-font-weight-semibold)}.tab-bar-dot{position:absolute;top:var(--basalt-space-1);inset-inline-end:var(--basalt-space-1);width:var(--basalt-size-dot);height:var(--basalt-size-dot);border-radius:var(--basalt-radius-full);background-color:currentColor}@media(hover:hover)and (pointer:fine){.tab-bar-item:hover .tab-bar-glyph{background-color:var(--basalt-state-selected);transition-duration:var(--basalt-duration-instant)}}.tab-bar-item:active .tab-bar-glyph{background-color:var(--basalt-state-selected);transition-duration:var(--basalt-duration-instant)}.tab-bar[data-keys] .tab-bar-item:is(:hover,:active) .tab-bar-glyph{background-color:transparent}.tab-bar-item:focus-visible{outline:var(--basalt-size-focus-width) solid var(--basalt-border-focus);outline-offset:calc(-1 * var(--basalt-size-focus-width))}.tab-bar-sheet-head{display:flex;align-items:center;justify-content:space-between;gap:var(--basalt-space-2);margin-bottom:var(--basalt-space-2)}.tab-bar-sheet-head .dialog-title{margin:0}@media(forced-colors:active){.tab-bar{background:Canvas;border-top-color:CanvasText}.tab-bar-item{color:LinkText}.tab-bar-item:is(:hover,:active) .tab-bar-glyph{forced-color-adjust:none;background-color:Highlight;color:HighlightText}.tab-bar[data-keys] .tab-bar-item:is(:hover,:active) .tab-bar-glyph{forced-color-adjust:auto;background-color:transparent;color:inherit}.tab-bar-dot{forced-color-adjust:none;background-color:CanvasText}}.tab-bar-version{box-sizing:border-box;display:flex;align-items:center;min-height:var(--basalt-size-tap-min);margin-top:var(--basalt-space-2);padding-inline:calc(var(--basalt-space-1-5) + var(--basalt-space-3));border-top:var(--basalt-size-hairline) solid var(--basalt-border-divider)}.tab-bar-version .version-link{font-size:var(--basalt-text-sm-size);line-height:var(--basalt-text-sm-line-height);letter-spacing:var(--basalt-text-sm-tracking)}} +@layer basalt{:root{--bh-inset-bottom: max(env(safe-area-inset-bottom, var(--basalt-space-0)), var(--bh-inset-bottom-sim, var(--basalt-space-0)));--basalt-bottom-offset: var(--basalt-space-0)}@media(width<720px){:root:has(.tab-bar){--basalt-bottom-offset: calc(var(--basalt-size-tab-bar) + var(--bh-inset-bottom));scroll-padding-bottom:calc(var(--basalt-bottom-offset) + var(--basalt-space-4))}}.tab-bar{display:none}@media(width<720px){.tab-bar{--bh-tap-margin: 0;position:fixed;inset-inline:0;bottom:0;z-index:var(--basalt-layer-sticky);box-sizing:border-box;display:block;padding-bottom:var(--bh-inset-bottom);padding-inline:var(--bh-inset-start) var(--bh-inset-end);border-top:var(--basalt-size-hairline) solid var(--basalt-border-hairline);background:var(--basalt-surface-page);color:var(--basalt-text-primary);font-family:var(--basalt-font-family-sans)}}@media print{.tab-bar{display:none}}.tab-bar-list{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(0,1fr);height:calc(var(--basalt-size-tab-bar) - var(--basalt-size-hairline));margin:0;padding:0;list-style:none}.tab-bar-list>li{display:flex;min-width:0;margin:0;padding:0}.tab-bar-item{box-sizing:border-box;flex:1;min-width:0;height:100%;min-height:0;margin:0;padding:var(--basalt-space-0-5) var(--basalt-space-0-5) 0;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;gap:var(--basalt-space-0-5);border:0;background:none;color:var(--basalt-text-primary);font:inherit;text-decoration:none;outline:none;cursor:pointer;-webkit-tap-highlight-color:transparent}.tab-bar-glyph{position:relative;flex:none;display:flex;align-items:center;justify-content:center;width:var(--basalt-size-control-md);height:var(--basalt-size-control-md);border-radius:var(--basalt-radius-full);transition:background-color var(--basalt-duration-fast) var(--basalt-ease-out)}.tab-bar-label{display:inline-flex;flex-direction:column;align-items:center;max-width:100%;font:var(--basalt-font-weight-regular) var(--bh-xs);letter-spacing:var(--basalt-text-xs-tracking);white-space:nowrap}.tab-bar-label[data-label]:after{content:attr(data-label);height:0;overflow:hidden;visibility:hidden;font-weight:var(--basalt-font-weight-semibold);user-select:none;pointer-events:none}.tab-bar-item:is([aria-current=page],[data-current]) .tab-bar-label{font-weight:var(--basalt-font-weight-semibold)}.tab-bar-dot{position:absolute;top:var(--basalt-space-1);inset-inline-end:var(--basalt-space-1);width:var(--basalt-size-dot);height:var(--basalt-size-dot);border-radius:var(--basalt-radius-full);background-color:currentColor}@media(hover:hover)and (pointer:fine){.tab-bar-item:hover .tab-bar-glyph{background-color:var(--basalt-state-selected);transition-duration:var(--basalt-duration-instant)}}.tab-bar-item:active .tab-bar-glyph{background-color:var(--basalt-state-selected);transition-duration:var(--basalt-duration-instant)}.tab-bar[data-keys] .tab-bar-item:is(:hover,:active) .tab-bar-glyph{background-color:transparent}.tab-bar-item:focus-visible{outline:var(--basalt-size-focus-width) solid var(--basalt-border-focus);outline-offset:calc(-1 * var(--basalt-size-focus-width))}.tab-bar-sheet-head{display:flex;align-items:center;justify-content:space-between;gap:var(--basalt-space-2);margin-bottom:var(--basalt-space-2);--basalt-edge-room-end: calc(max(var(--_pad), var(--bh-inset-end)) - var(--bh-inset-end));--basalt-edge-room: initial;--basalt-edge-room-start: initial}.tab-bar-sheet-head .dialog-title{margin:0}@media(forced-colors:active){.tab-bar{background:Canvas;border-top-color:CanvasText}.tab-bar-item{color:LinkText}.tab-bar-item:is(:hover,:active) .tab-bar-glyph{forced-color-adjust:none;background-color:Highlight;color:HighlightText}.tab-bar[data-keys] .tab-bar-item:is(:hover,:active) .tab-bar-glyph{forced-color-adjust:auto;background-color:transparent;color:inherit}.tab-bar-dot{forced-color-adjust:none;background-color:CanvasText}}.tab-bar-version{box-sizing:border-box;display:flex;align-items:center;min-height:var(--basalt-size-tap-min);margin-top:var(--basalt-space-2);padding-inline:calc(var(--basalt-space-1-5) + var(--basalt-space-3));border-top:var(--basalt-size-hairline) solid var(--basalt-border-divider)}.tab-bar-version .version-link{font-size:var(--basalt-text-sm-size);line-height:var(--basalt-text-sm-line-height);letter-spacing:var(--basalt-text-sm-tracking)}} diff --git a/.agent/skills/basalt-html/parts/terminal.css b/.agent/skills/basalt-html/parts/terminal.css index 5f9e3dde..3ad8ce65 100644 --- a/.agent/skills/basalt-html/parts/terminal.css +++ b/.agent/skills/basalt-html/parts/terminal.css @@ -1 +1 @@ -@layer basalt{.terminal{container-type:inline-size}.terminal .code-head{flex-wrap:wrap;justify-content:space-between;gap:0 var(--basalt-space-3);min-height:var(--basalt-size-control-sm);padding:var(--basalt-space-1) var(--basalt-space-4);border-bottom:0;box-shadow:inset 0 calc(-1 * var(--basalt-size-hairline)) 0 var(--basalt-border-divider)}.terminal .code-body{box-sizing:border-box;padding:var(--basalt-space-3) var(--basalt-space-4);font:var(--basalt-font-weight-regular) var(--bh-sm-mono);white-space:pre;overflow:visible;overflow-x:auto;outline:none;border-radius:inherit}.terminal .code-body:focus-visible{outline:var(--basalt-size-focus-width) solid var(--basalt-border-focus);outline-offset:var(--basalt-size-focus-offset)}.terminal-lines{display:grid;grid-template-columns:minmax(calc(var(--basalt-size-icon-sm) + var(--basalt-space-2)),max-content) auto;width:max-content;min-width:100%;font:inherit}.terminal-line{display:grid;grid-template-columns:subgrid;grid-column:1 / -1;min-height:var(--basalt-size-code-line-height)}.terminal-gutter{padding-inline-end:1ch;color:var(--basalt-text-tertiary);-webkit-user-select:none;user-select:none}.terminal-text{min-width:0}.terminal-mark{display:block;margin-block:calc((var(--basalt-size-code-line-height) - var(--basalt-size-icon-sm)) / 2)}.terminal-line[data-kind=output]{color:var(--basalt-text-secondary)}.terminal-line[data-kind=error] .terminal-text{color:var(--basalt-status-danger)}.terminal-line[data-kind=done] .terminal-mark,.terminal-done{color:var(--basalt-status-success)}.terminal-line[data-kind=warning] .terminal-mark{color:var(--basalt-status-warning)}.terminal-line[data-kind=error] .terminal-mark,.terminal-failed{color:var(--basalt-status-danger)}.terminal-hint{grid-column:1 / -1;margin-inline-start:calc(var(--basalt-size-icon-sm) + var(--basalt-space-2));color:var(--basalt-text-tertiary)}.terminal-title{min-width:0}.terminal-actions{display:inline-flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:0 var(--basalt-space-2);max-width:100%;margin-inline-start:auto}.terminal-actions:has(.btn){margin-inline-end:calc(-1 * var(--basalt-space-2-5))}.terminal-state{display:inline-flex;font-weight:var(--basalt-font-weight-regular)}.terminal-state [data-error]{color:var(--basalt-status-danger)}.terminal-swap{display:inline-grid}.terminal-swap>*{grid-area:1 / 1;justify-self:end;display:inline-flex;align-items:center;gap:var(--basalt-space-1-5);white-space:nowrap}.terminal-swap>:not([data-on]){visibility:hidden}.terminal-actions .terminal-copy-compact{display:none}@container (width < 480px){.terminal-actions .terminal-copy{display:none}.terminal-actions .terminal-copy-compact{display:inline-flex}}.terminal[data-live] .code-body{block-size:calc(var(--basalt-size-code-line-height) * 9 + var(--basalt-space-3) * 2);overflow-y:auto;scrollbar-gutter:stable}.terminal-line[data-kind=stage] .terminal-gutter{display:flex;align-items:center}.terminal-line[data-kind=stage] .terminal-mark{display:block;block-size:var(--basalt-size-icon-sm);margin-block:calc((var(--basalt-size-code-line-height) - var(--basalt-size-icon-sm)) / 2)}.terminal-line[data-kind=stage] .terminal-mark>svg{display:block}.terminal-braille{display:inline-flex;inline-size:var(--basalt-size-icon-sm);justify-content:center}.terminal-line[data-kind=stage]{color:var(--basalt-text-primary)}.terminal-line[data-kind=stage][data-state=done],.terminal-line[data-kind=stage][data-state=done] .terminal-mark{color:var(--basalt-text-secondary)}.terminal-line[data-kind=stage]:is([data-state=skipped],[data-state=canceled]),.terminal-line[data-kind=stage]:is([data-state=skipped],[data-state=canceled]) .terminal-mark{color:var(--basalt-text-tertiary)}.terminal-line[data-kind=stage][data-state=failed] :is(.terminal-mark,.terminal-text){color:var(--basalt-status-danger)}.terminal-stage{display:flex;justify-content:space-between;gap:var(--basalt-space-4)}.terminal-duration{flex:none;color:var(--basalt-text-tertiary);font-variant-numeric:tabular-nums}.terminal .code-body[data-stages]>.terminal-lines{width:100%}.terminal[data-live] .code-body{scrollbar-width:none;scrollbar-gutter:auto}.terminal[data-live] .code-body::-webkit-scrollbar{display:none}@media(forced-colors:active){.terminal .code-head{box-shadow:none;border-bottom:var(--basalt-size-hairline) solid CanvasText;padding-bottom:calc(var(--basalt-space-1) - var(--basalt-size-hairline))}.terminal-line[data-kind] .terminal-mark,.terminal .terminal-done,.terminal .terminal-failed,.terminal-line[data-kind=error] .terminal-text,.terminal-state [data-error]{color:CanvasText}}} +@layer basalt{.terminal{container-type:inline-size}.terminal .code-head{flex-wrap:wrap;justify-content:space-between;gap:0 var(--basalt-space-3);min-height:var(--basalt-size-control-sm);padding:var(--basalt-space-1) var(--basalt-space-4);border-bottom:0;box-shadow:inset 0 calc(-1 * var(--basalt-size-hairline)) 0 var(--basalt-border-divider)}.terminal .code-body{box-sizing:border-box;padding:var(--basalt-space-3) var(--basalt-space-4);font:var(--basalt-font-weight-regular) var(--bh-sm-mono);white-space:pre;overflow:visible;overflow-x:auto;outline:none;border-radius:inherit}.terminal .code-body:focus-visible{outline:var(--basalt-size-focus-width) solid var(--basalt-border-focus);outline-offset:var(--basalt-size-focus-offset)}.terminal-lines{display:grid;grid-template-columns:minmax(calc(var(--basalt-size-icon-sm) + var(--basalt-space-2)),max-content) auto;width:max-content;min-width:100%;font:inherit}.terminal-line{display:grid;grid-template-columns:subgrid;grid-column:1 / -1;min-height:var(--basalt-size-code-line-height)}.terminal-gutter{padding-inline-end:1ch;color:var(--basalt-text-tertiary);-webkit-user-select:none;user-select:none}.terminal-text{min-width:0}.terminal-mark{display:block;margin-block:calc((var(--basalt-size-code-line-height) - var(--basalt-size-icon-sm)) / 2)}.terminal-line[data-kind=output]{color:var(--basalt-text-secondary)}.terminal-line[data-kind=error] .terminal-text{color:var(--basalt-status-danger)}.terminal-line[data-kind=done] .terminal-mark,.terminal-done{color:var(--basalt-status-success)}.terminal-line[data-kind=warning] .terminal-mark{color:var(--basalt-status-warning)}.terminal-line[data-kind=error] .terminal-mark,.terminal-failed{color:var(--basalt-status-danger)}.terminal-hint{grid-column:1 / -1;margin-inline-start:calc(var(--basalt-size-icon-sm) + var(--basalt-space-2));color:var(--basalt-text-tertiary)}.terminal-title{min-width:0}.terminal-actions{display:inline-flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:0 var(--basalt-space-2);max-width:100%;margin-inline-start:auto}.terminal-state{display:inline-flex;font-weight:var(--basalt-font-weight-regular)}.terminal-state [data-error]{color:var(--basalt-status-danger)}.terminal-swap{display:inline-grid}.terminal-swap>*{grid-area:1 / 1;justify-self:end;display:inline-flex;align-items:center;gap:var(--basalt-space-1-5);white-space:nowrap}.terminal-swap>:not([data-on]){visibility:hidden}.terminal-control .terminal-swap>*{justify-self:center}:is(.terminal-copy,.terminal-copy-compact)>svg[data-off]{display:none}.terminal-actions .terminal-copy-compact{display:none}@container (width < 480px){.terminal-actions .terminal-copy{display:none}.terminal-actions .terminal-copy-compact{display:inline-flex}}.terminal[data-live] .code-body{block-size:calc(var(--basalt-size-code-line-height) * 9 + var(--basalt-space-3) * 2);overflow-y:auto;scrollbar-gutter:stable}.terminal-line[data-kind=stage] .terminal-gutter{display:flex;align-items:center}.terminal-line[data-kind=stage] .terminal-mark{display:block;block-size:var(--basalt-size-icon-sm);margin-block:calc((var(--basalt-size-code-line-height) - var(--basalt-size-icon-sm)) / 2)}.terminal-line[data-kind=stage] .terminal-mark>svg{display:block}.terminal-braille{display:inline-flex;inline-size:var(--basalt-size-icon-sm);justify-content:center}.terminal-line[data-kind=stage]{color:var(--basalt-text-primary)}.terminal-line[data-kind=stage][data-state=done],.terminal-line[data-kind=stage][data-state=done] .terminal-mark{color:var(--basalt-text-secondary)}.terminal-line[data-kind=stage]:is([data-state=skipped],[data-state=canceled]),.terminal-line[data-kind=stage]:is([data-state=skipped],[data-state=canceled]) .terminal-mark{color:var(--basalt-text-tertiary)}.terminal-line[data-kind=stage][data-state=failed] :is(.terminal-mark,.terminal-text){color:var(--basalt-status-danger)}.terminal-stage{display:flex;justify-content:space-between;gap:var(--basalt-space-4)}.terminal-duration{flex:none;color:var(--basalt-text-tertiary);font-variant-numeric:tabular-nums}.terminal .code-body[data-stages]>.terminal-lines{width:100%}.terminal[data-live] .code-body{scrollbar-width:none;scrollbar-gutter:auto}.terminal[data-live] .code-body::-webkit-scrollbar{display:none}@media(forced-colors:active){.terminal .code-head{box-shadow:none;border-bottom:var(--basalt-size-hairline) solid CanvasText;padding-bottom:calc(var(--basalt-space-1) - var(--basalt-size-hairline))}.terminal-line[data-kind] .terminal-mark,.terminal .terminal-done,.terminal .terminal-failed,.terminal-line[data-kind=error] .terminal-text,.terminal-state [data-error]{color:CanvasText}}} diff --git a/.agent/skills/basalt-html/parts/terminal.js b/.agent/skills/basalt-html/parts/terminal.js index 7eb963dd..cc24efdd 100644 --- a/.agent/skills/basalt-html/parts/terminal.js +++ b/.agent/skills/basalt-html/parts/terminal.js @@ -1,2 +1,2 @@ -(function(b){"use strict";var A=b._,d=A.esc,f=A.icon,w='<svg class="icon" viewBox="0 0 24 24" width="16" height="16" fill="none" aria-hidden="true" focusable="false"><g fill="none" stroke="currentColor" stroke-width="2.25" stroke-linecap="round" stroke-linejoin="round"><path d="M9 9.5C9 13 9 16.5 9 20"/><path d="M9 20C12.5 20 16 20 19.5 20"/><path d="M19.5 20C19.5 16.5 19.5 13 19.5 9.5"/><path d="M19.5 9.5C16 9.5 12.5 9.5 9 9.5"/><path d="M4.5 15C4.5 11.5 4.5 8 4.5 4.5"/><path d="M4.5 4.5C8 4.5 11.5 4.5 15 4.5"/></g></svg>',B={done:["CheckCircle","Done"],warning:["Warning","Warning"],error:["XCircle","Error"]};function O(e,r){var t=function(n,l){return"<span "+(l&&!r?'role="img" aria-label="'+l+'"':'aria-hidden="true"')+' class="terminal-mark">'+n.replace('aria-hidden="true" ',"")+"</span>"};return e==="done"?t('<svg class="icon" viewBox="0 0 24 24" width="16" height="16" fill="none" aria-hidden="true" focusable="false"><g fill="none" stroke="currentColor" stroke-width="2.25" stroke-linecap="round" stroke-linejoin="round"><path d="M5 13C6.667 14.667 8.333 16.333 10 18"/><path d="M10 18C13 14.333 16 10.667 19 7"/></g></svg>',"Done"):e==="failed"?t(f("XCircle",{size:16}),"Failed"):e==="skipped"?t('<svg class="icon" viewBox="0 0 24 24" width="16" height="16" fill="none" aria-hidden="true" focusable="false"><g fill="none" stroke="currentColor" stroke-width="2.25" stroke-linecap="round" stroke-linejoin="round"><path d="M5 12C9.667 12 14.333 12 19 12"/></g></svg>'):e==="canceled"?t(f("Prohibit",{size:16})):"<span "+(r?'aria-hidden="true"':'role="img" aria-label="Running"')+' class="terminal-braille"><braille-spinner></braille-spinner></span>'}var W={skipped:"Skipped",canceled:"Canceled"};function x(e,r){return'<span class="terminal-swap">'+r.map(function(t){return"<span"+(t[0]===e?' data-on=""':"")+">"+t[1]+"</span>"}).join("")+"</span>"}function E(e){return e.map(function(r){return[r,r]})}function X(e,r){if(e.kind==="stage"){var t=e.state||"running",n=e.word||W[t],l=document.createElement("span");return l.className="terminal-line",l.setAttribute("data-kind","stage"),l.setAttribute("data-state",t),l.innerHTML='<span class="terminal-gutter">'+O(t,!!n)+'</span><span class="terminal-text terminal-stage"><span>'+(n?'<span class="terminal-word">'+d(n)+" </span>":"")+d(e.text)+"</span>"+(e.time?'<span class="terminal-duration">'+d(e.time)+"</span>":"")+"</span>",l}var g=B[e.kind],s=e.kind==="command"?'<span aria-hidden="true">'+d(r)+"</span>":g?f(g[0],{size:16,label:g[1]}).replace('class="icon"','class="icon terminal-mark"'):"",u=document.createElement("span");return u.className="terminal-line",u.setAttribute("data-kind",e.kind),u.innerHTML='<span class="terminal-gutter">'+s+'</span><span class="terminal-text">'+d(e.text)+"</span>",u}function P(e){if(!e||e.__bh)return;e.__bh=!0;var r=e.querySelector("figcaption"),t=e.querySelector("pre"),n=t&&t.querySelector("code");if(!r||!n)return;var l=r.textContent.trim(),g=e.getAttribute("data-prompt")||"$",s=e.hasAttribute("data-replay"),u=Number(e.getAttribute("data-interval"))||600,S=e.getAttribute("data-exit-code"),p=Array.prototype.map.call(n.querySelectorAll("[data-kind]"),function(a){return{kind:a.getAttribute("data-kind"),text:a.textContent,state:a.getAttribute("data-state"),word:a.getAttribute("data-word"),time:a.getAttribute("data-time")}}),L=e.hasAttribute("data-stages");L&&t.setAttribute("data-stages","");var T=p.filter(function(a){return a.kind==="command"}).map(function(a){return a.text}).join(` -`),y=p[p.length-1],K=!!y&&(y.kind==="error"||y.kind==="stage"&&y.state==="failed"),C="";if(s){var Y=S==null||S===""?"Failed":"Failed, exit "+S;C+='<span class="terminal-state">'+x("idle",[["idle","Not started"],["running","<braille-spinner></braille-spinner><span>Running</span>"],["paused","Paused"],["done",f("CheckCircle",{size:16}).replace('class="icon"','class="icon terminal-done"')+"<span>Done</span>"],["failed",f("XCircle",{size:16}).replace('class="icon"','class="icon terminal-failed"')+'<span data-error="">'+d(Y)+"</span>"]])+"</span>",C+='<button type="button" class="btn terminal-control" data-variant="ghost" data-size="sm">'+x("Play",E(["Play","Pause","Resume","Replay"]))+"</button>"}var R=T?"":" disabled";C+='<button type="button" class="btn terminal-copy" data-variant="ghost" data-size="sm"'+R+">"+w+x("Copy commands",E(["Copy commands","Copied"]))+'</button><button type="button" class="btn terminal-copy-compact" data-variant="ghost" data-size="sm" data-icon-only aria-label="Copy commands"'+R+">"+w+'</button><span class="visually-hidden" role="status"></span>',r.classList.add("code-head"),r.innerHTML='<span class="terminal-title">'+d(l)+'</span><span class="terminal-actions">'+C+"</span>",t.setAttribute("aria-label",l+", transcript"),n.className="terminal-lines",n.textContent="";var i=s?"idle":null,c=s?0:p.length,z=0,H=0,M=!0;t.addEventListener("scroll",function(){M=t.scrollHeight-t.scrollTop-t.clientHeight<2});function k(a,h,o){Array.prototype.forEach.call(a.children,function(U,V){U.toggleAttribute("data-on",o[V]===h)})}var $=e.querySelector(".terminal-state .terminal-swap"),I=e.querySelector(".terminal-control .terminal-swap"),N=e.querySelector(".terminal-copy .terminal-swap"),_=e.querySelector('.terminal-actions [role="status"]'),v=e.querySelector(".terminal-copy-compact"),J=["idle","running","paused","done","failed"],Q=["Play","Pause","Resume","Replay"];function m(){var a=n.querySelectorAll(".terminal-line").length;c<a&&(n.textContent="",a=0);for(var h=a;h<c;h++)n.appendChild(X(p[h],g));if(t.setAttribute("role",s&&i==="running"&&!L?"log":s&&!c?"group":"region"),s){var o=n.querySelector(".terminal-hint");i==="idle"&&c===0?o||(o=document.createElement("span"),o.className="terminal-hint",o.textContent="Press Play to start",n.appendChild(o)):o&&o.remove(),e.toggleAttribute("data-live",!0),e.querySelector(".terminal-state").setAttribute("data-state",i),k($,i,J),k(I,i==="idle"?"Play":i==="running"?"Pause":i==="paused"?"Resume":"Replay",Q),M&&(t.scrollTop=t.scrollHeight)}}function q(){if(i==="running"){if(c>=p.length){i=K?"failed":"done",m();return}var a=function(){c++,m(),q()};c===0?H=requestAnimationFrame(a):z=setTimeout(a,u)}}function j(){clearTimeout(z),cancelAnimationFrame(H)}s&&e.querySelector(".terminal-control").addEventListener("click",function(){i==="running"?(j(),i="paused",m()):i==="paused"?(i="running",m(),q()):(j(),M=!0,c=0,i="running",m(),q())});var D;function F(){!T||!b.copyText||b.copyText(T).then(function(a){a&&(k(N,"Copied",["Copy commands","Copied"]),v.innerHTML='<svg class="icon" viewBox="0 0 24 24" width="16" height="16" fill="none" aria-hidden="true" focusable="false"><g fill="none" stroke="currentColor" stroke-width="2.25" stroke-linecap="round" stroke-linejoin="round"><path d="M5 13C6.667 14.667 8.333 16.333 10 18"/><path d="M10 18C13 14.333 16 10.667 19 7"/></g></svg>',v.setAttribute("aria-label","Copied"),_.textContent="Copied",clearTimeout(D),D=setTimeout(function(){k(N,"Copy commands",["Copy commands","Copied"]),v.innerHTML=w,v.setAttribute("aria-label","Copy commands"),_.textContent=""},1500))})}e.querySelector(".terminal-copy").addEventListener("click",F),v.addEventListener("click",F),m()}function G(){document.querySelectorAll(".terminal").forEach(P)}b.terminal=P,A.step(50,"wireTerminals",G)})(window.Basalt); +(function(v){"use strict";var C=v._,d=C.esc,g=C.icon,T='<svg class="icon" viewBox="0 0 24 24" width="16" height="16" fill="none" aria-hidden="true" focusable="false"><g fill="none" stroke="currentColor" stroke-width="2.25" stroke-linecap="round" stroke-linejoin="round"><path d="M9 9.5C9 13 9 16.5 9 20"/><path d="M9 20C12.5 20 16 20 19.5 20"/><path d="M19.5 20C19.5 16.5 19.5 13 19.5 9.5"/><path d="M19.5 9.5C16 9.5 12.5 9.5 9 9.5"/><path d="M4.5 15C4.5 11.5 4.5 8 4.5 4.5"/><path d="M4.5 4.5C8 4.5 11.5 4.5 15 4.5"/></g></svg>',F={done:["CheckCircle","Done"],warning:["Warning","Warning"],error:["XCircle","Error"]};function O(e,r){var a=function(n,l){return"<span "+(l&&!r?'role="img" aria-label="'+l+'"':'aria-hidden="true"')+' class="terminal-mark">'+n.replace('aria-hidden="true" ',"")+"</span>"};return e==="done"?a('<svg class="icon" viewBox="0 0 24 24" width="16" height="16" fill="none" aria-hidden="true" focusable="false"><g fill="none" stroke="currentColor" stroke-width="2.25" stroke-linecap="round" stroke-linejoin="round"><path d="M5 13C6.667 14.667 8.333 16.333 10 18"/><path d="M10 18C13 14.333 16 10.667 19 7"/></g></svg>',"Done"):e==="failed"?a(g("XCircle",{size:16}),"Failed"):e==="skipped"?a('<svg class="icon" viewBox="0 0 24 24" width="16" height="16" fill="none" aria-hidden="true" focusable="false"><g fill="none" stroke="currentColor" stroke-width="2.25" stroke-linecap="round" stroke-linejoin="round"><path d="M5 12C9.667 12 14.333 12 19 12"/></g></svg>'):e==="canceled"?a(g("Prohibit",{size:16})):"<span "+(r?'aria-hidden="true"':'role="img" aria-label="Running"')+' class="terminal-braille"><braille-spinner></braille-spinner></span>'}var W={skipped:"Skipped",canceled:"Canceled"};function q(e,r){return'<span class="terminal-swap">'+r.map(function(a){return"<span"+(a[0]===e?' data-on=""':"")+">"+a[1]+"</span>"}).join("")+"</span>"}function X(e){return e.map(function(r){return[r,r]})}function G(e,r){if(e.kind==="stage"){var a=e.state||"running",n=e.word||W[a],l=document.createElement("span");return l.className="terminal-line",l.setAttribute("data-kind","stage"),l.setAttribute("data-state",a),l.innerHTML='<span class="terminal-gutter">'+O(a,!!n)+'</span><span class="terminal-text terminal-stage"><span>'+(n?'<span class="terminal-word">'+d(n)+" </span>":"")+d(e.text)+"</span>"+(e.time?'<span class="terminal-duration">'+d(e.time)+"</span>":"")+"</span>",l}var h=F[e.kind],o=e.kind==="command"?'<span aria-hidden="true">'+d(r)+"</span>":h?g(h[0],{size:16,label:h[1]}).replace('class="icon"','class="icon terminal-mark"'):"",p=document.createElement("span");return p.className="terminal-line",p.setAttribute("data-kind",e.kind),p.innerHTML='<span class="terminal-gutter">'+o+'</span><span class="terminal-text">'+d(e.text)+"</span>",p}function P(e){if(!e||e.__bh)return;e.__bh=!0;var r=e.querySelector("figcaption"),a=e.querySelector("pre"),n=a&&a.querySelector("code");if(!r||!n)return;var l=r.textContent.trim(),h=e.getAttribute("data-prompt")||"$",o=e.hasAttribute("data-replay"),p=Number(e.getAttribute("data-interval"))||600,w=e.getAttribute("data-exit-code"),m=Array.prototype.map.call(n.querySelectorAll("[data-kind]"),function(t){return{kind:t.getAttribute("data-kind"),text:t.textContent,state:t.getAttribute("data-state"),word:t.getAttribute("data-word"),time:t.getAttribute("data-time")}}),R=e.hasAttribute("data-stages");R&&a.setAttribute("data-stages","");var A=m.filter(function(t){return t.kind==="command"}).map(function(t){return t.text}).join(` +`),b=m[m.length-1],Y=!!b&&(b.kind==="error"||b.kind==="stage"&&b.state==="failed"),y="";if(o){var $=w==null||w===""?"Failed":"Failed, exit "+w;y+='<span class="terminal-state">'+q("idle",[["idle","Not started"],["running","<braille-spinner></braille-spinner><span>Running</span>"],["paused","Paused"],["done",g("CheckCircle",{size:16}).replace('class="icon"','class="icon terminal-done"')+"<span>Done</span>"],["failed",g("XCircle",{size:16}).replace('class="icon"','class="icon terminal-failed"')+'<span data-error="">'+d($)+"</span>"]])+"</span>",y+='<button type="button" class="btn terminal-control" data-variant="ghost" data-size="sm">'+q("Play",X(["Play","Pause","Resume","Replay"]))+"</button>"}var j=A?"":" disabled";y+='<button type="button" class="btn terminal-copy" data-variant="ghost" data-size="sm" data-edge="end"'+j+">"+T+'<svg class="icon" viewBox="0 0 24 24" width="16" height="16" fill="none" aria-hidden="true" focusable="false"><g fill="none" stroke="currentColor" stroke-width="2.25" stroke-linecap="round" stroke-linejoin="round"><path d="M5 13C6.667 14.667 8.333 16.333 10 18"/><path d="M10 18C13 14.333 16 10.667 19 7"/></g></svg><svg class="icon" viewBox="0 0 24 24" width="16" height="16" fill="none" aria-hidden="true" focusable="false"><g fill="none" stroke="currentColor" stroke-width="2.25" stroke-linecap="round" stroke-linejoin="round"><path d="M7.05 7.05C10.35 10.35 13.65 13.65 16.95 16.95"/><path d="M16.95 7.05C13.65 10.35 10.35 13.65 7.05 16.95"/></g></svg><span>Copy commands</span></button><button type="button" class="btn terminal-copy-compact" data-variant="ghost" data-size="sm" data-icon-only data-edge="end" aria-label="Copy commands"'+j+">"+T+'<svg class="icon" viewBox="0 0 24 24" width="16" height="16" fill="none" aria-hidden="true" focusable="false"><g fill="none" stroke="currentColor" stroke-width="2.25" stroke-linecap="round" stroke-linejoin="round"><path d="M5 13C6.667 14.667 8.333 16.333 10 18"/><path d="M10 18C13 14.333 16 10.667 19 7"/></g></svg><svg class="icon" viewBox="0 0 24 24" width="16" height="16" fill="none" aria-hidden="true" focusable="false"><g fill="none" stroke="currentColor" stroke-width="2.25" stroke-linecap="round" stroke-linejoin="round"><path d="M7.05 7.05C10.35 10.35 13.65 13.65 16.95 16.95"/><path d="M16.95 7.05C13.65 10.35 10.35 13.65 7.05 16.95"/></g></svg></button><span class="visually-hidden" role="status"></span>',r.classList.add("code-head"),r.innerHTML='<span class="terminal-title">'+d(l)+'</span><span class="terminal-actions">'+y+"</span>",a.setAttribute("aria-label",l+", transcript"),n.className="terminal-lines",n.textContent="";var i=o?"idle":null,c=o?0:m.length,L=0,z=0,x=!0;a.addEventListener("scroll",function(){x=a.scrollHeight-a.scrollTop-a.clientHeight<2});function N(t,u,s){Array.prototype.forEach.call(t.children,function(E,Z){E.toggleAttribute("data-on",s[Z]===u)})}var I=e.querySelector(".terminal-state .terminal-swap"),J=e.querySelector(".terminal-control .terminal-swap"),Q=e.querySelector(".terminal-copy"),M=function(t){[Q,k].forEach(function(u){Array.prototype.forEach.call(u.querySelectorAll("svg"),function(s,E){s.toggleAttribute("data-off",E!==t)})})},B=e.querySelector('.terminal-actions [role="status"]'),k=e.querySelector(".terminal-copy-compact");M(0);var U=["idle","running","paused","done","failed"],V=["Play","Pause","Resume","Replay"];function f(){var t=n.querySelectorAll(".terminal-line").length;c<t&&(n.textContent="",t=0);for(var u=t;u<c;u++)n.appendChild(G(m[u],h));if(a.setAttribute("role",o&&i==="running"&&!R?"log":o&&!c?"group":"region"),o){var s=n.querySelector(".terminal-hint");i==="idle"&&c===0?s||(s=document.createElement("span"),s.className="terminal-hint",s.textContent="Press Play to start",n.appendChild(s)):s&&s.remove(),e.toggleAttribute("data-live",!0),e.querySelector(".terminal-state").setAttribute("data-state",i),N(I,i,U),N(J,i==="idle"?"Play":i==="running"?"Pause":i==="paused"?"Resume":"Replay",V),x&&(a.scrollTop=a.scrollHeight)}}function S(){if(i==="running"){if(c>=m.length){i=Y?"failed":"done",f();return}var t=function(){c++,f(),S()};c===0?z=requestAnimationFrame(t):L=setTimeout(t,p)}}function _(){clearTimeout(L),cancelAnimationFrame(z)}o&&e.querySelector(".terminal-control").addEventListener("click",function(){i==="running"?(_(),i="paused",f()):i==="paused"?(i="running",f(),S()):(_(),x=!0,c=0,i="running",f(),S())});var H;function D(){!A||!v.copyText||v.copyText(A).then(function(t){M(t?1:2),k.setAttribute("aria-label",t?"Copied":"Copy failed"),B.textContent=t?"Copied":"Copy failed",clearTimeout(H),H=setTimeout(function(){M(0),k.setAttribute("aria-label","Copy commands"),B.textContent=""},1500)})}e.querySelector(".terminal-copy").addEventListener("click",D),k.addEventListener("click",D),f()}function K(){document.querySelectorAll(".terminal").forEach(P)}v.terminal=P,C.step(50,"wireTerminals",K)})(window.Basalt); diff --git a/.agent/skills/basalt-html/parts/toast.css b/.agent/skills/basalt-html/parts/toast.css index 21679c03..c1a6992d 100644 --- a/.agent/skills/basalt-html/parts/toast.css +++ b/.agent/skills/basalt-html/parts/toast.css @@ -1 +1 @@ -@layer basalt{.toast-viewport{--_inset: max(var(--basalt-space-4), env(safe-area-inset-left, var(--basalt-space-0)), env(safe-area-inset-right, var(--basalt-space-0)));position:fixed;inset:auto max(var(--basalt-space-4),env(safe-area-inset-right,var(--basalt-space-0))) max(var(--basalt-space-4),env(safe-area-inset-bottom,var(--basalt-space-0))) auto;width:min(var(--basalt-size-toast-width),calc(100vw - 2 * var(--_inset)));height:0;margin:0;padding:0;border:0;background:transparent;overflow:visible;color:var(--basalt-text-primary)}.toast-viewport:focus{outline:none}.toast-viewport:focus>.toast[data-front]{outline:var(--basalt-size-focus-width) solid var(--basalt-border-focus);outline-offset:var(--basalt-size-focus-offset)}.toast{--_gap: var(--basalt-space-2);--_peek: var(--basalt-space-2);--_scale: max(0, 1 - (var(--toast-index, 0) * .05)) ;--_shrink: calc(1 - var(--_scale));--_height: var(--toast-frontmost-height, var(--toast-height));--_dir: -1;--_offset-y: calc(var(--_dir) * (var(--toast-offset-y, var(--basalt-space-0)) + var(--toast-index, 0) * var(--_gap)) + var(--toast-swipe-movement-y, var(--basalt-space-0)));--_rest: translateX(var(--toast-swipe-movement-x, var(--basalt-space-0))) translateY(calc(var(--toast-swipe-movement-y, var(--basalt-space-0)) + var(--_dir) * (var(--toast-index, 0) * var(--_peek) + var(--_shrink) * var(--_height)))) scale(var(--_scale));box-sizing:border-box;position:absolute;right:0;bottom:0;width:100%;height:var(--_height);border:var(--basalt-size-hairline) solid var(--basalt-border-rim);border-top-color:var(--basalt-border-rim-top);border-radius:var(--basalt-radius-lg);background:var(--basalt-surface-1);box-shadow:var(--basalt-shadow-overlay);color:var(--basalt-text-primary);font-family:var(--basalt-font-family-sans);transform-origin:bottom center;z-index:calc(1000 - var(--toast-index, 0));transform:var(--_rest);transition:transform var(--basalt-duration-slow) var(--basalt-ease-out),opacity var(--basalt-duration-slow) var(--basalt-ease-out),height var(--basalt-duration-base) var(--basalt-ease-out);user-select:none}.toast[data-expanded]{--_rest: translateX(var(--toast-swipe-movement-x, var(--basalt-space-0))) translateY(var(--_offset-y));height:var(--toast-height)}.toast[data-starting-style],.toast[data-ending-style]{opacity:0;transform:translateY(calc(var(--_dir) * (-100% - var(--basalt-space-4))))}.toast[data-ending-style]{transition-duration:calc(var(--basalt-duration-slow) * .75),calc(var(--basalt-duration-slow) * .75),calc(var(--basalt-duration-base) * .75);transition-timing-function:var(--basalt-ease-in)}.toast[data-limited]{opacity:0}.toast[data-ending-style][data-swipe-direction=right]{transform:translate(calc(var(--toast-swipe-movement-x, var(--basalt-space-0)) + 120%)) translateY(var(--_offset-y))}.toast[data-swiping]{transition-property:opacity,height}.toast:after{content:"";position:absolute;top:100%;left:0;width:100%;height:calc(var(--_gap) + var(--basalt-size-hairline))}.toast-content{display:flex;align-items:flex-start;gap:var(--basalt-space-3);padding:var(--basalt-space-3) var(--basalt-space-3) var(--basalt-space-3) var(--basalt-space-4);overflow:hidden;transition:opacity var(--basalt-duration-base) var(--basalt-ease-out)}.toast-content[data-behind]{opacity:0}.toast-content[data-expanded]{opacity:1}.toast-seat{flex:none;display:grid;place-items:center;width:var(--basalt-size-icon-sm);height:var(--basalt-size-icon-sm);margin-top:calc((var(--basalt-text-sm-line-height) - var(--basalt-size-icon-sm)) / 2 + var(--basalt-space-0-5) / 2);color:var(--basalt-text-primary)}.toast[data-status=success] .toast-seat{color:var(--basalt-status-success)}.toast[data-status=warning] .toast-seat{color:var(--basalt-status-warning)}.toast[data-status=danger] .toast-seat{color:var(--basalt-status-danger)}.toast[data-running] .toast-seat{color:var(--basalt-text-primary)}.toast-text{flex:1;min-width:0;padding-top:calc(var(--basalt-space-0-5) / 2)}.toast-title{margin:0;font:var(--basalt-font-weight-medium) var(--basalt-text-sm-size) / var(--basalt-text-sm-line-height) var(--basalt-font-family-sans)}.toast-description{margin:var(--basalt-space-0-5) 0 0;font-size:var(--basalt-text-sm-size);line-height:var(--basalt-text-sm-line-height);color:var(--basalt-text-secondary)}.toast-description:empty{display:none}.toast[data-status=danger] .toast-title{color:var(--basalt-status-danger)}.toast-count{margin-inline-start:var(--basalt-space-1-5);font-weight:var(--basalt-font-weight-regular);font-variant-numeric:tabular-nums;color:var(--basalt-text-secondary)}.toast-close{color:var(--basalt-text-secondary)}.toast .btn[data-size=xs]{--_h: var(--basalt-size-control-xs);--_px: var(--basalt-space-2);font-size:var(--basalt-text-sm-size)}.toast-drain{position:absolute;right:calc(var(--basalt-radius-lg) - var(--basalt-size-hairline));bottom:calc(-1 * var(--basalt-size-hairline));left:calc(var(--basalt-radius-lg) - var(--basalt-size-hairline));height:var(--basalt-size-hairline);background:var(--basalt-text-tertiary);transform-origin:right center;pointer-events:none;animation:bh-drain linear forwards}.toast[data-expanded] .toast-drain,.toast-viewport[data-away] .toast-drain{animation-play-state:paused}@keyframes bh-drain{0%{transform:scaleX(1)}to{transform:scaleX(0)}}@media(width<720px){.toast-viewport{top:max(var(--basalt-space-4),env(safe-area-inset-top,var(--basalt-space-0)));bottom:auto}:root:has(.topbar,.app-header) .toast-viewport{top:calc(var(--basalt-sticky-offset) + var(--basalt-space-2))}.toast{--_dir: 1;top:0;bottom:auto;transform-origin:top center}}@media(prefers-reduced-motion:reduce){.toast{transition-property:opacity}.toast[data-starting-style],.toast[data-ending-style]{transform:var(--_rest)}.toast[data-ending-style]{transition-duration:calc(var(--basalt-duration-slow) * .75)}.toast-drain{display:none}}@media(forced-colors:active){.toast{border-color:CanvasText}.toast:focus-visible,.toast-viewport:focus>.toast[data-front]{outline-color:Highlight}.toast[data-status] :is(.toast-seat,.toast-title){color:CanvasText}.toast-drain{forced-color-adjust:none;background:CanvasText}}@media print{.toast-viewport{display:none}}} +@layer basalt{.toast-viewport{--_inset: max(var(--basalt-space-4), env(safe-area-inset-left, var(--basalt-space-0)), env(safe-area-inset-right, var(--basalt-space-0)));position:fixed;inset:auto max(var(--basalt-space-4),env(safe-area-inset-right,var(--basalt-space-0))) max(var(--basalt-space-4),env(safe-area-inset-bottom,var(--basalt-space-0))) auto;width:min(var(--basalt-size-toast-width),calc(100vw - 2 * var(--_inset)));height:0;margin:0;padding:0;border:0;background:transparent;overflow:visible;color:var(--basalt-text-primary)}.toast-viewport:focus{outline:none}.toast-viewport:focus>.toast[data-front]{outline:var(--basalt-size-focus-width) solid var(--basalt-border-focus);outline-offset:var(--basalt-size-focus-offset)}.toast{--_gap: var(--basalt-space-2);--_peek: var(--basalt-space-2);--_scale: max(0, 1 - (var(--toast-index, 0) * .05)) ;--_shrink: calc(1 - var(--_scale));--_height: var(--toast-frontmost-height, var(--toast-height));--_dir: -1;--_offset-y: calc(var(--_dir) * (var(--toast-offset-y, var(--basalt-space-0)) + var(--toast-index, 0) * var(--_gap)) + var(--toast-swipe-movement-y, var(--basalt-space-0)));--_rest: translateX(var(--toast-swipe-movement-x, var(--basalt-space-0))) translateY(calc(var(--toast-swipe-movement-y, var(--basalt-space-0)) + var(--_dir) * (var(--toast-index, 0) * var(--_peek) + var(--_shrink) * var(--_height)))) scale(var(--_scale));box-sizing:border-box;position:absolute;right:0;bottom:0;width:100%;height:var(--_height);border:var(--basalt-size-hairline) solid var(--basalt-border-rim);border-top-color:var(--basalt-border-rim-top);border-radius:var(--basalt-radius-lg);background:var(--basalt-surface-1);box-shadow:var(--basalt-shadow-overlay);color:var(--basalt-text-primary);font-family:var(--basalt-font-family-sans);transform-origin:bottom center;z-index:calc(1000 - var(--toast-index, 0));transform:var(--_rest);transition:transform var(--basalt-duration-slow) var(--basalt-ease-out),opacity var(--basalt-duration-slow) var(--basalt-ease-out),height var(--basalt-duration-base) var(--basalt-ease-out);user-select:none}.toast[data-expanded]{--_rest: translateX(var(--toast-swipe-movement-x, var(--basalt-space-0))) translateY(var(--_offset-y));height:var(--toast-height)}.toast[data-starting-style],.toast[data-ending-style]{opacity:0;transform:translateY(calc(var(--_dir) * (-100% - var(--basalt-space-4))))}.toast[data-ending-style]{transition-duration:calc(var(--basalt-duration-slow) * .75),calc(var(--basalt-duration-slow) * .75),calc(var(--basalt-duration-base) * .75);transition-timing-function:var(--basalt-ease-in)}.toast[data-limited]{opacity:0}.toast[data-ending-style][data-swipe-direction=right]{transform:translate(calc(var(--toast-swipe-movement-x, var(--basalt-space-0)) + 120%)) translateY(var(--_offset-y))}.toast[data-swiping]{transition-property:opacity,height}.toast:after{content:"";position:absolute;top:100%;left:0;width:100%;height:calc(var(--_gap) + var(--basalt-size-hairline))}.toast-content{display:flex;align-items:flex-start;gap:var(--basalt-space-3);padding-block:var(--basalt-space-3);padding-inline:var(--basalt-space-4) var(--basalt-space-3);overflow:hidden;transition:opacity var(--basalt-duration-base) var(--basalt-ease-out)}.toast-content[data-behind]{opacity:0}.toast-content[data-expanded]{opacity:1}.toast-seat{flex:none;display:grid;place-items:center;width:var(--basalt-size-icon-sm);height:var(--basalt-size-icon-sm);margin-top:calc((var(--basalt-text-sm-line-height) - var(--basalt-size-icon-sm)) / 2 + var(--basalt-space-0-5) / 2);color:var(--basalt-text-primary)}.toast[data-status=success] .toast-seat{color:var(--basalt-status-success)}.toast[data-status=warning] .toast-seat{color:var(--basalt-status-warning)}.toast[data-status=danger] .toast-seat{color:var(--basalt-status-danger)}.toast[data-running] .toast-seat{color:var(--basalt-text-primary)}.toast-text{flex:1;min-width:0;padding-top:calc(var(--basalt-space-0-5) / 2)}.toast-title{margin:0;font:var(--basalt-font-weight-medium) var(--basalt-text-sm-size) / var(--basalt-text-sm-line-height) var(--basalt-font-family-sans)}.toast-description{margin:var(--basalt-space-0-5) 0 0;font-size:var(--basalt-text-sm-size);line-height:var(--basalt-text-sm-line-height);color:var(--basalt-text-secondary)}.toast-description:empty{display:none}.toast[data-status=danger] .toast-title{color:var(--basalt-status-danger)}.toast-count{margin-inline-start:var(--basalt-space-1-5);font-weight:var(--basalt-font-weight-regular);font-variant-numeric:tabular-nums;color:var(--basalt-text-secondary)}.toast-close{color:var(--basalt-text-secondary)}.toast .btn[data-size=xs]{--_h: var(--basalt-size-control-xs);--_px: var(--basalt-space-2);font-size:var(--basalt-text-sm-size)}@media(pointer:coarse),(width<720px){.toast .btn:is(.toast-close,.toast-action){min-width:0;min-height:0;border-radius:var(--basalt-radius-sm)}.toast .toast-close:before{content:"";position:absolute;inset:calc((var(--basalt-size-control-xs) - var(--basalt-size-tap-min)) / 2 - var(--basalt-size-hairline))}.toast .toast-action:before{content:"";position:absolute;inset-block:calc((100% - var(--basalt-size-tap-min)) / 2 - var(--basalt-size-hairline));inset-inline:min(var(--basalt-space-0),calc(100% - var(--basalt-size-tap-min) - 2 * var(--basalt-size-hairline))) 0}}.toast-drain{position:absolute;right:calc(var(--basalt-radius-lg) - var(--basalt-size-hairline));bottom:calc(-1 * var(--basalt-size-hairline));left:calc(var(--basalt-radius-lg) - var(--basalt-size-hairline));height:var(--basalt-size-hairline);background:var(--basalt-text-tertiary);transform-origin:right center;pointer-events:none;animation:bh-drain linear forwards}.toast[data-expanded] .toast-drain,.toast-viewport[data-away] .toast-drain{animation-play-state:paused}@keyframes bh-drain{0%{transform:scaleX(1)}to{transform:scaleX(0)}}@media(width<720px){.toast-viewport{top:max(var(--basalt-space-4),env(safe-area-inset-top,var(--basalt-space-0)));bottom:auto}:root:has(.topbar,.app-header) .toast-viewport{top:calc(var(--basalt-sticky-offset) + var(--basalt-space-2))}.toast{--_dir: 1;top:0;bottom:auto;transform-origin:top center}}@media(prefers-reduced-motion:reduce){.toast{transition-property:opacity}.toast[data-starting-style],.toast[data-ending-style]{transform:var(--_rest)}.toast[data-ending-style]{transition-duration:calc(var(--basalt-duration-slow) * .75)}.toast-drain{display:none}}@media(forced-colors:active){.toast{border-color:CanvasText}.toast:focus-visible,.toast-viewport:focus>.toast[data-front]{outline-color:Highlight}.toast[data-status] :is(.toast-seat,.toast-title){color:CanvasText}.toast-drain{forced-color-adjust:none;background:CanvasText}}@media print{.toast-viewport{display:none}}} diff --git a/.agent/skills/basalt-html/parts/topbar-nav.css b/.agent/skills/basalt-html/parts/topbar-nav.css index 8a7f3e14..2151860d 100644 --- a/.agent/skills/basalt-html/parts/topbar-nav.css +++ b/.agent/skills/basalt-html/parts/topbar-nav.css @@ -1 +1 @@ -@layer basalt{.topbar-links{--bh-tap-margin: 0;--panel-plate: var(--basalt-state-selected);position:relative;isolation:isolate;display:flex;margin-inline-start:var(--basalt-space-2)}.topbar .topbar-links a{position:relative;z-index:1;box-sizing:border-box;display:flex;flex-direction:column;justify-content:center;height:var(--basalt-size-tap-min);min-height:0;margin:0;padding-inline:calc(var(--basalt-space-0-5) + var(--basalt-space-3));color:var(--basalt-text-secondary);font:var(--basalt-font-weight-regular) var(--bh-base);letter-spacing:var(--basalt-text-base-tracking);text-decoration:none;white-space:nowrap;outline:none;cursor:pointer;-webkit-tap-highlight-color:transparent;transition:color var(--basalt-duration-fast) var(--basalt-ease-out)}.topbar-links a:before{content:"";position:absolute;z-index:-1;inset:calc((var(--basalt-size-tap-min) - var(--basalt-size-control-md)) / 2) var(--basalt-space-0-5);border-radius:var(--basalt-radius-full);background-color:transparent;transition:background-color var(--basalt-duration-fast) var(--basalt-ease-out)}.topbar-links a[data-label]:after{content:attr(data-label);height:0;overflow:hidden;visibility:hidden;font-weight:var(--basalt-font-weight-semibold);user-select:none;pointer-events:none}.topbar .topbar-links a[aria-current=page]{color:var(--basalt-text-primary);font-weight:var(--basalt-font-weight-semibold)}@media(hover:hover){.topbar .topbar-links a:hover{color:var(--basalt-text-primary);transition-duration:var(--basalt-duration-instant)}.topbar-links a:hover:before{background-color:var(--basalt-state-selected);transition-duration:var(--basalt-duration-instant)}}.topbar .topbar-links a:is(:active,:focus-visible){color:var(--basalt-text-primary);transition-duration:var(--basalt-duration-instant)}.topbar-links a:active:before{background-color:var(--basalt-state-selected);transition-duration:var(--basalt-duration-instant)}.topbar-links a:focus-visible:before{outline:var(--basalt-size-focus-width) solid var(--basalt-border-focus);outline-offset:var(--basalt-size-focus-offset)}.topbar-links[data-keys] a:is(:hover,:active):before{background-color:transparent}.topbar .topbar-links[data-keys] a:hover:not([aria-current],:focus-visible){color:var(--basalt-text-secondary)}.topbar-links>.plate{border-radius:var(--basalt-radius-full)}@media(prefers-reduced-motion:no-preference)and (forced-colors:none)and (hover:hover)and (pointer:fine){.topbar-links[data-glide] a:before{background-color:transparent;transition-duration:var(--basalt-duration-instant)}}.topbar-menu-trigger{display:none}@media(width<720px){.topbar-links,.topbar-action{display:none}.topbar-menu-trigger{display:inline-flex}}.topbar-menu-actions{display:flex;align-items:center;flex:none;gap:var(--basalt-space-1)}@media(width<720px){.topbar-menu .sheet-band .btn{--_h: var(--basalt-size-tap-min);border-radius:var(--basalt-radius-md);min-width:var(--basalt-size-tap-min)}}.topbar-menu .sheet-band{gap:var(--basalt-space-2)}.topbar-menu-loops{padding:var(--basalt-space-2) max(var(--basalt-gutter),env(safe-area-inset-right,var(--basalt-space-0))) 0 max(var(--basalt-gutter),env(safe-area-inset-left,var(--basalt-space-0)))}.topbar-menu-loops .btn{--_h: var(--basalt-size-tap-min);border-radius:var(--basalt-radius-md)}.topbar-menu .nav{padding-block:var(--basalt-space-2);padding-inline:max(var(--basalt-space-1-5),env(safe-area-inset-left,var(--basalt-space-0))) max(var(--basalt-space-1-5),env(safe-area-inset-right,var(--basalt-space-0)))}.topbar-menu-foot{padding:var(--basalt-space-2) max(var(--basalt-gutter),env(safe-area-inset-right,var(--basalt-space-0))) max(var(--basalt-space-4),env(safe-area-inset-bottom,var(--basalt-space-0))) max(var(--basalt-gutter),env(safe-area-inset-left,var(--basalt-space-0)))}.topbar-menu-foot .btn{--_h: var(--basalt-size-tap-min);border-radius:var(--basalt-radius-md);width:100%}@media(forced-colors:active){.topbar .topbar-links a:hover,.topbar .topbar-links a:active{forced-color-adjust:none;color:HighlightText}.topbar-links a:hover:before,.topbar-links a:active:before{background-color:Highlight}.topbar .topbar-links[data-keys] a:is(:hover,:active){forced-color-adjust:auto;color:inherit}.topbar-links[data-keys] a:is(:hover,:active):before{background-color:transparent}}} +@layer basalt{.topbar-links{--bh-tap-margin: 0;--panel-plate: var(--basalt-state-selected);position:relative;isolation:isolate;display:flex;margin-inline-start:var(--basalt-space-2)}.topbar .topbar-links a{position:relative;z-index:1;box-sizing:border-box;display:flex;flex-direction:column;justify-content:center;height:var(--basalt-size-tap-min);min-height:0;margin:0;padding-inline:calc(var(--basalt-space-0-5) + var(--basalt-space-3));color:var(--basalt-text-secondary);font:var(--basalt-font-weight-regular) var(--bh-base);letter-spacing:var(--basalt-text-base-tracking);text-decoration:none;white-space:nowrap;outline:none;cursor:pointer;-webkit-tap-highlight-color:transparent;transition:color var(--basalt-duration-fast) var(--basalt-ease-out)}.topbar-links a:before{content:"";position:absolute;z-index:-1;inset:calc((var(--basalt-size-tap-min) - var(--basalt-size-control-md)) / 2) var(--basalt-space-0-5);border-radius:var(--basalt-radius-full);background-color:transparent;transition:background-color var(--basalt-duration-fast) var(--basalt-ease-out)}.topbar-links a[data-label]:after{content:attr(data-label);height:0;overflow:hidden;visibility:hidden;font-weight:var(--basalt-font-weight-semibold);user-select:none;pointer-events:none}.topbar .topbar-links a[aria-current=page]{color:var(--basalt-text-primary);font-weight:var(--basalt-font-weight-semibold)}@media(hover:hover){.topbar .topbar-links a:hover{color:var(--basalt-text-primary);transition-duration:var(--basalt-duration-instant)}.topbar-links a:hover:before{background-color:var(--basalt-state-selected);transition-duration:var(--basalt-duration-instant)}}.topbar .topbar-links a:is(:active,:focus-visible){color:var(--basalt-text-primary);transition-duration:var(--basalt-duration-instant)}.topbar-links a:active:before{background-color:var(--basalt-state-selected);transition-duration:var(--basalt-duration-instant)}.topbar-links a:focus-visible:before{outline:var(--basalt-size-focus-width) solid var(--basalt-border-focus);outline-offset:var(--basalt-size-focus-offset)}.topbar-links[data-keys] a:is(:hover,:active):before{background-color:transparent}.topbar .topbar-links[data-keys] a:hover:not([aria-current],:focus-visible){color:var(--basalt-text-secondary)}.topbar-links>.plate{border-radius:var(--basalt-radius-full)}@media(prefers-reduced-motion:no-preference)and (forced-colors:none)and (hover:hover)and (pointer:fine){.topbar-links[data-glide] a:before{background-color:transparent;transition-duration:var(--basalt-duration-instant)}}.topbar-menu-trigger{display:none}@media(width<720px){.topbar-links,.topbar-action{display:none}.topbar-menu-trigger{display:inline-flex}.topbar-inner:has(>.topbar-menu-trigger)>:not(.topbar-menu-trigger){--basalt-edge-room-end: initial}}.topbar-menu-actions>:not(:last-child){--basalt-edge-room-end: initial}.topbar-menu-actions{display:flex;align-items:center;flex:none;gap:var(--basalt-space-1)}@media(width<720px){.topbar-menu .sheet-band .btn{--_h: var(--basalt-size-tap-min);border-radius:var(--basalt-radius-md);min-width:var(--basalt-size-tap-min)}}.topbar-menu .sheet-band{gap:var(--basalt-space-2)}.topbar-menu-loops{padding-block:var(--basalt-space-2) 0;padding-inline:max(var(--basalt-gutter),var(--bh-inset-start)) max(var(--basalt-gutter),var(--bh-inset-end))}.topbar-menu-loops .btn{--_h: var(--basalt-size-tap-min);border-radius:var(--basalt-radius-md)}.topbar-menu .nav{padding-block:var(--basalt-space-2);padding-inline:max(var(--basalt-space-1-5),var(--bh-inset-start)) max(var(--basalt-space-1-5),var(--bh-inset-end))}.topbar-menu-foot{padding-block:var(--basalt-space-2) max(var(--basalt-space-4),env(safe-area-inset-bottom,var(--basalt-space-0)));padding-inline:max(var(--basalt-gutter),var(--bh-inset-start)) max(var(--basalt-gutter),var(--bh-inset-end))}.topbar-menu-foot .btn{--_h: var(--basalt-size-tap-min);border-radius:var(--basalt-radius-md);width:100%}@media(forced-colors:active){.topbar .topbar-links a:hover,.topbar .topbar-links a:active{forced-color-adjust:none;color:HighlightText}.topbar-links a:hover:before,.topbar-links a:active:before{background-color:Highlight}.topbar .topbar-links[data-keys] a:is(:hover,:active){forced-color-adjust:auto;color:inherit}.topbar-links[data-keys] a:is(:hover,:active):before{background-color:transparent}}} diff --git a/.agent/skills/basalt-html/parts/topbar-nav.js b/.agent/skills/basalt-html/parts/topbar-nav.js index 7b1c2505..b52003a2 100644 --- a/.agent/skills/basalt-html/parts/topbar-nav.js +++ b/.agent/skills/basalt-html/parts/topbar-nav.js @@ -1 +1 @@ -(function(M){"use strict";var h=M._,b=0;function r(i,a,e){var l=document.createElement(i);a&&(l.className=a);for(var o in e||{})l.setAttribute(o,e[o]);return l}function p(i){var a=i.cloneNode(!0);return a.removeAttribute("id"),a.querySelectorAll("[id]").forEach(function(e){e.removeAttribute("id")}),a}function k(i){if(!i.__bhNav){var a=i.querySelector(".topbar-inner"),e=a&&a.querySelector(".topbar-links"),l=a&&a.querySelector(".topbar-action");if(!(!e&&!l)){i.__bhNav=!0;var o=i.getAttribute("data-menu-label")||"Menu",T=i.getAttribute("data-close-label")||"Close menu",v="bh-topbar-menu"+(b?"-"+b:"");if(b++,e){e.querySelectorAll("a").forEach(function(t){t.setAttribute("data-label",t.textContent.trim())});var f=r("span","plate",{"aria-hidden":"true"});e.insertBefore(f,e.firstChild),h.glide(e,f,{active:"a[data-hovered]",item:"a"})}var d=r("button","btn topbar-menu-trigger",{type:"button","data-variant":"ghost","data-icon-only":"","aria-label":o,"aria-expanded":"false","aria-controls":v,"data-dialog-open":"#"+v});d.innerHTML='<span data-glyph="menu"></span>',a.appendChild(d);var n=r("dialog","panel float modal sheet topbar-menu",{id:v,"data-side":"top","aria-label":o}),u=r("div","sheet-band"),m=a.querySelector(".brand");m&&u.appendChild(p(m)),u.appendChild(r("span","spacer"));var c=r("div","topbar-menu-actions");a.querySelectorAll("[data-tool]").forEach(function(t){c.appendChild(p(t))});var g=a.querySelector("[data-theme-toggle]");g&&c.appendChild(p(g));var y=r("button","btn",{type:"button","data-variant":"ghost","data-icon-only":"","aria-label":T,"data-dialog-close":"",autofocus:""});if(y.innerHTML='<span data-glyph="close"></span>',c.appendChild(y),u.appendChild(c),n.appendChild(u),a.querySelector("[data-loops-toggle]")){var C=r("div","topbar-menu-loops"),A=r("button","btn",{type:"button","data-loops-toggle":"","aria-pressed":"false"});A.innerHTML='<span class="btn-check" data-glyph="pause" aria-hidden="true"></span>Pause animations',C.appendChild(A),n.appendChild(C)}if(e){var q=r("nav","nav",{"aria-label":e.getAttribute("aria-label")||"Primary"}),S=r("ul","nav-list");e.querySelectorAll("a").forEach(function(t){var s=r("a","nav-item",{href:t.getAttribute("href")||"#"});t.getAttribute("aria-current")&&s.setAttribute("aria-current",t.getAttribute("aria-current")),s.innerHTML='<span class="nav-pill"><span class="nav-label"></span></span>',s.querySelector(".nav-label").textContent=t.textContent.trim();var x=document.createElement("li");x.appendChild(s),S.appendChild(x)}),q.appendChild(S),n.appendChild(q)}if(l){var E=r("div","topbar-menu-foot"),L=p(l);L.classList.remove("topbar-action"),E.appendChild(L),n.appendChild(E)}n.addEventListener("click",function(t){t.target.closest(".nav-item")&&n.close()}),n.addEventListener("close",function(){d.setAttribute("aria-expanded","false")}),d.addEventListener("click",function(){d.setAttribute("aria-expanded","true")}),document.body.appendChild(n);var _=matchMedia("(width >= 720px)");_.addEventListener("change",function(){if(!(!_.matches||!n.open)){var t=e&&(e.querySelector('a[aria-current="page"]')||e.querySelector("a"));t&&(n.__opener=t),n.close()}})}}}h.step(30,"buildTopbarMenu",function(){document.querySelectorAll(".topbar").forEach(k)})})(window.Basalt); +(function(M){"use strict";var h=M._,b=0;function n(i,a,e){var l=document.createElement(i);a&&(l.className=a);for(var o in e||{})l.setAttribute(o,e[o]);return l}function p(i){var a=i.cloneNode(!0);return a.removeAttribute("id"),a.querySelectorAll("[id]").forEach(function(e){e.removeAttribute("id")}),a}function k(i){if(!i.__bhNav){var a=i.querySelector(".topbar-inner"),e=a&&a.querySelector(".topbar-links"),l=a&&a.querySelector(".topbar-action");if(!(!e&&!l)){i.__bhNav=!0;var o=i.getAttribute("data-menu-label")||"Menu",T=i.getAttribute("data-close-label")||"Close menu",v="bh-topbar-menu"+(b?"-"+b:"");if(b++,e){e.querySelectorAll("a").forEach(function(t){t.setAttribute("data-label",t.textContent.trim())});var f=n("span","plate",{"aria-hidden":"true"});e.insertBefore(f,e.firstChild),h.glide(e,f,{active:"a[data-hovered]",item:"a"})}var d=n("button","btn topbar-menu-trigger",{type:"button","data-variant":"ghost","data-icon-only":"","data-edge":"end","aria-label":o,"aria-expanded":"false","aria-controls":v,"data-dialog-open":"#"+v});d.innerHTML='<span data-glyph="menu"></span>',a.appendChild(d);var r=n("dialog","panel float modal sheet topbar-menu",{id:v,"data-side":"top","aria-label":o}),u=n("div","sheet-band"),m=a.querySelector(".brand");m&&u.appendChild(p(m)),u.appendChild(n("span","spacer"));var c=n("div","topbar-menu-actions");a.querySelectorAll("[data-tool]").forEach(function(t){c.appendChild(p(t))});var g=a.querySelector("[data-theme-toggle]");g&&c.appendChild(p(g));var y=n("button","btn",{type:"button","data-variant":"ghost","data-icon-only":"","data-edge":"end","aria-label":T,"data-dialog-close":"",autofocus:""});if(y.innerHTML='<span data-glyph="close"></span>',c.appendChild(y),u.appendChild(c),r.appendChild(u),a.querySelector("[data-loops-toggle]")){var C=n("div","topbar-menu-loops"),A=n("button","btn",{type:"button","data-loops-toggle":"","aria-pressed":"false"});A.innerHTML='<span class="btn-check" data-glyph="pause" aria-hidden="true"></span>Pause animations',C.appendChild(A),r.appendChild(C)}if(e){var q=n("nav","nav",{"aria-label":e.getAttribute("aria-label")||"Primary"}),S=n("ul","nav-list");e.querySelectorAll("a").forEach(function(t){var s=n("a","nav-item",{href:t.getAttribute("href")||"#"});t.getAttribute("aria-current")&&s.setAttribute("aria-current",t.getAttribute("aria-current")),s.innerHTML='<span class="nav-pill"><span class="nav-label"></span></span>',s.querySelector(".nav-label").textContent=t.textContent.trim();var x=document.createElement("li");x.appendChild(s),S.appendChild(x)}),q.appendChild(S),r.appendChild(q)}if(l){var E=n("div","topbar-menu-foot"),L=p(l);L.classList.remove("topbar-action"),E.appendChild(L),r.appendChild(E)}r.addEventListener("click",function(t){t.target.closest(".nav-item")&&r.close()}),r.addEventListener("close",function(){d.setAttribute("aria-expanded","false")}),d.addEventListener("click",function(){d.setAttribute("aria-expanded","true")}),document.body.appendChild(r);var _=matchMedia("(width >= 720px)");_.addEventListener("change",function(){if(!(!_.matches||!r.open)){var t=e&&(e.querySelector('a[aria-current="page"]')||e.querySelector("a"));t&&(r.__opener=t),r.close()}})}}}h.step(30,"buildTopbarMenu",function(){document.querySelectorAll(".topbar").forEach(k)})})(window.Basalt); diff --git a/.agent/skills/basalt-html/parts/topbar.css b/.agent/skills/basalt-html/parts/topbar.css index 5d24ae7c..9deba6de 100644 --- a/.agent/skills/basalt-html/parts/topbar.css +++ b/.agent/skills/basalt-html/parts/topbar.css @@ -1 +1 @@ -@layer basalt{:root{--bh-inset-top: env(safe-area-inset-top, var(--basalt-space-0));--bh-inset-left: env(safe-area-inset-left, var(--basalt-space-0));--bh-inset-right: env(safe-area-inset-right, var(--basalt-space-0));--basalt-sticky-offset: calc(var(--basalt-size-header) + var(--bh-inset-top));--bh-pad-left: max(var(--basalt-gutter), var(--bh-inset-left));--bh-pad-right: max(var(--basalt-gutter), var(--bh-inset-right))}:root:has(.topbar,.app-header){scrollbar-gutter:stable;scroll-padding-top:calc(var(--basalt-sticky-offset) + var(--basalt-space-4))}:is(.topbar,.app-header) *{scroll-margin-top:calc(-1 * (var(--basalt-sticky-offset) + var(--basalt-space-4)))}.topbar,.app-header{position:sticky;top:0;z-index:var(--basalt-layer-sticky);height:var(--basalt-sticky-offset);padding-top:var(--bh-inset-top);background:var(--basalt-surface-chrome);-webkit-backdrop-filter:blur(var(--basalt-blur-chrome));backdrop-filter:blur(var(--basalt-blur-chrome));border-bottom:var(--basalt-size-hairline) solid var(--basalt-border-hairline);color:var(--basalt-text-primary)}.skip-link{position:fixed;top:calc(var(--basalt-sticky-offset) + var(--basalt-space-2));inset-inline-start:var(--bh-pad-left);transform:none}:root:has(.topbar) .skip-link{inset-inline-start:max(var(--bh-pad-left),calc((100% - var(--basalt-size-page-width)) / 2 + var(--bh-pad-left)))}.skip-link:not(:focus){clip-path:inset(50%)}:is(.topbar,.app-header) :is(.faint,.necessity){color:var(--basalt-text-secondary)}:is(.topbar,.app-header) .btn[data-variant=ghost]:active:not([disabled],[aria-disabled=true],[aria-busy=true]){color:var(--basalt-text-primary)}:is(.topbar,.app-header)[data-solid]{background:var(--basalt-surface-page);-webkit-backdrop-filter:none;backdrop-filter:none}@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))){.topbar,.app-header{background:var(--basalt-surface-page)}}@media(prefers-reduced-transparency:reduce){.topbar,.app-header{background:var(--basalt-surface-page);-webkit-backdrop-filter:none;backdrop-filter:none}}.topbar-inner{display:flex;align-items:center;gap:var(--basalt-space-2);height:calc(var(--basalt-size-header) - var(--basalt-size-hairline));max-width:var(--basalt-size-page-width);margin-inline:auto;padding-top:var(--basalt-size-hairline);padding-inline:var(--bh-pad-left) var(--bh-pad-right)}.brand{position:relative;display:inline-flex;align-items:center;flex:none;gap:var(--basalt-space-2);height:var(--basalt-size-tap-min);min-width:var(--basalt-size-tap-min);margin:0;color:var(--basalt-text-primary);font:var(--basalt-font-weight-semibold) var(--bh-md);letter-spacing:var(--basalt-text-md-tracking);text-decoration:none;white-space:nowrap;outline:none;-webkit-tap-highlight-color:transparent}.brand:focus-visible:after{content:"";position:absolute;inset-block:calc((var(--basalt-size-tap-min) - var(--basalt-size-control-md)) / 2);inset-inline:0;border-radius:var(--basalt-radius-sm);outline:var(--basalt-size-focus-width) solid var(--basalt-border-focus);outline-offset:var(--basalt-size-focus-offset);pointer-events:none}.lockup-sprite{position:absolute;width:0;height:0;overflow:hidden;pointer-events:none}.lockup{display:block;flex:none;max-width:none;pointer-events:none}.lockup-2x{display:none}@media(min-resolution:2dppx),(-webkit-min-device-pixel-ratio:2){.lockup-1x{display:none}.lockup-2x{display:block}}.site-slot{position:relative;height:var(--basalt-sticky-offset)}.site-slot>.topbar{--_from: calc(-100% - var(--basalt-size-hairline));position:absolute;inset:0 0 auto}.site-slot>.topbar[data-form=bar]{position:fixed;top:0}.site-slot>.topbar[data-form=bar][data-motion=from]{transform:translateY(var(--_from));transition:none}.site-slot>.topbar[data-form=bar][data-motion=in]{transform:translateY(0);transition:transform var(--basalt-duration-slower) var(--basalt-ease-out)}.site-slot>.topbar[data-form=bar][data-motion=out]{transform:translateY(var(--_from));transition:transform calc(var(--basalt-duration-slower) * .75) var(--basalt-ease-in)}@media(prefers-reduced-motion:reduce){.site-slot>.topbar[data-form=bar][data-motion]{transform:none}.site-slot>.topbar[data-form=bar][data-motion=from]{opacity:0}.site-slot>.topbar[data-form=bar][data-motion=in]{opacity:1;transition:opacity var(--basalt-duration-slower) var(--basalt-ease-out)}.site-slot>.topbar[data-form=bar][data-motion=out]{opacity:0;transition:opacity calc(var(--basalt-duration-slower) * .75) var(--basalt-ease-in)}}.site-page{display:flex;flex-direction:column;min-height:100svh}.site-page>main{flex:1 0 auto}.site-footer{--_gap: var(--basalt-space-12);--_above: var(--basalt-space-16);box-sizing:border-box;width:100%;max-width:var(--basalt-size-page-width);margin:var(--_above) auto 0;padding:0 var(--bh-pad-right) calc(var(--basalt-space-8) + env(safe-area-inset-bottom,var(--basalt-space-0))) var(--bh-pad-left);color:var(--basalt-text-secondary);font:var(--basalt-font-weight-regular) var(--bh-sm);letter-spacing:var(--basalt-text-sm-tracking)}.site-footer-body{padding-top:var(--basalt-space-8);border-top:var(--basalt-size-hairline) solid var(--basalt-border-divider)}.site-footer-top{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));column-gap:var(--basalt-gutter);row-gap:var(--basalt-space-8)}.site-footer-id{grid-column:1 / span 4;display:flex;flex-direction:column;align-items:flex-start;gap:var(--basalt-space-3);min-width:0}.site-footer-id>.brand{margin-block:calc(-1 * (var(--basalt-size-tap-min) - var(--basalt-size-control-md)) / 2)}.site-footer-note{margin:0;max-width:var(--basalt-size-prose-width)}.site-footer-links{grid-column:5 / -1;min-width:0}.site-footer-top:not(:has(.site-footer-id))>.site-footer-links{grid-column:1 / -1}.site-footer-groups{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));column-gap:var(--basalt-gutter);row-gap:var(--basalt-space-8);align-items:start}.site-footer-group{min-width:0}.site-footer-label{margin:0 0 var(--basalt-space-1);color:var(--basalt-text-primary);font:var(--basalt-font-weight-medium) var(--bh-sm);letter-spacing:var(--basalt-text-sm-tracking)}.site-footer-links-host{--_hang: calc(var(--basalt-space-0-5) + var(--basalt-space-2));position:relative;isolation:isolate;margin-inline-start:calc(-1 * var(--_hang))}.site-footer-links-host>ul{margin:0;padding:0;list-style:none}.site-footer-links-host a{position:relative;z-index:1;box-sizing:border-box;display:flex;flex-direction:column;justify-content:center;width:max-content;min-height:var(--basalt-size-control-md);margin:0;padding-inline:var(--_hang);color:var(--basalt-text-secondary);font:var(--basalt-font-weight-regular) var(--bh-sm);letter-spacing:var(--basalt-text-sm-tracking);text-decoration:none;overflow-wrap:anywhere;outline:none;-webkit-tap-highlight-color:transparent;transition:color var(--basalt-duration-fast) var(--basalt-ease-out)}.site-footer-links-host a:before{content:"";position:absolute;z-index:-1;inset:calc((100% - var(--basalt-size-control-sm)) / 2) var(--basalt-space-0-5);border-radius:var(--basalt-radius-full);background-color:transparent;transition:background-color var(--basalt-duration-fast) var(--basalt-ease-out)}.site-footer-links-host a[data-label]:after{content:attr(data-label);height:0;overflow:hidden;visibility:hidden;font-weight:var(--basalt-font-weight-semibold);user-select:none;pointer-events:none}.site-footer-links-host a[aria-current=page]{color:var(--basalt-text-primary);font-weight:var(--basalt-font-weight-semibold)}@media(hover:hover){.site-footer-links-host a:hover{color:var(--basalt-text-primary);transition-duration:var(--basalt-duration-instant)}.site-footer-links-host a:hover:before{background-color:var(--basalt-state-selected);transition-duration:var(--basalt-duration-instant)}}.site-footer-links-host a:is(:active,:focus-visible){color:var(--basalt-text-primary);transition-duration:var(--basalt-duration-instant)}.site-footer-links-host a:active:before{background-color:var(--basalt-state-selected);transition-duration:var(--basalt-duration-instant)}.site-footer-links-host a:focus-visible:before{outline:var(--basalt-size-focus-width) solid var(--basalt-border-focus);outline-offset:var(--basalt-size-focus-offset)}.site-footer-links-host[data-keys] a:is(:hover,:active):before{background-color:transparent}.site-footer-links-host[data-keys] a:hover:not([aria-current],:focus-visible){color:var(--basalt-text-secondary)}.site-footer-links-host>.plate{--panel-plate: var(--basalt-state-selected);border-radius:var(--basalt-radius-full)}@media(prefers-reduced-motion:no-preference)and (forced-colors:none)and (hover:hover)and (pointer:fine){.site-footer-links-host[data-glide] a:before{background-color:transparent;transition-duration:var(--basalt-duration-instant)}}@media(pointer:coarse),(width<720px){.site-footer-links-host a{min-height:var(--basalt-size-tap-min)}}.site-footer[data-form=line] .site-footer-top{display:flex;flex-wrap:wrap;align-items:center;column-gap:var(--basalt-space-6);row-gap:var(--basalt-space-2)}.site-footer[data-form=line] .site-footer-links{flex:1 1 auto}.site-footer[data-form=line] .site-footer-links-host{margin-inline-start:0}.site-footer[data-form=line] .site-footer-links-host>ul{display:flex;flex-wrap:wrap}.site-footer-base{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;column-gap:var(--basalt-space-6);row-gap:var(--basalt-space-4);margin-top:var(--_gap)}.site-footer[data-form=line] .site-footer-base{margin-top:var(--basalt-space-4)}.site-footer-legal{margin:0;max-width:var(--basalt-size-prose-width);color:var(--basalt-text-tertiary)}.site-footer-toggle{display:none;align-items:center;justify-content:space-between;box-sizing:border-box;width:100%;height:var(--basalt-size-tap-min);margin:0;padding:0;border:0;background:transparent;color:var(--basalt-text-primary);font:inherit;letter-spacing:inherit;text-align:start;cursor:pointer;-webkit-tap-highlight-color:transparent}.site-footer-toggle:focus-visible{outline:var(--basalt-size-focus-width) solid var(--basalt-border-focus);outline-offset:var(--basalt-size-focus-offset)}.site-footer-toggle>svg{color:var(--basalt-text-secondary);transition:transform var(--basalt-duration-slow) var(--basalt-ease-out),color var(--basalt-duration-fast) var(--basalt-ease-out)}@media(hover:hover){.site-footer-toggle:hover>svg{color:var(--basalt-text-primary)}}.site-footer-group[data-open] .site-footer-toggle>svg{transform:rotate(180deg)}@media(prefers-reduced-motion:reduce){.site-footer-toggle>svg{transition:color var(--basalt-duration-fast) var(--basalt-ease-out)}}@media(width<1024px){.site-footer{--_above: var(--basalt-space-12)}.site-footer-id,.site-footer-links{grid-column:1 / -1}.site-footer-id{flex-direction:row;flex-wrap:wrap;align-items:center;column-gap:var(--basalt-space-6)}}@media(width<720px){.site-footer{--_gap: var(--basalt-space-8);--_above: var(--basalt-space-8)}.site-footer-top{row-gap:var(--basalt-space-6)}.site-footer-id{flex-direction:column;align-items:flex-start}.site-footer-groups{grid-template-columns:repeat(2,minmax(0,1fr));column-gap:var(--basalt-space-4);row-gap:var(--basalt-space-6)}.site-footer-base{flex-direction:column;align-items:flex-start}.site-footer[data-wired] .site-footer-groups{grid-template-columns:minmax(0,1fr);row-gap:0}.site-footer[data-wired] .site-footer-group+.site-footer-group{border-top:var(--basalt-size-hairline) solid var(--basalt-border-divider)}.site-footer[data-wired] .site-footer-label{margin:0}.site-footer[data-wired] .site-footer-label-wide{display:none}.site-footer[data-wired] .site-footer-toggle{display:flex}.site-footer[data-wired] .site-footer-group:not([data-open])>.site-footer-links-host{display:none}.site-footer[data-wired] .site-footer-group[data-open]>.site-footer-links-host{padding-bottom:var(--basalt-space-2)}}@media(width<720px){.topbar-inner{gap:var(--basalt-space-1)}:is(.topbar,.app-header) .btn{--_h: var(--basalt-size-tap-min);border-radius:var(--basalt-radius-md);min-width:var(--basalt-size-tap-min)}}@media(forced-colors:active){.topbar,.app-header{background:Canvas;color:CanvasText;border-bottom-color:CanvasText;-webkit-backdrop-filter:none;backdrop-filter:none}.site-footer-body,.site-footer[data-wired] .site-footer-group+.site-footer-group{border-color:CanvasText}.site-footer-links-host a:hover,.site-footer-links-host a:active{forced-color-adjust:none;color:HighlightText}.site-footer-links-host a:hover:before,.site-footer-links-host a:active:before{background-color:Highlight}.site-footer-links-host[data-keys] a:is(:hover,:active){forced-color-adjust:auto;color:inherit}.site-footer-links-host[data-keys] a:is(:hover,:active):before{background-color:transparent}}@media print{.topbar,.app-header{position:static;background:var(--basalt-surface-page);-webkit-backdrop-filter:none;backdrop-filter:none}.site-slot>.topbar[data-form]{position:absolute;transform:none;opacity:1;transition:none}.site-footer-toggle{display:none}}.version-link{position:relative;box-sizing:border-box;display:inline-flex;flex-wrap:wrap;align-items:baseline;column-gap:var(--basalt-space-3);max-width:100%;overflow-x:clip;padding-block:var(--basalt-space-1);border-radius:var(--basalt-radius-xs);color:var(--basalt-text-secondary);font:var(--basalt-font-weight-regular) var(--basalt-text-xs-size) / var(--basalt-text-xs-line-height) var(--basalt-font-family-sans);letter-spacing:var(--basalt-text-xs-tracking);font-variant-numeric:tabular-nums;text-decoration:none;-webkit-tap-highlight-color:transparent;transition:color var(--basalt-duration-fast) var(--basalt-ease-out)}.version-link-words,.version-link-date{position:relative;min-width:0;overflow-wrap:anywhere}.version-link-date:before{content:"·";content:"·" / "";position:absolute;inset-inline-end:100%;width:var(--basalt-space-3);text-align:center}.version-link-pre{display:inline-block;max-width:100%}.version-link-number{display:inline-flex;flex-direction:column;max-width:100%}.version-link-number:after{content:attr(data-label);height:0;overflow:hidden;visibility:hidden;font-weight:var(--basalt-font-weight-semibold);user-select:none;pointer-events:none}.version-link:hover{color:var(--basalt-text-primary)}.version-link:hover :is(.version-link-words,.version-link-date>time){text-decoration:underline;text-decoration-thickness:var(--basalt-size-hairline);text-underline-offset:var(--basalt-size-underline-offset)}.version-link:focus-visible{outline:var(--basalt-size-focus-width) solid var(--basalt-border-focus);outline-offset:var(--basalt-size-focus-offset)}.version-link[aria-current=page]{color:var(--basalt-text-primary)}.version-link[aria-current=page] .version-link-number{font-weight:var(--basalt-font-weight-semibold)}@media(pointer:coarse){.version-link:after{content:"";position:absolute;inset-inline:0;top:50%;height:max(100%,var(--basalt-size-tap-min));transform:translateY(-50%)}}.site-footer-legal-row{display:flex;flex-wrap:wrap;align-items:baseline;gap:var(--basalt-space-1) var(--basalt-space-4);min-width:0}.site-footer-legal-row .version-link{font-size:var(--basalt-text-sm-size);line-height:var(--basalt-text-sm-line-height);letter-spacing:var(--basalt-text-sm-tracking)}} +@layer basalt{:root{--bh-inset-top: env(safe-area-inset-top, var(--basalt-space-0));--basalt-sticky-offset: calc(var(--basalt-size-header) + var(--bh-inset-top));--bh-pad-start: max(var(--basalt-gutter), var(--bh-inset-start));--bh-pad-end: max(var(--basalt-gutter), var(--bh-inset-end))}:root:has(.topbar,.app-header){scrollbar-gutter:stable;scroll-padding-top:calc(var(--basalt-sticky-offset) + var(--basalt-space-4))}:is(.topbar,.app-header) *{scroll-margin-top:calc(-1 * (var(--basalt-sticky-offset) + var(--basalt-space-4)))}.topbar,.app-header{position:sticky;top:0;z-index:var(--basalt-layer-sticky);height:var(--basalt-sticky-offset);padding-top:var(--bh-inset-top);background:var(--basalt-surface-chrome);-webkit-backdrop-filter:blur(var(--basalt-blur-chrome));backdrop-filter:blur(var(--basalt-blur-chrome));border-bottom:var(--basalt-size-hairline) solid var(--basalt-border-hairline);color:var(--basalt-text-primary)}.skip-link{position:fixed;top:calc(var(--basalt-sticky-offset) + var(--basalt-space-2));inset-inline-start:var(--bh-pad-start);transform:none}:root:has(.topbar) .skip-link{inset-inline-start:max(var(--bh-pad-start),calc((100% - var(--basalt-size-page-width)) / 2 + var(--bh-pad-start)))}.skip-link:not(:focus){clip-path:inset(50%)}:is(.topbar,.app-header) :is(.faint,.necessity){color:var(--basalt-text-secondary)}:is(.topbar,.app-header) .btn[data-variant=ghost]:active:not([disabled],[aria-disabled=true],[aria-busy=true]){color:var(--basalt-text-primary)}:is(.topbar,.app-header)[data-solid]{background:var(--basalt-surface-page);-webkit-backdrop-filter:none;backdrop-filter:none}@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))){.topbar,.app-header{background:var(--basalt-surface-page)}}@media(prefers-reduced-transparency:reduce){.topbar,.app-header{background:var(--basalt-surface-page);-webkit-backdrop-filter:none;backdrop-filter:none}}.topbar-inner{display:flex;align-items:center;gap:var(--basalt-space-2);height:calc(var(--basalt-size-header) - var(--basalt-size-hairline));max-width:var(--basalt-size-page-width);margin-inline:auto;padding-top:var(--basalt-size-hairline);padding-inline:var(--bh-pad-start) var(--bh-pad-end)}:is(.topbar,.app-header){--basalt-edge-room-end: calc(var(--bh-pad-end) - var(--bh-inset-end));--basalt-edge-room: initial;--basalt-edge-room-start: initial}.brand{position:relative;display:inline-flex;align-items:center;flex:none;gap:var(--basalt-space-2);height:var(--basalt-size-tap-min);min-width:var(--basalt-size-tap-min);margin:0;color:var(--basalt-text-primary);font:var(--basalt-font-weight-semibold) var(--bh-md);letter-spacing:var(--basalt-text-md-tracking);text-decoration:none;white-space:nowrap;outline:none;-webkit-tap-highlight-color:transparent}.brand:focus-visible:after{content:"";position:absolute;inset-block:calc((var(--basalt-size-tap-min) - var(--basalt-size-control-md)) / 2);inset-inline:0;border-radius:var(--basalt-radius-sm);outline:var(--basalt-size-focus-width) solid var(--basalt-border-focus);outline-offset:var(--basalt-size-focus-offset);pointer-events:none}.lockup-sprite{position:absolute;width:0;height:0;overflow:hidden;pointer-events:none}.lockup{display:block;flex:none;max-width:none;pointer-events:none}.lockup-2x{display:none}@media(min-resolution:2dppx),(-webkit-min-device-pixel-ratio:2){.lockup-1x{display:none}.lockup-2x{display:block}}.site-slot{position:relative;height:var(--basalt-sticky-offset)}.site-slot>.topbar{--_from: calc(-100% - var(--basalt-size-hairline));position:absolute;inset:0 0 auto}.site-slot>.topbar[data-form=bar]{position:fixed;top:0}.site-slot>.topbar[data-form=bar][data-motion=from]{transform:translateY(var(--_from));transition:none}.site-slot>.topbar[data-form=bar][data-motion=in]{transform:translateY(0);transition:transform var(--basalt-duration-slower) var(--basalt-ease-out)}.site-slot>.topbar[data-form=bar][data-motion=out]{transform:translateY(var(--_from));transition:transform calc(var(--basalt-duration-slower) * .75) var(--basalt-ease-in)}@media(prefers-reduced-motion:reduce){.site-slot>.topbar[data-form=bar][data-motion]{transform:none}.site-slot>.topbar[data-form=bar][data-motion=from]{opacity:0}.site-slot>.topbar[data-form=bar][data-motion=in]{opacity:1;transition:opacity var(--basalt-duration-slower) var(--basalt-ease-out)}.site-slot>.topbar[data-form=bar][data-motion=out]{opacity:0;transition:opacity calc(var(--basalt-duration-slower) * .75) var(--basalt-ease-in)}}.site-page{display:flex;flex-direction:column;min-height:100svh}.site-page>main{flex:1 0 auto}.site-footer{--_gap: var(--basalt-space-12);--_above: var(--basalt-space-16);box-sizing:border-box;width:100%;max-width:var(--basalt-size-page-width);margin:var(--_above) auto 0;padding-block:0 calc(var(--basalt-space-8) + env(safe-area-inset-bottom,var(--basalt-space-0)));padding-inline:var(--bh-pad-start) var(--bh-pad-end);color:var(--basalt-text-secondary);font:var(--basalt-font-weight-regular) var(--bh-sm);letter-spacing:var(--basalt-text-sm-tracking)}.site-footer-body{padding-top:var(--basalt-space-8);border-top:var(--basalt-size-hairline) solid var(--basalt-border-divider)}.site-footer-top{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));column-gap:var(--basalt-gutter);row-gap:var(--basalt-space-8)}.site-footer-id{grid-column:1 / span 4;display:flex;flex-direction:column;align-items:flex-start;gap:var(--basalt-space-3);min-width:0}.site-footer-id>.brand{margin-block:calc(-1 * (var(--basalt-size-tap-min) - var(--basalt-size-control-md)) / 2)}.site-footer-note{margin:0;max-width:var(--basalt-size-prose-width)}.site-footer-links{grid-column:5 / -1;min-width:0}.site-footer-top:not(:has(.site-footer-id))>.site-footer-links{grid-column:1 / -1}.site-footer-groups{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));column-gap:var(--basalt-gutter);row-gap:var(--basalt-space-8);align-items:start}.site-footer-group{min-width:0}.site-footer-label{margin:0 0 var(--basalt-space-1);color:var(--basalt-text-primary);font:var(--basalt-font-weight-medium) var(--bh-sm);letter-spacing:var(--basalt-text-sm-tracking)}.site-footer-links-host{--_hang: calc(var(--basalt-space-0-5) + var(--basalt-space-2));position:relative;isolation:isolate;margin-inline-start:calc(-1 * var(--_hang))}.site-footer-links-host>ul{margin:0;padding:0;list-style:none}.site-footer-links-host a{position:relative;z-index:1;box-sizing:border-box;display:flex;flex-direction:column;justify-content:center;width:max-content;min-height:var(--basalt-size-control-md);margin:0;padding-inline:var(--_hang);color:var(--basalt-text-secondary);font:var(--basalt-font-weight-regular) var(--bh-sm);letter-spacing:var(--basalt-text-sm-tracking);text-decoration:none;overflow-wrap:anywhere;outline:none;-webkit-tap-highlight-color:transparent;transition:color var(--basalt-duration-fast) var(--basalt-ease-out)}.site-footer-links-host a:before{content:"";position:absolute;z-index:-1;inset:calc((100% - var(--basalt-size-control-sm)) / 2) var(--basalt-space-0-5);border-radius:var(--basalt-radius-full);background-color:transparent;transition:background-color var(--basalt-duration-fast) var(--basalt-ease-out)}.site-footer-links-host a[data-label]:after{content:attr(data-label);height:0;overflow:hidden;visibility:hidden;font-weight:var(--basalt-font-weight-semibold);user-select:none;pointer-events:none}.site-footer-links-host a[aria-current=page]{color:var(--basalt-text-primary);font-weight:var(--basalt-font-weight-semibold)}@media(hover:hover){.site-footer-links-host a:hover{color:var(--basalt-text-primary);transition-duration:var(--basalt-duration-instant)}.site-footer-links-host a:hover:before{background-color:var(--basalt-state-selected);transition-duration:var(--basalt-duration-instant)}}.site-footer-links-host a:is(:active,:focus-visible){color:var(--basalt-text-primary);transition-duration:var(--basalt-duration-instant)}.site-footer-links-host a:active:before{background-color:var(--basalt-state-selected);transition-duration:var(--basalt-duration-instant)}.site-footer-links-host a:focus-visible:before{outline:var(--basalt-size-focus-width) solid var(--basalt-border-focus);outline-offset:var(--basalt-size-focus-offset)}.site-footer-links-host[data-keys] a:is(:hover,:active):before{background-color:transparent}.site-footer-links-host[data-keys] a:hover:not([aria-current],:focus-visible){color:var(--basalt-text-secondary)}.site-footer-links-host>.plate{--panel-plate: var(--basalt-state-selected);border-radius:var(--basalt-radius-full)}@media(prefers-reduced-motion:no-preference)and (forced-colors:none)and (hover:hover)and (pointer:fine){.site-footer-links-host[data-glide] a:before{background-color:transparent;transition-duration:var(--basalt-duration-instant)}}@media(pointer:coarse),(width<720px){.site-footer-links-host a{min-height:var(--basalt-size-tap-min)}}.site-footer[data-form=line] .site-footer-top{display:flex;flex-wrap:wrap;align-items:center;column-gap:var(--basalt-space-6);row-gap:var(--basalt-space-2)}.site-footer[data-form=line] .site-footer-links{flex:1 1 auto}.site-footer[data-form=line] .site-footer-links-host{margin-inline-start:0}.site-footer[data-form=line] .site-footer-links-host>ul{display:flex;flex-wrap:wrap}.site-footer-base{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;column-gap:var(--basalt-space-6);row-gap:var(--basalt-space-4);margin-top:var(--_gap)}.site-footer[data-form=line] .site-footer-base{margin-top:var(--basalt-space-4)}.site-footer-legal{margin:0;max-width:var(--basalt-size-prose-width);color:var(--basalt-text-tertiary)}.site-footer-toggle{display:none;align-items:center;justify-content:space-between;box-sizing:border-box;width:100%;height:var(--basalt-size-tap-min);margin:0;padding:0;border:0;background:transparent;color:var(--basalt-text-primary);font:inherit;letter-spacing:inherit;text-align:start;cursor:pointer;-webkit-tap-highlight-color:transparent}.site-footer-toggle:focus-visible{outline:var(--basalt-size-focus-width) solid var(--basalt-border-focus);outline-offset:var(--basalt-size-focus-offset)}.site-footer-toggle>svg{color:var(--basalt-text-secondary);transition:transform var(--basalt-duration-slow) var(--basalt-ease-out),color var(--basalt-duration-fast) var(--basalt-ease-out)}@media(hover:hover){.site-footer-toggle:hover>svg{color:var(--basalt-text-primary)}}.site-footer-group[data-open] .site-footer-toggle>svg{transform:rotate(180deg)}@media(prefers-reduced-motion:reduce){.site-footer-toggle>svg{transition:color var(--basalt-duration-fast) var(--basalt-ease-out)}}@media(width<1024px){.site-footer{--_above: var(--basalt-space-12)}.site-footer-id,.site-footer-links{grid-column:1 / -1}.site-footer-id{flex-direction:row;flex-wrap:wrap;align-items:center;column-gap:var(--basalt-space-6)}}@media(width<720px){.site-footer{--_gap: var(--basalt-space-8);--_above: var(--basalt-space-8)}.site-footer-top{row-gap:var(--basalt-space-6)}.site-footer-id{flex-direction:column;align-items:flex-start}.site-footer-groups{grid-template-columns:repeat(2,minmax(0,1fr));column-gap:var(--basalt-space-4);row-gap:var(--basalt-space-6)}.site-footer-base{flex-direction:column;align-items:flex-start}.site-footer[data-wired] .site-footer-groups{grid-template-columns:minmax(0,1fr);row-gap:0}.site-footer[data-wired] .site-footer-group+.site-footer-group{border-top:var(--basalt-size-hairline) solid var(--basalt-border-divider)}.site-footer[data-wired] .site-footer-label{margin:0}.site-footer[data-wired] .site-footer-label-wide{display:none}.site-footer[data-wired] .site-footer-toggle{display:flex}.site-footer[data-wired] .site-footer-group:not([data-open])>.site-footer-links-host{display:none}.site-footer[data-wired] .site-footer-group[data-open]>.site-footer-links-host{padding-bottom:var(--basalt-space-2)}}@media(width<720px){.topbar-inner{gap:var(--basalt-space-1)}:is(.topbar,.app-header) .btn{--_h: var(--basalt-size-tap-min);border-radius:var(--basalt-radius-md);min-width:var(--basalt-size-tap-min)}}@media(forced-colors:active){.topbar,.app-header{background:Canvas;color:CanvasText;border-bottom-color:CanvasText;-webkit-backdrop-filter:none;backdrop-filter:none}.site-footer-body,.site-footer[data-wired] .site-footer-group+.site-footer-group{border-color:CanvasText}.site-footer-links-host a:hover,.site-footer-links-host a:active{forced-color-adjust:none;color:HighlightText}.site-footer-links-host a:hover:before,.site-footer-links-host a:active:before{background-color:Highlight}.site-footer-links-host[data-keys] a:is(:hover,:active){forced-color-adjust:auto;color:inherit}.site-footer-links-host[data-keys] a:is(:hover,:active):before{background-color:transparent}}@media print{.topbar,.app-header{position:static;background:var(--basalt-surface-page);-webkit-backdrop-filter:none;backdrop-filter:none}.site-slot>.topbar[data-form]{position:absolute;transform:none;opacity:1;transition:none}.site-footer-toggle{display:none}}.version-link{position:relative;box-sizing:border-box;display:inline-flex;flex-wrap:wrap;align-items:baseline;column-gap:var(--basalt-space-3);max-width:100%;overflow-x:clip;padding-block:var(--basalt-space-1);border-radius:var(--basalt-radius-xs);color:var(--basalt-text-secondary);font:var(--basalt-font-weight-regular) var(--basalt-text-xs-size) / var(--basalt-text-xs-line-height) var(--basalt-font-family-sans);letter-spacing:var(--basalt-text-xs-tracking);font-variant-numeric:tabular-nums;text-decoration:none;-webkit-tap-highlight-color:transparent;transition:color var(--basalt-duration-fast) var(--basalt-ease-out)}.version-link-words,.version-link-date{position:relative;min-width:0;overflow-wrap:anywhere}.version-link-date:before{content:"·";content:"·" / "";position:absolute;inset-inline-end:100%;width:var(--basalt-space-3);text-align:center}.version-link-pre{display:inline-block;max-width:100%}.version-link-number{display:inline-flex;flex-direction:column;max-width:100%}.version-link-number:after{content:attr(data-label);height:0;overflow:hidden;visibility:hidden;font-weight:var(--basalt-font-weight-semibold);user-select:none;pointer-events:none}.version-link:hover{color:var(--basalt-text-primary)}.version-link:hover :is(.version-link-words,.version-link-date>time){text-decoration:underline;text-decoration-thickness:var(--basalt-size-hairline);text-underline-offset:var(--basalt-size-underline-offset)}.version-link:focus-visible{outline:var(--basalt-size-focus-width) solid var(--basalt-border-focus);outline-offset:var(--basalt-size-focus-offset)}.version-link[aria-current=page]{color:var(--basalt-text-primary)}.version-link[aria-current=page] .version-link-number{font-weight:var(--basalt-font-weight-semibold)}@media(pointer:coarse){.version-link:after{content:"";position:absolute;inset-inline:0;top:50%;height:max(100%,var(--basalt-size-tap-min));transform:translateY(-50%)}}.site-footer-legal-row{display:flex;flex-wrap:wrap;align-items:baseline;gap:var(--basalt-space-1) var(--basalt-space-4);min-width:0}.site-footer-legal-row .version-link{font-size:var(--basalt-text-sm-size);line-height:var(--basalt-text-sm-line-height);letter-spacing:var(--basalt-text-sm-tracking)}} diff --git a/.agent/skills/basalt-html/parts/type-layout.css b/.agent/skills/basalt-html/parts/type-layout.css index 319e448e..b8bea94c 100644 --- a/.agent/skills/basalt-html/parts/type-layout.css +++ b/.agent/skills/basalt-html/parts/type-layout.css @@ -1 +1 @@ -:root{--basalt-space-32: 128px;--basalt-size-section-gap: var(--basalt-space-32);--basalt-size-section-gap-md: var(--basalt-space-24);--basalt-size-section-gap-narrow: var(--basalt-space-16);--basalt-size-display-measure: 13em;--basalt-text-6xl-size: 72px;--basalt-text-6xl-line-height: 76px;--basalt-text-6xl-tracking: -.04em;--basalt-text-7xl-size: 96px;--basalt-text-7xl-line-height: 96px;--basalt-text-7xl-tracking: -.045em;--basalt-text-hero-narrow-size: 44px;--basalt-text-hero-narrow-line-height: 48px;--basalt-text-hero-narrow-tracking: -.03em;--basalt-text-display-narrow-size: 36px;--basalt-text-display-narrow-line-height: 40px;--basalt-text-display-narrow-tracking: -.025em}@layer basalt{:root{--basalt-hero-size: var(--basalt-text-7xl-size);--basalt-hero-line-height: var(--basalt-text-7xl-line-height);--basalt-hero-tracking: var(--basalt-text-7xl-tracking);--basalt-display-size: var(--basalt-text-6xl-size);--basalt-display-line-height: var(--basalt-text-6xl-line-height);--basalt-display-tracking: var(--basalt-text-6xl-tracking);--basalt-lead-size: var(--basalt-text-xl-size);--basalt-lead-line-height: var(--basalt-text-xl-line-height);--basalt-lead-tracking: var(--basalt-text-xl-tracking);--basalt-section-gap: var(--basalt-size-section-gap);--basalt-intro-gap: var(--basalt-space-6);--basalt-actions-gap: var(--basalt-space-8)}@media(width<1024px){:root{--basalt-hero-size: var(--basalt-text-6xl-size);--basalt-hero-line-height: var(--basalt-text-6xl-line-height);--basalt-hero-tracking: var(--basalt-text-6xl-tracking);--basalt-display-size: var(--basalt-text-5xl-size);--basalt-display-line-height: var(--basalt-text-5xl-line-height);--basalt-display-tracking: var(--basalt-text-5xl-tracking);--basalt-section-gap: var(--basalt-size-section-gap-md)}}@media(width<720px){:root{--basalt-hero-size: var(--basalt-text-hero-narrow-size);--basalt-hero-line-height: var(--basalt-text-hero-narrow-line-height);--basalt-hero-tracking: var(--basalt-text-hero-narrow-tracking);--basalt-display-size: var(--basalt-text-display-narrow-size);--basalt-display-line-height: var(--basalt-text-display-narrow-line-height);--basalt-display-tracking: var(--basalt-text-display-narrow-tracking);--basalt-lead-size: var(--basalt-text-lg-size);--basalt-lead-line-height: var(--basalt-text-lg-line-height);--basalt-lead-tracking: var(--basalt-text-lg-tracking);--basalt-section-gap: var(--basalt-size-section-gap-narrow);--basalt-intro-gap: var(--basalt-space-4);--basalt-actions-gap: var(--basalt-space-6)}}.text-hero,.text-display,.text-6xl,.text-7xl{margin:0;color:var(--basalt-text-primary);font-family:var(--basalt-font-family-sans);font-weight:var(--basalt-font-weight-semibold);max-inline-size:var(--basalt-size-display-measure);text-wrap:balance;overflow-wrap:break-word;hyphens:manual}.text-hero{font-size:var(--basalt-hero-size);line-height:var(--basalt-hero-line-height);letter-spacing:var(--basalt-hero-tracking)}.text-display{font-size:var(--basalt-display-size);line-height:var(--basalt-display-line-height);letter-spacing:var(--basalt-display-tracking)}.text-7xl{font-size:var(--basalt-text-7xl-size);line-height:var(--basalt-text-7xl-line-height);letter-spacing:var(--basalt-text-7xl-tracking)}.text-6xl{font-size:var(--basalt-text-6xl-size);line-height:var(--basalt-text-6xl-line-height);letter-spacing:var(--basalt-text-6xl-tracking)}:is(.text-hero,.text-display,.text-6xl,.text-7xl)>.text-line{display:block}.text-lead{margin:0;max-inline-size:var(--basalt-size-prose-width);color:var(--basalt-text-secondary);font-size:var(--basalt-lead-size);font-weight:var(--basalt-font-weight-regular);line-height:var(--basalt-lead-line-height);letter-spacing:var(--basalt-lead-tracking);text-wrap:pretty;overflow-wrap:break-word}.page-row,.page-section{box-sizing:border-box;width:100%;max-width:var(--basalt-size-page-width);margin-inline:auto;padding-inline:max(var(--basalt-gutter),env(safe-area-inset-left,var(--basalt-space-0))) max(var(--basalt-gutter),env(safe-area-inset-right,var(--basalt-space-0)))}.page-sections{display:block;padding-block-end:var(--basalt-section-gap)}.page-section{padding-block-start:var(--basalt-section-gap)}.page-sections>.page-section:first-child{padding-block-start:calc(var(--basalt-section-gap) / 2)}.section-intro{margin-block-end:calc(var(--basalt-section-gap) / 2)}.section-intro:last-child,.columns>.section-intro{margin-block-end:0}.section-intro>.text-lead{margin-block-start:var(--basalt-intro-gap)}.section-intro>.section-actions{margin-block-start:var(--basalt-actions-gap)}.section-actions{display:flex;flex-wrap:wrap;gap:var(--basalt-space-3)}.columns{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));column-gap:var(--basalt-gutter);row-gap:var(--basalt-space-8);align-items:start}.columns>*{--_ls: 12;--span: initial;grid-column:span var(--_ls);min-width:0}.columns[data-layout="2"]>*{--_ls: 6}.columns[data-layout="3"]>*{--_ls: 4}@media(width>=1024px){.columns>*{grid-column:span var(--span, var(--_ls))}.columns[data-layout="4"]>*{--_ls: 3}.columns[data-layout="5-7"]>:nth-child(odd),.columns[data-layout="7-5"]>:nth-child(2n){--_ls: 5}.columns[data-layout="5-7"]>:nth-child(2n),.columns[data-layout="7-5"]>:nth-child(odd){--_ls: 7}.columns[data-layout="4-8"]>:nth-child(odd),.columns[data-layout="8-4"]>:nth-child(2n){--_ls: 4}.columns[data-layout="4-8"]>:nth-child(2n),.columns[data-layout="8-4"]>:nth-child(odd){--_ls: 8}}@media(width>=720px)and (width<1024px){.columns[data-layout="4"]>*{--_ls: 6}}@media(width<720px){.columns>*{grid-column:1 / -1}}} +:root{--basalt-space-32: 128px;--basalt-size-section-gap: var(--basalt-space-32);--basalt-size-section-gap-md: var(--basalt-space-24);--basalt-size-section-gap-narrow: var(--basalt-space-16);--basalt-size-display-measure: 13em;--basalt-text-6xl-size: 72px;--basalt-text-6xl-line-height: 76px;--basalt-text-6xl-tracking: -.04em;--basalt-text-7xl-size: 96px;--basalt-text-7xl-line-height: 96px;--basalt-text-7xl-tracking: -.045em;--basalt-text-hero-narrow-size: 44px;--basalt-text-hero-narrow-line-height: 48px;--basalt-text-hero-narrow-tracking: -.03em;--basalt-text-display-narrow-size: 36px;--basalt-text-display-narrow-line-height: 40px;--basalt-text-display-narrow-tracking: -.025em}@layer basalt{:root{--basalt-hero-size: var(--basalt-text-7xl-size);--basalt-hero-line-height: var(--basalt-text-7xl-line-height);--basalt-hero-tracking: var(--basalt-text-7xl-tracking);--basalt-display-size: var(--basalt-text-6xl-size);--basalt-display-line-height: var(--basalt-text-6xl-line-height);--basalt-display-tracking: var(--basalt-text-6xl-tracking);--basalt-lead-size: var(--basalt-text-xl-size);--basalt-lead-line-height: var(--basalt-text-xl-line-height);--basalt-lead-tracking: var(--basalt-text-xl-tracking);--basalt-section-gap: var(--basalt-size-section-gap);--basalt-intro-gap: var(--basalt-space-6);--basalt-actions-gap: var(--basalt-space-8)}@media(width<1024px){:root{--basalt-hero-size: var(--basalt-text-6xl-size);--basalt-hero-line-height: var(--basalt-text-6xl-line-height);--basalt-hero-tracking: var(--basalt-text-6xl-tracking);--basalt-display-size: var(--basalt-text-5xl-size);--basalt-display-line-height: var(--basalt-text-5xl-line-height);--basalt-display-tracking: var(--basalt-text-5xl-tracking);--basalt-section-gap: var(--basalt-size-section-gap-md)}}@media(width<720px){:root{--basalt-hero-size: var(--basalt-text-hero-narrow-size);--basalt-hero-line-height: var(--basalt-text-hero-narrow-line-height);--basalt-hero-tracking: var(--basalt-text-hero-narrow-tracking);--basalt-display-size: var(--basalt-text-display-narrow-size);--basalt-display-line-height: var(--basalt-text-display-narrow-line-height);--basalt-display-tracking: var(--basalt-text-display-narrow-tracking);--basalt-lead-size: var(--basalt-text-lg-size);--basalt-lead-line-height: var(--basalt-text-lg-line-height);--basalt-lead-tracking: var(--basalt-text-lg-tracking);--basalt-section-gap: var(--basalt-size-section-gap-narrow);--basalt-intro-gap: var(--basalt-space-4);--basalt-actions-gap: var(--basalt-space-6)}}.text-hero,.text-display,.text-6xl,.text-7xl{margin:0;color:var(--basalt-text-primary);font-family:var(--basalt-font-family-sans);font-weight:var(--basalt-font-weight-semibold);max-inline-size:var(--basalt-size-display-measure);text-wrap:balance;overflow-wrap:break-word;hyphens:manual}.text-hero{font-size:var(--basalt-hero-size);line-height:var(--basalt-hero-line-height);letter-spacing:var(--basalt-hero-tracking)}.text-display{font-size:var(--basalt-display-size);line-height:var(--basalt-display-line-height);letter-spacing:var(--basalt-display-tracking)}.text-7xl{font-size:var(--basalt-text-7xl-size);line-height:var(--basalt-text-7xl-line-height);letter-spacing:var(--basalt-text-7xl-tracking)}.text-6xl{font-size:var(--basalt-text-6xl-size);line-height:var(--basalt-text-6xl-line-height);letter-spacing:var(--basalt-text-6xl-tracking)}:is(.text-hero,.text-display,.text-6xl,.text-7xl)>.text-line{display:block}.text-lead{margin:0;max-inline-size:var(--basalt-size-prose-width);color:var(--basalt-text-secondary);font-size:var(--basalt-lead-size);font-weight:var(--basalt-font-weight-regular);line-height:var(--basalt-lead-line-height);letter-spacing:var(--basalt-lead-tracking);text-wrap:pretty;overflow-wrap:break-word}.page-row,.page-section{box-sizing:border-box;width:100%;max-width:var(--basalt-size-page-width);margin-inline:auto;padding-inline:max(var(--basalt-gutter),var(--bh-inset-start)) max(var(--basalt-gutter),var(--bh-inset-end))}.page-sections{display:block;padding-block-end:var(--basalt-section-gap)}.page-section{padding-block-start:var(--basalt-section-gap)}.page-sections>.page-section:first-child{padding-block-start:calc(var(--basalt-section-gap) / 2)}.section-intro{margin-block-end:calc(var(--basalt-section-gap) / 2)}.section-intro:last-child,.columns>.section-intro{margin-block-end:0}.section-intro>.text-lead{margin-block-start:var(--basalt-intro-gap)}.section-intro>.section-actions{margin-block-start:var(--basalt-actions-gap)}.section-actions{display:flex;flex-wrap:wrap;gap:var(--basalt-space-3)}.columns{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));column-gap:var(--basalt-gutter);row-gap:var(--basalt-space-8);align-items:start}.columns>*{--_ls: 12;--span: initial;grid-column:span var(--_ls);min-width:0}.columns[data-layout="2"]>*{--_ls: 6}.columns[data-layout="3"]>*{--_ls: 4}@media(width>=1024px){.columns>*{grid-column:span var(--span, var(--_ls))}.columns[data-layout="4"]>*{--_ls: 3}.columns[data-layout="5-7"]>:nth-child(odd),.columns[data-layout="7-5"]>:nth-child(2n){--_ls: 5}.columns[data-layout="5-7"]>:nth-child(2n),.columns[data-layout="7-5"]>:nth-child(odd){--_ls: 7}.columns[data-layout="4-8"]>:nth-child(odd),.columns[data-layout="8-4"]>:nth-child(2n){--_ls: 4}.columns[data-layout="4-8"]>:nth-child(2n),.columns[data-layout="8-4"]>:nth-child(odd){--_ls: 8}}@media(width>=720px)and (width<1024px){.columns[data-layout="4"]>*{--_ls: 6}}@media(width<720px){.columns>*{grid-column:1 / -1}}} diff --git a/.agent/skills/basalt-html/parts/usage/code.md b/.agent/skills/basalt-html/parts/usage/code.md index 4b25dd15..4d6bdbeb 100644 --- a/.agent/skills/basalt-html/parts/usage/code.md +++ b/.agent/skills/basalt-html/parts/usage/code.md @@ -9,4 +9,6 @@ `tabindex="0"` goes on `pre.code-body` (it scrolls), with `<code>` inside; not on the `<code>`. +Its Copy takes `data-edge="end"`. + Tokens, only inside the `<code>`: `.tok-k` keyword, `.tok-s` string, `.tok-n` number or constant, `.tok-f` function, `.tok-c` comment. diff --git a/.agent/skills/basalt-html/parts/usage/command-list.md b/.agent/skills/basalt-html/parts/usage/command-list.md index 9829c805..2319de11 100644 --- a/.agent/skills/basalt-html/parts/usage/command-list.md +++ b/.agent/skills/basalt-html/parts/usage/command-list.md @@ -17,5 +17,5 @@ Items are the palette's (`label`, `icon`, `keys`, `keywords`, `danger`, `href`, - `data-label` names the region and the Back button; `data-noun` is what the foot counts ("9 commands", "3 of 9", spoken once after 400ms). - Focus stays in the field (a combobox): ↑ ↓ wrap, ↵ runs the row (in a split it runs the pane's first button), Esc clears the search and then does nothing, Tab leaves. Nothing is focused on load. The lit row shows only while the field has focus or the pointer is over the list. - A search ranks title matches above description and keyword matches, each in the order given. -- It keeps its height while you filter, up to 360px, then scrolls; no match is one sentence and a Clear button. +- The panel is as tall as its matches, up to 360px, then scrolls; on the open page its unfiltered height stays as page under it. In a panel, dialog or popover (or with `data-reserve="off"`) it holds no room. No match is one sentence and a Clear button. - ⌘K focuses the field on a page with no palette; with a palette on the page, ⌘K is the palette's. One owner. diff --git a/.agent/skills/basalt-html/parts/usage/copy.md b/.agent/skills/basalt-html/parts/usage/copy.md index cc3131a2..5967d7c1 100644 --- a/.agent/skills/basalt-html/parts/usage/copy.md +++ b/.agent/skills/basalt-html/parts/usage/copy.md @@ -1,6 +1,6 @@ # copy -`<button class="btn" data-copy="#code-id">` or `data-copy-text="…"`; keep an icon and a `<span>` label inside. +`<button class="btn" data-copy="#code-id">` or `data-copy-text="…"`; keep an icon and a `<span>` label inside. Its words hold; the glyph turns check (close if refused). `Basalt.copyText(text)` copies from script. Copy buttons are not printed. diff --git a/.agent/skills/basalt-html/parts/usage/core.md b/.agent/skills/basalt-html/parts/usage/core.md index 3aab1a56..91394741 100644 --- a/.agent/skills/basalt-html/parts/usage/core.md +++ b/.agent/skills/basalt-html/parts/usage/core.md @@ -4,6 +4,7 @@ **Type:** `h1`–`h4`, `.display`, `.text-5xl` (56/60; give it room at 390), `.lead`, `.eyebrow`, `.muted`, `.faint`, `.small`, `.mono`, `.num`, `.prose`, inline `code`. `h2` is 24/30. `.lead` (16/24, under a report's `h1`) and `.prose` are 34rem on the row's start edge; `.page` is the 72rem row. A site page's display type, lead (`.text-lead`, 20/28), row and sections are `type-layout`. **Panels:** `.panel`, `.card`, `.panel-pad`, `.panel-head`, `.float` (+ `.modal`). `.float` is only for what leaves the flow; never to promote a panel. `.card.lg` and `.panel-pad.lg` take wider padding from 720px up. **Buttons:** `.btn[data-variant=primary|ghost|danger]` (default secondary), `data-size=sm|lg`, `data-icon-only`, `aria-busy`. +- **At an edge:** a ghost `.btn` that starts or ends a head, bar or row takes `data-edge="start"` or `"end"`: its glyph or words sit on the head's line and its box hangs into the padding, only as far as the head's `--basalt-edge-room` (its padding less any safe area; a head of your own sets it, `style="--basalt-edge-room: var(--basalt-space-4)"`). A `.panel-head`'s last ghost `.btn`, and a `.page > .section > .section-head`'s, hang by themselves. Never a margin by hand. - **Busy** is `aria-busy="true"` on the button (label in a `<span>`): the label hides and a ring sits over it, so the width holds. - **Press:** a press is a colour step, and `.btn` also scales to .98 (100ms, ease-out) while pressed, never when disabled or busy and never under reduced motion; nothing else scales on press. diff --git a/.agent/skills/basalt-html/parts/usage/dialog-form.md b/.agent/skills/basalt-html/parts/usage/dialog-form.md index fa880daa..a6a45e22 100644 --- a/.agent/skills/basalt-html/parts/usage/dialog-form.md +++ b/.agent/skills/basalt-html/parts/usage/dialog-form.md @@ -5,7 +5,7 @@ A form or task in the center (React's `DialogContent form`): a dialog with the s ```html <dialog class="panel float modal dialog" data-form id="d"> <header class="sheet-head"><div class="sheet-head-text"><h2 class="dialog-title" tabindex="-1">Invite a teammate</h2></div> - <button class="btn sheet-close" data-variant="ghost" data-dialog-close aria-label="Close"><span data-glyph="close"></span></button></header> + <button class="btn sheet-close" data-variant="ghost" data-icon-only data-edge="end" data-dialog-close aria-label="Close"><span data-glyph="close"></span></button></header> <div class="sheet-body"><p class="dialog-description">They get a link to join.</p>…fields…</div> <footer class="sheet-foot"><div class="dialog-actions"><button class="btn" data-dialog-close>Cancel</button><button class="btn" data-variant="primary">Send invite</button></div></footer> </dialog> diff --git a/.agent/skills/basalt-html/parts/usage/filter.md b/.agent/skills/basalt-html/parts/usage/filter.md index 0253b950..224a19f3 100644 --- a/.agent/skills/basalt-html/parts/usage/filter.md +++ b/.agent/skills/basalt-html/parts/usage/filter.md @@ -11,7 +11,7 @@ A filter that takes any number of its values (React's MultiSelect), and the line <p class="filter-result" data-for="runs" data-noun="runs">Showing 24 of 24 runs</p> ``` -- Write the labelled checkboxes only. The script builds the control: up to six values are chips (a plus off, a check on) under the label, a count ("Any", "2 of 4") and Clear; seven or more, or `data-toolbar`, are a trigger and a checklist, with a search field from ten values. The count, never the window, picks the form. `data-label` names the group. +- Write the labelled checkboxes only. The script builds the control: up to six values are chips (a plus off, a check on) under the label, then Clear, then a count ("Any", "2 of 4"); seven or more, or `data-toolbar`, are a trigger and a checklist, with a search field from ten values. The count, never the window, picks the form. `data-label` names the group. - Clear stays in place and is `aria-disabled` at zero, so focus stays on it. Nothing chosen means no filter. - `data-for` (a `table` or its `.table-wrap` by id) and `data-column` (from 1) hide the rows whose cell's `data-value`, else its words, matches no chosen value, and show the table's `tr[data-empty]` when none is left. Without them, listen for `filterchange` (`detail.values`) and filter yourself. - `.filter-result` is the one thing spoken: shown at once, spoken once, 400ms after the text holds still. Put one by each filtered list, with `data-noun`. `Basalt.filterResult(el, text)` sets one by hand; `Basalt.refreshFilter(id)` filters again after you replace the rows. diff --git a/.agent/skills/basalt-html/parts/usage/links.md b/.agent/skills/basalt-html/parts/usage/links.md index 84697b64..89fd4786 100644 --- a/.agent/skills/basalt-html/parts/usage/links.md +++ b/.agent/skills/basalt-html/parts/usage/links.md @@ -13,7 +13,7 @@ - **The link:** secondary ink, primary on hover and focus, the name underlined and the glyph not. The visible name is the accessible name; the link takes its container's text size (a footer's 13px, a profile's 14px). Same tab by default. - **Beside 18 to 24px text** put `data-size="20"` on the `ul`: the glyphs become 20. - **Touch:** each link is at least 44 by 44, wrapped lines touch and never overlap. -- **Icon only,** for a row made entirely of marks (an author card): `<ul class="links" data-icon-only aria-label="Elsewhere">` with `<li><a class="btn" data-variant="ghost" data-icon-only href aria-label="GitHub"><i data-icon="GithubLogo"></i></a></li>`. A row that needs Email or a service without a mark is the labelled row. +- **Icon only,** for a row made entirely of marks (an author card): `<ul class="links" data-icon-only aria-label="Elsewhere">` with `<li><a class="btn" data-variant="ghost" data-icon-only href aria-label="GitHub"><i data-icon="GithubLogo"></i></a></li>`. The first link takes `data-edge="start"`: in a `.card` its glyph sits on the card's line. A row that needs Email or a service without a mark is the labelled row. - **New tab:** `target="_blank"` draws the arrow after the name and adds "(opens in a new tab)" to the name (`data-new-tab-label="words"` translates it); `mailto:` gets no arrow, and neither does an icon-only link, whose name takes the words. Never write the arrow or the words yourself. - The long form, a profile list with handles, is a `rows` list: `--usage rows`. - Not in the top bar. diff --git a/.agent/skills/basalt-html/parts/usage/notifications.md b/.agent/skills/basalt-html/parts/usage/notifications.md index 45b78490..bdf7efc3 100644 --- a/.agent/skills/basalt-html/parts/usage/notifications.md +++ b/.agent/skills/basalt-html/parts/usage/notifications.md @@ -14,4 +14,4 @@ var centre = Basalt.notifications('#bell', { - The page owns the entries and read state; call `setEntries` after a change; `onClearAll` adds Clear all. Newest first; `href` makes a link, else a button. `time` is your words ("2m ago"); `status`: `success`, `warning`, `danger`, `pending` (waiting; the title says it). - A group: `entries: [...]` on an entry, its title naming who and what; the row adds "×N" (`count`) and opens to them. -- Home of a toast's `home: 'centre'`. In a bar's end, 32px; the unread count is in the button's name. +- Home of a toast's `home: 'centre'`. In a bar's end, 32px; the unread count is in the button's name. Last in a bar: `edge: 'end'`. diff --git a/.agent/skills/basalt-html/parts/usage/search.md b/.agent/skills/basalt-html/parts/usage/search.md index b8dbc3da..0a770c76 100644 --- a/.agent/skills/basalt-html/parts/usage/search.md +++ b/.agent/skills/basalt-html/parts/usage/search.md @@ -8,7 +8,7 @@ A search dialog on the dialog's rules (`--usage dialog`): `<dialog class="panel <form class="search-form" role="search"> <label class="search-field"><span data-glyph="search"></span><span class="visually-hidden">Search products</span> <input class="search-input" type="search" placeholder="A brand, whey" autocomplete="off" enterkeyhint="search"></label> - <button type="button" class="btn search-close" data-variant="ghost" data-icon-only aria-label="Close search" data-dialog-close><span data-glyph="close"></span></button> + <button type="button" class="btn search-close" data-variant="ghost" data-icon-only data-edge="end" aria-label="Close search" data-dialog-close><span data-glyph="close"></span></button> </form> <p class="search-count" role="status">2 products</p> <ul class="search-results"> @@ -17,7 +17,7 @@ A search dialog on the dialog's rules (`--usage dialog`): `<dialog class="panel </dialog> ``` -- `.search-results` has a fixed height, a full result's, so the field and the count never move; it scrolls inside. The counts are presets (a shop's: 3 logo rows, 5 picture rows, a "See all" row); set yours: `style="--_logos: 0; --_packs: 6; --_alls: 0"`. +- `.search-results` hugs its rows up to a full result, then scrolls; the top is held, so the field and the count never move. The counts are presets (a shop's: 3 logo rows, 5 picture rows, a "See all" row); set yours: `style="--_logos: 0; --_packs: 6; --_alls: 0"`. - A row is as tall as its `.search-media` plus 6px each side: 72 for a pack (the default, 48 by 60), 60 for a logo (`data-shape="logo"`, 96 by 48), 48 at least with none. A row of its own words, centred: `data-centered` on the link. - The count is one `role="status"` line you rewrite after a pause, not per keystroke; change only its text. - One close button: the browser's clear × is hidden. The title is read on opening and never drawn. diff --git a/.agent/skills/basalt-html/parts/usage/selection.md b/.agent/skills/basalt-html/parts/usage/selection.md index 833f5f08..e9559a67 100644 --- a/.agent/skills/basalt-html/parts/usage/selection.md +++ b/.agent/skills/basalt-html/parts/usage/selection.md @@ -10,4 +10,4 @@ A table with a checkbox column. The header box is `data-select-all`; every cell ``` - The state is the row's checked box and the count in words ("3 of 12 selected", "None selected"), not the wash (about 1.2:1). There is no bar and no edge mark. -- The column is a fixed 40px, so selecting moves no header or column. Set `checked` on a row's box to start it selected; the mixed header box and the count paint at once on load. +- The column is 32 on a pointer, 44 on touch; a `<col>` may make it wider. The box is centred in it, and never more than `space-4` from the column's start: a column a word heads is sized for its word, and its boxes start on the cell's line, under the word. Selecting moves no header or column. Set `checked` on a row's box to start it selected; the mixed header box and the count paint at once on load. diff --git a/.agent/skills/basalt-html/parts/usage/sheet.md b/.agent/skills/basalt-html/parts/usage/sheet.md index 37db7352..c193fa9b 100644 --- a/.agent/skills/basalt-html/parts/usage/sheet.md +++ b/.agent/skills/basalt-html/parts/usage/sheet.md @@ -5,5 +5,5 @@ A modal side panel on the dialog's rules (`--usage dialog`): `<dialog class="pan - Right and left are `min(440px, 100%)` full height; bottom is 90dvh with 16px top corners. Put long content straight in; a `.dialog-actions` as the last child stays at the foot. - **Top** is the site header's narrow menu, which `topbar-nav` builds for you (`--usage topbar-nav`). By hand: it covers the bar and redraws it as a first row `<div class="sheet-band">` (56px, a hairline below, the gutter either side), then the list unrolls beneath. - **Menu and Close:** `<span data-glyph="menu"></span>` and `<span data-glyph="close"></span>` are the core set's glyphs (`--usage glyph`). React morphs Menu into Close; the skill swaps them at once (a recorded difference). -- **Head, body, foot:** `header.sheet-head` > `.sheet-head-text` (a `.dialog-title` with `tabindex="-1"`, a `.dialog-description` count) and a ghost icon-only `.btn.sheet-close` with `data-dialog-close`; then `.sheet-body` (scrolls, `tabindex="0"`) and `footer.sheet-foot`. No sheet padding. +- **Head, body, foot:** `header.sheet-head` > `.sheet-head-text` (a `.dialog-title` with `tabindex="-1"`, a `.dialog-description` count) and a ghost `.btn.sheet-close` with `data-icon-only data-edge="end"` and `data-dialog-close` (its glyph on the title's line); then `.sheet-body` (scrolls, `tabindex="0"`) and `footer.sheet-foot`. No sheet padding. - **Steps:** swap the body and foot, then `title.focus()` on this sheet's title, so the new one is read. diff --git a/.agent/skills/basalt-html/parts/usage/tab-bar.md b/.agent/skills/basalt-html/parts/usage/tab-bar.md index 9837640e..4696dba0 100644 --- a/.agent/skills/basalt-html/parts/usage/tab-bar.md +++ b/.agent/skills/basalt-html/parts/usage/tab-bar.md @@ -13,7 +13,7 @@ The phone tab bar (React's `TabBar`): an app's destinations under 720, glyph ove ``` - Three to five items. With more than five destinations, four links and then More (above), which opens a bottom sheet of `.nav` rows: - `<dialog class="panel float modal sheet" id="more" data-side="bottom"><div class="tab-bar-sheet-head"><h2 class="dialog-title">More</h2><button class="btn" data-variant="ghost" data-icon-only aria-label="Close more" data-dialog-close><span data-glyph="close"></span></button></div><nav class="nav" aria-label="More">…</nav></dialog>` + `<dialog class="panel float modal sheet" id="more" data-side="bottom"><div class="tab-bar-sheet-head"><h2 class="dialog-title">More</h2><button class="btn" data-variant="ghost" data-icon-only data-edge="end" aria-label="Close more" data-dialog-close><span data-glyph="close"></span></button></div><nav class="nav" aria-label="More">…</nav></dialog>` - Every item has a glyph and a label, one word where it can be, both primary ink; the label is 12/16. The current page: `aria-current="page"`, its glyph selected and its label 600, no pill or bar. If it is under More, put `data-current` on the More button and say so in its `aria-label` ("More, Settings, current page"). - `.tab-bar-dot` says something is new; its words follow, visually hidden. Counts are spoken, never drawn. - Inside `.app-shell` give the shell `data-tabbar`: its content pads past the bar. On its own, pad your content's bottom by `calc(var(--basalt-bottom-offset) + var(--basalt-space-6))`, as the shell does. compose adds `viewport-fit=cover` for the safe area. diff --git a/.agent/skills/basalt-html/parts/usage/topbar.md b/.agent/skills/basalt-html/parts/usage/topbar.md index ac41d762..b8c9c92f 100644 --- a/.agent/skills/basalt-html/parts/usage/topbar.md +++ b/.agent/skills/basalt-html/parts/usage/topbar.md @@ -19,7 +19,7 @@ The page's one blurred (smoked) surface; it falls back to opaque on its own. - The skip link finds the first `.topbar` or `.app-header` when it takes focus, and again on scroll, and sits 8px under its real bottom edge (a notice above the bar is cleared). - A lockup by pixel density: a `.lockup-sprite` svg holds one `<symbol>` for each brand drawing (`brand/`'s `lockup-header-1x` and `-2x`), and `.brand` draws both with `<svg class="lockup lockup-1x" viewBox width height aria-hidden="true"><use href="#x1"/></svg>` and a `lockup-2x`. Only the one fitted to the screen shows (2x from 2dppx). No `<img>`, no `<title>`. - A bar that arrives, or leaves and returns: put it in `<div class="site-slot">` and give it `data-phase-after="#hero"` (the first screen, the hero, its mark). It writes `data-phase` (rest, between, pinned) and `data-form` (row, bar) on the bar for your CSS; the slot keeps the row's height. It never returns on scrolling up. -- `data-tool` on up to two ghost icon buttons that stay at every width (a search trigger): the narrow menu draws them again. +- `data-tool` on up to two ghost icon buttons that stay at every width (a search trigger): the narrow menu draws them again. The last ghost control of the bar (a tool, a bell) takes `data-edge="end"`: its glyph sits on the line, and it hangs only where it is last. `.site-footer` ends every site page, on the page, once. Wrap the page in `.site-page` (a column at least `100svh`) so a short page keeps it at the foot. diff --git a/AGENTS.md b/AGENTS.md index c841499e..7c72f5fd 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -121,7 +121,7 @@ Basalt has one owner (Bailey) and a design panel of two independent design revie horizontal tab keeps its `Highlight` underline. **No state is ever marked by an outline** (selected, active, current and pressed never draw one), and **there is no vertical bar anywhere.** Focus is a 2px ring at +2 outside the control, drawn inside at −2 only where +2 would be cut or would cross a neighbour: a field or band flush with a clipping edge, a row of - tabs that scrolls, a sortable header cell (a header band that is itself a button), a phone tab bar cell, and a cut cell of a still table (a focus stop, which shows its own ring after Esc has closed its plate). These structural + tabs that scrolls, a sortable header cell (a header band that is itself a button), a phone tab bar cell, a ghost control hung at an edge with less than 4 of room left, and a cut cell of a still table (a focus stop, which shows its own ring after Esc has closed its plate). These structural vertical lines are allowed, each named and never a selection, sort, active or status mark: the 1px divider at a pinned table column's edge while the table is scrolled, the app sidebar's 1px edge, a meter's labelled target tick, the vertical `Separator` between groups of controls, the edges between a `NumberField`'s value and its steppers, a diagram's connector, a sequence diagram's lifeline with its activation bar, a frame's sides, and a stage list's or run timeline's connector (1px between two marks, never @@ -134,6 +134,14 @@ Basalt has one owner (Bailey) and a design panel of two independent design revie under reduced motion and in forced colours each item paints its own. - **Reserved room is page, not paint:** a box hugs what it shows; a seat's spare room lies outside it, on the open side; a seat inside a control is never empty (a glyph at rest, its selected form or the check when on). +- **A ghost control at an edge** puts its glyph or its words on the box's content line and hangs its own box into the padding by its + inset (its inline padding; half the size it is drawn at, less its glyph, when icon-only: 8 at 32, 14 at the 44 it is on touch). The + head's padding is the same on both sides, and the head says how much of it is room (`--basalt-edge-room`: its padding less any + safe-area inset); the control never hangs by more, and with no room it does not hang. Use `edge` (`data-edge` in the skill), never a + margin written by hand. Its ring is at +2 where the hung box keeps 4 from the edge of its room and inside at −2 where it does not. + A drawn control sits on the line with its edge. +- **The last thing in a box** has no padding of its own toward the box's edge; a 44px tap box there reaches into the box's padding. +- **A height is room too:** a box is as tall as what it shows, and room held so that what follows does not move is open page under it. - **Reservation limits:** native-element width copies are cleaned in props without an observer; opaque components need DOM cleanup and a second live instance, so server HTML can duplicate ids and controls until hydration (permanently without scripts), and an unsafe component can narrow when hydration declines it. The HTML skill still widens resting items once on initialization; build-time reservation and glyphs are a later batch (DECISIONS 150). - **A focusable row** (a link or button in a list, not a listbox option) takes the control ring at +2, outside the row, and its list keeps at least `space-1-5` from any clipping edge. A @@ -184,7 +192,8 @@ Basalt has one owner (Bailey) and a design panel of two independent design revie and holds no version. The entry or release a link opens is the stream's arrival (the plate and "Linked"). Build details is on the running release alone, from the running build. No area filter. - **Density and touch:** compact moves controls one step down, with a floor of 24px. Touch - targets stay at least 44px whatever the density, on touch and in any window under 720 whatever the pointer (16px text entry stays touch-only), except a chart's day, reached by drag and by the keys (the phase lane's marks keep 44px); a diagram's card that answers a tap is 44px tall. Text entry is 16px on touch. A one-line notification entry is at least 44 tall on + targets stay at least 44px whatever the density, on touch and in any window under 720 whatever the pointer (16px text entry stays touch-only), except a chart's day, reached by drag and by the keys (the phase lane's marks keep 44px); a diagram's card that answers a tap is 44px tall. A toast's Dismiss and action keep their pointer size and take + the 44px as hit area inside the toast's padding. A still table's selection column is 44 wide. Text entry is 16px on touch. A one-line notification entry is at least 44 tall on touch, and a `Link` on a line of its own has a 44px hit box with no change to layout, its words raised over a stacked neighbour's box; a link in a sentence keeps its line. - **The phone and what is pinned:** while an on-screen keyboard is up (`data-screen-keyboard`) the tab bar and the phone's status bar are covered, and the foot, sheets, dialogs, the command menu and the toasts are laid out on what is seen. A page that pins more than the bar opts into measured sizes diff --git a/docs/foundations.md b/docs/foundations.md index 8b0677da..67c10c42 100644 --- a/docs/foundations.md +++ b/docs/foundations.md @@ -152,7 +152,7 @@ kept as a rule so both themes behave alike (DECISIONS 166). Four text levels wer Outlines survive Windows forced-colours mode; box-shadow rings don't. **No state is ever marked by an outline:** selected, active, current and pressed never draw one. Focus is a 2px ring at +2 outside the control, drawn inside at −2 only where +2 would be cut or would cross a neighbour: a field or band flush with a clipping edge (the search dialog's - band, a flush listbox, an inline-label row), a row of tabs that scrolls, a sortable header cell, a phone tab bar cell, and a cut cell of a + band, a flush listbox, an inline-label row), a row of tabs that scrolls, a sortable header cell, a phone tab bar cell, a ghost control hung at an edge whose box ends less than 4 from the edge of its room, and a cut cell of a still table (a focus stop, which shows its own ring after Esc has closed its plate). A focusable row (a link or button in a list, not a listbox option) takes the same control ring at +2, outside the row, and its list keeps at least `space-1-5` (6px) between a row and any clipping edge so the ring is never cut. A @@ -210,7 +210,8 @@ kept as a rule so both themes behave alike (DECISIONS 166). Four text levels wer reserved, is a different state and does take weight); the chosen value is the check. There is no bar, no inset outline and no ↵ chip, except the opening list's cursor row, which keeps one (DECISIONS 155, V6): the owner ruled the vertical bar and the outline AI tells (9 Nov 2026), and the plate with the ink step is the cue that does not rest on colour (1.4.1) and says where focus is (2.4.7). A chosen value (a Select option, a checked item) is a check in primary ink at the row's start, in a - 16px slot every row reserves so labels align, with no extra weight; its label stays secondary until lit. Danger keeps its colour on the plate: 5.16:1 on level 1 and + 16px slot that every row of the + popup keeps, a row with no check and no glyph too, when any row has one, so labels align, with no extra weight; its label stays secondary until lit. Danger keeps its colour on the plate: 5.16:1 on level 1 and 4.80:1 on levels 2 and 3 in dark, 5.43:1 in light. Group labels are tertiary, 12/16, weight 500 (5.33:1 or better). In forced colours the lit row is `Highlight` with `HighlightText` for its label, glyph, hint and chip text and border, `forced-color-adjust: none` on the row (Chromium otherwise paints a Canvas backplate behind forced text and the @@ -245,7 +246,10 @@ kept as a rule so both themes behave alike (DECISIONS 166). Four text levels wer (about 1.2:1): the first column is a checkbox column (a `Checkbox` per row, labelled "Select {name}", and a header box that is mixed while some rows are selected), and the count ("3 of 12 selected") is written in a polite live region by the app. Basalt ships no helper for the column or the count: the column is the app's own markup on - `Table`, `TableCell` and `Checkbox`, given a first column `size-control-md` wide, and the row takes `selected`. + `Table`, `TableCell` and `Checkbox`, given a first column + `var(--basalt-select-column)` wide (`size-control-md`, 32, on a pointer; `size-tap-min`, 44, on touch and under 720, where the column + holds the checkbox's whole hit area and nothing reaches the next column), the box centred in it, and never more than `space-4` from the column's start: a column a word heads is sized + for its word, and its boxes start on the cell's line, under the word. The row takes `selected`. Outside a table the same selection is `SelectableList` (see [Lists and facts](#lists-and-facts)), which draws the boxes, the all box and the count. Do not mark selection with a vertical line. - **The still table** (the owner's rule, decision 71: header positions, column widths and alignment never move, through @@ -351,15 +355,38 @@ kept as a rule so both themes behave alike (DECISIONS 166). Four text levels wer underline or plate; any of many, and on, is a check in a reserved seat or a filled choice box; a glyph closes and fills. The ink steps to primary with it. The wash alone, and the ink step alone, are never the cue. The silhouette follows the furniture the state sits in; the weight, the ink step and the shape do not change. -- **Reserved room.** A seat is room held so nothing moves when a word or state changes (DECISIONS 326). A drawn box (a border, a +- **Reserved room.** A seat is room held so nothing moves when a word or state changes (DECISIONS 326, 328, 329). A drawn box (a border, a fill or a plate) hugs what it shows, with equal padding on facing sides, and never holds room for a word, a mark or a row that is - not showing. The seat is an unseen cell around the box: what it shows sits against the edge that faces its fixed neighbour, and - the spare room falls where the row is already open. A seat is never put where its spare room opens a gap between two things a - fixed distance apart, and it is centred only where its row is. A control's box never changes size, so a seat inside a control is - never empty: at rest it holds its mark's rest form and, on, its on form. A control whose words change is as wide as its widest - words, centred; a control with words at its start and an amount at its end anchors each to its own end. Room every row of a - list, menu or table shares is a column, not a seat. A box changes face by fading out and in; no width animates. A label's 600 - width (DECISIONS 150) stands. + not showing. Facing sides are measured to what is drawn: a mark's own drawing, not its 16px seat (a filter chip is 8 before its seat + and 12 after its words, which puts the plus 10.6 and the words 12 from the edge), and a mark that fills its seat takes the words' + padding (an option chip is 12 and 12). The seat is an unseen cell around the box: what it shows sits against the edge that faces its + fixed neighbour, and the spare room falls where the row is already open. A seat is never put where its spare room opens a gap + between two things a fixed distance apart, and it is centred only where its row is. A control's box never changes size, so a seat + inside a control is never empty: at rest it holds its mark's rest form and, on, its on form. A control whose words change is as wide + as its widest words, centred; a control with words at its start and an amount at its end anchors each to its own end. Room every + row of a list, menu or table shares is a column, not a seat, and every row keeps it. A box changes face by fading out and in; no + width animates. A label's 600 width (DECISIONS 150) stands. +- **A height is room too.** A panel, a dialog or a list in a box is as tall as what it shows. Room held so that what follows does not + move is open page under the box, never paint inside it: the in-page command list's panel hugs its rows over its unfiltered height, + and the search dialog's top is held while its box ends under its results. A window that its content scrolls in (a live transcript, + `SearchPassages`' `rows`, `TabsPanels stacked`, `StageList`'s `reserveDetail`, a pane) is a field, not a seat: it is for the open + page or a work area, never inside a card or a panel, where it would leave the box empty. +- **A ghost control at an edge.** A ghost `Button` or `IconButton` that starts or ends a head, a bar, a band or a row puts what it + shows on the box's content line: its glyph, or its words. Its own box hangs past the line into the head's padding by its inset (its + inline padding with words; half the size it is drawn at, less its glyph's own size, when icon-only: 6 at 28, 8 at 32, 14 at the 44 + it is on touch), and the head's padding is the same on both sides. It hangs only into room the head says it has: the head's padding + on that side less any safe-area inset there (`--basalt-edge-room`, or `-start` and `-end`), and never by more than that room, so the + whole target stays inside the padding and clear of a notch or a corner. A head that says nothing gives no room, and nothing hangs. + A part with no padding of its own (a drawer, a release, a composer) is not a head: its edge control hangs into the room of the box the part + sits in, where that box says so (`AppShell`'s main and foot for a drawer, release notes and a composer directly inside them; a card's content + for a composer; the skill's page for release notes), and stands on the line with its edge anywhere else. + `edge="start"` or `"end"` does it (`data-edge` in the skill); no component writes a margin for it. The hang is plate and hit area, + never layout, and stops inside the box's rim. Its focus ring follows the rule every control has: at +2 where the hung box keeps 4 + from the edge of its room, inside at −2 only where it does not (a 44px control on a 16px line). On touch a hung control with words is + as wide as its words and takes what it lacks of 44 as hit area. A drawn control sits on the line with its edge. A control centred in + its row (a period's arrows, pagination) and a tab are not at an edge. +- **The last thing in a box** carries no padding of its own toward the box's edge: the box's padding is the only room under it. A + 44px tap box there is hit area and reaches into that padding, never across the rim (DECISIONS 331). - **The choice card** (`ChoiceCard`, in a `ChoiceCardGroup`) is a native radio (one of many) or checkbox (any of many) wearing a card: the whole card is the label and the input is visually hidden but focusable. Plain `Card` gets no selected prop, because paint without semantics ends up on a `div` nothing can operate. A real choice box (`size-choice`, the @@ -431,10 +458,10 @@ kept as a rule so both themes behave alike (DECISIONS 166). Four text levels wer **Seven or more values, or any use in a toolbar, are a trigger and a checklist**: a non-modal popup of popup rows, with the same checkbox group, a count and Clear in its footer. The switch depends on the count and the `toolbar` prop, never the viewport. **Clear** is always mounted, in place, with the same label; at zero it is `aria-disabled`, not `disabled` - (activation is suppressed and keyboard focus stays on it), and it never hides and never moves focus. In the chips' head it - sits right after the count, `space-2` apart ("Status · 2 of 4 · Clear"), and the count reserves the width of its widest form - ("Any" and "N of N" share one grid cell, tabular figures), so Clear never moves as the count changes; the checklist's footer - (count at the start, Clear at the end) is as it was. What is spoken + (activation is suppressed and keyboard focus stays on it), and it never hides and never moves focus. In the chips' head Clear follows the label and the count follows Clear, `space-2` apart ("Status · Clear · 2 of 4"), so Clear never + moves as the count changes and the count's spare room is the row's open end ("Any" and "N of N" share one grid cell, tabular + figures). The checklist's footer is the count at its start and Clear at its end, both on the popup's line, `space-4` in, with Clear + hung by its padding. What is spoken is one polite, atomic result line outside the filter (`FilterResult`: "Showing 3 of 24 runs"), updated after the text has held still for 400ms, so three toggles are one announcement. **The checklist's rows scroll inside `size-popup-max-height` (360), with the search band and the foot outside them**: nine 40px rows show whole and the tenth is the first to scroll. **From @@ -477,6 +504,10 @@ kept as a rule so both themes behave alike (DECISIONS 166). Four text levels wer removed to make room: the newcomer waits in a queue and enters as room appears; a timed toast is closed instead, oldest first. Repeats group ("×3", on a `group` key) and errors never do. A drag of more than 40px dismisses it, by distance alone. The line and the clock pause together on hover, on focus, in a blurred window and in a hidden tab. + - **On touch.** On touch Dismiss and the action keep their pointer size (24 and the action's own height, + radius 6) and take their 44px as hit area inside the toast's padding, so a toast is one height on every pointer: Dismiss all round, the + action above and below and, where its words are narrower, on its start side, away from Dismiss. A hit area drawn by a pseudo-element is + a hairline larger on each side (46), so the press's .98 never takes it under 44. - **The notification centre** is the durable record the toasts point to: a bell IconButton (32px, a 6px ink dot while anything is unread, and the count in its accessible name and never drawn, so the button never changes width) that opens a popover at its opener's level plus one, below the bell with its end edge on the bell's, with a header band (title, count, "Mark all as read") and a footer ("View @@ -593,7 +624,7 @@ kept as a rule so both themes behave alike (DECISIONS 166). Four text levels wer too: the prompt's width plus 1ch, at least 24px, measured by the browser and never counted in characters, so `$` is exactly 24px and a longer prompt ("PS>") or a wide glyph widens the column for every line and the text of every line starts on one edge. The terminal is the container for its own head: under 30rem of its own width (not the viewport's) the copy button is - the icon alone (Copy, morphing to Check as drawn, announcing "Copied") and keeps its name "Copy commands", so a live head is two rows + the icon alone (Copy, morphing to Check as drawn, announcing "Copied", or the close and "Copy failed" after a refused write) and keeps its name "Copy commands", so a live head is two rows at 390. A finished run's head keeps the callout's marks in the 16px seat (CheckCircle in the success colour; XCircle with "Failed, exit 1" in danger ink) and "Done" in the head's secondary ink. A replay that hasn't started shows one sentence in the log's box, "Press Play to start", in tertiary ink, which leaves when the first line arrives; Play and Replay make the region a @@ -1074,11 +1105,14 @@ below, one level up, no rim or radius of its own. - **The plate shows only while the list is in use**: while the field has focus or the pointer is over the list. It fades, as Menu's does, when neither is true, and while the field has focus it stays when the pointer leaves, because it marks what ↵ will run. A page at rest with one row lit reads as a selection that isn't there, except the opening list, whose cursor row is lit at rest because the cursor is its state. (The modal's plate is always lit: the modal exists only while it is used.) -- **The list holds its unfiltered height**, up to `size-popup-max-height` (360), and scrolls inside. Filtering never changes it, so - what is below it never moves: the still table's rule, applied to a list. +- **The panel is as tall as its rows**, up to `size-popup-max-height` (360), and scrolls inside past it. On the open page the list's + unfiltered height is kept as page under the panel, so what is below it never moves and the box never holds an empty band. Inside a + card, a panel, a dialog or any other surface the list holds no room: the surface ends under what it shows, and what follows inside + it moves with the list (`reserve={false}`, `data-reserve="off"` in the skill, says the same for an app's own painted box). Beside a + preview, the list and the pane share the row's height. - **A foot band** shows the count at the start ("9 commands", "3 of 9") and the key legend at the end (`data-kbd-hint`, hidden on touch). The count is shown at once and spoken once, through a polite, atomic live region after 400ms of stillness (`FilterResult`'s rule). No match - is one centred sentence ("Nothing matches “zzz”.") and a ghost "Clear search", in the held area and outside the listbox, so the button is valid. + is one centred sentence ("Nothing matches “zzz”.") and a ghost "Clear search", in the panel's flow, with its own padding, outside the listbox, so the button is valid. - **Until cmdk arrives** the rows are drawn as they will be and what is typed is kept, then becomes the first search. cmdk stays behind its dynamic import, loaded when the list first mounts. - **Where the modal command menu sits** (DECISIONS 167, Q7c): its top is `max(16px, 12vh)` and its height is capped at 480px or what the window leaves under it, as the skill's palette is. @@ -1157,8 +1191,10 @@ implementation hasn't been reviewed. `border-divider` and nothing else (4 to 0; the prototype's brighter line broke the divider rule). Its height is the app's, in 24px rows. Under 720 it is a page that replaces the record, with a Back button, its halves stacked on a divider. - **Search.** The trigger is a button shaped like a field from 720 (`size-search-trigger` 200 by 44, a 1px `border-field` edge, radius 8, the word `aria-hidden`) and a - 44px icon button under it. The dialog is centred at `size-command-width` (560) and its results area is a fixed height, a full result's, that scrolls inside, so the - field and the count never move (4 to 0). A result is a link sized to its picture with 6px above and below: 72 for a 48 by 60 pack, 60 for a 96 by 48 logo, 48 at + 44px icon button under it. The dialog is `size-command-width` (560) wide. Its top is held where it opens (the top it has at a full result's height) and its + results area is as tall as its rows, up to a full result's height, scrolling inside past it: the field and the count never move, and + the box ends under what it shows (DECISIONS 329, superseding the fixed height). Its Close is hung at the band's end, on the line the + count and the results end on. A result is a link sized to its picture with 6px above and below: 72 for a 48 by 60 pack, 60 for a 96 by 48 logo, 48 at least (the 48 is a floor, not a size). Results are links and tab stops, each with the control ring at +2, 8px from the panel's edge, and a hover wash that runs full bleed and lifts no ink (the name and the detail both keep their ink: tertiary passes 4.5:1 on the wash over the dialog's level, 6.00:1 in dark and 4.88:1 in light, secondary 9.12:1 and 7.74:1, so no step is needed); there is no active row (3 to 1; one member wanted options in a listbox with arrow keys). The field's mark is a real 2px outline at −2 round its band (no majority, the vote's first option stands). The browser's own clear × is hidden: the band has one ×. The count is `FilterResult`'s debounced line. @@ -1192,7 +1228,7 @@ implementation hasn't been reviewed. lifting to secondary on the plate), then the passage in secondary at `text-base`, wrapping (its length is the server's). A **match** is a `mark` in primary ink at 600 with no fill: monochrome, so the ink and the weight are the mark, never a highlighter colour; in forced colours it keeps its weight in `CanvasText`. `markMatches(text, ranges)` draws a server's ranges (UTF-16 offsets, joined where they overlap or touch, clamped, a boundary - inside a code point widened to the whole of it, in any order) and never parses HTML. `current` is the passage shown beside the results: `aria-current` and the source at 600. **A results budget** is the caller's: `rows` (and `lines`, two by default) make the list as tall as that many passages, scrolling inside, so the field and the count never move; unset, the list grows with its page. The query, its paging and any grouping are the app's. The site search's `SearchResults` keeps its counts (three logo rows, five picture rows and "See all") as a shop's presets that any app sets (`logoRows`, `rows`, `all`; the skill's `--_logos`, `--_packs`, `--_alls`), found by the agnosticism audit (cimip-gaps-2, F7). **Loading:** the first + inside a code point widened to the whole of it, in any order) and never parses HTML. `current` is the passage shown beside the results: `aria-current` and the source at 600. **A results budget** is the caller's: `rows` (and `lines`, two by default) make the list as tall as that many passages, scrolling inside, so the field and the count never move; it is a window for the open page or a results pane, never for a short list inside a card; unset, the list grows with its page. The query, its paging and any grouping are the app's. The site search's `SearchResults` keeps its counts (three logo rows, five picture rows and "See all") as a shop's presets that any app sets (`logoRows`, `rows`, `all`; the skill's `--_logos`, `--_packs`, `--_alls`), found by the agnosticism audit (cimip-gaps-2, F7). **Loading:** the first results are a `LoadingShape` of stand-in passages (bones in the list's own shape); a changed query keeps the last results on screen (`refreshing`) and shows `Refreshing` ("Searching") only after a second; no results is the app's sentence in the list's place. React's alone (the HTML skill has no search over a server). @@ -1263,8 +1299,13 @@ voted, four members, 3 of 4 deciding, on the owner's handoff, from his approved rest is `inert` and hidden while closed. It opens as a grid row going `0fr` to `1fr` over `duration-slow` on `ease-out` and closes at 0.75× on `ease-in`; under reduced motion it is simply there. The clip keeps `space-2` beside the rows so a ring is whole and lets go at the transition's own end. A keyboard open puts focus on the first new row only once the clip has let go (vote 5, no majority); a pointer open leaves it on the button. -- **The copy button** (`CopyButton`): a `Button` of any variant and size that copies a string, says its words, then "Copied" for 1500ms - (as `CodeBlock` and `Terminal`), with both in one `Reserve` cell so its width never changes and a visually hidden `role="status"`. It says +- **The copy button** (`CopyButton`): a `Button` of any variant and size that copies a string. Of words alone it says its words, then + "Copied" for 1500ms, both centred in one `Reserve` cell so its width never changes. A copy control with a glyph (`CodeBlock`, + `Terminal`, the skill's `[data-copy]` with a glyph) keeps its words: its glyph is the check for 1500ms after a write that succeeded, + and the close after one that was refused. An icon-only copy does the same: the check, or the close, for + 1500ms. Copy and check are the drawn pair and change as the icon-only copy does (the morph at + `slow` on `ease-out`, at once under reduced motion; the skill swaps at once); copy and close are not a pair and crossfade over + `duration-fast`. Each has a visually hidden `role="status"`. It says Copied only after the write succeeded; a refused or missing clipboard leaves the button as it was. - **A cut table cell that holds a link** is unchanged (vote 7: no majority, so DECISIONS 142 stands: no plate). - **Values the builder chose where the ballot gave none, and the council left standing** (DECISIONS 157: no member objected): the link card's spacing (`space-10` above the heading, `space-5` @@ -1579,7 +1620,7 @@ The plan is secondary ink, never a series, and never carries a marker: a marker observed series draws over it, its markers ringed. - **The reason in words** goes in the reserved lane above the plot, 12/16 tertiary, from where the gap starts: the full words if they fit ("Watch not observed · not worn, travel"), then "Watch not observed", then "Not observed". Only the last gap may step back to - fit, and never over an earlier one. The reason is always also in the summary, the readout and the table. + fit, and never over an earlier one. The reason is always also in the summary, the table, the day's accessible description and the date line; the readout's value says 'Not observed' alone. **The headline chart** has no legend rows, so whenever it has a gap it shows a "Not observed" key above the plot, the hatch swatch and the words, as the series charts' legend does (DECISIONS 167, Q11a, 4 to 0); a gap whose lane words do not fit is then never a hatch with no word. - **The table** says "Not observed" in tertiary with no mark (DECISIONS 95), and the reason in its Note column. @@ -1587,8 +1628,9 @@ The plan is secondary ink, never a series, and never carries a marker: a marker - It sits above the plot, under the title and the source line: a date line, then each key. A key is a 16px swatch (`size-icon-sm`) drawn like its mark, the name, and its value for the picked day. -- **Nothing moves.** Every value reserves the widest of its forms ("10 h 59 m", "Not observed", "140 min so far") and so does the date - line: picking a day changes words, never positions. +- **Nothing moves.** Every value reserves the widest form it can show ("10 h 59 m", "140 min so far", and "Not observed" for a series + that can be missing), and so does the date line: picking a day changes words, never positions. A gap's reason is + never in the legend; on that day the date line says it. - **It returns to the latest day** when the pointer leaves, but **never while keyboard focus is inside the chart**: then the focused day is the one shown, whatever the pointer does. - **The picked day** is a full-height `state-selected` plate behind the marks, its axis date lifting from tertiary to primary, and its @@ -1660,7 +1702,7 @@ changes); the implementation hasn't been reviewed. The votes that had no majorit ringed `size-cut`), with no cursor, halo or plate. How the line curves (vote 3) and the kit's two reference lines (vote 6) had no majority, so the line is joined straight and the guides are Basalt's gridlines, gutter and baseline rule: for the owner's review page, where three of four members wanted the kit's two labelled guides. - **The headline frame** (`TimeChart`'s `headline`, votes 7 to 9): a 14/20, 500, secondary title and "View as table" in one 28px row; the picked day's number as the - headline (`text-4xl` under 720px, `text-5xl` from it, in a seat as wide as its widest form, tabular); the unit beside it (the one place a headline carries the unit, a + headline (`text-4xl` under 720px, `text-5xl` from it, in a seat as wide as its widest form, tabular, ending the seat, so a shorter number or the dash of a day with no reading is `space-2` from the unit and the unit never moves); the unit beside it (the one place a headline carries the unit, a written exception to "the unit is written once, on the top tick": the top tick keeps it too); one context line as tall as its tallest form. There is no live region and no hand-built toggle; the table opens in the same figure as the still table; the key hint stays a legend; the `figcaption` is required. The number glides over `duration-slow` when a day is picked (vote 9 had no majority; the glide, with the readable text the target, is the vote's option that stands), and its real value is in the @@ -2424,8 +2466,8 @@ broke a rule, and each change is named. fill and surface (the contrast test proves it), and the label's full ink on ghost and danger, where it would not in light (the council's consent row 11, by the AA rule and not by vote; in dark the lifted secondary would hold, and the rule is kept, DECISIONS 166). Full ink in forced colours. - **The count pill (D11d, A11, A12).** `count` on a `Button`: an outlined pill 24 tall in `border-input`, the number 600, secondary at zero and - primary above, never a fill and never a colour. It holds two tabular digits (0 to 99 never moves the button; no majority: reserve two digits stands, - and a third digit widens it). It is `aria-hidden`; the button's name carries the count. + primary above, never a fill and never a colour. The pill hugs its figures, 24 at least. The button holds a seat for two tabular digits round it and the pill ends that seat (0 to 99 + never moves the button; a third digit widens it). It is `aria-hidden`; the button's name carries the count. - **Two lines (D11b).** `note` on a `Button`: the label (14/20, a `<code>` in it is mono) over a note (13/18, secondary), start-aligned, at least 64 (`size-control-6xl`); in a container 340 to 480 wide they share one line at 48, 12px apart. A disabled one keeps the label's ink on the note. - **Done (D11c, A9, A10).** `IconButton` `done`: the plus becomes the core check in the button's own ink, in one shared seat, with a 100ms crossfade @@ -2437,14 +2479,14 @@ broke a rule, and each change is named. has no pressed state: a choice between two is a `SegmentedControl`. On touch one on a line of its own has a 44px hit box that changes no layout; one in a sentence keeps its line. It takes no `Button` box and no .98 press. - **The switch row (D9a, A2, A3).** `SwitchRow` in a `SwitchRowGroup`: one checkbox drawn as a row, an optional tile, a name and a kind, and a 16px - seat where a plus and a check cross over in 100ms (kept under reduced motion). The edge is `border-field` at rest and checked (`border-input` outside more contrast); hover lifts the ink to + seat where a plus and a check cross over in 100ms (kept under reduced motion). A tile is nested 8 from the row's start, top and bottom; with no tile the words start `space-3` in, as the seat ends (`space-2` under 720). The edge is `border-field` at rest and checked (`border-input` outside more contrast); hover lifts the ink to primary and the edge to `text-secondary` (not `border-hover`, which is fainter than the boundary and would drop it under 3:1). On is the selected wash and primary ink. It is 52 tall from 720 wide with a 36px tile and a 14/20 name, and 48 under 720 with a 32px tile and a 13/18 name: the council could not draw the ballot's 48 (a 36px tile, 12px of padding and two edges make 50) and kept the approved prototype's values. The row is not a filter: no count, no Clear and no seven-or-more rule; what it does to the page is said once by a `FilterResult` (400ms). In forced colours on is `Highlight` with `HighlightText` and no outline. - **Option chips (D9b, A4, A5).** `OptionChips`: one of many, eight at most, as chips that wrap with no track: a fieldset with a legend and a small - count; a chip 44 tall, radius 8, padding 10 before and 14 after, 16px, 8px apart, with a round 16px seat every chip reserves (a ring at rest, filled + count; a chip 44 tall, radius 8, padding 12 on both sides, 16px, 8px apart, with a round 16px seat every chip reserves (a ring at rest, filled with a 12px check when chosen). The chosen chip is the selected wash and primary ink and its edge does not change. A value that cannot be chosen takes `unavailable` (the words): the disabled look, its words kept, `aria-disabled` and reachable, never chosen by a click, Space or an arrow key landing on it. @@ -2529,7 +2571,7 @@ under the list moves whenever the list's height does, drops rows away from the p an app with a sticky header of its own inside the pane sets the property in its own CSS). The return waits for the page or size the press asked for, however long the app takes to load it, and forgets the press when a filter changes or the app moves somewhere else. - **The count** is "1–25 of 214", `text-sm`, secondary, tabular, in a seat as wide as its widest form for the unfiltered total ("888–888 of 888"), so a shorter count moves nothing. - It is blank for no matches. + It is blank for no matches. The band keeps its rows then: it is the list's fixed head, and nothing above the rows moves. - **The page size** is a `Select` of the app's sizes (10, 25, 50 and 100 unless it gives others) followed by the words "per page", named by the app's noun and those words ("Orders per page"): the visible words are inside the name (WCAG 2.5.3), the noun is the app's. The size a list starts at is the app's too (the examples start at 25; it is not a default), and so is whether it remembers the reader's choice. A new size keeps the reader's first row in view (page 3 at 25 per page is page 6 at 10). @@ -3080,9 +3122,10 @@ Found by an app's message stream (cimip-gaps-2, batch B3; the no-council path, D the lead; the owner sees the pictures before merge). Every part serves any app where people write to each other: a support inbox, a build's comments, a team chat, a shared document. - **The composer** (`Composer`). The field is Basalt's `Textarea` with an accessible name (`label`) and no visible label; the placeholder says where the message goes too. Under it a row: - the app's own actions at its start (ghost `sm` buttons: attach, a format toggle) and Send, a primary Button, always the row's last, at its end. Under that one status line, `text-xs` in - tertiary ink, one line tall even when empty and never more (a long list of names is cut with an ellipsis; the live region holds the whole text), a polite live region: who is typing (`typingStatus`: "Ana is typing", "Ana and Ben are typing", "Ana, Ben, and Cy are typing", "4 people - are typing") or anything the app says there. Nothing moves when it fills. The field starts at `rows` lines (default 2, the textarea's own least) and grows with its text a line at a time + the app's own actions at its start (ghost `sm` buttons: attach, a format toggle) and Send, a primary Button, always the row's last, at its end. The status is in that row, after the app's actions: `text-xs` in tertiary ink, one line, cut with an ellipsis (the live region holds + the whole text), a polite live region that is always mounted: who is typing (`typingStatus`: "Ana is typing", "Ana and Ben are typing", "Ana, Ben, and Cy are typing", "4 people + are typing") or anything the app says there. When its words do not fit beside the actions it takes a row of its own under them, and Send stays on the first row. With no status no line + is held. The first of the app's actions, when ghost, takes `edge="start"`: its glyph is on the field's line. The field starts at `rows` lines (default 2, the textarea's own least) and grows with its text a line at a time to `maxRows` (default 8), then scrolls; it has no resize handle, since its height is its text's. Where the browser cannot size a field to its content (`field-sizing`), it is measured, within the same bounds. - **Sending.** Enter sends and Shift+Enter is a new line (the soft keyboard's key says Send), or with `sendKey="Mod+Enter"` Enter is a new line and the platform's modifier with Enter sends, diff --git a/packages/react/src/app-shell.tsx b/packages/react/src/app-shell.tsx index a2857a1f..09d16c0a 100644 --- a/packages/react/src/app-shell.tsx +++ b/packages/react/src/app-shell.tsx @@ -124,7 +124,8 @@ export interface AppHeaderProps extends Omit<React.ComponentProps<"header">, "ti /** * The actions at the end of the bar: ghost icon buttons and at most one primary Button. Never a danger Button. Under 720 the * primary stays in the bar with its words, 44 tall like the bar's other buttons, and the title gives way to it (it is cut - * first), so keep its words short. + * first), so keep its words short. When the last one shown is a ghost button, give it `edge="end"`: its glyph goes on the bar's line and + * its box hangs into the bar's padding, as far as the bar's room allows (DECISIONS 336). A primary Button sits on the line with its edge. */ actions?: React.ReactNode; /** diff --git a/packages/react/src/button.tsx b/packages/react/src/button.tsx index 09c535f1..022b9fb0 100644 --- a/packages/react/src/button.tsx +++ b/packages/react/src/button.tsx @@ -46,8 +46,18 @@ type BaseProps = Omit<PartProps<"button">, "children"> & { * "(opens in a new tab)". The arrow and the words come from the target alone; there is no prop for them. */ newTabLabel?: string; + /** + * A ghost button that starts or ends a head, a bar, a band or a row (DECISIONS 336): what it shows (its glyph, or its words) goes on the + * head's content line and its own box hangs into the head's padding, only as far as the head's `--basalt-edge-room` allows (none when the + * head declares nothing). Its focus ring stays at +2 where the room keeps 4 and is drawn inside where it does not. Ghost only: with another + * variant it does nothing (and warns once in development). + */ + edge?: ButtonEdge; }; +/** The side of its head a ghost button is hung at. */ +export type ButtonEdge = "start" | "end"; + /** * A toggle: `pressed` writes `aria-pressed`. Only secondary and ghost buttons toggle (a latched primary would read as the * primary action, a latched danger as an error); on those two `pressed` is a type error. @@ -71,6 +81,14 @@ export type ButtonProps = BaseProps & iconEnd?: IconComponent; /** `icon` is a long-tail glyph that keeps its silhouette when filled, so a pressed toggle may fill it. A core glyph needs no mark. */ fillSafe?: boolean; + /** + * The "done" state of a button with `icon` and words: the words hold and the glyph is replaced by `doneIcon` (the core check), through the + * same seat as `IconButton`'s `done`, so Copy and Check morph and any other pair crossfades over 100ms. Say what happened in a polite line + * outside the button. Hold it for `CONFIRM_MS` (DECISIONS 336). + */ + done?: boolean; + /** The glyph shown while `done`. Default: the core check. */ + doneIcon?: IconComponent; /** * A quieter amount after the label ("Add to cart $49"), in tabular figures. It sits in a seat that holds the widest amount * named in `amountReserve`, so the label never moves when the amount changes. Put the amount in the button's name too (a @@ -98,9 +116,21 @@ const iconSize = (size: ControlSize) => (size === "xl" ? 20 : 16); declare const process: { env: { NODE_ENV?: string } }; let warnedBare = false; +let warnedEdge = false; + +/** `data-edge` for a ghost button; any other variant gets none, and a development warning once. */ +function edgeOf(edge: ButtonEdge | undefined, variant: ButtonVariant): ButtonEdge | undefined { + if (edge === undefined) return undefined; + if (variant === "ghost") return edge; + if (process.env.NODE_ENV !== "production" && !warnedEdge) { + warnedEdge = true; + console.warn("Basalt Button: `edge` hangs a ghost button at its head's edge; with another variant it does nothing (DECISIONS 336)"); + } + return undefined; +} /** A button. Its label says what happens: "Deploy", not "OK". */ -export function Button({ variant = "secondary", size = "md", fullWidth, icon, iconEnd, fillSafe, pressed, amount, amountReserve, count, note, loading: loadingProp = false, waitForAnswer = true, disabled, onClick, className, children, newTabLabel, render, ref, ...props }: ButtonProps) { +export function Button({ variant = "secondary", size = "md", fullWidth, edge, icon, iconEnd, fillSafe, done, doneIcon = CheckGlyph, pressed, amount, amountReserve, count, note, loading: loadingProp = false, waitForAnswer = true, disabled, onClick, className, children, newTabLabel, render, ref, ...props }: ButtonProps) { // A button rendered as a link that opens a new tab draws the arrow in its trailing slot and says so in its name. // A handler on the rendered element is taken into the press, so the wait guards it too. const [rendered, handler] = takeClick(render, onClick); @@ -130,11 +160,14 @@ export function Button({ variant = "secondary", size = "md", fullWidth, icon, ic data-variant={variant} data-size={size} data-full-width={fullWidth ? "" : undefined} + data-edge={edgeOf(edge, variant)} + data-done={icon && done ? "" : undefined} data-lines={note ? "" : undefined} className={withClass("basalt-button", className)} onClick={wait.press} > - {icon && !(toggles && !own) ? <ControlIcon icon={icon} size={iconSize(size)} selected={isPressed} fillSafe={fillSafe} eager={toggles} /> : null} + {icon && done !== undefined && !toggles ? <DoneSeat icon={icon} doneIcon={doneIcon} done={done} size={iconSize(size)} selected={false} fillSafe={fillSafe} /> : null} + {icon && !(toggles && !own) && !(done !== undefined && !toggles) ? <ControlIcon icon={icon} size={iconSize(size)} selected={isPressed} fillSafe={fillSafe} eager={toggles} /> : null} {/* A text toggle's seat holds its glyph at rest and, pressed, the check where the glyph has no selected form; the two crossfade, so both states are one width. */} {toggles && icon && !own ? ( <span className="basalt-button-check" data-glyph="" aria-hidden="true"> @@ -216,7 +249,7 @@ function DoneSeat({ icon, doneIcon, done, size, selected, fillSafe }: DoneSeatPr } /** A square button with only an icon. As a toggle it has no check: the plate, the ink step and the glyph's selected form say pressed. */ -export function IconButton({ variant = "ghost", size = "md", fullWidth, icon, done, doneIcon = CheckGlyph, fillSafe, pressed, label, loading: loadingProp = false, waitForAnswer = true, disabled, onClick, className, newTabLabel, render, ref, ...props }: IconButtonProps) { +export function IconButton({ variant = "ghost", size = "md", fullWidth, edge, icon, done, doneIcon = CheckGlyph, fillSafe, pressed, label, loading: loadingProp = false, waitForAnswer = true, disabled, onClick, className, newTabLabel, render, ref, ...props }: IconButtonProps) { // A handler on the rendered element is taken into the press, so the wait guards it too. const [rendered, handler] = takeClick(render, onClick); const link = newTabRender(rendered); @@ -240,6 +273,7 @@ export function IconButton({ variant = "ghost", size = "md", fullWidth, icon, do data-size={size} data-icon-only="" data-full-width={fullWidth ? "" : undefined} + data-edge={edgeOf(edge, variant)} data-done={done ? "" : undefined} className={withClass("basalt-button", className)} onClick={wait.press} diff --git a/packages/react/src/chart.tsx b/packages/react/src/chart.tsx index 9721b80a..54dde3f2 100644 --- a/packages/react/src/chart.tsx +++ b/packages/react/src/chart.tsx @@ -24,7 +24,7 @@ export interface ChartSeries { /** The series' name: it is in the legend, in the direct label and in every spoken sentence. */ name: string; values: Array<number | null>; - /** Why a day was not observed, per day: "not worn, travel". It is said in the lane, the summary, the readout and the table. */ + /** Why a day was not observed, per day: "not worn, travel". It is said in the lane (where it fits), the date line, the summary, the day's description and the table; the legend says "Not observed" alone. */ reasons?: Array<string | null | undefined>; } @@ -773,19 +773,32 @@ function planText(plan: ChartPlan, p: number | readonly [number, number] | null return typeof p === "number" ? format(p) : `${format(p[0])}–${format(p[1])}`; } +/** + * The forms a legend value reserves, so no key moves on any day (DECISIONS 336, Q2): each of its numbers (digits as zeros: the numerals are tabular), and + * "Not observed" for a series that can be missing. A gap's reason is never one of them: the legend does not carry it. + */ +export function legendForms(values: ReadonlyArray<number | null | undefined>, n: number, text: (value: number, index: number) => string): string[] { + const forms: string[] = []; + for (let i = 0; i < n; i++) { + const v = values[i]; + if (v != null) forms.push(shapeOf(text(v, i))); + } + return unique(values.some((v) => v == null) ? forms.concat(NOT_OBSERVED) : forms); +} + function Readout({ series, plan, bar, n, shown, active, partial, partialLabel, partialSuffix, format, formatPlan, formats, stamps, idBase }: ReadoutProps) { const dateOf = (i: number) => formats.withDay.format(at(stamps, i)); + // On a day a series was not observed the date line says why ("Wed, Oct 21 · scale not used"), as the headline's context line does: the legend never + // carries a gap's reason, and the lane cuts it where it does not fit (the pixel review's finding 1). The first missing series with a reason says it. + const reasonOf = (i: number) => series.find((s) => s.values[i] == null && s.reasons?.[i])?.reasons?.[i] ?? undefined; + const dateText = (i: number, latest: boolean) => `${latest ? "Latest · " : ""}${dateOf(i)}${reasonOf(i) ? ` · ${reasonOf(i)}` : ""}`; + const textOf = (v: number, i: number) => `${format(v)}${i === partial ? ` ${partialSuffix}` : ""}`; + // A day that was not observed says so and no more: its reason is in the lane, the summary, the table's note and the day's description (DECISIONS 336, Q2). const valueOf = (s: ChartSeries, i: number) => { const v = s.values[i]; - // A day that was not observed says why, in the lane's own words ("Not observed · not worn, travel"). - return v == null ? (s.reasons?.[i] ? `${NOT_OBSERVED} · ${s.reasons[i]}` : NOT_OBSERVED) : `${format(v)}${i === partial ? ` ${partialSuffix}` : ""}`; - }; - // Each value reserves the widest of its forms (digits as zeros: the numerals are tabular), so a new day moves nothing. - const reserveFor = (s: ChartSeries) => { - const forms: string[] = []; - for (let i = 0; i < n; i++) forms.push(shapeOf(valueOf(s, i))); - return unique(forms.concat(s.values.some((v) => v == null) ? [NOT_OBSERVED] : [])); + return v == null ? NOT_OBSERVED : textOf(v, i); }; + const reserveFor = (s: ChartSeries) => legendForms(s.values, n, textOf); const planForms = (): string[] => { if (!plan) return []; const forms: string[] = []; @@ -804,8 +817,8 @@ function Readout({ series, plan, bar, n, shown, active, partial, partialLabel, p return ( <div className="basalt-chart-key"> <p className="basalt-chart-date"> - {unique(Array.from({ length: n }, (_, k) => shapeOf(`Latest · ${dateOf(k)}`))).map((form) => <span key={form} className="basalt-chart-reserve" aria-hidden="true">{form}</span>)} - <span>{active === null ? "Latest · " : ""}{dateOf(i)}</span> + {unique(Array.from({ length: n }, (_, k) => [shapeOf(dateText(k, true)), shapeOf(dateText(k, false))]).flat()).map((form) => <span key={form} className="basalt-chart-reserve" aria-hidden="true">{form}</span>)} + <span>{dateText(i, active === null)}</span> </p> <ul className="basalt-chart-legend" aria-label="Key"> {series.map((s, k) => ( diff --git a/packages/react/src/command-panel.tsx b/packages/react/src/command-panel.tsx index 4852e56c..97279b53 100644 --- a/packages/react/src/command-panel.tsx +++ b/packages/react/src/command-panel.tsx @@ -218,8 +218,9 @@ export function CommandListPanel({ groups, label, placeholder, noun, level, band if (initialSearch) setSearch(initialSearch); }, [initialSearch]); - // The list holds its unfiltered height, up to the popup cap, and scrolls inside: filtering never changes it, so what is - // below it never moves. Measured whenever the list is unfiltered, from the sizer cmdk wraps the rows in. + // The panel hugs its rows, up to the popup cap, and scrolls inside past it. Its unfiltered height is measured whenever the list is unfiltered: as + // page under the panel on the open page (the host's data-reserve, DECISIONS 336), and, beside a preview, as the list's own height, which the list + // and the pane share. Measured from the sizer cmdk wraps the rows in. React.useLayoutEffect(() => { const host = list.current; const box = body.current; @@ -229,7 +230,14 @@ export function CommandListPanel({ groups, label, placeholder, noun, level, band if (searchRef.current) return; const style = getComputedStyle(host); const padding = Number.parseFloat(style.paddingTop) + Number.parseFloat(style.paddingBottom); - box.style.setProperty("--_held", `${sizer.getBoundingClientRect().height + padding}px`); + const listHeight = sizer.getBoundingClientRect().height + padding; + box.style.setProperty("--_held", `${listHeight}px`); + const page = root.current; + // The page keeps the taller of the panel's two heights, the unfiltered list's and "Nothing matches"', so a short list filtered to nothing + // never moves what follows (the code review's finding 6). The sentence's height is read from an unseen copy of it. + const none = box.querySelector<HTMLElement>(".basalt-command-none-sizer"); + const empty = none ? padding + none.getBoundingClientRect().height : 0; + if (page) wrap.current?.style.setProperty("--_held-page", `${page.getBoundingClientRect().height - listHeight + Math.max(listHeight, empty)}px`); }; measure(); const resizes = new ResizeObserver(measure); @@ -394,6 +402,11 @@ export function CommandListPanel({ groups, label, placeholder, noun, level, band ))} </Command.List> <NoMatch query={search} onClear={clear} /> + {/* An unseen copy of "Nothing matches", measured with the list, so the page can keep room for it. */} + <div className="basalt-command-none basalt-command-none-sizer" aria-hidden="true" inert> + <p>Nothing matches.</p> + <Button variant="ghost" size="sm" tabIndex={-1}>Clear search</Button> + </div> </div> <Foot total={total} noun={noun} hintId={ids.hint} preview={Boolean(detail)} query={search} /> </Command> diff --git a/packages/react/src/command.tsx b/packages/react/src/command.tsx index d4a51300..bf75c696 100644 --- a/packages/react/src/command.tsx +++ b/packages/react/src/command.tsx @@ -230,15 +230,22 @@ export interface CommandListProps { * on a page. A page whose surface is this list sets it, and has no `CommandMenu`; a page with a modal gives ⌘K to the modal. */ bindShortcut?: boolean; + /** + * On the open page (the list's panel at level 1) the list's unfiltered height is kept as page under the panel, so what follows never moves while + * the panel hugs its matches (DECISIONS 336, Q6). Inside a card or any other surface it holds no room. `false` says the same for an app's own + * painted box. Default true. + */ + reserve?: boolean; className?: string; } /** * The command panel set in the page: a level-1 panel in the flow with no scrim or shadow, a search field that keeps focus while - * the arrows move through the rows, and a foot that counts what is shown. Filtering never changes its height. Until cmdk + * the arrows move through the rows, and a foot that counts what is shown. The panel is as tall as its rows; on the open page (with `reserve`) the taller of its unfiltered and its + * "Nothing matches" heights is kept as page under it, so filtering never moves what follows. Until cmdk * arrives (the first mount, as `CommandMenu`'s first opening), the rows are drawn as they will be and what is typed is kept. */ -export function CommandList({ groups, label, placeholder = "Search commands", noun = "command", onSelect, detail, bindShortcut = false, className }: CommandListProps) { +export function CommandList({ groups, label, placeholder = "Search commands", noun = "command", onSelect, detail, bindShortcut = false, reserve = true, className }: CommandListProps) { const level = usePanelLevel(); const bandLevel = Math.min(level + 1, 3); const { state, retry } = usePanel(true); @@ -272,13 +279,13 @@ export function CommandList({ groups, label, placeholder = "Search commands", no if (state.status === "ready") { const ListPanel = state.ListPanel; return ( - <div ref={host} className="basalt-command-host" data-pane={detail ? "" : undefined}> + <div ref={host} className="basalt-command-host" data-pane={detail ? "" : undefined} data-reserve={reserve && level === 1 ? "" : undefined}> <ListPanel groups={groups} label={label} placeholder={placeholder} noun={noun} level={level} bandLevel={bandLevel} onSelect={onSelect} detail={paneOf} className={className} initialSearch={early} focusHandoff={handoff} /> </div> ); } return ( - <div ref={host} className="basalt-command-host" data-pane={detail ? "" : undefined}> + <div ref={host} className="basalt-command-host" data-pane={detail ? "" : undefined} data-reserve={reserve && level === 1 ? "" : undefined}> <div className={join("basalt-command-split", className)}> <div className="basalt-command basalt-command-page" data-level={level} role="region" aria-label={label} aria-busy={state.status === "loading" || undefined}> <div className="basalt-command-search" data-level={bandLevel}> diff --git a/packages/react/src/composer.tsx b/packages/react/src/composer.tsx index aa800338..941bfb20 100644 --- a/packages/react/src/composer.tsx +++ b/packages/react/src/composer.tsx @@ -37,9 +37,16 @@ export interface ComposerProps extends Omit<React.ComponentProps<"div">, "onChan rows?: number; /** Lines it grows to with its text before it scrolls. Default 8. */ maxRows?: number; - /** The app's other actions, at the start of the row under the field: an attach button, a format toggle. Send is always the row's last. */ + /** + * The app's other actions, at the start of the row under the field: an attach button, a format toggle. Send is always the row's last. The first, + * when it is a ghost control, takes `edge="start"`: its glyph goes on the field's line, hung into the room the box holding the composer says it + * has (`AppShell`'s foot, a card's content); the composer itself says none (DECISIONS 336). + */ actions?: React.ReactNode; - /** The line under the composer: who is typing (`typingStatus`), a draft saved. A polite live region, one line tall even when empty. */ + /** + * Who is typing (`typingStatus`), a draft saved: in the actions row after the app's actions, on a row of its own under them when its words do not fit + * beside them. A polite live region, always mounted; with no status no line is held. + */ status?: React.ReactNode; /** * Names in the field: render the picker for the composer's field, `(field) => <MentionPicker field={field} options={people} />`. The app imports @@ -55,8 +62,7 @@ export interface ComposerProps extends Omit<React.ComponentProps<"div">, "onChan /** * A message field with its send action. The field has an accessible name and no visible label; it grows with its text up to `maxRows` and - * then scrolls. The row under it holds the app's `actions` and Send (primary, the row's last); the `status` line under that is a polite live - * region that keeps its height when empty. A key sends by pressing Send, so a send is guarded by the button's own wait. With `mentions`, the + * then scrolls. The row under it holds the app's `actions`, the `status` (a polite live region) and Send (primary, the row's last). A key sends by pressing Send, so a send is guarded by the button's own wait. With `mentions`, the * trigger opens a picker of names while focus stays in the field. */ export function Composer({ label, value, defaultValue = "", onValueChange, onSend, sendKey = "Enter", sendLabel = "Send", waitForAnswer = true, placeholder, rows = 2, maxRows = 8, actions, status, mentions, disabled = false, inputRef, textareaProps, className, style, ...props }: ComposerProps) { @@ -156,10 +162,14 @@ export function Composer({ label, value, defaultValue = "", onValueChange, onSen /> {mentions ? mentions(own) : null} <div className="basalt-composer-actions"> - {actions ? <div className="basalt-composer-extra">{actions}</div> : null} + {/* The app's actions, then the status, beside them while its words fit and on a row of its own under them when they do not; Send stays on the + first row. No line is held when there is no status, and the polite region is always mounted (DECISIONS 336, Q4). */} + <div className="basalt-composer-start"> + {actions ? <div className="basalt-composer-extra">{actions}</div> : null} + <p className="basalt-composer-status" aria-live="polite">{status}</p> + </div> {sendKey === "Mod+Enter" ? <ActionShortcut shortcut="Mod+Enter" className="basalt-composer-send-group">{button}</ActionShortcut> : button} </div> - <p className="basalt-composer-status" aria-live="polite">{status}</p> </div> ); } diff --git a/packages/react/src/copy-button.tsx b/packages/react/src/copy-button.tsx index ff661ba7..e012046d 100644 --- a/packages/react/src/copy-button.tsx +++ b/packages/react/src/copy-button.tsx @@ -3,7 +3,7 @@ import * as React from "react"; import { Button } from "./button"; -import type { ButtonVariant, ControlSize } from "./button"; +import type { ButtonEdge, ButtonVariant, ControlSize } from "./button"; import { COPIED_MS } from "./constants"; import { Reserve } from "./reserve"; import { join } from "./utils"; @@ -19,6 +19,8 @@ export interface CopyButtonProps extends Omit<React.ComponentProps<"button">, "c statusLabel?: string; variant?: ButtonVariant; size?: ControlSize; + /** A ghost copy button that starts or ends a head or a row is hung at that edge, as `Button`'s `edge` (DECISIONS 336). */ + edge?: ButtonEdge; /** Called after the write has succeeded. */ onCopy?: () => void; } diff --git a/packages/react/src/copy-result.ts b/packages/react/src/copy-result.ts new file mode 100644 index 00000000..7f4c00ef --- /dev/null +++ b/packages/react/src/copy-result.ts @@ -0,0 +1,56 @@ +// What a copy control with a glyph shows after a write (DECISIONS 152, item 6; 336 and the open items' ruling): the check for CONFIRM_MS after a write +// that succeeded, the close after one that was refused, through the button's done seat. The done glyph stays the last result's until the next write, so +// as the 1500ms ends it is that glyph that leaves: never a check on the way out of a failure. Used by CodeBlock's and Terminal's copies. +import * as React from "react"; + +import { CONFIRM_MS } from "./constants"; +import { CheckGlyph } from "./glyphs/check"; +import { CloseGlyph } from "./glyphs/close"; +import type { IconComponent } from "./types"; + +export type CopyOutcome = "copied" | "failed"; + +export interface CopyState { + /** The result being shown, or null once its time is up. */ + shown: CopyOutcome | null; + /** The last result, which picks the done glyph while it leaves. */ + last: CopyOutcome; +} + +export const COPY_REST: CopyState = { shown: null, last: "copied" }; + +/** The next state: a write's outcome shows it and makes it the last; the end of its time hides it and keeps it the last. */ +export function nextCopyState(state: CopyState, event: CopyOutcome | "reset"): CopyState { + return event === "reset" ? { shown: null, last: state.last } : { shown: event, last: event }; +} + +/** The done glyph for a state: the close while the last result was a refusal, else the check. */ +export function copyDoneIcon(state: CopyState): IconComponent { + return state.last === "failed" ? CloseGlyph : CheckGlyph; +} + +/** The words the status line says for a state. */ +export function copyStatus(state: CopyState): string { + return state.shown === "copied" ? "Copied" : state.shown === "failed" ? "Copy failed" : ""; +} + +/** A copy's state and its write: `copy(text)` writes, shows the outcome for CONFIRM_MS and keeps its glyph as it leaves. */ +export function useCopyResult() { + const [state, setState] = React.useState<CopyState>(COPY_REST); + React.useEffect(() => { + if (!state.shown) return undefined; + const t = setTimeout(() => setState((now) => nextCopyState(now, "reset")), CONFIRM_MS); + return () => clearTimeout(t); + }, [state]); + const copy = React.useCallback(async (text: string) => { + let outcome: CopyOutcome = "copied"; + try { + await navigator.clipboard.writeText(text); + } catch { + // clipboard refused (an insecure context or no permission): the close for a moment, and the status says so + outcome = "failed"; + } + setState((now) => nextCopyState(now, outcome)); + }, []); + return { state, copy, done: state.shown !== null, doneIcon: copyDoneIcon(state), status: copyStatus(state) }; +} diff --git a/packages/react/src/diagram-viewer.tsx b/packages/react/src/diagram-viewer.tsx index 345146e3..7e129565 100644 --- a/packages/react/src/diagram-viewer.tsx +++ b/packages/react/src/diagram-viewer.tsx @@ -202,7 +202,7 @@ export function DiagramViewer({ kit, spec, component, source, summary, opener, o <h2 id={titleId} className="basalt-dialog-title" tabIndex={-1}>{model.title}</h2> {source !== undefined && source !== null ? <p className={`basalt-dialog-description ${P}-viewer-source`}>{source}</p> : null} </div> - <IconButton icon={CloseGlyph} label="Close" className="basalt-sheet-close" onClick={close} /> + <IconButton icon={CloseGlyph} label="Close" edge="end" className="basalt-sheet-close" onClick={close} /> </header> <p id={descId} className="basalt-visually-hidden">{summary}</p> <div ref={setStage} className={`${P}-stage`} tabIndex={0} role="group" aria-label="Zoomed drawing" data-layout={layout.layout}> @@ -237,7 +237,7 @@ export function DiagramViewer({ kit, spec, component, source, summary, opener, o <div className={`${P}-zoom`}> {/* At a limit, or with the list open, a control is disabled as Basalt's are (B1 of the pixel review): it stays mounted and focusable, loses its ink, and takes no hover, press or scale. */} - <IconButton icon={MinusGlyph} size="sm" label="Zoom out" disabled={off || zoom.atMin} focusableWhenDisabled onClick={() => { if (!off && !zoom.atMin) z()?.zoomOut(); }} /> + <IconButton icon={MinusGlyph} size="sm" edge="start" label="Zoom out" disabled={off || zoom.atMin} focusableWhenDisabled onClick={() => { if (!off && !zoom.atMin) z()?.zoomOut(); }} /> <span className={`${P}-level`} aria-hidden="true" data-reserve="400%"><span>{`${zoom.level}%`}</span></span> <IconButton icon={PlusGlyph} size="sm" label="Zoom in" disabled={off || zoom.atMax} focusableWhenDisabled onClick={() => { if (!off && !zoom.atMax) z()?.zoomIn(); }} /> <Button variant="secondary" size="sm" className={`${P}-fit`} disabled={off || zoom.atFit} focusableWhenDisabled onClick={() => { if (!off && !zoom.atFit) z()?.fit(); }}>Fit</Button> diff --git a/packages/react/src/dialog.tsx b/packages/react/src/dialog.tsx index 1ded35b1..4e60c597 100644 --- a/packages/react/src/dialog.tsx +++ b/packages/react/src/dialog.tsx @@ -106,6 +106,11 @@ function modalityOf(event: Event | undefined): FormState["opened"] { /** Whether the dialog above is modal (the default): its content makes what is outside inert only then. */ export const DialogModal = /* @__PURE__ */ React.createContext(true); +/** + * A dialog whose top is held where it opens though it is not a form (the search dialog, DECISIONS 336): its box ends under what it shows. The part + * marked `data-grows` is measured at its max-height, so the held top is the one the box has when that part is full. Basalt's own, not exported. + */ +export const DialogHoldsTop = /* @__PURE__ */ React.createContext(false); export interface DialogTriggerProps extends PartProps<"button"> { nativeButton?: boolean; @@ -156,7 +161,8 @@ export function DialogContent({ className, style, children, ref, size = "default if (ref) ref.current = element; }, [ref]); const popupRef = useModalOutside<HTMLDivElement>(keepRef, React.useContext(DialogModal)); - const top = useHeldTop(node, form); + const holds = React.useContext(DialogHoldsTop); + const top = useHeldTop(node, form, holds); // A form's state lives only while it is open: opened by whatever means, it starts with what its fields hold and no remembered input; when its box goes, both go (however it was closed). React.useLayoutEffect(() => { if (!form || !state || !node) return undefined; @@ -192,19 +198,23 @@ const FIRST_FIELD = 'input:not([type="hidden"]):not([disabled]):not([type="check * once as it opens and again only when the window is resized, so whatever grows inside (an error under a field) grows downward and the title does not move. `null` while it is * being measured, in its natural centre, and for a dialog that is not a form or that is a full-screen modal (under 720). */ -function useHeldTop(node: HTMLElement | null, form: boolean): number | null { +function useHeldTop(node: HTMLElement | null, form: boolean, holds = false): number | null { const [top, setTop] = React.useState<number | null>(null); const [epoch, setEpoch] = React.useState(0); React.useLayoutEffect(() => { if (!node) { setTop(null); return; } - if (!form) return; + if (!form && !holds) return; // The full-screen form (under size-breakpoint-md, 720px) has no top to hold. - if (window.matchMedia("(width < 720px)").matches) { setTop(null); return; } + if (form && window.matchMedia("(width < 720px)").matches) { setTop(null); return; } // The margin from the window's edge is what its own max-height leaves: the window less twice `space-4`. const max = Number.parseFloat(getComputedStyle(node).maxHeight); const gap = Number.isFinite(max) ? Math.max(0, (window.innerHeight - max) / 2) : 0; - setTop(Math.max(gap, Math.round((window.innerHeight - node.offsetHeight) / 2))); - }, [node, form, epoch]); + // A part that grows (the search's results) counts at its full height, so the top is where the full box has it, whatever it holds now. + const grows = holds ? node.querySelector<HTMLElement>("[data-grows]") : null; + const room = grows ? Number.parseFloat(getComputedStyle(grows).maxHeight) - grows.offsetHeight : 0; + const height = Math.min(node.offsetHeight + (Number.isFinite(room) ? Math.max(0, room) : 0), Number.isFinite(max) ? max : Infinity); + setTop(Math.max(gap, Math.round((window.innerHeight - height) / 2))); + }, [node, form, holds, epoch]); // The held place lands where it is and never glides. It is measured while the box is centred by `translate(-50%, -50%)` (that style is resolved // to measure it), and the held box is placed by its top with `translateX(-50%)`: a transition between the two slid the dialog down from half its // height above as it opened, under reduced motion too. So the change to the held place is resolved with transitions off, and only the entry's @@ -217,11 +227,11 @@ function useHeldTop(node: HTMLElement | null, form: boolean): number | null { node.style.transition = transition; }, [node, top]); React.useEffect(() => { - if (!node || !form) return undefined; + if (!node || (!form && !holds)) return undefined; const resize = () => { setTop(null); setEpoch((n) => n + 1); }; window.addEventListener("resize", resize); return () => window.removeEventListener("resize", resize); - }, [node, form]); + }, [node, form, holds]); return top; } diff --git a/packages/react/src/drawer.tsx b/packages/react/src/drawer.tsx index db7ae530..3a12a601 100644 --- a/packages/react/src/drawer.tsx +++ b/packages/react/src/drawer.tsx @@ -35,7 +35,7 @@ export function Drawer({ label, open = true, rows = 13, columns, onBack, backLab className={join("basalt-drawer", className)} style={{ "--_rows": rows, ...(columns ? { "--_columns": columns } : null), ...style } as React.CSSProperties} > - {onBack ? <Button variant="ghost" size="sm" icon={ChevronLeftGlyph} className="basalt-drawer-back" onClick={onBack}>{backLabel}</Button> : null} + {onBack ? <Button variant="ghost" size="sm" edge="start" icon={ChevronLeftGlyph} className="basalt-drawer-back" onClick={onBack}>{backLabel}</Button> : null} {children} </section> ); diff --git a/packages/react/src/feedback.tsx b/packages/react/src/feedback.tsx index e92963e6..21cca597 100644 --- a/packages/react/src/feedback.tsx +++ b/packages/react/src/feedback.tsx @@ -8,9 +8,9 @@ import { WarningIcon } from "@phosphor-icons/react/dist/csr/Warning"; import { XCircleIcon } from "@phosphor-icons/react/dist/csr/XCircle"; import * as React from "react"; -import { CheckGlyph } from "./glyphs/check"; import { ChevronDownGlyph } from "./glyphs/chevron-down"; import { CopyGlyph } from "./glyphs/copy"; +import { useCopyResult } from "./copy-result"; import { IconButton } from "./button"; import { CodeLine, CodePrompt, codeLines, codeWords, continues } from "./code-lines"; import { loadFlight } from "./control-icon"; @@ -20,7 +20,6 @@ import type { CodeToken } from "./syntax"; import { inLevel, useFloatingLayer, usePanelLevel, usePopupLevel } from "./layers"; import type { Align, ChangeDetails, CollisionAvoidance, FocusTarget, OpenChangeDetails, PartProps, PlacementOffset, PlacementProps, PopoverHandle, PopupActions, Side } from "./types"; import { join, withClass } from "./utils"; -import { CONFIRM_MS } from "./constants"; import { useInRequiredField } from "./field-group"; import { useJoinedRef, useWriting } from "./wait"; import type { WritingEmpty } from "./wait"; @@ -349,28 +348,17 @@ export function CodeBlock({ code, language, title, copyable = true, prompt, wrap // With a prompt, every line has a gutter, so the text is cut into lines; without one the block is a single run of text. // A block that wraps is cut into lines too, each a row of words that break only at a space. const lines = React.useMemo(() => (prompt === undefined && !wrap ? null : codeLines(code, tokens)), [prompt, wrap, code, tokens]); - const [copied, setCopied] = React.useState(false); - React.useEffect(() => { - if (!copied) return; - const t = setTimeout(() => setCopied(false), CONFIRM_MS); - return () => clearTimeout(t); - }, [copied]); + // What the last copy did, held for CONFIRM_MS: the check, or the close for a refused write (copy-result.ts; DECISIONS 336, the open items' ruling). + const copyResult = useCopyResult(); // The copy glyph is one that changes (Copy, then Check): the morph's engine is on its way before the first click. React.useEffect(() => { if (copyable) loadFlight(); }, [copyable]); - const copy = async () => { - try { - await navigator.clipboard.writeText(code); - setCopied(true); - } catch { - // clipboard refused (insecure context or permissions): leave the button as it was - } - }; + const copy = () => copyResult.copy(code); const copyButton = copyable ? ( <span className="basalt-code-copy"> - <IconButton size="sm" icon={copied ? CheckGlyph : CopyGlyph} label="Copy code" onClick={copy} /> - <span className="basalt-visually-hidden" role="status">{copied ? "Copied" : ""}</span> + <IconButton size="sm" edge={title ? "end" : undefined} icon={CopyGlyph} done={copyResult.done} doneIcon={copyResult.doneIcon} label="Copy code" onClick={copy} /> + <span className="basalt-visually-hidden" role="status">{copyResult.status}</span> </span> ) : null; return ( diff --git a/packages/react/src/filter.tsx b/packages/react/src/filter.tsx index 252dc720..e3f8e0d1 100644 --- a/packages/react/src/filter.tsx +++ b/packages/react/src/filter.tsx @@ -5,7 +5,7 @@ import * as React from "react"; import { ChevronDownGlyph } from "./glyphs/chevron-down"; import { SearchGlyph } from "./glyphs/search"; -import { Button, type ControlSize } from "./button"; +import { Button, type ButtonEdge, type ControlSize } from "./button"; import { CheckGlyph } from "./glyphs/check"; import { PlusGlyph } from "./glyphs/plus"; import { Icon } from "./icon"; @@ -83,10 +83,12 @@ export function MultiSelect({ label, options, value, defaultValue, onValueChange // in the DOM for the group's description to read. const wide = `${options.length} of ${options.length}`; const popup = toolbar || options.length > MAX_CHIPS; - const clear = ( + // Clear, in the chips' head after the label, or at the checklist foot's end, hung there (DECISIONS 336). + const clearAt = (edge?: ButtonEdge) => ( <Button variant="ghost" size="sm" + edge={edge} className="basalt-filter-clear" // Not `disabled`: a disabled button drops keyboard focus. At zero it is aria-disabled, activation is suppressed, and focus stays. // A disabled filter's Clear is aria-disabled the same way, so it cannot clear what the filter will not change. @@ -101,15 +103,16 @@ export function MultiSelect({ label, options, value, defaultValue, onValueChange Clear </Button> ); - if (popup) return <ChecklistFilter {...{ label, options, ordered, set, disabled, className, count, clear, controlSize, toolbar }} />; + if (popup) return <ChecklistFilter {...{ label, options, ordered, set, disabled, className, count, clear: clearAt("end"), controlSize, toolbar }} />; return ( <div className={join("basalt-filter", className)}> <div className="basalt-filter-head"> <span id={ids.label} className="basalt-filter-label">{label}</span> + {/* Label, Clear, count (DECISIONS 336, Q1): Clear never moves as the count changes, and the count's spare room is the row's open end. */} + {clearAt()} <span id={ids.count} className="basalt-filter-count" data-reserved="" data-any="Any" data-widest={wide}> <span className="basalt-filter-count-value">{count}</span> </span> - {clear} </div> <BaseCheckboxGroup value={ordered} onValueChange={set} disabled={disabled} aria-labelledby={ids.label} aria-describedby={ids.count} className="basalt-filter-chips"> {options.map((o) => ( diff --git a/packages/react/src/index.ts b/packages/react/src/index.ts index a0baa535..ff705bf0 100644 --- a/packages/react/src/index.ts +++ b/packages/react/src/index.ts @@ -1,5 +1,5 @@ export { Button, IconButton } from "./button"; -export type { ButtonProps, ButtonVariant, ControlSize, IconButtonProps } from "./button"; +export type { ButtonEdge, ButtonProps, ButtonVariant, ControlSize, IconButtonProps } from "./button"; export { Icon } from "./icon"; export type { IconProps, IconSize } from "./icon"; // The core set: one module per glyph, so an app bundles the ones it imports. diff --git a/packages/react/src/notifications.tsx b/packages/react/src/notifications.tsx index ef3d7840..72615d4b 100644 --- a/packages/react/src/notifications.tsx +++ b/packages/react/src/notifications.tsx @@ -5,6 +5,7 @@ import { XCircleIcon } from "@phosphor-icons/react/dist/csr/XCircle"; import * as React from "react"; import { Button, IconButton } from "./button"; +import type { ButtonEdge } from "./button"; import { Popover, PopoverContent, PopoverTitle, PopoverTrigger } from "./feedback"; import { ControlIcon, loadFlight } from "./control-icon"; import { ChevronDownGlyph } from "./glyphs/chevron-down"; @@ -75,6 +76,11 @@ interface ListParts { } export interface NotificationCenterProps extends ListParts { + /** + * The bell is a ghost icon button: when it is the last control of a bar (`AppHeader`'s last action, `SiteHeader`'s last tool), give it + * `edge="end"` so its glyph goes on the bar's line (DECISIONS 336). + */ + edge?: ButtonEdge; /** "View all" was pressed (the app's own page). With `viewAllHref` it is a link as well. */ onViewAll?: () => void; viewAllHref?: string; @@ -127,7 +133,7 @@ function drawn(entries: readonly NotificationEntry[]): NotificationEntry[] { * On a phone the bell gives way to a page: put `NotificationList` on the app's own page and link to it from the tab bar (`TabBarItem` * with `NotificationsGlyph` and its `dot`), the same page "View all" opens. */ -export function NotificationCenter({ entries: given, onSelect, onMarkAllRead, onClearAll, onViewAll, viewAllHref, label = "Notifications", open, defaultOpen, onOpenChange, side = "bottom", align = "end", className }: NotificationCenterProps) { +export function NotificationCenter({ entries: given, onSelect, onMarkAllRead, onClearAll, onViewAll, viewAllHref, label = "Notifications", open, defaultOpen, onOpenChange, side = "bottom", align = "end", edge, className }: NotificationCenterProps) { const entries = drawn(given); const unread = unreadCount(entries); const popup = React.useRef<PopupActions | null>(null); @@ -138,13 +144,13 @@ export function NotificationCenter({ entries: given, onSelect, onMarkAllRead, on <PopoverTrigger className="basalt-notifications-trigger" data-unread={unread > 0 ? "" : undefined} - render={<IconButton icon={NotificationsGlyph} label={unread > 0 ? `${label}, ${unread} unread` : label} className={className} />} + render={<IconButton icon={NotificationsGlyph} label={unread > 0 ? `${label}, ${unread} unread` : label} edge={edge} className={className} />} /> <PopoverContent side={side} align={align} className="basalt-notifications"> <div className="basalt-notifications-head"> <PopoverTitle className="basalt-notifications-title">{label}</PopoverTitle> <span className="basalt-notifications-count">{unread} unread</span> - <MarkAllRead unread={unread} onMarkAllRead={onMarkAllRead} /> + <MarkAllRead unread={unread} onMarkAllRead={onMarkAllRead} edge="end" /> </div> {entries.length === 0 ? ( <p className="basalt-notifications-empty">Nothing yet.</p> @@ -156,13 +162,13 @@ export function NotificationCenter({ entries: given, onSelect, onMarkAllRead, on </div> )} <div className="basalt-notifications-foot"> - <ClearAll count={entries.length} onClearAll={onClearAll} /> + <ClearAll count={entries.length} onClearAll={onClearAll} edge="start" /> {viewAllHref ? ( - <a className="basalt-button" data-variant="ghost" data-size="sm" href={viewAllHref} onClick={() => { onViewAll?.(); leave(); }}> + <a className="basalt-button" data-variant="ghost" data-size="sm" data-edge="end" href={viewAllHref} onClick={() => { onViewAll?.(); leave(); }}> <span className="basalt-button-label">View all</span> </a> ) : ( - <Button variant="ghost" size="sm" onClick={() => { onViewAll?.(); leave(); }}>View all</Button> + <Button variant="ghost" size="sm" edge="end" onClick={() => { onViewAll?.(); leave(); }}>View all</Button> )} </div> </PopoverContent> @@ -216,20 +222,20 @@ export function NotificationList({ entries: given, onSelect, onMarkAllRead, onCl ); } -function MarkAllRead({ unread, onMarkAllRead }: { unread: number; onMarkAllRead?: () => void }) { +function MarkAllRead({ unread, onMarkAllRead, edge }: { unread: number; onMarkAllRead?: () => void; edge?: ButtonEdge }) { // Stays mounted and keeps focus when nothing is left to mark, as Clear does: disabled in place. return ( - <Button variant="ghost" size="sm" className="basalt-notifications-mark" disabled={unread === 0} focusableWhenDisabled onClick={() => onMarkAllRead?.()}> + <Button variant="ghost" size="sm" edge={edge} className="basalt-notifications-mark" disabled={unread === 0} focusableWhenDisabled onClick={() => onMarkAllRead?.()}> Mark all as read </Button> ); } -function ClearAll({ count, onClearAll }: { count: number; onClearAll?: () => void }) { +function ClearAll({ count, onClearAll, edge }: { count: number; onClearAll?: () => void; edge?: ButtonEdge }) { if (!onClearAll) return null; // At the foot's start, apart from View all; stays mounted and keeps focus when nothing is left, as Mark all as read does. return ( - <Button variant="ghost" size="sm" className="basalt-notifications-clear" disabled={count === 0} focusableWhenDisabled onClick={() => onClearAll()}> + <Button variant="ghost" size="sm" edge={edge} className="basalt-notifications-clear" disabled={count === 0} focusableWhenDisabled onClick={() => onClearAll()}> Clear all </Button> ); diff --git a/packages/react/src/overlays.tsx b/packages/react/src/overlays.tsx index 442536bd..3217bbb2 100644 --- a/packages/react/src/overlays.tsx +++ b/packages/react/src/overlays.tsx @@ -113,7 +113,7 @@ export function SheetHeader({ closeLabel, className, children, ...props }: Sheet return ( <header {...props} className={join("basalt-sheet-head", className)}> <div className="basalt-sheet-head-text">{children}</div> - {closeLabel ? <DialogClose render={<IconButton icon={CloseGlyph} label={closeLabel} className="basalt-sheet-close" />} /> : null} + {closeLabel ? <DialogClose render={<IconButton icon={CloseGlyph} label={closeLabel} edge="end" className="basalt-sheet-close" />} /> : null} </header> ); } diff --git a/packages/react/src/release-notes.tsx b/packages/react/src/release-notes.tsx index 896b2e85..c47ce366 100644 --- a/packages/react/src/release-notes.tsx +++ b/packages/react/src/release-notes.tsx @@ -423,7 +423,7 @@ function Release({ release, form, product, running, runningBuild, shared }: { re <ArrivedWord on={arrival.on} ever={arrival.ever} label={words.linked} /> {heading} </div> - <CopyButton variant="ghost" size="sm" text={() => `${shared.base()}#${id}`} aria-label={words.copyLinkTo(name)} copiedLabel={words.copied} statusLabel={words.linkCopied} className="basalt-release-copy"> + <CopyButton variant="ghost" size="sm" edge="end" text={() => `${shared.base()}#${id}`} aria-label={words.copyLinkTo(name)} copiedLabel={words.copied} statusLabel={words.linkCopied} className="basalt-release-copy"> {words.copyLink} </CopyButton> </header> diff --git a/packages/react/src/search.tsx b/packages/react/src/search.tsx index be1ee617..2579542a 100644 --- a/packages/react/src/search.tsx +++ b/packages/react/src/search.tsx @@ -1,7 +1,7 @@ import * as React from "react"; import { IconButton } from "./button"; -import { Dialog, DialogClose, DialogContent, DialogTitle } from "./dialog"; +import { Dialog, DialogClose, DialogContent, DialogHoldsTop, DialogTitle } from "./dialog"; import { FilterResult } from "./filter-result"; import { CloseGlyph } from "./glyphs/close"; import { SearchGlyph } from "./glyphs/search"; @@ -64,6 +64,8 @@ export interface SearchDialogProps { export function SearchDialog({ open, onOpenChange, title, label, placeholder, query, onQueryChange, onSubmit, count, closeLabel = "Close search", finalFocus, children }: SearchDialogProps) { return ( <Dialog open={open} onOpenChange={onOpenChange}> + {/* Its top is held where the full box has it and the box ends under what it shows (DECISIONS 336, Q3). */} + <DialogHoldsTop.Provider value> <DialogContent className="basalt-search" finalFocus={finalFocus}> <DialogTitle className="basalt-visually-hidden">{title}</DialogTitle> <form @@ -87,11 +89,12 @@ export function SearchDialog({ open, onOpenChange, title, label, placeholder, qu onChange={(event) => onQueryChange(event.target.value)} /> </label> - <DialogClose render={<IconButton icon={CloseGlyph} label={closeLabel} className="basalt-search-close" />} /> + <DialogClose render={<IconButton icon={CloseGlyph} label={closeLabel} edge="end" className="basalt-search-close" />} /> </form> <FilterResult className="basalt-search-count">{count}</FilterResult> {children} </DialogContent> + </DialogHoldsTop.Provider> </Dialog> ); } @@ -106,11 +109,12 @@ export interface SearchResultsProps extends React.ComponentProps<"ul"> { } /** - * The results area. Its height is that of a full result: `logoRows` logo rows, `rows` picture rows and a "See all" row. It holds that - * height with fewer results, with none, and with the app's lead links, and scrolls inside; on a short window it is the room the dialog has. + * The results area. It is as tall as its rows, up to a full result's height (`logoRows` logo rows, `rows` picture rows and a "See all" row), and + * scrolls inside past it; on a short window it is the room the dialog has. The dialog's top is held where the full box has it, so the field and + * the count never move and the box ends under what it shows (DECISIONS 336). */ export function SearchResults({ logoRows = 3, rows = 5, all = true, className, style, ...props }: SearchResultsProps) { - return <ul {...props} className={join("basalt-search-results", className)} style={{ "--_logos": logoRows, "--_packs": rows, "--_alls": all ? 1 : 0, ...style } as React.CSSProperties} />; + return <ul {...props} data-grows="" className={join("basalt-search-results", className)} style={{ "--_logos": logoRows, "--_packs": rows, "--_alls": all ? 1 : 0, ...style } as React.CSSProperties} />; } export interface SearchResultProps extends Omit<React.ComponentProps<"a">, "children" | "media"> { diff --git a/packages/react/src/site-menu.tsx b/packages/react/src/site-menu.tsx index 119f14cd..162f8892 100644 --- a/packages/react/src/site-menu.tsx +++ b/packages/react/src/site-menu.tsx @@ -19,6 +19,8 @@ import { useMediaQuery } from "./use-media"; /** The bar's buttons are a plain `button` with the ghost icon button's look, because their glyph morphs (`IconButton` takes a glyph, not a morph). */ const barButton = { "data-variant": "ghost", "data-size": "md", "data-icon-only": "" } as const; +/** Menu and Close are the bar's last displayed control and its band's, hung at the end (DECISIONS 336). */ +const hungAtEnd = { ...barButton, "data-edge": "end" } as const; export interface SiteMenuProps { /** The brand, drawn again in the sheet's first row: a `SiteBrand`. */ @@ -63,7 +65,7 @@ export function SiteMenu({ brand, links = [], tools, themeToggle, loops = false, }, [wide, open]); return ( <Sheet open={open} onOpenChange={setOpen}> - <SheetTrigger ref={trigger} aria-label={menuLabel} {...barButton} className="basalt-button basalt-site-menu-trigger"> + <SheetTrigger ref={trigger} aria-label={menuLabel} {...hungAtEnd} className="basalt-button basalt-site-menu-trigger"> <MorphIcon glyph={open ? CloseGlyph : MenuGlyph} /> </SheetTrigger> <SheetContent @@ -100,7 +102,7 @@ function MenuClose({ ref, label, open }: { ref: React.Ref<HTMLButtonElement>; la const [shown, setShown] = React.useState(false); React.useEffect(() => { setShown(open); }, [open]); return ( - <SheetClose ref={ref} aria-label={label} {...barButton} className="basalt-button basalt-site-menu-close"> + <SheetClose ref={ref} aria-label={label} {...hungAtEnd} className="basalt-button basalt-site-menu-close"> <MorphIcon glyph={shown ? CloseGlyph : MenuGlyph} /> </SheetClose> ); diff --git a/packages/react/src/social-links.tsx b/packages/react/src/social-links.tsx index cdd0e995..0b38adc3 100644 --- a/packages/react/src/social-links.tsx +++ b/packages/react/src/social-links.tsx @@ -53,6 +53,8 @@ export interface SocialLinksProps extends React.ComponentProps<"ul"> { */ export function SocialLinks({ size = 16, iconOnly = false, className, children, ...props }: SocialLinksProps) { const value = React.useMemo(() => ({ size, iconOnly }), [size, iconOnly]); + // An icon-only row's links all carry edge="start", and the stylesheet gives room to the first rendered item alone (DECISIONS 336, S9), so links in a + // fragment or a component that returns several are told apart by where they land, not by how they were written (the code review's finding 2). return ( <ul {...props} data-icon-only={iconOnly ? "" : undefined} className={join("basalt-social-links", className)}> <RowContext.Provider value={value}>{children}</RowContext.Provider> @@ -81,7 +83,7 @@ export function SocialLink({ service, children, target, rel, newTabLabel, classN if (row.iconOnly && mark) { return ( <li className="basalt-social-item"> - <IconButton variant="ghost" size="md" icon={mark} label={children} newTabLabel={newTabLabel} nativeButton={false} render={<a {...props} target={target} rel={rel} />} /> + <IconButton variant="ghost" size="md" edge="start" icon={mark} label={children} newTabLabel={newTabLabel} nativeButton={false} render={<a {...props} target={target} rel={rel} />} /> </li> ); } diff --git a/packages/react/src/status-bar.tsx b/packages/react/src/status-bar.tsx index 94843087..7736631a 100644 --- a/packages/react/src/status-bar.tsx +++ b/packages/react/src/status-bar.tsx @@ -2,6 +2,7 @@ import { XCircleIcon } from "@phosphor-icons/react/dist/csr/XCircle"; import * as React from "react"; import { STATUS_MESSAGE_MS } from "./constants"; +import type { ButtonEdge } from "./button"; import { StatusLine } from "./filter-result"; import { Icon } from "./icon"; import { usePeekPlate } from "./use-peek"; @@ -31,7 +32,10 @@ export interface StatusMessage { export interface StatusBarProps extends Omit<React.ComponentProps<"footer">, "children"> { /** The bar's name. Default "Status". */ label?: string; - /** The run: a button or a link with its mark, its id and its counts. */ + /** + * The run: a button or a link with its mark, its id and its counts. A control given `variant="ghost"` first here (or first in `sources` when there + * is no `start`) is hung at the bar's start, and one last in `end` at its end: its words on the bar's line (DECISIONS 336). + */ start?: React.ReactNode; /** * The sources and the session in one button that opens the `Drawer`: a `DrawerTrigger` (`variant="ghost" size="sm"`), which carries @@ -46,6 +50,31 @@ export interface StatusBarProps extends Omit<React.ComponentProps<"footer">, "ch end?: React.ReactNode; } +type Hangable = { variant?: string; edge?: ButtonEdge; label?: unknown; icon?: unknown; children?: React.ReactNode }; + +/** A ghost control, read from its props so the bar imports no button: `variant="ghost"`, or an `IconButton`'s defaults (a label and an icon, no variant). */ +function isGhost(props: Hangable): boolean { + return props.variant === "ghost" || (props.variant === undefined && props.label !== undefined && props.icon !== undefined); +} + +/** + * A slot's first (or last) control, when it is a ghost Basalt control with no edge of its own (a ghost `Button`, `IconButton` or `DrawerTrigger`), + * hung at the bar's edge (DECISIONS 336). A fragment is looked into, so its first or last child is the slot's (the code review's finding 4). + */ +function hang(slot: React.ReactNode, side: ButtonEdge): React.ReactNode { + const items = React.Children.toArray(slot); + const at = side === "start" ? 0 : items.length - 1; + const item = items[at]; + if (!React.isValidElement<Hangable>(item)) return slot; + if (item.type === React.Fragment) { + items[at] = React.cloneElement(item, undefined, hang(item.props.children, side)); + return items; + } + if (typeof item.type === "string" || !isGhost(item.props) || item.props.edge !== undefined) return slot; + items[at] = React.cloneElement(item, { edge: side }); + return items; +} + /** * The foot of an app. A message is spoken once through regions that are in the page before any text: a polite one, and an assertive one for * an error. The visible words are hidden from assistive technology so they are not said twice. A page has one foot: the status bar and a @@ -109,8 +138,8 @@ export function StatusBar({ label = "Status", start, sources, message, onMessage }, [key, error]); return ( <footer {...props} aria-label={label} data-pinned-edge="bottom" className={join("basalt-status-bar", className)}> - {start ? <div className="basalt-status-bar-start">{start}</div> : null} - {sources ? <div className="basalt-status-bar-sources">{sources}</div> : null} + {start ? <div className="basalt-status-bar-start">{hang(start, "start")}</div> : null} + {sources ? <div className="basalt-status-bar-sources">{start ? sources : hang(sources, "start")}</div> : null} <p ref={band} data-pinned-extent="" @@ -126,7 +155,7 @@ export function StatusBar({ label = "Status", start, sources, message, onMessage {error ? <span className="basalt-status-bar-seat" aria-hidden={cut ? "true" : undefined}><Icon icon={XCircleIcon} size={16} /></span> : null} <span className="basalt-status-bar-text" aria-hidden={cut ? "true" : undefined}>{message?.text}</span> </p> - {end ? <div className="basalt-status-bar-end">{end}</div> : null} + {end ? <div className="basalt-status-bar-end">{hang(end, "end")}</div> : null} <StatusLine sendId={message?.id}>{message && !error && !held ? message.text : ""}</StatusLine> <span role="alert" aria-live="assertive" aria-atomic="true" className="basalt-visually-hidden">{held ? "" : alert}</span> </footer> diff --git a/packages/react/src/styles/components.css b/packages/react/src/styles/components.css index 733d6165..8b6b28bb 100644 --- a/packages/react/src/styles/components.css +++ b/packages/react/src/styles/components.css @@ -244,6 +244,39 @@ .basalt-button[data-icon-only] { width: var(--_h); padding: 0; } .basalt-button[data-full-width] { display: flex; width: 100%; } + /* A ghost control at an edge (DECISIONS 336): `edge="start"` or `"end"` puts what it shows (its glyph, or its words) on the head's content + line and hangs its own box into the head's padding by its inset: its inline padding with words, half the size it is drawn at less its + glyph when icon-only. It hangs only into room the head declares (`--basalt-edge-room`, or `-start` and `-end`: the head's padding on that + side less any safe-area inset), never by more; a head that declares nothing gives no room. `--_drawn` is the size in force on the button + itself (the touch block raises it to 44) and `--_glyph` the size its glyph is drawn at. The hang is plate and hit area, never layout. */ + .basalt-button { --_drawn: var(--_h); --_glyph: var(--basalt-size-icon-sm); } + .basalt-button[data-size="xl"] { --_glyph: var(--basalt-size-icon-md); } + .basalt-button[data-variant="ghost"][data-edge] { --_inset: var(--_px); } + .basalt-button[data-variant="ghost"][data-icon-only][data-edge] { --_inset: calc((var(--_drawn) - var(--_glyph)) / 2); } + .basalt-button[data-variant="ghost"][data-edge="start"] { + --_hang: min(var(--_inset), var(--basalt-edge-room-start, var(--basalt-edge-room, var(--basalt-space-0)))); + margin-inline-start: calc(-1 * var(--_hang)); + } + .basalt-button[data-variant="ghost"][data-edge="end"] { + --_hang: min(var(--_inset), var(--basalt-edge-room-end, var(--basalt-edge-room, var(--basalt-space-0)))); + margin-inline-end: calc(-1 * var(--_hang)); + } + /* The ring, by the rule every control has: at +2 where the hung box keeps focus-offset + focus-width (4) from the edge of its room, inside at + -2 only where it does not. What is left of the room after the hang, less those 4, times 999: a whole pixel short gives -2, none short +2. + With no room declared the fallback is the hang plus a target, so the ring is the ordinary +2. */ + .basalt-button[data-variant="ghost"][data-edge="start"]:focus-visible { + outline-offset: clamp(calc(-1 * var(--basalt-size-focus-width)), + calc((var(--basalt-edge-room-start, var(--basalt-edge-room, calc(var(--_hang) + var(--basalt-size-tap-min)))) - var(--_hang) + - var(--basalt-size-focus-offset) - var(--basalt-size-focus-width)) * 999 + var(--basalt-size-focus-offset)), + var(--basalt-size-focus-offset)); + } + .basalt-button[data-variant="ghost"][data-edge="end"]:focus-visible { + outline-offset: clamp(calc(-1 * var(--basalt-size-focus-width)), + calc((var(--basalt-edge-room-end, var(--basalt-edge-room, calc(var(--_hang) + var(--basalt-size-tap-min)))) - var(--_hang) + - var(--basalt-size-focus-offset) - var(--basalt-size-focus-width)) * 999 + var(--basalt-size-focus-offset)), + var(--basalt-size-focus-offset)); + } + .basalt-button[data-variant="primary"] { background: var(--basalt-action-primary); color: var(--basalt-action-primary-text); @@ -329,26 +362,31 @@ .basalt-button-amount { justify-items: end; font-variant-numeric: tabular-nums; } .basalt-button:is([data-variant="primary"], [data-variant="secondary"], [data-variant="outline"]):not([data-disabled], [data-loading]) > .basalt-button-amount { opacity: var(--basalt-opacity-amount); } - /* The count (DECISIONS 154, D11d): an outlined pill, 24 tall, in neutral ink, the number secondary at zero and primary above. It holds two tabular - digits (a hidden "00" shares its cell), so 0 to 99 never moves the button; a third digit widens it. It is aria-hidden: the name carries the count. - Never a fill and never a colour: the edge is the input boundary and the number is the cue. */ + /* The count (DECISIONS 154, D11d; 336, M-1): an outlined pill, 24 tall, in neutral ink, the number secondary at zero and primary above. The pill hugs its + figures, 24 at least. The button holds a seat for two tabular digits round it (an unseen "00" and the pill's padding share its cell) and the pill ends + that seat, so 0 to 99 never moves the button; a third digit widens it. It is aria-hidden: the name carries the count. Never a fill and never a + colour: the edge is the input boundary and the number is the cue. */ .basalt-button-count { + display: inline-grid; + flex: none; + font: var(--basalt-font-weight-semibold) var(--basalt-text-sm-size) / 1 var(--basalt-font-family-sans); + font-variant-numeric: tabular-nums; + } + .basalt-button-count::before { content: "00"; grid-area: 1 / 1; height: 0; padding-inline: var(--basalt-space-1-5); overflow: hidden; visibility: hidden; user-select: none; pointer-events: none; } + .basalt-button-count > span { + grid-area: 1 / 1; + justify-self: end; box-sizing: border-box; display: inline-grid; place-items: center; - flex: none; height: var(--basalt-size-control-xs); min-width: var(--basalt-size-control-xs); padding: 0 var(--basalt-space-1-5); border-radius: var(--basalt-radius-full); box-shadow: inset 0 0 0 var(--basalt-size-hairline) var(--basalt-border-input); color: var(--basalt-text-primary); - font: var(--basalt-font-weight-semibold) var(--basalt-text-sm-size) / 1 var(--basalt-font-family-sans); - font-variant-numeric: tabular-nums; } - .basalt-button-count[data-zero] { color: var(--basalt-text-secondary); } - .basalt-button-count::before { content: "00"; grid-area: 1 / 1; height: 0; overflow: hidden; visibility: hidden; user-select: none; pointer-events: none; } - .basalt-button-count > span { grid-area: 1 / 1; } + .basalt-button-count[data-zero] > span { color: var(--basalt-text-secondary); } /* Two lines (DECISIONS 154, D11b): the label over a note, start-aligned, at least 64 tall; in a container 340 to 480 wide the two share one line, the label first and the note at the end, baseline-aligned and 12px apart, at 48. The label's own line is 14/20 (a <code> in it is mono). */ @@ -696,6 +734,9 @@ } .basalt-menu-check { display: inline-flex; align-items: center; justify-content: center; width: var(--basalt-size-icon-sm); flex: none; color: var(--basalt-text-primary); } + /* The menu's column (DECISIONS 336, M-2): when any row has a check or a glyph, every row keeps their 16px column, a plain row too, so labels align. + A popup with no such row has no column. */ + .basalt-menu:has(.basalt-menu-item > :is(.basalt-menu-check, .basalt-icon:not(.basalt-menu-item-chevron)):first-child) .basalt-menu-item:not(:has(> :is(.basalt-menu-check, .basalt-icon:not(.basalt-menu-item-chevron)):first-child)) { padding-inline-start: calc(var(--basalt-space-3) + var(--basalt-size-icon-sm) + var(--_gap)); } .basalt-menu-radio-dot { display: block; width: var(--basalt-space-1-5); height: var(--basalt-space-1-5); border-radius: var(--basalt-radius-full); background: currentColor; } .basalt-menu-submenu-trigger:dir(rtl) > .basalt-icon { transform: rotate(180deg); } .basalt-menu-item-label { flex: 1; min-width: 0; } @@ -870,9 +911,9 @@ downward; the height is at most the window less space-4 above and below (the dialog's own max-height), and less its top once the top is held. */ .basalt-dialog[data-form] { display: flex; flex-direction: column; padding: 0; overflow: hidden; } /* stylelint-disable-next-line unit-disallowed-list -- a height that follows the window (a viewport unit); a fixed-length token cannot say it */ - .basalt-dialog[data-form][data-held] { top: var(--_dialog-top); max-height: calc(100dvh - var(--_dialog-top) - var(--basalt-space-4)); transform: translateX(-50%); } - .basalt-dialog[data-form][data-held][data-starting-style], - .basalt-dialog[data-form][data-held][data-ending-style] { transform: translateX(-50%) scale(0.98); } + .basalt-dialog:is([data-form], .basalt-search)[data-held] { top: var(--_dialog-top); max-height: calc(100dvh - var(--_dialog-top) - var(--basalt-space-4)); transform: translateX(-50%); } + .basalt-dialog:is([data-form], .basalt-search)[data-held][data-starting-style], + .basalt-dialog:is([data-form], .basalt-search)[data-held][data-ending-style] { transform: translateX(-50%) scale(0.98); } .basalt-dialog[data-form] .basalt-sheet-body { padding-block: var(--basalt-space-5); } /* The description opens the body, so the held head stays one line. */ .basalt-dialog[data-form] .basalt-sheet-body > .basalt-dialog-description:first-child { margin: 0 0 var(--basalt-space-5); font-size: var(--basalt-text-sm-size); line-height: var(--basalt-text-sm-line-height); } @@ -1378,9 +1419,13 @@ --basalt-sticky-offset: calc(var(--basalt-size-header) + var(--_inset-top)); /* what a sticky thing under a bar adds */ --basalt-site-row: var(--basalt-sticky-offset); /* the resting row's height: a bar that arrives keeps it in a slot, and a stage is pulled up by it */ --basalt-bottom-offset: var(--basalt-space-0); - --_pad-left: max(var(--basalt-gutter), var(--_inset-left)); /* a bar's inline padding: the gutter or the side inset */ - --_pad-right: max(var(--basalt-gutter), var(--_inset-right)); + /* The side insets by direction (DECISIONS 336): start and end are left and right, swapped right to left, so a bar pads the side its inset is on. */ + --_inset-start: var(--_inset-left); + --_inset-end: var(--_inset-right); + --_pad-start: max(var(--basalt-gutter), var(--_inset-start)); /* a bar's inline padding: the gutter or the side inset */ + --_pad-end: max(var(--basalt-gutter), var(--_inset-end)); } + :root:dir(rtl) { --_inset-start: var(--_inset-right); --_inset-end: var(--_inset-left); } /* stylelint-disable-next-line unit-disallowed-list -- size-breakpoint-md (720px): a media query cannot read a token; below it the links go into the menu and the gutter narrows */ @media (width < 720px) { :root { --basalt-gutter: var(--basalt-size-gutter-narrow); } @@ -1433,11 +1478,11 @@ :root:has(.basalt-site-header, .basalt-app-header, .basalt-sticky-bar) .basalt-skip-link { position: fixed; top: calc(var(--basalt-sticky-offset) + var(--basalt-space-2)); - inset-inline-start: var(--_pad-left); + inset-inline-start: var(--_pad-start); transform: none; } :root:has(.basalt-site-header) .basalt-skip-link { - inset-inline-start: max(var(--_pad-left), calc((100% - var(--basalt-size-page-width)) / 2 + var(--_pad-left))); + inset-inline-start: max(var(--_pad-start), calc((100% - var(--basalt-size-page-width)) / 2 + var(--_pad-start))); } /* In an app shell the skip link starts on the brand link's start edge, as it does under a site header: from 1024 that is the sidebar's space-3 and the brand band's space-1-5 + space-3 in from the shell's start (and a capped shell starts half the window's spare width @@ -1490,9 +1535,13 @@ align-items: center; height: calc(var(--basalt-size-header) - var(--basalt-size-hairline)); padding-top: var(--basalt-size-hairline); - padding-inline: var(--_pad-left) var(--_pad-right); + padding-inline: var(--_pad-start) var(--_pad-end); } .basalt-site-bar { max-width: var(--basalt-size-page-width); margin-inline: auto; } + /* The bars' room for a control hung at their end (DECISIONS 336): the end padding less the end inset, so a hung Menu, Close or last ghost + action never reaches under a notch. The menu's trigger and Close carry data-edge; an app hangs its own last ghost action with `edge="end"`. */ + :is(.basalt-site-header, .basalt-app-header, .basalt-site-menu-band) { --basalt-edge-room-end: calc(var(--_pad-end) - var(--_inset-end)); --basalt-edge-room: initial; --basalt-edge-room-start: initial; } + .basalt-site-menu-band .basalt-bar-actions > :not(:last-child) { --basalt-edge-room-end: initial; } .basalt-app-bar { gap: var(--basalt-space-2); } .basalt-bar-spacer { flex: 1 1 auto; } .basalt-bar-actions { display: flex; align-items: center; flex: none; gap: var(--basalt-space-2); } @@ -1671,6 +1720,8 @@ .basalt-site-action { display: none; } .basalt-site-menu-trigger { display: inline-flex; } .basalt-bar-actions { gap: var(--basalt-space-1); } + /* Menu is the last control shown here, so an app's tool hung at the end on a wide bar gives no room before it (DECISIONS 336). */ + .basalt-site-bar .basalt-bar-actions:has(> .basalt-site-menu-trigger) > :not(.basalt-site-menu-trigger) { --basalt-edge-room-end: initial; } :is(.basalt-site-header, .basalt-app-header, .basalt-site-menu-band) .basalt-button { --_h: var(--basalt-size-tap-min); --_radius: var(--basalt-radius-md); @@ -1707,12 +1758,13 @@ flex: none; height: var(--basalt-size-header); padding-top: var(--basalt-size-hairline); - padding-inline: var(--_pad-left) var(--_pad-right); + padding-inline: var(--_pad-start) var(--_pad-end); border-bottom: var(--basalt-size-hairline) solid var(--basalt-border-divider); } /* The menu's first row when the page has a loops toggle: the same control in its Button form, at the band's own gutter, 44 on touch like the foot's button. */ .basalt-site-menu-loops { - padding: var(--basalt-space-2) var(--_pad-right) 0 var(--_pad-left); + padding-block: var(--basalt-space-2) 0; + padding-inline: var(--_pad-start) var(--_pad-end); } .basalt-site-menu-loops .basalt-button { --_h: var(--basalt-size-tap-min); @@ -1720,10 +1772,11 @@ } .basalt-site-menu-nav { padding-block: var(--basalt-space-2); - padding-inline: max(var(--basalt-space-1-5), var(--_inset-left)) max(var(--basalt-space-1-5), var(--_inset-right)); + padding-inline: max(var(--basalt-space-1-5), var(--_inset-start)) max(var(--basalt-space-1-5), var(--_inset-end)); } .basalt-site-menu-foot { - padding: var(--basalt-space-2) var(--_pad-right) max(var(--basalt-space-4), var(--_inset-bottom)) var(--_pad-left); + padding-block: var(--basalt-space-2) max(var(--basalt-space-4), var(--_inset-bottom)); + padding-inline: var(--_pad-start) var(--_pad-end); } .basalt-site-menu-foot .basalt-button { --_h: var(--basalt-size-tap-min); @@ -1894,9 +1947,15 @@ box-sizing: border-box; min-width: 0; max-width: var(--basalt-size-page-width); - padding: var(--basalt-space-6) var(--_pad-right) var(--basalt-space-16) var(--_pad-left); + padding-block: var(--basalt-space-6) var(--basalt-space-16); + padding-inline: var(--_pad-start) var(--_pad-end); } .basalt-app-shell[data-capped] .basalt-app-main { max-width: none; } + /* A part with no padding of its own (a drawer, release notes, a composer) is not a head: its edge control hangs into the room of the box it sits in + (DECISIONS 336, the open items' ruling). The main and the foot say theirs, their padding less the side insets, to their direct children only, so a + control deeper in never hangs into room that is not its own. */ + .basalt-app-main > :is(.basalt-drawer, .basalt-release-notes, .basalt-pane-layout), .basalt-app-foot > .basalt-composer { --basalt-edge-room-start: calc(var(--_pad-start) - var(--_inset-start)); --basalt-edge-room-end: calc(var(--_pad-end) - var(--_inset-end)); --basalt-edge-room: initial; } + .basalt-card-content > .basalt-composer { --basalt-edge-room: var(--basalt-space-4); --basalt-edge-room-start: initial; --basalt-edge-room-end: initial; } /* The rail, 72: Nav's collapsed form, the brand's mark alone. */ /* stylelint-disable-next-line unit-disallowed-list -- size-breakpoint-md (720px) and size-breakpoint-lg (1024px): a media query cannot read a token; from 720 the rail, from 1024 the sidebar */ @media (width >= 720px) and (width < 1024px) { @@ -1933,11 +1992,15 @@ .basalt-nav + .basalt-nav[data-size="sm"] { margin-top: var(--basalt-space-4); } .basalt-pane-grid { display: grid; grid-template-columns: minmax(0, 1fr); row-gap: var(--basalt-space-8); } .basalt-pane-page { min-width: 0; } + /* The page column says its room to release notes and a drawer directly inside it (the open items' ruling, the pixel review's finding 2): stacked, the + page's own, said by the page and passed on; beside the pane, the gap to it at the end. */ + .basalt-pane-page > :is(.basalt-release-notes, .basalt-drawer) { --basalt-edge-room: inherit; --basalt-edge-room-start: inherit; --basalt-edge-room-end: inherit; } .basalt-pane { min-width: 0; } .basalt-pane:focus-visible { outline: var(--basalt-size-focus-width) solid var(--basalt-border-focus); outline-offset: var(--basalt-size-focus-offset); } /* stylelint-disable-next-line basalt/container-length -- size-sidebar-width (256px) + size-gutter (24px) + size-breakpoint-container-lg (640px), where the pane sits beside the page; a container query cannot read a custom property */ @container (width >= 920px) { .basalt-pane-grid { grid-template-columns: minmax(0, 1fr) var(--basalt-size-sidebar-width); column-gap: var(--basalt-size-gutter); align-items: start; } + .basalt-pane-page > :is(.basalt-release-notes, .basalt-drawer) { --basalt-edge-room: inherit; --basalt-edge-room-start: inherit; --basalt-edge-room-end: var(--basalt-size-gutter); } .basalt-pane { position: sticky; /* The content's edge, not the box's, is space-6 under the bar and above the window's foot: the box reaches space-1-5 past it. */ @@ -1968,7 +2031,7 @@ box-sizing: border-box; display: block; padding-bottom: var(--_inset-bottom); - padding-inline: var(--_inset-left) var(--_inset-right); + padding-inline: var(--_inset-start) var(--_inset-end); border-top: var(--basalt-size-hairline) solid var(--basalt-border-hairline); background: var(--basalt-surface-page); color: var(--basalt-text-primary); @@ -2059,7 +2122,8 @@ .basalt-tabbar[data-keys] .basalt-tabbar-item:is(:hover, :active) .basalt-tabbar-glyph { background-color: transparent; } .basalt-tabbar-item:focus-visible { outline: var(--basalt-size-focus-width) solid var(--basalt-border-focus); outline-offset: calc(-1 * var(--basalt-size-focus-width)); } /* More's bottom sheet: a title and Close, then Nav rows. */ - .basalt-tabbar-sheet-head { display: flex; align-items: center; justify-content: space-between; gap: var(--basalt-space-2); margin-bottom: var(--basalt-space-2); } + /* Close is hung at the head's end, its glyph on the sheet's line; the room is the sheet's own end padding less the end inset (DECISIONS 336). */ + .basalt-tabbar-sheet-head { display: flex; align-items: center; justify-content: space-between; gap: var(--basalt-space-2); margin-bottom: var(--basalt-space-2); --basalt-edge-room-end: calc(max(var(--basalt-space-6), var(--_inset-end)) - var(--_inset-end)); --basalt-edge-room: initial; --basalt-edge-room-start: initial; } @media (forced-colors: active) { .basalt-site-link:hover .basalt-site-pill, @@ -2334,6 +2398,12 @@ /* A checkbox in a cell is centred in its row (DECISIONS 167, Q9e). It is a block of its own (16px wide, the cell's middle alignment centres it exactly) and not a box on a text baseline, which left it 1 to 2.5px off the centre by the font's metrics. It still does not move when ticked: a block has no baseline to move. */ .basalt-table :is(td, th) .basalt-checkbox { display: flex; } + /* The selection column (DECISIONS 336, S10): give its <col> `var(--basalt-select-column)`, 32 on a pointer and 44 on touch and under 720, where the + column holds the checkbox's whole hit area and nothing reaches the next column. Its cell has no inline padding and the box is centred in it, never more + than space-4 from the column's start (the polish ruling): 8 / 8 in 32, 12 / 12 in 40, 14 / 14 in 44, 16 / 16 in 48; in a wider column a word heads, the box starts on the cell's line, under the word. */ + :root { --basalt-select-column: var(--basalt-size-control-md); } + .basalt-table :is(td, th):first-child:has(> .basalt-checkbox) { padding-inline: 0; } + .basalt-table :is(td, th):first-child > .basalt-checkbox { margin-inline: min(var(--basalt-space-4), calc((100% - var(--basalt-size-choice)) / 2)) auto; } /* The flat form (DECISIONS 162, D18b): a table in a Card has the card's one box, so its own frame draws nothing (no border, radius, fill or shadow) and sets no level. The header band keeps its fill. Its cells are padded space-2 above and below, so a two-line cell (TableCall) has air. */ @@ -2357,6 +2427,7 @@ cut at its own edge in a fixed table, so it takes the box from padding that an equal negative margin gives back: the text sits where it did, the row does not grow, and the focus ring's offset is pulled in by the same amount, so it hugs the text as before. */ + :root { --basalt-select-column: var(--basalt-size-tap-min); } .basalt-table :is(td, th) .basalt-checkbox { position: relative; } .basalt-table :is(td, th) .basalt-checkbox::before { content: ""; position: absolute; inset: min(var(--basalt-space-0), calc((100% - var(--basalt-size-tap-min)) / 2)); } .basalt-table :is(td, th) a:not(.basalt-button) { @@ -2689,7 +2760,9 @@ gap: var(--basalt-space-1-5); height: var(--basalt-size-control-md); margin: 0; - padding: 0 calc(var(--basalt-space-3) - var(--basalt-size-hairline)) 0 calc(var(--basalt-space-2) - var(--basalt-size-hairline)); + /* 8 before the mark's seat and 12 after the words: the mark is drawn 2.6 inside its seat, so what is drawn is 10.6 and 12 from the edges (DECISIONS 336, S11). */ + padding-block: 0; + padding-inline: calc(var(--basalt-space-2) - var(--basalt-size-hairline)) calc(var(--basalt-space-3) - var(--basalt-size-hairline)); border: var(--basalt-size-hairline) solid var(--basalt-border-hairline); border-radius: var(--basalt-radius-sm); background: transparent; @@ -2757,7 +2830,8 @@ min-width: 0; min-height: var(--_basalt-control-4xl, var(--basalt-size-control-4xl)); margin: 0; - padding: var(--basalt-space-1-5) var(--basalt-space-3) var(--basalt-space-1-5) var(--basalt-space-2); + padding-block: var(--basalt-space-1-5); + padding-inline: var(--basalt-space-2) var(--basalt-space-3); border: var(--basalt-size-hairline) solid var(--basalt-border-field); border-radius: var(--basalt-radius-md); background: transparent; @@ -2769,7 +2843,9 @@ transition-property: background-color, border-color, color; transition-duration: var(--basalt-duration-fast); transition-timing-function: var(--basalt-ease-out); - } + } /* With no tile the words start where the seat ends: space-3 on both sides (space-2 under 720). A tile is nested 8 from the row's start, top and bottom (DECISIONS 336, S11). */ + .basalt-switch-row:not(:has(> .basalt-switch-row-tile)) { padding-inline: var(--basalt-space-3); } + .basalt-switch-row[data-tile] { grid-template-columns: auto minmax(0, 1fr) auto; } .basalt-switch-row-tile { display: block; flex: none; width: var(--basalt-size-control-lg); height: var(--basalt-size-control-lg); } .basalt-switch-row-tile > * { display: block; width: 100%; height: 100%; } @@ -2797,6 +2873,7 @@ /* stylelint-disable-next-line unit-disallowed-list -- size-breakpoint-md (720px): a media query cannot read a token; below it the row is 48 */ @media (width < 720px) { .basalt-switch-row { min-height: var(--_basalt-control-3xl, var(--basalt-size-control-3xl)); column-gap: var(--basalt-space-2); padding-inline: var(--basalt-space-1-5) var(--basalt-space-2); } + .basalt-switch-row:not(:has(> .basalt-switch-row-tile)) { padding-inline: var(--basalt-space-2); } .basalt-switch-row-tile { width: var(--basalt-size-control-md); height: var(--basalt-size-control-md); } .basalt-switch-row-name { font-size: var(--basalt-text-sm-size); line-height: var(--basalt-text-sm-line-height); } } @@ -2819,7 +2896,9 @@ gap: var(--basalt-space-2); min-height: var(--_basalt-control-2xl, var(--basalt-size-control-2xl)); margin: 0; - padding: 0 calc(var(--basalt-space-3-5) - var(--basalt-size-hairline)) 0 calc(var(--basalt-space-2-5) - var(--basalt-size-hairline)); + /* 12 on both sides with the rim (DECISIONS 336, S11): the chosen ring fills its seat, so it takes the words' padding. */ + padding-block: 0; + padding-inline: calc(var(--basalt-space-3) - var(--basalt-size-hairline)); border: var(--basalt-size-hairline) solid var(--basalt-border-field); border-radius: var(--basalt-radius-md); background: transparent; @@ -2881,7 +2960,8 @@ .basalt-filter-row[data-highlighted] { color: var(--basalt-text-primary); } .basalt-filter-row[data-highlighted]::before { background-color: var(--_plate); } .basalt-filter-row[data-disabled] { color: var(--basalt-text-disabled); } - .basalt-filter-foot { display: flex; align-items: center; justify-content: space-between; gap: var(--basalt-space-3); padding: var(--basalt-space-1-5) var(--basalt-space-3); border-top: var(--basalt-size-hairline) solid var(--basalt-border-divider); margin: var(--basalt-space-0-5) calc(-1 * var(--basalt-space-1)) 0; } + /* The count at the foot's start and Clear at its end, on the popup's line: space-4 in, Clear hung by its padding (DECISIONS 336, S12). */ + .basalt-filter-foot { display: flex; align-items: center; justify-content: space-between; gap: var(--basalt-space-3); padding-block: var(--basalt-space-1-5); padding-inline: var(--basalt-space-4); --basalt-edge-room: var(--basalt-space-4); --basalt-edge-room-start: initial; --basalt-edge-room-end: initial; border-top: var(--basalt-size-hairline) solid var(--basalt-border-divider); margin: var(--basalt-space-0-5) calc(-1 * var(--basalt-space-1)) 0; } .basalt-filter-foot .basalt-filter-clear { margin-inline-start: 0; } /* The rows scroll inside the popup cap (nine 40px rows show whole), with the search band and the foot outside them. */ /* position: relative, so each row's hidden input (marked, so absolute at its place in the flow; DECISIONS 167, Q9j) is contained by the rows and scrolls with them: with the popup as its containing block the inputs made the popup itself scroll. */ @@ -3039,7 +3119,8 @@ width: 100%; min-width: var(--basalt-size-select-min); height: var(--_h); - padding: 0 var(--basalt-space-2) 0 var(--basalt-space-2-5); + padding-block: 0; + padding-inline: var(--basalt-space-2-5) var(--basalt-space-2); margin: 0; border: 0; border-radius: var(--basalt-radius-sm); @@ -3150,7 +3231,8 @@ display: flex; align-items: flex-start; gap: var(--basalt-space-3); - padding: var(--basalt-space-3) var(--basalt-space-3) var(--basalt-space-3) var(--basalt-space-4); + padding-block: var(--basalt-space-3); + padding-inline: var(--basalt-space-4) var(--basalt-space-3); overflow: hidden; transition: opacity var(--basalt-duration-base) var(--basalt-ease-out); } @@ -3183,6 +3265,15 @@ /* A group's count: "×3", beside the title, quieter than it. */ .basalt-toast-count { margin-inline-start: var(--basalt-space-1-5); font-weight: var(--basalt-font-weight-regular); font-variant-numeric: tabular-nums; color: var(--basalt-text-secondary); } .basalt-toast-close { color: var(--basalt-text-secondary); } + /* On touch Dismiss and the action keep their pointer size (24 and the action's own height, radius 6) and take their 44 as hit area inside the + toast's padding, so a toast is one height on every pointer (DECISIONS 336, R-5). The hit area is 46 (a hairline more on each side), so the + press's .98 never takes it under 44; a short action's missing width is on its start side, over the words and away from Dismiss. */ + /* stylelint-disable-next-line unit-disallowed-list -- size-breakpoint-md (720px): a media query cannot read a token; under it the touch sizes apply whatever the pointer */ + @media (pointer: coarse), (width < 720px) { + .basalt-toast .basalt-button:is(.basalt-toast-close, .basalt-toast-action) { min-width: 0; min-height: 0; --_radius: var(--basalt-radius-sm); } + .basalt-toast .basalt-toast-close::before { content: ""; position: absolute; inset: calc((var(--basalt-size-control-xs) - var(--basalt-size-tap-min)) / 2 - var(--basalt-size-hairline)); } + .basalt-toast .basalt-toast-action::before { content: ""; position: absolute; inset-block: calc((100% - var(--basalt-size-tap-min)) / 2 - var(--basalt-size-hairline)); inset-inline: min(var(--basalt-space-0), calc(100% - var(--basalt-size-tap-min) - 2 * var(--basalt-size-hairline))) 0; } + } /* ---- Notification centre ---- */ @@ -3219,16 +3310,21 @@ display: flex; align-items: center; gap: var(--basalt-space-2); - padding: var(--basalt-space-2-5) var(--basalt-space-2-5) var(--basalt-space-2-5) var(--basalt-space-4); + padding-block: var(--basalt-space-2-5); + padding-inline: var(--basalt-space-4); border-bottom: var(--basalt-size-hairline) solid var(--basalt-border-divider); } + /* The popup's head and foot: space-4 on both sides, Mark all as read and View all hung at the end and Clear all at the start, their words on the + line the title and the entries are on (DECISIONS 336). The in-page list keeps its own padding, below, and declares no room. */ + .basalt-notifications > :is(.basalt-notifications-head, .basalt-notifications-foot) { --basalt-edge-room: var(--basalt-space-4); --basalt-edge-room-start: initial; --basalt-edge-room-end: initial; } .basalt-notifications-title { margin: 0; font-size: var(--basalt-text-base-size); line-height: var(--basalt-text-base-line-height); font-weight: var(--basalt-font-weight-semibold); } .basalt-notifications-count { flex: 1; min-width: 0; font-size: var(--basalt-text-sm-size); line-height: var(--basalt-text-sm-line-height); color: var(--basalt-text-secondary); font-variant-numeric: tabular-nums; } .basalt-notifications-mark { flex: none; } .basalt-notifications-foot { display: flex; justify-content: flex-end; - padding: var(--basalt-space-2-5); + padding-block: var(--basalt-space-2-5); + padding-inline: var(--basalt-space-4); border-top: var(--basalt-size-hairline) solid var(--basalt-border-divider); } /* Clear all at the start, View all at the end (the owner, DECISIONS 269). */ @@ -3452,13 +3548,18 @@ outline: var(--basalt-size-focus-width) solid var(--basalt-border-focus); outline-offset: calc(-1 * var(--basalt-size-focus-width)); } - /* The list holds its unfiltered height (written by script as --_held), up to the popup cap, and scrolls inside. */ - .basalt-command-page .basalt-command-body { position: relative; flex: none; height: var(--_held, auto); max-height: var(--basalt-size-popup-max-height); } - .basalt-command-page .basalt-command-list { box-sizing: border-box; height: 100%; max-height: var(--basalt-size-popup-max-height); overscroll-behavior: contain; } - /* No match: one centred sentence and a ghost button, in the held area and outside the listbox. */ + /* The panel is as tall as its rows, up to the popup cap, and scrolls inside past it (DECISIONS 336, Q6). On the open page the list's unfiltered + height (written by script as --_held-page) is kept as page under the panel, never paint, so what follows never moves; inside a card or any other + surface, or with reserve={false}, it holds no room. Beside a preview the list holds its unfiltered height (--_held), which it and the pane share. */ + .basalt-command-page .basalt-command-body { position: relative; flex: none; max-height: var(--basalt-size-popup-max-height); } + .basalt-command-split[data-mode] .basalt-command-page .basalt-command-body { height: var(--_held, auto); } + .basalt-command-page .basalt-command-list { box-sizing: border-box; max-height: var(--basalt-size-popup-max-height); overscroll-behavior: contain; } + .basalt-command-split[data-mode] .basalt-command-page .basalt-command-list { height: 100%; } + .basalt-command-host[data-reserve] > .basalt-command-split:not([data-mode]) { min-block-size: var(--_held-page, auto); align-content: start; } + /* No match: one centred sentence and a ghost button, in the panel's flow with its own padding, outside the listbox. */ + .basalt-command-split[data-mode] .basalt-command-none { position: absolute; inset: 0; } + .basalt-command-none.basalt-command-none-sizer { position: absolute; inset-inline: 0; top: 0; visibility: hidden; pointer-events: none; } .basalt-command-none { - position: absolute; - inset: 0; display: flex; flex-direction: column; align-items: center; @@ -3567,8 +3668,7 @@ /* ---- Composer, Mention and MentionPicker (cimip-gaps-2, B3) ---- A composer is the textarea, a row of actions under it with Send last, and a status line under that. The field has no visible label (its name is the aria-label) and grows with its text, a line at a time, from --_rows to --_max-rows (set by the component), then - scrolls; it never takes a resize handle, since its height is the text's. The status line is text-xs in tertiary ink, one line tall - even when empty, so nothing above or below moves when someone starts typing. */ + scrolls; it never takes a resize handle, since its height is the text's. The status is text-xs in tertiary ink, in the actions row. */ .basalt-composer { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--basalt-space-2); min-width: 0; } .basalt-input.basalt-textarea.basalt-composer-field { --_line: var(--basalt-text-base-line-height); @@ -3578,15 +3678,20 @@ max-height: calc(var(--_line) * var(--_max-rows, 8) + var(--basalt-space-4)); overflow-y: auto; } - .basalt-composer-actions { display: flex; align-items: center; justify-content: space-between; gap: var(--basalt-space-2); flex-wrap: wrap; } + /* The row: a start group (the app's actions, then the status) and Send, which stays on the first row at the row's end (DECISIONS 336, Q4). The start + group is at least Send's height and wraps: the status sits beside the actions while its words fit and takes a row of its own under them when they + do not. No line is held when there is no status. */ + .basalt-composer-actions { display: flex; align-items: flex-start; gap: var(--basalt-space-2); } + .basalt-composer-start { flex: 1 1 0; align-self: stretch; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: var(--basalt-space-1) var(--basalt-space-3); } .basalt-composer-extra { display: flex; align-items: center; gap: var(--basalt-space-1); flex-wrap: wrap; min-width: 0; } /* Send is the row's last, at its end, whether or not the app gave other actions. */ - .basalt-composer-actions > :is(.basalt-composer-send, .basalt-composer-send-group) { margin-inline-start: auto; } - /* One line, always: a long list of names is cut with an ellipsis rather than wrapped, so nothing under it moves. The cut is a look only: - the live region holds the whole text, and that is what is read. */ + .basalt-composer-actions > :is(.basalt-composer-send, .basalt-composer-send-group) { flex: none; margin-inline-start: auto; } + /* One line: a long list of names is cut with an ellipsis rather than wrapped. The cut is a look only: the live region holds the whole text, and that + is what is read. */ .basalt-composer-status { + flex: 0 1 auto; + min-width: 0; margin: 0; - min-height: var(--basalt-text-xs-line-height); font-size: var(--basalt-text-xs-size); line-height: var(--basalt-text-xs-line-height); color: var(--basalt-text-tertiary); @@ -4067,6 +4172,8 @@ .basalt-code-title { padding: var(--basalt-space-1) var(--basalt-space-4); + /* Its copy control hangs into the end padding, its glyph on the line the title starts on (DECISIONS 336). */ + --basalt-edge-room: var(--basalt-space-4); --basalt-edge-room-start: initial; --basalt-edge-room-end: initial; box-shadow: inset 0 calc(-1 * var(--basalt-size-hairline)) 0 var(--basalt-border-divider); font: var(--basalt-font-weight-medium) var(--basalt-text-xs-size) / var(--basalt-text-xs-line-height) var(--basalt-font-family-sans); color: var(--basalt-text-secondary); @@ -4074,7 +4181,8 @@ .basalt-code-pre { margin: 0; - padding: var(--basalt-space-3) var(--basalt-space-12) var(--basalt-space-3) var(--basalt-space-4); + padding-block: var(--basalt-space-3); + padding-inline: var(--basalt-space-4) var(--basalt-space-12); overflow-x: auto; font: var(--basalt-font-weight-regular) var(--basalt-text-sm-size) / var(--basalt-size-code-line-height) var(--basalt-font-family-mono); white-space: pre; @@ -4082,7 +4190,7 @@ outline: none; } - .basalt-code[data-titled] .basalt-code-pre { padding-right: var(--basalt-space-4); } + .basalt-code[data-titled] .basalt-code-pre { padding-inline-end: var(--basalt-space-4); } /* wrap: a long line breaks at a space and nowhere else. Each run between spaces is a word that never breaks inside (white-space: nowrap on the word; the break between a space and the next word belongs to the line, which wraps), so a flag, a path or a hyphenated name stays whole; a word longer than the line still scrolls the block sideways. With no prompt each line is a row whose continuation is indented 2ch; beside a prompt the gutter marks a line. */ @@ -4094,9 +4202,9 @@ .basalt-code-pre code { font: inherit; } .basalt-code-pre:focus-visible { outline: var(--basalt-size-focus-width) solid var(--basalt-border-focus); outline-offset: var(--basalt-size-focus-offset); } /* Copy sits top right: in the title row when there is one, else over the code's corner. */ - .basalt-code-copy { position: absolute; top: var(--basalt-space-1-5); right: var(--basalt-space-1-5); } + .basalt-code-copy { position: absolute; top: var(--basalt-space-1-5); inset-inline-end: var(--basalt-space-1-5); } .basalt-code-title { display: flex; align-items: center; justify-content: space-between; min-height: var(--basalt-size-control-sm); } - .basalt-code-title .basalt-code-copy { position: static; margin: calc(-1 * var(--basalt-space-1)) calc(-1 * var(--basalt-space-2-5)) calc(-1 * var(--basalt-space-1)) 0; } + .basalt-code-title .basalt-code-copy { position: static; margin-block: calc(-1 * var(--basalt-space-1)); margin-inline: 0; } /* Base UI's one inline style, drawn here so a page under `style-src 'self'` can turn Base UI's style elements off (`CSPProvider disableStyleElements`) and see the same thing: the element Base UI marks scrolls with no scrollbar. Base UI's own rule is these two declarations; with its style element on, both agree. */ @@ -4278,11 +4386,12 @@ /* Before the first line of a replay: one sentence in the log's box, in the text column. */ .basalt-terminal-hint { grid-column: 1 / -1; margin-inline-start: calc(var(--basalt-size-icon-sm) + var(--basalt-space-2)); color: var(--basalt-text-tertiary); } .basalt-terminal-actions { display: inline-flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 0 var(--basalt-space-2); max-width: 100%; margin-inline-start: auto; } - .basalt-terminal-actions:has(.basalt-button) { margin-inline-end: calc(-1 * var(--basalt-space-2-5)); } .basalt-terminal-state { display: inline-flex; font-weight: var(--basalt-font-weight-regular); } .basalt-terminal-state [data-error] { color: var(--basalt-status-danger); } - /* A word that changes in place is a Reserve (every form in one grid cell, the others unseen), so the cell is as wide as the widest. */ + /* A word that changes in place is a Reserve (every form in one grid cell, the others unseen), so the cell is as wide as the widest. The state's + words face the buttons, so their spare room is the head's open middle; a button's words are centred in it (DECISIONS 336, R-1). */ .basalt-terminal-swap { justify-items: end; } + .basalt-terminal-actions .basalt-button .basalt-terminal-swap { justify-items: center; } .basalt-terminal-swap > * { display: inline-flex; align-items: center; gap: var(--basalt-space-1-5); white-space: nowrap; } /* A transcript whose lines arrive has a fixed height that scrolls inside, so arriving lines never move the page. */ .basalt-terminal[data-live] .basalt-code-pre { box-sizing: border-box; block-size: calc(var(--basalt-size-code-line-height) * 9 + var(--basalt-space-3) * 2); overflow-y: auto; scrollbar-gutter: stable; } @@ -4496,8 +4605,6 @@ /* Under 480px of the Terminal's own width the figure is start-aligned, right after the state word, so the two read as one status and the seat's spare room falls at the line's open end (ruling 12). */ .basalt-terminal-time .basalt-run-timer > .basalt-reserve { justify-items: start; } - /* Under 480px a head with a run's time keeps its actions inside its padding (the compact copy button hangs by its own margin, below). */ - .basalt-terminal-actions:has(> .basalt-terminal-time) { margin-inline-end: 0; } /* From 480px of its own width a head with a run's time reads title, state … time, Copy, as a card's head reads name, badge … time, controls (DECISIONS 326, 67-5): the state follows the title space-3 after it, start-aligned in its seat; the time keeps its place space-3 before Copy, end-aligned in its seat. Both seats' spare room is the head's own open middle. */ @@ -4509,8 +4616,6 @@ .basalt-terminal-head:has(.basalt-terminal-time) .basalt-terminal-state > .basalt-reserve { justify-items: start; } .basalt-terminal-head:has(.basalt-terminal-time) .basalt-terminal-time { order: 2; margin-inline-start: auto; } .basalt-terminal-head:has(.basalt-terminal-time) .basalt-terminal-time .basalt-run-timer > .basalt-reserve { justify-items: end; } - /* "Copy commands" ends on the line every duration under it ends on: the ghost button's glyph-side padding hangs past the head's (the re-check). */ - .basalt-terminal-head:has(.basalt-terminal-time) .basalt-terminal-copy { margin-inline-end: calc(-1 * var(--basalt-space-2-5)); } } /* Under 480px of the Terminal's own width a head with a run's time is two rows (ruling 12): the title and the copy button (its glyph on the end padding line), then the state and its time from the title's start edge; space-2 between the two lines, the words 15 from the head's edges. The button's row is its own height @@ -4531,8 +4636,9 @@ } .basalt-terminal-head:has(.basalt-terminal-time) > .basalt-terminal-actions { display: contents; } .basalt-terminal-head:has(.basalt-terminal-time) .basalt-terminal-title { grid-area: 1 / 1 / 2 / 3; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } - /* The copy glyph on the head's inline padding line, where the title starts and every duration ends: the target hangs into the padding (14 at 44). */ - .basalt-terminal-head:has(.basalt-terminal-time) .basalt-terminal-copy-compact { grid-area: 1 / 3; justify-self: end; margin-inline-end: calc((var(--_head-button) - var(--basalt-size-icon-sm)) / -2); } + /* The copy glyph on the head's inline padding line, where the title starts and every duration ends: the target hangs into the padding by the + edge rule (6 at 28, 14 at 44). */ + .basalt-terminal-head:has(.basalt-terminal-time) .basalt-terminal-copy-compact { grid-area: 1 / 3; justify-self: end; } .basalt-terminal-head:has(.basalt-terminal-time) :is(.basalt-terminal-state, .basalt-terminal-time) { grid-row: 2; margin-block-start: calc(var(--basalt-space-2) - (var(--_head-button) - var(--basalt-text-xs-line-height)) / 2); } .basalt-terminal-head:has(.basalt-terminal-time) .basalt-terminal-state { grid-column: 1; } .basalt-terminal-head:has(.basalt-terminal-time) .basalt-terminal-state > .basalt-reserve { justify-items: start; } @@ -5641,7 +5747,8 @@ .basalt-diagram[data-viewer] { gap: 0; } .basalt-diagram[data-viewer] > :is(.basalt-diagram-head, .basalt-diagram-key, .basalt-diagram-hint, .basalt-diagram-tap-hint, .basalt-diagram-foot, .basalt-diagram-list, .basalt-diagram-summary) { display: none; } .basalt-diagram-viewer-list { box-sizing: border-box; max-width: calc(var(--basalt-size-page-width) - 2 * var(--basalt-size-gutter) + 2 * var(--_pad)); padding: var(--_pad); } - .basalt-diagram-viewer-foot { display: flex; flex-direction: column; gap: var(--basalt-space-3); padding-block-start: var(--basalt-space-3); } + /* The zoom row's first control (Zoom out) is hung at the foot's start, its glyph on the line the key starts on (DECISIONS 336); the room is the foot's start padding less the inset. */ + .basalt-diagram-viewer-foot { display: flex; flex-direction: column; gap: var(--basalt-space-3); padding-block-start: var(--basalt-space-3); --basalt-edge-room-start: calc(max(var(--basalt-space-5), var(--_inset-start)) - var(--_inset-start)); --basalt-edge-room: initial; --basalt-edge-room-end: initial; } .basalt-diagram-viewer-key { --_ground: var(--_surface, var(--basalt-surface-overlay)); } .basalt-diagram-viewer-key .basalt-diagram-key { padding-block-start: 0; border-top: 0; } .basalt-diagram-viewer-key[data-layout="drawn"] .basalt-diagram-entry[data-when="stacked"], .basalt-diagram-viewer-key[data-layout="stacked"] .basalt-diagram-entry[data-when="drawn"], .basalt-diagram-viewer-key[data-bare] .basalt-diagram-entry[data-line] { display: none; } @@ -5740,8 +5847,10 @@ .basalt-chart-seat, .basalt-chart-context { display: inline-grid; } .basalt-chart-seat > *, .basalt-chart-context > * { grid-area: 1 / 1; } .basalt-chart-seat > .basalt-chart-reserve { font-kerning: none; } - /* The seat is as wide as its widest reserved form and nothing else: the digits drawn over it overflow it, so a form that is a sixty-fourth of a pixel wider than its text cannot move the unit. */ - .basalt-chart-seat > :not(.basalt-chart-reserve) { inline-size: 0; } + /* The seat is as wide as its widest reserved form and nothing else: the digits drawn over it overflow it, so a form that is a sixty-fourth of a pixel wider than its text cannot move the unit. + What it shows ends the seat (DECISIONS 336, R-10): the zero-width box sits at the seat's end and its digits are drawn from there toward the start, so a + shorter number or the dash of a day with no reading is space-2 from the unit, and the unit never moves. */ + .basalt-chart-seat > :not(.basalt-chart-reserve) { inline-size: 0; justify-self: end; display: flex; justify-content: flex-end; align-items: baseline; } .basalt-chart-seat [data-missing] { color: var(--basalt-text-tertiary); } .basalt-chart-unit { color: var(--basalt-text-secondary); font: var(--basalt-font-weight-medium) var(--basalt-text-md-size) / var(--basalt-text-md-line-height) var(--basalt-font-family-sans); letter-spacing: var(--basalt-text-md-tracking); } .basalt-chart-context { justify-self: start; margin: 0; color: var(--basalt-text-secondary); font: var(--basalt-font-weight-regular) var(--basalt-text-sm-size) / var(--basalt-text-sm-line-height) var(--basalt-font-family-sans); font-variant-numeric: tabular-nums; } @@ -5990,6 +6099,33 @@ bar's 44px buttons are. A segment keeps its 6: it is nested in a track that is 8 with 2 of padding. */ .basalt-button, .basalt-button[data-size] { --_radius: var(--basalt-radius-md); } + /* The size in force here (DECISIONS 336): a hung icon-only button drawn at 44 hangs 14 on a 16px glyph. */ + .basalt-button { --_drawn: max(var(--_h), var(--basalt-size-tap-min)); } + /* A hung control with words is as wide as its words, so its inset is its padding; what it lacks of 44 is hit area on ::before (46: the + press's .98 keeps it at 45.08), toward the edge as far as the room allows and the rest toward the inside. ::before, as a pressed + Button's ::after is taken. */ + .basalt-button[data-variant="ghost"][data-edge]:not([data-icon-only]) { + --_miss: max(var(--basalt-space-0), calc(var(--basalt-size-tap-min) + 2 * var(--basalt-size-hairline) - 100%)); + /* What it lacks is split half toward the edge and half toward the inside, as decided. Where the edge has less room than its half (a side + inset has taken it), the box itself grows by the shortfall instead, so the inward half never outgrows the outward one and never reaches + into a neighbour's target (the code review's finding 1). With the room said, a short word is as wide as its word; with none it is the ordinary 44. */ + min-width: max(var(--basalt-space-0), min(var(--basalt-size-tap-min), calc(var(--basalt-size-tap-min) + 2 * var(--basalt-size-hairline) - 2 * var(--_reach)))); + } + .basalt-button[data-variant="ghost"][data-edge="end"]:not([data-icon-only]) { --_reach: calc(var(--basalt-edge-room-end, var(--basalt-edge-room, var(--basalt-space-0))) - var(--_hang)); } + .basalt-button[data-variant="ghost"][data-edge="start"]:not([data-icon-only]) { --_reach: calc(var(--basalt-edge-room-start, var(--basalt-edge-room, var(--basalt-space-0))) - var(--_hang)); } + .basalt-button[data-variant="ghost"][data-edge]:not([data-icon-only])::before { + content: ""; + position: absolute; + inset-block: min(var(--basalt-space-0), calc((100% - var(--basalt-size-tap-min)) / 2 - var(--basalt-size-hairline))); + } + .basalt-button[data-variant="ghost"][data-edge="end"]:not([data-icon-only])::before { + --_out: min(calc(var(--_miss) / 2), calc(var(--basalt-edge-room-end, var(--basalt-edge-room, var(--basalt-space-0))) - var(--_hang))); + inset-inline: calc(var(--_out) - var(--_miss)) calc(-1 * var(--_out)); + } + .basalt-button[data-variant="ghost"][data-edge="start"]:not([data-icon-only])::before { + --_out: min(calc(var(--_miss) / 2), calc(var(--basalt-edge-room-start, var(--basalt-edge-room, var(--basalt-space-0))) - var(--_hang))); + inset-inline: calc(-1 * var(--_out)) calc(var(--_out) - var(--_miss)); + } .basalt-input, .basalt-input[data-size], .basalt-select-trigger, @@ -6069,13 +6205,11 @@ display: flex; flex-direction: column; overflow-y: auto; - padding: var(--basalt-space-6); - padding-top: max(var(--basalt-space-6), env(safe-area-inset-top)); - padding-right: max(var(--basalt-space-6), env(safe-area-inset-right)); + padding-block-start: max(var(--basalt-space-6), env(safe-area-inset-top)); + padding-inline: max(var(--basalt-space-6), var(--_inset-start)) max(var(--basalt-space-6), var(--_inset-end)); /* The bottom padding: space-6, or the home indicator's safe area where it is deeper. An on-screen keyboard covers the safe area, so there it is space-6. */ --_sheet-floor: max(var(--basalt-space-6), env(safe-area-inset-bottom)); - padding-bottom: var(--_sheet-floor); - padding-left: max(var(--basalt-space-6), env(safe-area-inset-left)); + padding-block-end: var(--_sheet-floor); background: var(--_surface, var(--basalt-surface-overlay)); color: var(--basalt-text-primary); box-shadow: var(--basalt-shadow-modal); @@ -6138,7 +6272,11 @@ align-items: center; justify-content: space-between; gap: var(--basalt-space-3); - padding: max(var(--basalt-space-3), env(safe-area-inset-top)) max(var(--basalt-space-3), env(safe-area-inset-right)) var(--basalt-space-3) max(var(--basalt-space-5), env(safe-area-inset-left)); + padding-block: max(var(--basalt-space-3), env(safe-area-inset-top)) var(--basalt-space-3); + /* The same padding on both sides (DECISIONS 336): Close is hung at the end, its glyph on the line the title starts on. Its room is the end + padding less the inset there, so the whole target stays clear of a notch or a corner. */ + padding-inline: max(var(--basalt-space-5), var(--_inset-start)) max(var(--basalt-space-5), var(--_inset-end)); + --basalt-edge-room-end: calc(max(var(--basalt-space-5), var(--_inset-end)) - var(--_inset-end)); --basalt-edge-room: initial; --basalt-edge-room-start: initial; border-bottom: var(--basalt-size-hairline) solid var(--basalt-border-divider); } .basalt-sheet-head-text { flex: 1; min-width: 0; } @@ -6150,7 +6288,7 @@ min-height: 0; overflow-y: auto; overscroll-behavior: contain; - padding-inline: max(var(--basalt-space-5), env(safe-area-inset-left)) max(var(--basalt-space-5), env(safe-area-inset-right)); + padding-inline: max(var(--basalt-space-5), var(--_inset-start)) max(var(--basalt-space-5), var(--_inset-end)); /* The body clips what it scrolls: space-1-5 at each end keeps a focused control's ring (2px at +2) whole against the head and the foot. */ padding-block: var(--basalt-space-1-5); } @@ -6158,7 +6296,8 @@ .basalt-sheet-foot { box-sizing: border-box; flex: none; - padding: var(--basalt-space-4) max(var(--basalt-space-5), env(safe-area-inset-right)) max(var(--basalt-space-5), env(safe-area-inset-bottom)) max(var(--basalt-space-5), env(safe-area-inset-left)); + padding-block: var(--basalt-space-4) max(var(--basalt-space-5), env(safe-area-inset-bottom)); + padding-inline: max(var(--basalt-space-5), var(--_inset-start)) max(var(--basalt-space-5), var(--_inset-end)); border-top: var(--basalt-size-hairline) solid var(--basalt-border-divider); } @@ -6181,7 +6320,7 @@ font-family: var(--basalt-font-family-sans); } .basalt-drawer[hidden] { display: none; } - .basalt-drawer-back { display: none; justify-self: start; margin-inline-start: calc(-1 * var(--basalt-space-2-5)); } + .basalt-drawer-back { display: none; justify-self: start; } .basalt-drawer-section { display: flex; flex-direction: column; min-width: 0; min-height: 0; padding-top: var(--basalt-space-3); } .basalt-drawer-head { display: flex; flex: none; align-items: center; justify-content: space-between; gap: var(--basalt-space-3); min-height: var(--basalt-size-control-sm); } .basalt-drawer-title { margin: 0; font: var(--basalt-font-weight-semibold) var(--basalt-text-base-size) / var(--basalt-text-base-line-height) var(--basalt-font-family-sans); color: var(--basalt-text-primary); } @@ -6228,7 +6367,8 @@ @media (hover: hover) { .basalt-search-trigger:hover { background: transparent; color: var(--basalt-text-primary); } } } - /* The search dialog (D13a, V3): centred, with a results area of a fixed height, so the field and the count never move. */ + /* The search dialog (D13a, V3; DECISIONS 336, Q3): its top is held where the full box has it (DialogContent writes --_dialog-top), and its results area is + as tall as its rows up to a full result's height, so the field and the count never move and the box ends under what it shows. */ .basalt-dialog.basalt-search { display: flex; flex-direction: column; @@ -6244,7 +6384,10 @@ align-items: center; gap: var(--basalt-space-1); margin: 0; - padding: var(--basalt-space-2) var(--basalt-space-2) var(--basalt-space-2) var(--basalt-space-4); + /* space-4 on both sides (DECISIONS 336): Close is hung at the end, its glyph on the line the count and the results end on. */ + padding-block: var(--basalt-space-2); + padding-inline: var(--basalt-space-4); + --basalt-edge-room: var(--basalt-space-4); --basalt-edge-room-start: initial; --basalt-edge-room-end: initial; border-bottom: var(--basalt-size-hairline) solid var(--basalt-border-divider); border-start-start-radius: var(--basalt-radius-lg); border-start-end-radius: var(--basalt-radius-lg); @@ -6283,7 +6426,7 @@ line-height: var(--basalt-text-sm-line-height); color: var(--basalt-text-tertiary); } - /* The results area is as tall as a full result: its logo rows, its picture rows and a "See all" row, plus its padding. */ + /* The results area is as tall as its rows, up to a full result: its logo rows, its picture rows and a "See all" row, plus its padding. */ .basalt-search-results { --_floor: var(--basalt-space-12); --_logo-row: max(var(--_floor), calc(var(--basalt-size-search-logo-height) + 2 * var(--basalt-space-1-5))); @@ -6291,7 +6434,7 @@ box-sizing: border-box; flex: 0 1 auto; min-height: 0; - height: calc(var(--basalt-space-1) + var(--basalt-space-2-5) + var(--_logos, 3) * var(--_logo-row) + var(--_packs, 5) * var(--_pack-row) + var(--_alls, 1) * var(--_floor)); + max-height: calc(var(--basalt-space-1) + var(--basalt-space-2-5) + var(--_logos, 3) * var(--_logo-row) + var(--_packs, 5) * var(--_pack-row) + var(--_alls, 1) * var(--_floor)); margin: 0; padding: var(--basalt-space-1) var(--basalt-space-2) var(--basalt-space-2-5); list-style: none; @@ -6299,6 +6442,8 @@ overscroll-behavior: contain; scroll-padding-block: var(--basalt-space-1-5); } + /* With no rows the list holds no padding, so the box ends under the count (the pixel review's polish). */ + .basalt-search-results:not(:has(> *)) { padding-block: 0; } .basalt-search-item { margin: 0; padding: 0; list-style: none; } /* A result is a link and a tab stop, with the control ring at +2 (it sits 8px from the panel's edge). Its hover wash is not a plate: it runs to the panel's edges, and no ink lifts. No ink lifts (V5): a result's name and its detail keep their ink on the hover wash. Measured on the wash over the dialog's level (a modal is always level 1): tertiary ink 6.00:1 in dark and 4.88:1 in light, secondary 9.12:1 and 7.74:1, so tertiary passes 4.5:1 there and the step to secondary the first build had was removed (by the AA rule: it is not needed). */ @@ -6749,6 +6894,12 @@ wash, no weight change, no press scale. It takes its container's text size. The core arrow comes after the name for a new tab. */ .basalt-social-links { display: flex; flex-wrap: wrap; align-items: center; column-gap: var(--basalt-space-4); row-gap: var(--basalt-space-1); margin: 0; padding: 0; list-style: none; } .basalt-social-links[data-icon-only] { column-gap: var(--basalt-space-1); } + /* An icon-only row's first link is hung at the start, its glyph on the line, only where the box round it declares room: a card's space-4 + (DECISIONS 336, S9). A row that ends a card hangs its spare half into the card's padding, so the glyph's foot is the card's line. */ + .basalt-card-content > .basalt-social-links[data-icon-only] { --basalt-edge-room: var(--basalt-space-4); --basalt-edge-room-start: initial; --basalt-edge-room-end: initial; } + /* Every icon-only link carries edge="start"; only the first rendered item has the room, so the rest stand where they are. */ + .basalt-social-links[data-icon-only] > .basalt-social-item:not(:first-child) { --basalt-edge-room: initial; --basalt-edge-room-start: initial; } + .basalt-card-content:last-child > .basalt-social-links[data-icon-only]:last-child { margin-block-end: calc((var(--basalt-size-icon-sm) - var(--basalt-size-control-md)) / 2); } /* The item is a flex box, not a line box: an inline-flex link in a line box takes its baseline from its glyph, which sat a word without a glyph 2px lower. */ .basalt-social-item { display: flex; } .basalt-social-link { @@ -6780,6 +6931,7 @@ @media (pointer: coarse), (width < 720px) { .basalt-social-links:not([data-icon-only]) { gap: 0; margin-inline: calc(-1 * var(--basalt-space-2)); } .basalt-social-links:not([data-icon-only]) .basalt-social-link { min-width: var(--basalt-size-tap-min); min-height: var(--basalt-size-tap-min); justify-content: center; padding-inline: var(--basalt-space-2); } + .basalt-card-content:last-child > .basalt-social-links[data-icon-only]:last-child { margin-block-end: calc((var(--basalt-size-icon-sm) - var(--basalt-size-tap-min)) / 2); } } /* The long form: rows in the list's rhythm (a 44px hit area with a 40px row inside, 12px padding and gap, 14/20 secondary ink, the @@ -6835,6 +6987,8 @@ .basalt-pagination[data-compact] .basalt-pagination-pages { display: none; } .basalt-pagination[data-compact] .basalt-pagination-summary { display: inline-block; } .basalt-pagination-summary { margin-inline: var(--basalt-space-1); } + /* The count's seat is centred between the arrows, as the row is (DECISIONS 336, R-9). */ + .basalt-pagination-summary > .basalt-reserve { justify-items: center; } /* size-breakpoint-container-lg (640px): a container query cannot read a token. Under it the numbers go: Previous, the summary and Next, in the nearest container. */ /* stylelint-disable-next-line basalt/container-length -- size-breakpoint-container-lg (640px); a container query cannot read a custom property */ @container (width < 640px) { @@ -7034,7 +7188,7 @@ width: 100%; max-width: var(--basalt-size-page-width); margin-inline: auto; - padding-inline: var(--_pad-left) var(--_pad-right); + padding-inline: var(--_pad-start) var(--_pad-end); } /* The rhythm: sections are one section gap apart, the first starts half a gap below the bar and the page ends a gap above its footer. No section is given the window's height, so the widest empty band on a page is one gap. */ @@ -7518,8 +7672,8 @@ .basalt-tooltip[data-ending-style] { transform: none; } .basalt-dialog[data-starting-style], .basalt-dialog[data-ending-style] { transform: translate(-50%, -50%); } - .basalt-dialog[data-form][data-held][data-starting-style], - .basalt-dialog[data-form][data-held][data-ending-style] { transform: translateX(-50%); } + .basalt-dialog:is([data-form], .basalt-search)[data-held][data-starting-style], + .basalt-dialog:is([data-form], .basalt-search)[data-held][data-ending-style] { transform: translateX(-50%); } /* stylelint-disable-next-line unit-disallowed-list -- size-breakpoint-md (720px): a media query cannot read a token */ @media (width < 720px) { .basalt-dialog[data-form][data-starting-style], .basalt-dialog[data-form][data-ending-style] { opacity: 0; transform: none; } @@ -7565,7 +7719,7 @@ @media (forced-colors: active) { /* A skeleton's fill is dropped, so its box is a 1px ButtonBorder edge inside its own size and no fill (DECISIONS 167, Q4). */ .basalt-skeleton { box-sizing: border-box; border: var(--basalt-size-hairline) solid ButtonBorder; } - .basalt-button-count { border: var(--basalt-size-hairline) solid ButtonText; box-shadow: none; color: ButtonText; } + .basalt-button-count > span { border: var(--basalt-size-hairline) solid ButtonText; box-shadow: none; color: ButtonText; } .basalt-button:is([data-variant="primary"], [data-variant="secondary"], [data-variant="outline"]):not([data-disabled], [data-loading]) > .basalt-button-amount { opacity: 1; } .basalt-switch-row, .basalt-option-chip { border-color: ButtonText; color: ButtonText; } @@ -7691,7 +7845,7 @@ .basalt-date-age-seat { justify-items: start; } /* ---- Status bar (D14b; V7, R6): a 44px foot from 720, fixed (56 plus the safe area) under it ---- */ - .basalt-status-bar { position: relative; box-sizing: border-box; display: flex; align-items: center; gap: var(--basalt-space-4); min-height: var(--basalt-size-tap-min); padding-inline: var(--basalt-gutter); border-top: var(--basalt-size-hairline) solid var(--basalt-border-divider); background: var(--basalt-surface-page); color: var(--basalt-text-tertiary); font: var(--basalt-font-weight-regular) var(--basalt-text-sm-size) / var(--basalt-text-sm-line-height) var(--basalt-font-family-mono); white-space: nowrap; } + .basalt-status-bar { position: relative; box-sizing: border-box; display: flex; align-items: center; gap: var(--basalt-space-4); min-height: var(--basalt-size-tap-min); padding-inline: var(--basalt-gutter); border-top: var(--basalt-size-hairline) solid var(--basalt-border-divider); background: var(--basalt-surface-page); color: var(--basalt-text-tertiary); font: var(--basalt-font-weight-regular) var(--basalt-text-sm-size) / var(--basalt-text-sm-line-height) var(--basalt-font-family-mono); white-space: nowrap; --basalt-edge-room: var(--basalt-gutter); --basalt-edge-room-start: initial; --basalt-edge-room-end: initial; } .basalt-status-bar-start, .basalt-status-bar-sources, .basalt-status-bar-end { display: flex; flex: none; align-items: center; gap: var(--basalt-space-2); } .basalt-status-bar-message { display: flex; flex: 1 1 0; align-items: center; justify-content: center; gap: var(--basalt-space-2); min-width: 0; min-height: var(--basalt-text-sm-line-height); margin: 0; color: var(--basalt-text-primary); } .basalt-status-bar-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; } @@ -7700,8 +7854,11 @@ /* The sources button is a ghost sm Button (28, radius 6) with no open look of its own (DECISIONS 167, Q9b): the open state is aria-expanded and the drawer it opens. */ /* stylelint-disable-next-line unit-disallowed-list -- size-breakpoint-md (720px): a media query cannot read a token; below it the bar is fixed at the foot */ @media (width < 720px) { - .basalt-status-bar { position: fixed; inset-inline: 0; bottom: 0; z-index: var(--basalt-layer-sticky); padding-block-end: var(--_inset-bottom); padding-inline: max(var(--basalt-gutter), var(--_inset-left)) max(var(--basalt-gutter), var(--_inset-right)); min-height: calc(var(--basalt-size-tab-bar) + var(--_inset-bottom)); gap: var(--basalt-space-2); } + .basalt-status-bar { position: fixed; inset-inline: 0; bottom: 0; z-index: var(--basalt-layer-sticky); padding-block-end: var(--_inset-bottom); padding-inline: max(var(--basalt-gutter), var(--_inset-start)) max(var(--basalt-gutter), var(--_inset-end)); min-height: calc(var(--basalt-size-tab-bar) + var(--_inset-bottom)); gap: var(--basalt-space-2); + --basalt-edge-room-start: calc(max(var(--basalt-gutter), var(--_inset-start)) - var(--_inset-start)); --basalt-edge-room-end: calc(max(var(--basalt-gutter), var(--_inset-end)) - var(--_inset-end)); --basalt-edge-room: initial; } .basalt-status-bar-sources { margin-inline-start: auto; } + /* With no sources, end follows start here and is not at the bar's end, so its last button does not hang (DECISIONS 336). */ + .basalt-status-bar:not(:has(> .basalt-status-bar-sources)) > .basalt-status-bar-end { --basalt-edge-room: initial; --basalt-edge-room-end: initial; } /* The message is stacked above the bar, out of flow, so a message coming and going moves nothing. */ .basalt-status-bar-message { position: absolute; inset-inline: 0; bottom: calc(100% + var(--basalt-size-hairline)); justify-content: flex-start; padding: var(--basalt-space-2) var(--basalt-gutter); border-top: var(--basalt-size-hairline) solid var(--basalt-border-divider); background: var(--basalt-surface-page); white-space: normal; } .basalt-status-bar-message[data-empty] { display: none; } @@ -8030,7 +8187,7 @@ .basalt-release-head-text > .basalt-release-heading:not([data-headline]) ~ .basalt-release-meta { grid-row: 3; } .basalt-release-head-text > :not(.basalt-release-word) ~ * { margin-top: var(--basalt-space-1); } /* A ghost button at the column's edge puts its words on the edge: its plate hangs space-2-5 past it (DECISIONS 326, sweep 68-1). */ - .basalt-release-head > .basalt-release-copy { grid-column: 2; grid-row: 2; align-self: center; margin-block: calc(-1 * var(--basalt-size-tap-min)); margin-inline-end: calc(-1 * var(--basalt-space-2-5)); } + .basalt-release-head > .basalt-release-copy { grid-column: 2; grid-row: 2; align-self: center; margin-block: calc(-1 * var(--basalt-size-tap-min)); } .basalt-release-heading { margin: 0; font: var(--basalt-font-weight-semibold) var(--basalt-text-2xl-size) / var(--basalt-text-2xl-line-height) var(--basalt-font-family-sans); letter-spacing: var(--basalt-text-2xl-tracking); text-wrap: balance; overflow-wrap: break-word; } /* The number standing alone is mono; in a line with its date (a headline's meta line) it is Geist, as at the foot. */ .basalt-release-version { font-family: var(--basalt-font-family-mono); letter-spacing: 0; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; } @@ -8324,13 +8481,14 @@ overflow-y: auto; overscroll-behavior: contain; /* The home indicator's safe area is the foot's to keep where no tab bar holds it. */ - padding: var(--basalt-space-3) var(--_pad-right) max(var(--basalt-space-3), calc(var(--_inset-bottom) - var(--basalt-bottom-offset))) var(--_pad-left); + padding-block: var(--basalt-space-3) max(var(--basalt-space-3), calc(var(--_inset-bottom) - var(--basalt-bottom-offset))); + padding-inline: var(--_pad-start) var(--_pad-end); border-top: var(--basalt-size-hairline) solid var(--basalt-border-divider); background: var(--basalt-surface-page); color: var(--basalt-text-primary); font-family: var(--basalt-font-family-sans); } - .basalt-app-foot > * { flex: none; box-sizing: border-box; width: 100%; max-width: calc(var(--basalt-size-page-width) - var(--_pad-left) - var(--_pad-right)); min-width: 0; } + .basalt-app-foot > * { flex: none; box-sizing: border-box; width: 100%; max-width: calc(var(--basalt-size-page-width) - var(--_pad-start) - var(--_pad-end)); min-width: 0; } .basalt-app-foot > .basalt-tray { flex: 0 1 auto; min-height: var(--basalt-size-tap-min); overflow-y: auto; overscroll-behavior: contain; } @media print { .basalt-app-foot { position: static; max-height: none; overflow: visible; } } @media (forced-colors: active) { .basalt-app-foot { border-top-color: CanvasText; } } @@ -8359,7 +8517,8 @@ gap: var(--basalt-space-2); min-width: 0; min-height: var(--basalt-size-control-xl); - padding: var(--basalt-space-1-5) var(--basalt-space-2) var(--basalt-space-1-5) var(--basalt-space-3); + padding-block: var(--basalt-space-1-5); + padding-inline: var(--basalt-space-3) var(--basalt-space-2); font-size: var(--basalt-text-sm-size); line-height: var(--basalt-text-sm-line-height); } @@ -8462,7 +8621,7 @@ top: calc(var(--basalt-viewport-top) + var(--basalt-viewport-height) / 2); max-height: calc(var(--basalt-viewport-height) - 2 * var(--basalt-space-4)); } - :root[data-screen-keyboard] .basalt-dialog[data-form][data-held] { + :root[data-screen-keyboard] .basalt-dialog:is([data-form], .basalt-search)[data-held] { top: max(var(--_dialog-top), calc(var(--basalt-viewport-top) + var(--basalt-space-4))); max-height: calc(var(--basalt-viewport-top) + var(--basalt-viewport-height) - max(var(--_dialog-top), calc(var(--basalt-viewport-top) + var(--basalt-space-4))) - var(--basalt-space-4)); } diff --git a/packages/react/src/tab-bar.tsx b/packages/react/src/tab-bar.tsx index 9bafbbcc..9709cc50 100644 --- a/packages/react/src/tab-bar.tsx +++ b/packages/react/src/tab-bar.tsx @@ -116,7 +116,7 @@ export function TabBarMore({ icon = MoreNavGlyph, label = "More", current, dot, <SheetContent side="bottom" className="basalt-tabbar-sheet"> <div className="basalt-tabbar-sheet-head"> <SheetTitle>{label}</SheetTitle> - <SheetClose render={<IconButton icon={CloseGlyph} label={`Close ${label.toLowerCase()}`} />} /> + <SheetClose render={<IconButton icon={CloseGlyph} label={`Close ${label.toLowerCase()}`} edge="end" />} /> </div> <Nav aria-label={label} onClick={closeOnLink}>{children}</Nav> {version ? <div className="basalt-tabbar-version" onClick={closeOnLink}><VersionPlaceContext.Provider value="more">{version}</VersionPlaceContext.Provider></div> : null} diff --git a/packages/react/src/terminal.tsx b/packages/react/src/terminal.tsx index e2a7918d..5ad31c10 100644 --- a/packages/react/src/terminal.tsx +++ b/packages/react/src/terminal.tsx @@ -6,6 +6,7 @@ import * as React from "react"; import { CheckGlyph } from "./glyphs/check"; import { CopyGlyph } from "./glyphs/copy"; +import { useCopyResult } from "./copy-result"; import { MinusGlyph } from "./glyphs/minus"; import { Button, IconButton } from "./button"; import { CodeLine, CodePrompt } from "./code-lines"; @@ -20,7 +21,6 @@ import { RunTimer } from "./run-timer"; import { warnRun } from "./run-warn"; import { Spinner } from "./spinner"; import { join } from "./utils"; -import { CONFIRM_MS } from "./constants"; declare const process: { env: { NODE_ENV?: string } }; @@ -166,25 +166,13 @@ export function Terminal({ title, lines, prompt = "$", copyable = true, status, // ---- copy: the commands, one per line. A replay knows every line, so it copies them all wherever its playhead is; a stream the // app drives passes the lines that have arrived. With no command there is nothing to copy, and the button is off. const commands = lines.filter((line) => line.kind === "command").map((line) => line.text).join("\n"); - const [copied, setCopied] = React.useState(false); - React.useEffect(() => { - if (!copied) return; - const t = setTimeout(() => setCopied(false), CONFIRM_MS); - return () => clearTimeout(t); - }, [copied]); + // What the last copy did, held for CONFIRM_MS: the words stay and the glyph says it, the check or the close (copy-result.ts; DECISIONS 336). + const copyResult = useCopyResult(); // The compact copy glyph is one that changes (Copy, then Check): the morph's engine is on its way before the first click. React.useEffect(() => { if (copyable) loadFlight(); }, [copyable]); - const copy = async () => { - if (!commands) return; - try { - await navigator.clipboard.writeText(commands); - setCopied(true); - } catch { - // clipboard refused (insecure context or permissions): leave the button as it was - } - }; + const copy = () => (commands ? copyResult.copy(commands) : undefined); // ---- the replay's control const press = () => { @@ -229,18 +217,18 @@ export function Terminal({ title, lines, prompt = "$", copyable = true, status, {words ? <span className="basalt-terminal-state" data-state={state}>{words}</span> : null} {stages && time ? <span className="basalt-terminal-time"><RunTimer start={time.start} end={time.end} carried={time.carried} since={time.since} /></span> : null} {control ? ( - <Button variant="ghost" size="sm" onClick={control.onClick} disabled={control.disabled}> + <Button variant="ghost" size="sm" edge={copyable ? undefined : "end"} onClick={control.onClick} disabled={control.disabled}> {swap(control.show, Object.fromEntries(control.words.map((word) => [word, word])))} </Button> ) : null} {copyable ? ( <> {/* Wide: the words. Narrow (the terminal's own width, under 30rem): the icon alone, with the same name. */} - <Button className="basalt-terminal-copy" variant="ghost" size="sm" icon={CopyGlyph} onClick={copy} disabled={!commands}> - {swap(copied ? "Copied" : "Copy commands", { "Copy commands": "Copy commands", Copied: "Copied" })} + <Button className="basalt-terminal-copy" variant="ghost" size="sm" edge="end" icon={CopyGlyph} done={copyResult.done} doneIcon={copyResult.doneIcon} onClick={copy} disabled={!commands}> + Copy commands </Button> - <IconButton className="basalt-terminal-copy-compact" size="sm" icon={copied ? CheckGlyph : CopyGlyph} label="Copy commands" onClick={copy} disabled={!commands} /> - <span className="basalt-visually-hidden" role="status">{copied ? "Copied" : ""}</span> + <IconButton className="basalt-terminal-copy-compact" size="sm" edge="end" icon={CopyGlyph} done={copyResult.done} doneIcon={copyResult.doneIcon} label="Copy commands" onClick={copy} disabled={!commands} /> + <span className="basalt-visually-hidden" role="status">{copyResult.status}</span> </> ) : null} </span> diff --git a/packages/react/test/bundle.test.mjs b/packages/react/test/bundle.test.mjs index 3fe7e7e0..e172562f 100644 --- a/packages/react/test/bundle.test.mjs +++ b/packages/react/test/bundle.test.mjs @@ -95,7 +95,8 @@ async function lazyGraph(names, extra = "") { // The whole static chunk graph, under splitting, for single imports. CommandMenu's lazy panel must not drag the // keyboard machinery, the icons or anything else into an import that never mentions it. // DECISIONS 326: a text toggle's seat holds its glyph and hands over to the check (button.tsx), about 185 bytes on every Button: Button 17,835 (17,650 to 17,850), Drawer 18,384 (18,200 to 18,400). -for (const [name, limit] of [["Spinner", 2_500], ["Sparkline", 6_000], ["Skeleton", 2_500], ["Badge", 3_000], ["NumberTicker", 7_000], ["Button", 17_950], ["Kbd", 11_000], ["AmbientMark", 1_500], ["LoopsToggle", 40_000], ["LoopsToggleIcon", 20_000], ["Reflow", 8_000], ["createTravellers", 1_000], ["entranceVerdict", 2_000], ["Listbox", 3_400], ["OpenList", 2_500], ["NoticeBar", 2_000], ["SearchTrigger", 5_500], ["SearchResult", 2_000], ["Drawer", 18_500]]) { +// Raised in DECISIONS 336 (reserved room), each to its measured size rounded up to the next 50, measured again merged with main at db0bc418 (#129 to #131): Button's `edge` and its words form's done seat (DoneSeat, so a copy with words keeps them) reach every Button-based export: Button 17,950 to 18,550, Drawer 18,500 to 19,100 (from main's). +for (const [name, limit] of [["Spinner", 2_500], ["Sparkline", 6_000], ["Skeleton", 2_500], ["Badge", 3_000], ["NumberTicker", 7_000], ["Button", 18_550], ["Kbd", 11_000], ["AmbientMark", 1_500], ["LoopsToggle", 40_000], ["LoopsToggleIcon", 20_000], ["Reflow", 8_000], ["createTravellers", 1_000], ["entranceVerdict", 2_000], ["Listbox", 3_400], ["OpenList", 2_500], ["NoticeBar", 2_000], ["SearchTrigger", 5_500], ["SearchResult", 2_000], ["Drawer", 19_100]]) { test(`${name} alone, with splitting, loads only its own static graph (${limit} bytes at most)`, async () => { const { bytes, chunks, inputs } = await graph(name); assert.ok(bytes < limit, `${name}: ${bytes} bytes in ${chunks} chunks (limit ${limit})`); @@ -109,7 +110,8 @@ for (const [name, limit] of [["Spinner", 2_500], ["Sparkline", 6_000], ["Skeleto // cimip-gaps-2 B5 (DECISIONS 246: trim first, then the raise a feature needs): every modal lays itself out above an on-screen keyboard (the shared // watcher, screen-keyboard.ts, trimmed to about 2.4 KB), so SearchDialog rose from about 87,300 to 88,162; merged with main (5ad5345a), whose own // changes added about 490 bytes, it measures 88,683, so its limit is 88,700. -for (const [name, limit] of [["SheetHeader", 82_000], ["SearchDialog", 89_550]]) { +// SearchDialog 89,550 (main's) to 89,950 in DECISIONS 336: its top is held where a full result has it (DialogContent's held top for a dialog that is not a form), and Close is hung. +for (const [name, limit] of [["SheetHeader", 82_000], ["SearchDialog", 89_950]]) { test(`${name} alone, with splitting, loads Base UI's dialog and the close button and no command panel (${limit} bytes at most)`, async () => { const { bytes, inputs } = await graph(name); assert.ok(bytes < limit, `${name}: ${bytes} bytes (limit ${limit})`); @@ -373,7 +375,9 @@ test("command-panel.js keeps Phosphor's full MIT notice as a preserved legal com // The full-run fix (DECISIONS 246): a control that is not disabled no longer writes aria-disabled="false" (a toolbar passes its own false through), 4 // bytes in Button and IconButton: NotificationCentre 152,550 measured, so its limit is 152,600. // DECISIONS 326: a text toggle's seat holds its glyph and hands over to the check (button.tsx), about 185 bytes on every Button: NotificationCentre 152,753 (152,600 to 152,800). -for (const [name, limit] of [["ToastProvider", 93_500], ["useToast", 4_000], ["NotificationCentre", 152_900]]) { +// NotificationCentre 152,900 (main's) to 153,200 in DECISIONS 336: its head's and foot's controls are hung at their edges, and Button's edge and done seat. +// 153,200 to 153,250 in the code review's fix round of 336 (finding 4): the bell takes `edge` when it is last in a bar; 153,211 measured. +for (const [name, limit] of [["ToastProvider", 93_500], ["useToast", 4_000], ["NotificationCentre", 153_250]]) { test(`${name} alone stays lean and loads no Shiki, cmdk or grammar`, async () => { // The static graph under splitting: what loads first. A control's glyph engine loads on demand and is not in it (and has a limit of its own, below). const { bytes, inputs } = await graph(name); @@ -385,7 +389,8 @@ for (const [name, limit] of [["ToastProvider", 93_500], ["useToast", 4_000], ["N // The toolbar (DECISIONS 135): Base UI's toolbar and its roving focus, the direction provider, and Basalt's own controls as items, so // the whole set weighs what its Button, Input and Link do plus the toolbar. The root alone is 23,575 bytes; every part, 53,764. Combined in integration-nov15b: the controls batch's Button (DECISIONS 154) and the links batch's Link arrow (DECISIONS 152) both ride in the set, which measures 56,008, over the 56,000 each side kept, so the limit was 56,050 (the measured bytes rounded up to the next 50); DECISIONS 221 raised it to 56,350 for the glyph morphs' shell in Button and IconButton. // DECISIONS 326: a text toggle's seat holds its glyph and hands over to the check (button.tsx), about 185 bytes on every Button: the toolbar parts 58,803 (58,650 to 58,850). -for (const [name, limit] of [["Toolbar", 25_000], ["Toolbar, ToolbarButton, ToolbarIconButton, ToolbarLink, ToolbarInput, ToolbarGroup, ToolbarSeparator", 58_950]]) { +// The toolbar's parts 58,950 (main's) to 59,200 in DECISIONS 336: Button's edge and done seat. +for (const [name, limit] of [["Toolbar", 25_000], ["Toolbar, ToolbarButton, ToolbarIconButton, ToolbarLink, ToolbarInput, ToolbarGroup, ToolbarSeparator", 59_200]]) { test(`${name.length > 10 ? "Every toolbar part" : name} stays small and loads no Shiki, cmdk or grammar (${limit} bytes at most)`, async () => { const { bytes, inputs } = await graph(name); assert.ok(bytes < limit, `${name} bundle is ${bytes} bytes (limit ${limit})`); @@ -405,7 +410,8 @@ for (const [name, limit] of [["DescriptionList, DescriptionItem", 1_500], ["Stat // The panels, art and parts (DECISIONS 162): the app tile, the captioned columns and the table call are plain markup, so they load no Base UI, no Phosphor and no Shiki; // the period stepper is two IconButtons, a status line and the core chevrons, so it carries a Button and nothing else of Base UI. -for (const [name, limit, plain] of [["AppTile", 1_500, true], ["CaptionedColumns, CaptionedColumn", 1_000, true], ["TableCall", 800, true], ["PeriodStepper", 18_050, false]]) { +// PeriodStepper 18,050 to 18,150 in DECISIONS 336: the IconButton it draws carries `edge`. +for (const [name, limit, plain] of [["AppTile", 1_500, true], ["CaptionedColumns, CaptionedColumn", 1_000, true], ["TableCall", 800, true], ["PeriodStepper", 18_150, false]]) { test(`${name} alone is small and loads no Shiki or cmdk${plain ? ", no Base UI and no Phosphor" : ""} (${limit} bytes at most)`, async () => { const { bytes, inputs } = await graph(name); assert.ok(bytes < limit, `${name} bundle is ${bytes} bytes (limit ${limit})`); @@ -436,9 +442,11 @@ for (const [name, limit] of [["trailingMean", 800], ["ShareBar", 1_500], ["Cover // The allowance was 400 and rose to 600 in the wording audit's batch (W3: the hidden space in the headline and the legend, W8's `DateAge` separator): TimeChart measures 47,541, 568 over, rounded up to the next 50. // It rose to 1,050 with one Mod key across platforms (DECISIONS 244, the owner's word on the size, 246): TimeChart's chips carry the platform rule, 48,001, 1,028 over, rounded up to the next 50. -test("the short bar plot's `compact` prop, the wording audit's word boundaries and the platform rule add under 1,050 bytes to TimeChart (it was 46,973 before the prop)", async () => { +test("the short bar plot's `compact` prop, the wording audit's word boundaries, the platform rule and the date line's reason add under 1,200 bytes to TimeChart (it was 46,973 before the prop)", async () => { const { bytes } = await bundle("TimeChart"); - assert.ok(bytes < 46_973 + 1_050, `TimeChart bundle is ${bytes} bytes; the prop, the boundaries and the platform rule may add 1,050`); + // 1,050 to 1,100 in DECISIONS 336: the legend reserves every form a value can show and no reason (legendForms). + // 1,100 to 1,200 in the pixel review's fix round of 336 (finding 1): on a gap day the date line says the gap's reason, and reserves both forms; 48,163 measured. + assert.ok(bytes < 46_973 + 1_200, `TimeChart bundle is ${bytes} bytes; the prop, the boundaries, the platform rule, the legend's forms and the date line's reason may add 1,200`); }); test("RangeMeter carries Base UI's Meter and no other part, no Phosphor and no Shiki; TimeChart and PhaseChart load no Shiki or cmdk", async () => { @@ -458,7 +466,8 @@ test("Terminal does not pull in Shiki, cmdk or an unrelated Base UI part", async // Stages and runs (DECISIONS 316): stage lines, RunTimer and the Prohibit mark took it from about 32,300 to 40,670 (40,000 to 40,700); reported on the PR. // The review round of 316: the failed outcome and the command that never steps back, and RunTimer's print and redraw guards: 41,435 (to 41,450). // DECISIONS 326: the head's copy button and the glyph seat every Button carries: 41,627 (to 41,650). - assert.ok(bytes < 41_750, `Terminal bundle is ${bytes} bytes`); + // 41,750 (main's) to 42,200 in DECISIONS 336, then 42,550 with the open items' ruling (the shared copy state, copy-result.ts, and the close on a refused icon-only copy): its copies are hung, its words form keeps its words with the done seat, and a refused copy shows the close. + assert.ok(bytes < 42_550, `Terminal bundle is ${bytes} bytes`); assert.deepEqual(inputs.filter((f) => /cmdk|@radix-ui|shiki/.test(f)), []); assert.ok(!inputs.some((f) => /@base-ui\/react\/(esm\/)?(menu|dialog|select|popover|tooltip)\//.test(f))); }); @@ -507,7 +516,8 @@ test("LoopsToggleIcon alone loads the icon button and the hold, and not Switch", // 19,600 to 19,650 (19,606 measured) and DirectoryList 20,000 to 20,050 (20,008). The full-run fix (no aria-disabled="false" on a control that is // not disabled, DECISIONS 246): CopyButton 18,551 measured, 18,550 to 18,600. // DECISIONS 326: a text toggle's seat holds its glyph and hands over to the check (button.tsx), about 185 bytes on every Button: DirectoryList 20,212 (20,050 to 20,250), Reveal 19,810 (19,650 to 19,850), CopyButton 18,749 (18,600 to 18,800). -for (const [name, limit, base] of [["LinkCard", 6_500, false], ["LinkTile", 6_000, false], ["BackLink", 5_500, false], ["BigLinkList", 1_000, false], ["BigLinkRow", 6_000, false], ["DirectoryRow", 6_500, false], ["DirectoryList", 20_350, true], ["Reveal", 19_950, true], ["CopyButton", 18_900, true]]) { +// DirectoryList 20,350 to 20,950, Reveal 19,950 to 20,550 and CopyButton 18,900 to 19,500 (from main's) in DECISIONS 336: Button's edge and done seat. +for (const [name, limit, base] of [["LinkCard", 6_500, false], ["LinkTile", 6_000, false], ["BackLink", 5_500, false], ["BigLinkList", 1_000, false], ["BigLinkRow", 6_000, false], ["DirectoryRow", 6_500, false], ["DirectoryList", 20_950, true], ["Reveal", 20_550, true], ["CopyButton", 19_500, true]]) { test(`${name} alone, with splitting, loads only its own static graph (${limit} bytes at most)`, async () => { const { bytes, chunks, inputs } = await graph(name); assert.ok(bytes < limit, `${name}: ${bytes} bytes in ${chunks} chunks (limit ${limit})`); @@ -697,8 +707,9 @@ test("the imports plugin never rewrites a file that resolves another copy of Bas // version the same way (rail-tooltip.js). Measured with splitting: VersionLink 2,107, ReleaseIndex 31,035 (Base UI's accordion), ReleaseNotes 67,232 // (the accordion, the callout, the copy and text buttons; 173,798 with the popup up front); each limit is the measurement rounded up to the next 50. // ReleaseNotes measured 67,535 once #127 was merged in (DECISIONS 328's Button and TextButton changes, which its copy and text buttons carry). +// ReleaseNotes 67,650 (main's) to 68,250 in DECISIONS 336: Button's edge and done seat. // The repo review's press guard (Promise.allSettled in takeClick, in every button) merged in: ReleaseNotes 67,639, so 67,650. -for (const [name, limit] of [["VersionLink", 2_150], ["ReleaseIndex", 31_050], ["ReleaseNotes", 67_650]]) { +for (const [name, limit] of [["VersionLink", 2_150], ["ReleaseIndex", 31_050], ["ReleaseNotes", 68_250]]) { test(`${name} alone, with splitting, loads only its own static graph (${limit} bytes at most)`, async () => { const { bytes, chunks } = await graph(name); assert.ok(bytes < limit, `${name}: ${bytes} bytes in ${chunks} chunks (limit ${limit})`); diff --git a/packages/react/test/charts.test.mjs b/packages/react/test/charts.test.mjs index 6cc62680..27104ed6 100644 --- a/packages/react/test/charts.test.mjs +++ b/packages/react/test/charts.test.mjs @@ -539,14 +539,16 @@ describe("Chart missing data", () => { await page.close(); }); - test("the reason is also in the readout ('Not observed · why'), the day's name and the table, in the words 'Not observed'", async () => { + // DECISIONS 336, Q2 and the pixel review's finding 1: the legend says "Not observed" alone, and the date line says why. + test("the reason is in the date line ('… · why'), the day's name and the table; the readout's value says 'Not observed' alone", async () => { const { page } = await chartPage({ cfg: { chart: "sleep", data: "sleep" } }); const missingDay = await page.evaluate(() => window.D.sleep.series[1].values.findIndex((v) => v == null)); const days = await dayBoxes(page); await page.mouse.move(days[missingDay].x + days[missingDay].width / 2, days[missingDay].y + 20); await frames(page); const values = await valueTexts(page); - assert.ok(values.includes("Not observed · not worn, travel"), `the readout says why the day was not observed: ${values}`); + assert.ok(values.includes("Not observed") && !values.some((v) => v.includes("·")), `the legend says Not observed alone: ${values}`); + assert.match(await page.locator(".basalt-chart-date > span:not(.basalt-chart-reserve)").innerText(), / · not worn, travel$/, "the date line says why"); assert.equal(await page.locator('.basalt-chart-value [data-missing]').first().evaluate((el) => getComputedStyle(el).color), await token(page, "text-tertiary")); const sentence = await page.locator(".basalt-chart-day").nth(missingDay).getAttribute("aria-label"); assert.match(sentence, /Watch not observed, not worn, travel/); @@ -633,6 +635,29 @@ describe("Chart readout", () => { await page.close(); }); + // DECISIONS 336, section 7: the headline's unit keeps its x on every day, a missing day ("—") and a number that gains a digit included, and the gap from + // the value's seat to the unit is space-2. The legend's keys are held by the test above (0px on every box across days, a gap day included). + test("with the headline, the unit keeps its x on every day (a missing day and a number with more digits included), space-2 after the value's seat", async () => { + for (const chart of ["sleep", "train"]) { + const { page } = await chartPage({ cfg: { chart, data: chart === "sleep" ? "sleep" : "train", extra: { headline: true } } }); + const space2 = await tokenPx(page, "space-2"); + const days = await dayBoxes(page); + const read = () => page.evaluate(() => { const seat = document.querySelector(".basalt-chart-seat").getBoundingClientRect(); const unit = document.querySelector(".basalt-chart-unit").getBoundingClientRect(); const shown = document.querySelector(".basalt-chart-seat > :not(.basalt-chart-reserve)").textContent; return { x: unit.x, gap: unit.x - seat.right, shown }; }); + const rest = await read(); + assert.ok(Math.abs(rest.gap - space2) <= 0.5, `${chart}: the unit is ${rest.gap} after the seat`); + const seen = new Set(); + for (let i = 0; i < days.length; i++) { + await page.mouse.move(days[i].x + days[i].width / 2, days[i].y + 40); + await frames(page, 3); + const here = await read(); + seen.add(here.shown.replace(/\d/g, "9")); + assert.equal(here.x, rest.x, `${chart}: the unit moved on day ${i} (${here.shown})`); + } + assert.ok(seen.size >= 2, `${chart}: the days shown take more than one form: ${[...seen]}`); + await page.close(); + } + }); + test("each key is a 16px swatch, the name and its value; the plan's swatch is its stroke and a band's is its two edges", async () => { const { page } = await chartPage(); const sw = await page.locator(".basalt-chart-swatch").first().evaluate((el) => { const r = el.getBoundingClientRect(); return [r.width, r.height]; }); diff --git a/packages/react/test/commands.test.mjs b/packages/react/test/commands.test.mjs index e79e7641..0840c961 100644 --- a/packages/react/test/commands.test.mjs +++ b/packages/react/test/commands.test.mjs @@ -220,7 +220,8 @@ describe("the command list in the page", () => { await modal.page.close(); }); - test("the list holds its unfiltered height up to the popup cap, and filtering moves nothing below it (0px)", async () => { + // DECISIONS 336, Q6: the panel hugs its rows; on the open page the room under it is page, so what follows never moves. + test("the panel hugs its rows up to the popup cap, and filtering moves nothing below it (0px)", async () => { const { page } = await open(listFixture()); await ready(page); const probe = async () => ({ below: (await box(page.locator("#below"))).y, panel: (await box(page.locator(".basalt-command-page"))).h, body: (await box(page.locator(".basalt-command-body"))).h }); @@ -231,7 +232,9 @@ describe("the command list in the page", () => { for (const query of ["dup", "zzz", "a", ""]) { await page.fill(".basalt-command-input", query); await settle(page); - assert.deepEqual(await probe(), rest, `nothing moved for "${query}" (0px)`); + const now = await probe(); + assert.equal(now.below, rest.below, `nothing below moved for "${query}" (0px)`); + assert.ok(now.panel <= rest.panel + 0.5, `the panel is no taller than unfiltered for "${query}"`); } await page.close(); // a short list holds its own natural height, however far it is filtered diff --git a/packages/react/test/export-sizes.json b/packages/react/test/export-sizes.json index 44f07653..dd9dd295 100644 --- a/packages/react/test/export-sizes.json +++ b/packages/react/test/export-sizes.json @@ -25,7 +25,7 @@ "ArrowUpGlyph": 2867, "Avatar": 11505, "BackLink": 3844, - "BackToTop": 20769, + "BackToTop": 21367, "Badge": 556, "BadgePair": 411, "BigLinkList": 229, @@ -33,7 +33,7 @@ "Bones": 9174, "BrandSvg": 1084, "Breadcrumbs": 5584, - "Button": 17821, + "Button": 18418, "CONFIRM_MS": 31, "COPIED_MS": 35, "CSPProvider": 449, @@ -58,15 +58,15 @@ "ChoiceCardGroup": 294, "Clock": 2921, "CloseGlyph": 2836, - "CodeBlock": 23243, + "CodeBlock": 23914, "Columns": 265, "ColumnsItem": 257, - "Combobox": 164834, + "Combobox": 164914, "CommandBlock": 4923, - "CommandList": 33346, - "CommandMenu": 87877, - "Composer": 52407, - "CopyButton": 18764, + "CommandList": 34024, + "CommandMenu": 88484, + "Composer": 53062, + "CopyButton": 19361, "CopyGlyph": 2884, "Countdown": 3016, "CoverageStrip": 1570, @@ -78,19 +78,19 @@ "Dialog": 70793, "DialogActions": 208, "DialogClose": 69662, - "DialogContent": 76996, + "DialogContent": 77247, "DialogDescription": 69849, "DialogTitle": 69862, "DialogTrigger": 69841, - "DirectoryList": 20200, + "DirectoryList": 20799, "DirectoryRow": 5065, "DisclosureRow": 24902, "DotLine": 584, "DotSep": 337, "DownloadGlyph": 2853, - "Drawer": 18370, + "Drawer": 18980, "DrawerSection": 2043, - "DrawerTrigger": 17991, + "DrawerTrigger": 18588, "ENTRANCE_LATE_MS": 26, "EditGlyph": 2915, "Elapsed": 2591, @@ -115,7 +115,7 @@ "HistoryGlyph": 3004, "HomeGlyph": 2945, "Icon": 384, - "IconButton": 16632, + "IconButton": 16714, "InlineCode": 233, "InlineField": 25894, "InlineFields": 210, @@ -133,18 +133,18 @@ "LinkTab": 3764, "LinkTabs": 141595, "LinkTile": 4463, - "ListBand": 159029, + "ListBand": 159627, "Listbox": 3215, "ListboxGroup": 377, "ListboxOption": 4052, - "LivePreview": 46527, + "LivePreview": 47120, "LoadingShape": 11753, "LogFields": 414, "LogLine": 602, "LogSlots": 1588, "LogSummary": 993, - "LoopsToggle": 30590, - "LoopsToggleIcon": 18159, + "LoopsToggle": 30856, + "LoopsToggleIcon": 18242, "MarksRow": 886, "Mention": 342, "MentionPicker": 14028, @@ -167,16 +167,16 @@ "MoreGlyph": 2809, "MoreNavGlyph": 2918, "MorphIcon": 6713, - "MultiSelect": 150795, + "MultiSelect": 151412, "Nav": 4774, "NavGroup": 492, "NavItem": 110669, "NoticeBar": 788, - "NotificationCenter": 152312, - "NotificationCentre": 152322, - "NotificationList": 32917, + "NotificationCenter": 152672, + "NotificationCentre": 152682, + "NotificationList": 33540, "NotificationsGlyph": 3066, - "NumberField": 44038, + "NumberField": 44118, "NumberTicker": 2587, "OpenList": 2020, "OpenListGroup": 448, @@ -186,14 +186,14 @@ "PageSection": 227, "PageSections": 246, "PageWait": 2453, - "Pagination": 21964, + "Pagination": 22562, "PairedArt": 462, "PaneLayout": 1307, "PanelList": 444, "PanelRow": 4642, "PauseGlyph": 2819, - "PeriodStepper": 17923, - "PhaseChart": 51250, + "PeriodStepper": 18006, + "PhaseChart": 51411, "PlanGlyph": 2966, "PlayGlyph": 2838, "PlusGlyph": 2825, @@ -219,9 +219,9 @@ "ReflowItem": 470, "Refreshing": 1911, "ReleaseIndex": 30827, - "ReleaseNotes": 67296, + "ReleaseNotes": 67906, "Reserve": 441, - "Reveal": 19798, + "Reveal": 20397, "RoutesGlyph": 3009, "RunAnnouncer": 448, "RunStage": 21697, @@ -233,14 +233,14 @@ "STATUS_MESSAGE_MS": 26, "SandboxesGlyph": 2963, "SchemaDiagram": 101212, - "SearchDialog": 89118, - "SearchField": 18406, + "SearchDialog": 89496, + "SearchField": 18488, "SearchGlyph": 3181, "SearchMatch": 248, "SearchPassage": 784, "SearchPassages": 375, "SearchResult": 722, - "SearchResults": 342, + "SearchResults": 358, "SearchTrigger": 3907, "SectionActions": 226, "SectionIntro": 224, @@ -261,16 +261,16 @@ "SheetContent": 75289, "SheetDescription": 69849, "SheetFooter": 234, - "SheetHeader": 79425, + "SheetHeader": 79516, "SheetTitle": 69862, "SheetTrigger": 69841, "ShortcutList": 10032, "SingleKeysSwitch": 17082, "SiteBrand": 1302, "SiteFooter": 15010, - "SiteHeader": 180045, + "SiteHeader": 180664, "SiteLockupDefs": 694, - "SiteMenu": 172367, + "SiteMenu": 172986, "SiteNav": 5102, "SiteNavLink": 411, "SiteNavList": 5112, @@ -280,7 +280,7 @@ "SkipLink": 1014, "Slide": 397, "Slider": 38283, - "SocialLink": 38530, + "SocialLink": 38626, "SocialLinks": 434, "SourceStamp": 3895, "SourceStateWords": 13683, @@ -294,9 +294,9 @@ "StageRail": 1200, "Stat": 2226, "Stats": 314, - "StatusBar": 6813, + "StatusBar": 7225, "StatusLine": 504, - "Stepper": 27209, + "Stepper": 27802, "Stream": 283, "StreamArrivedWord": 470, "StreamBlock": 2788, @@ -316,7 +316,7 @@ "Tab": 40001, "TabBar": 3501, "TabBarItem": 1859, - "TabBarMore": 92288, + "TabBarMore": 92379, "Table": 8279, "TableBody": 143, "TableCall": 391, @@ -333,19 +333,19 @@ "TabsList": 38792, "TabsPanel": 36621, "TabsPanels": 331, - "Terminal": 41598, + "Terminal": 42441, "Text": 922, "TextButton": 11393, "TextMorph": 4681, "Textarea": 27069, "ThemeChoiceControl": 4794, - "ThemeMenu": 206433, - "TimeChart": 48002, + "ThemeMenu": 206507, + "TimeChart": 48163, "ToastProvider": 92989, "Toolbar": 22915, - "ToolbarButton": 32121, + "ToolbarButton": 32718, "ToolbarGroup": 21467, - "ToolbarIconButton": 30934, + "ToolbarIconButton": 31012, "ToolbarInput": 43513, "ToolbarLink": 26715, "ToolbarSeparator": 21471, @@ -353,7 +353,7 @@ "TooltipProvider": 97618, "TrashGlyph": 2906, "TravelSpinner": 2100, - "Tray": 91412, + "Tray": 91503, "TrayRow": 502, "TrendsGlyph": 2924, "VersionLink": 1973, @@ -427,11 +427,11 @@ "useWaitMark": 303 }, "package": { - "bytes": 946282, - "gzip": 315272 + "bytes": 948167, + "gzip": 316004 }, "styles": { - "bytes": 460192, - "gzip": 59109 + "bytes": 468713, + "gzip": 60543 } } diff --git a/packages/react/test/figures.test.mjs b/packages/react/test/figures.test.mjs index f0b528e0..a9b35cf8 100644 --- a/packages/react/test/figures.test.mjs +++ b/packages/react/test/figures.test.mjs @@ -647,7 +647,9 @@ describe("Terminal", () => { await stubClipboard(page); await page.getByRole("button", { name: "Copy commands" }).click(); assert.deepEqual(await page.evaluate(() => window.copied), [COMMANDS]); - assert.equal(await page.getByRole("button", { name: "Copied" }).count(), 1, "the name changes to Copied"); + // DECISIONS 336, Q5: the words hold and the glyph says it; the status line says "Copied". + assert.equal(await page.getByRole("button", { name: "Copy commands" }).first().getAttribute("data-done"), "", "the glyph is the check"); + assert.equal(await page.locator(".basalt-terminal [role=status]").first().innerText(), "Copied"); await page.close(); }); diff --git a/packages/react/test/overlays-search.test.mjs b/packages/react/test/overlays-search.test.mjs index f8c7cc12..60b69228 100644 --- a/packages/react/test/overlays-search.test.mjs +++ b/packages/react/test/overlays-search.test.mjs @@ -447,7 +447,8 @@ for (const theme of ["dark", "light"]) { await page.close(); }); - test("nothing moves as you type: the field, the count and the results area keep their place and size with no results, two, and a full result", async () => { + // DECISIONS 336, Q3: the top is held where a full result has it and the box ends under what it shows; the field and the count never move. + test("nothing moves as you type: the field and the count keep their place, and the box ends under its rows, up to a full result", async () => { const { page } = await open(SEARCH(""), { theme, viewport: { width: 1440, height: 900 } }); await settle(page); const measure = async () => ({ @@ -457,11 +458,13 @@ for (const theme of ["dark", "light"]) { results: await box(page.locator(".basalt-search-results")), }); const rest = await measure(); - assert.equal(rest.results.height, 14 + 3 * 60 + 5 * 72 + 48, "the height of a full result: padding, 3 logo rows, 5 picture rows, a See all row"); for (const query of ["none", "one", "whey", "many"]) { await page.locator(".basalt-search-input").fill(query); + await settle(page); const now = await measure(); - assert.deepEqual(now, rest, `after typing "${query}": 0px of movement or resize`); + assert.deepEqual([now.dialog.y, now.form.y, now.count.y], [rest.dialog.y, rest.form.y, rest.count.y], `after typing "${query}": the top, the field and the count hold`); + assert.ok(now.results.height <= 14 + 3 * 60 + 5 * 72 + 48, "never taller than a full result"); + assert.ok(Math.abs(now.dialog.y + now.dialog.height - (now.results.y + now.results.height) - 1) <= 0.5, "the box ends under the results (its rim)"); } await page.close(); }); diff --git a/packages/react/test/reserved-room-rules.test.mjs b/packages/react/test/reserved-room-rules.test.mjs new file mode 100644 index 00000000..d3c4154b --- /dev/null +++ b/packages/react/test/reserved-room-rules.test.mjs @@ -0,0 +1,410 @@ +// Reserved room across every component (DECISIONS 328, 329, 336): what can be checked without a browser. The stylesheets, read as text: no physical +// sides, the edge rule written once with the same expressions in React and in the skill, every head that hangs a control declaring its room, no +// hand-written hang left, the side insets read by direction. The markup, by renderToStaticMarkup against the built package: where `edge` lands, the +// filter's head order, the composer's row, the count's seat, the command list's room. The legend's reserved forms, and the copy's glyph seat. +// Node only: nothing here starts a browser. +import assert from "node:assert/strict"; +import fs from "node:fs"; +import path from "node:path"; +import { describe, test } from "node:test"; +import { fileURLToPath } from "node:url"; +import * as React from "react"; +import { createElement as h } from "react"; +import { renderToStaticMarkup } from "react-dom/server"; + +import * as B from "../dist/index.js"; +import { legendForms } from "../dist/chart.js"; +import { COPY_REST, copyDoneIcon, copyStatus, nextCopyState } from "../dist/copy-result.js"; +import { CheckGlyph } from "../dist/glyphs/check.js"; +import { CloseGlyph } from "../dist/glyphs/close.js"; + +const here = path.dirname(fileURLToPath(import.meta.url)); +const root = path.resolve(here, "../../.."); +const read = (file) => fs.readFileSync(path.join(root, file), "utf8"); +/** CSS with its comments blanked out (kept as spaces, so line numbers hold). */ +const code = (css) => css.replace(/\/\*[\s\S]*?\*\//g, (m) => m.replace(/[^\n]/g, " ")); +const REACT = code(read("packages/react/src/styles/components.css")); +const SKILL_DIR = "tools/html-skill/src/modules"; +const SKILL_FILES = ["tools/html-skill/src/core.css", ...fs.readdirSync(path.join(root, SKILL_DIR)).filter((f) => f.endsWith(".css")).map((f) => `${SKILL_DIR}/${f}`)]; +const SKILL = Object.fromEntries(SKILL_FILES.map((f) => [f, code(read(f))])); +const SKILL_ALL = Object.values(SKILL).join("\n"); + +/** A value's parts at the top level (spaces inside a function stay). */ +function parts(value) { + const out = []; + let depth = 0; + let now = ""; + for (const ch of value.trim()) { + if (ch === "(") depth += 1; + if (ch === ")") depth -= 1; + if (/\s/.test(ch) && depth === 0) { + if (now) out.push(now); + now = ""; + } else now += ch; + } + if (now) out.push(now); + return out; +} + +/** Every rule as { selector, body }, nested at-rules flattened (the selector is the innermost one). */ +function rules(css) { + const out = []; + const re = /([^{}]+)\{([^{}]*)\}/g; + let m; + while ((m = re.exec(css))) out.push({ selector: m[1].trim().replace(/\s+/g, " "), body: m[2] }); + return out; +} +const decl = (body, property) => { + const m = new RegExp(`(?:^|[;\\s])${property.replace(/[-[\]]/g, "\\$&")}\\s*:\\s*([^;]+)`).exec(body); + return m ? m[1].trim().replace(/\s+/g, " ") : null; +}; +const ruleFor = (css, selector) => rules(css).filter((r) => r.selector === selector); + +describe("No physical sides", () => { + const SHEETS = [["components.css", REACT], ...Object.entries(SKILL)]; + test("no padding or margin shorthand has unequal inline sides, in React and in every skill stylesheet", () => { + const found = []; + for (const [name, css] of SHEETS) { + for (const m of css.matchAll(/(?<![-\w])(padding|margin)\s*:\s*([^;{}]+);/g)) { + const p = parts(m[2].replace(/!important/, "")); + if (p.length === 4 && p[1] !== p[3]) found.push(`${name}: ${m[1]}: ${m[2].trim()}`); + } + } + assert.deepEqual(found, []); + }); + test("no padding-left, padding-right, margin-left or margin-right", () => { + const found = []; + for (const [name, css] of SHEETS) for (const m of css.matchAll(/(?<![-\w])(?:padding|margin)-(?:left|right)\s*:/g)) found.push(`${name}: ${m[0]}`); + assert.deepEqual(found, []); + }); + test("R-11's ten rules are written with logical sides", () => { + for (const selector of [".basalt-chip", ".basalt-switch-row", ".basalt-option-chip", ".basalt-select-trigger", ".basalt-toast-content", ".basalt-notifications-head", ".basalt-sheet-head", ".basalt-search-form", ".basalt-tray-row"]) { + const base = ruleFor(REACT, selector)[0]; + assert.ok(base, `${selector} exists`); + assert.equal(decl(base.body, "padding"), null, `${selector} has no padding shorthand`); + assert.ok(decl(base.body, "padding-inline"), `${selector} writes padding-inline`); + } + const copy = ruleFor(REACT, ".basalt-code-title .basalt-code-copy")[0]; + assert.equal(decl(copy.body, "margin-inline"), "0"); + }); + test("the untitled block's corner copy is placed by inset-inline-end, not right", () => { + const corner = ruleFor(REACT, ".basalt-code-copy")[0]; + assert.ok(decl(corner.body, "inset-inline-end")); + assert.equal(decl(corner.body, "right"), null); + }); +}); + +describe("The edge rule is one rule", () => { + const reactEdge = (tail) => ruleFor(REACT, `.basalt-button[data-variant="ghost"]${tail}`); + const skillEnd = ':is([data-edge="end"], :is(.panel-head, .section-head) > :last-child)'; + const skillAny = ":is([data-edge], :is(.panel-head, .section-head) > :last-child)"; + const skillEdge = (tail) => ruleFor(SKILL["tools/html-skill/src/core.css"], `.btn[data-variant="ghost"]${tail}`); + const pairs = [ + ["[data-edge]", skillAny, "--_inset"], + ["[data-icon-only][data-edge]", `[data-icon-only]${skillAny}`, "--_inset"], + ['[data-edge="start"]', '[data-edge="start"]', "--_hang"], + ['[data-edge="start"]', '[data-edge="start"]', "margin-inline-start"], + ['[data-edge="end"]', skillEnd, "--_hang"], + ['[data-edge="end"]', skillEnd, "margin-inline-end"], + ['[data-edge="start"]:focus-visible', '[data-edge="start"]:focus-visible', "outline-offset"], + ['[data-edge="end"]:focus-visible', `${skillEnd}:focus-visible`, "outline-offset"], + ["[data-edge]:not([data-icon-only])", `${skillAny}:not([data-icon-only])`, "--_miss"], + ["[data-edge]:not([data-icon-only])", `${skillAny}:not([data-icon-only])`, "min-width"], + ["[data-edge]:not([data-icon-only])::before", `${skillAny}:not([data-icon-only])::before`, "inset-block"], + ['[data-edge="end"]:not([data-icon-only])::before', `${skillEnd}:not([data-icon-only])::before`, "--_out"], + ['[data-edge="end"]:not([data-icon-only])::before', `${skillEnd}:not([data-icon-only])::before`, "inset-inline"], + ['[data-edge="start"]:not([data-icon-only])::before', '[data-edge="start"]:not([data-icon-only])::before', "--_out"], + ['[data-edge="start"]:not([data-icon-only])::before', '[data-edge="start"]:not([data-icon-only])::before', "inset-inline"], + ]; + for (const [react, skill, property] of pairs) { + test(`${property} on ${react} is the same expression on both sides`, () => { + const a = reactEdge(react).map((r) => decl(r.body, property)).filter(Boolean); + const b = skillEdge(skill).map((r) => decl(r.body, property)).filter(Boolean); + assert.equal(a.length, 1, `React writes ${property} once on ${react}`); + assert.equal(b.length, 1, `the skill writes ${property} once on ${skill}`); + assert.equal(b[0], a[0]); + }); + } + test("the hang is min(inset, room), and the room falls back to nothing", () => { + assert.equal(decl(reactEdge('[data-edge="end"]')[0].body, "--_hang"), "min(var(--_inset), var(--basalt-edge-room-end, var(--basalt-edge-room, var(--basalt-space-0))))"); + assert.equal(decl(reactEdge("[data-icon-only][data-edge]")[0].body, "--_inset"), "calc((var(--_drawn) - var(--_glyph)) / 2)"); + }); + test("--_drawn is the button's own size, raised to the tap size in the touch block, on both sides", () => { + assert.equal(decl(ruleFor(REACT, ".basalt-button").find((r) => decl(r.body, "--_drawn") === "var(--_h)").body, "--_glyph"), "var(--basalt-size-icon-sm)"); + assert.ok(ruleFor(REACT, ".basalt-button").some((r) => decl(r.body, "--_drawn") === "max(var(--_h), var(--basalt-size-tap-min))")); + const core = SKILL["tools/html-skill/src/core.css"]; + assert.ok(ruleFor(core, ".btn").some((r) => decl(r.body, "--_drawn") === "var(--_h)")); + assert.ok(ruleFor(core, ".btn").some((r) => decl(r.body, "--_drawn") === "max(var(--_h), var(--basalt-size-tap-min))")); + }); + test("a glyph drawn at another size sets --_glyph in the same rule", () => { + assert.equal(decl(ruleFor(REACT, '.basalt-button[data-size="xl"]').find((r) => decl(r.body, "--_glyph")).body, "--_glyph"), "var(--basalt-size-icon-md)"); + assert.equal(decl(ruleFor(SKILL[`${SKILL_DIR}/links.css`], '.links[data-size="20"] .btn')[0].body, "--_glyph"), "var(--basalt-size-icon-md)"); + }); + + const ROOMS = { + react: [ + [".basalt-sheet-head", "--basalt-edge-room-end"], + [".basalt-search-form", "--basalt-edge-room"], + [":is(.basalt-site-header, .basalt-app-header, .basalt-site-menu-band)", "--basalt-edge-room-end"], + [".basalt-status-bar", "--basalt-edge-room"], + [".basalt-code-title", "--basalt-edge-room"], + [".basalt-tabbar-sheet-head", "--basalt-edge-room-end"], + [".basalt-notifications > :is(.basalt-notifications-head, .basalt-notifications-foot)", "--basalt-edge-room"], + [".basalt-filter-foot", "--basalt-edge-room"], + [".basalt-card-content > .basalt-social-links[data-icon-only]", "--basalt-edge-room"], + ], + skill: [ + [".sheet-head", "--basalt-edge-room-end"], + [".search-form", "--basalt-edge-room"], + [":is(.topbar, .app-header)", "--basalt-edge-room-end"], + [".sheet-band", "--basalt-edge-room-end"], + [".code-head", "--basalt-edge-room"], + [".tab-bar-sheet-head", "--basalt-edge-room-end"], + [".notifications-head", "--basalt-edge-room"], + [".notifications-foot", "--basalt-edge-room"], + [".filter-foot", "--basalt-edge-room"], + [".panel-head", "--basalt-edge-room"], + [".page > .section > .section-head", "--basalt-edge-room"], + [".card > .links[data-icon-only]", "--basalt-edge-room"], + ], + }; + for (const [selector, property] of ROOMS.react) { + test(`React's ${selector} declares ${property}`, () => { + assert.ok(ruleFor(REACT, selector).some((r) => decl(r.body, property)), `${selector} { ${property}: … }`); + }); + } + for (const [selector, property] of ROOMS.skill) { + test(`the skill's ${selector} declares ${property}`, () => { + assert.ok(ruleFor(SKILL_ALL, selector).some((r) => decl(r.body, property)), `${selector} { ${property}: … }`); + }); + } + test("every rule that says a room says all three forms, the ones it does not use as initial, so an inner head never inherits an outer box's side (code review 3)", () => { + const FORMS = ["--basalt-edge-room", "--basalt-edge-room-start", "--basalt-edge-room-end"]; + const found = []; + for (const [name, css] of [["components.css", REACT], ["skill", SKILL_ALL]]) { + for (const r of rules(css)) { + const said = FORMS.map((f) => decl(r.body, f)); + if (said.every((v) => v === null || v === "initial")) continue; + if (said.some((v) => v === null)) found.push(`${name}: ${r.selector}`); + } + } + assert.deepEqual(found, []); + }); + test("a head that hangs a control has the same padding on both sides, apart from its insets", () => { + for (const selector of [".basalt-search-form", ".basalt-filter-foot", ".basalt-notifications-head", ".basalt-notifications-foot"]) { + const r = ruleFor(REACT, selector)[0]; + assert.equal(parts(decl(r.body, "padding-inline")).length, 1, `${selector}: one inline padding`); + } + assert.equal(decl(ruleFor(REACT, ".basalt-sheet-head")[0].body, "padding-inline"), "max(var(--basalt-space-5), var(--_inset-start)) max(var(--basalt-space-5), var(--_inset-end))"); + }); + + // Hand-written hangs on a button that are not the edge rule's. The two named here are not the decision's: the drawer's Back (start) and the + // release's copy (#128, after the decision was measured). They are reported for a ruling and left as they were. + const NOT_RULED = new Set([".basalt-drawer-back"]); + test("no component rule hangs a button by a negative inline margin of its own (the terminal's four are gone)", () => { + const found = []; + for (const r of rules(REACT)) { + const named = r.selector.replace(/:not\([^)]*\)/g, ""); + // The classes a component puts on a Button count too (the open items' ruling: the drawer's Back and a release's Copy link were written on their own classes). + if (!/basalt-button|basalt-terminal-copy|basalt-code-copy|basalt-sheet-close|basalt-search-close|basalt-drawer-back|basalt-release-copy/.test(named) || /\[data-edge/.test(r.selector)) continue; + if (NOT_RULED.has(r.selector)) continue; + for (const p of ["margin-inline", "margin-inline-end", "margin-inline-start", "margin"]) { + const v = decl(r.body, p); + if (v && /calc\(\s*-1|\/\s*-2|-var\(/.test(v)) found.push(`${r.selector} { ${p}: ${v} }`); + } + } + assert.deepEqual(found, []); + for (const gone of [".basalt-terminal-actions:has(.basalt-button)", ".basalt-terminal-head:has(.basalt-terminal-time) .basalt-terminal-copy"]) { + assert.ok(ruleFor(REACT, gone).every((r) => !decl(r.body, "margin-inline-end")), `${gone} writes no margin`); + } + assert.ok(!/basalt-terminal-copy-compact[^{]*\{[^}]*margin-inline-end/.test(REACT), "the compact copy has no margin of its own"); + assert.ok(ruleFor(SKILL[`${SKILL_DIR}/terminal.css`], ".terminal-actions:has(.btn)").length === 0, "the skill's terminal hang is gone"); + }); + + test("the side insets are read by direction: left and right only in the root's own mapping", () => { + const reads = (css, name) => (css.match(new RegExp(`var\\(${name}\\)`, "g")) ?? []).length; + assert.equal(reads(REACT, "--_inset-left"), 2, "--_inset-left: the mapping and its right-to-left swap"); + assert.equal(reads(REACT, "--_inset-right"), 2, "--_inset-right: the mapping and its right-to-left swap"); + assert.equal(reads(REACT, "--_pad-left") + reads(REACT, "--_pad-right"), 0, "no --_pad-left or --_pad-right"); + assert.equal(reads(SKILL_ALL, "--bh-inset-left"), 2); + assert.equal(reads(SKILL_ALL, "--bh-inset-right"), 2); + assert.equal(reads(SKILL_ALL, "--bh-pad-left") + reads(SKILL_ALL, "--bh-pad-right"), 0); + assert.ok(/:root:dir\(rtl\)\s*\{\s*--_inset-start:\s*var\(--_inset-right\);\s*--_inset-end:\s*var\(--_inset-left\);/.test(REACT)); + assert.ok(!/env\(safe-area-inset-(?:left|right)/.test(REACT.replace(/--_inset-(?:left|right):\s*env\(safe-area-inset-(?:left|right)[^;]*;/g, "").replace(/\.basalt-toast-viewport\s*\{[^}]*\}/, "")), "every other read of a side inset goes through start and end"); + }); +}); + +describe("Markup", () => { + const html = (element) => renderToStaticMarkup(element); + test("MultiSelect's chips head is label, Clear, count, and the count describes the group", () => { + const out = html(h(B.MultiSelect, { label: "Status", options: [{ value: "a", label: "A" }, { value: "b", label: "B" }] })); + const head = out.match(/<div class="basalt-filter-head">([\s\S]*?)<\/div>/)[1]; + const at = (needle) => head.indexOf(needle); + assert.ok(at("basalt-filter-label") < at("basalt-filter-clear") && at("basalt-filter-clear") < at("basalt-filter-count"), "label, Clear, count"); + const countId = head.match(/id="([^"]+)" class="basalt-filter-count"/)[1]; + assert.ok(out.includes(`aria-describedby="${countId}"`), "the count is the group's description"); + }); + test("Composer renders its status inside the actions row, and the live region with no status", () => { + const none = html(h(B.Composer, { label: "Message", onSend() {} })); + assert.match(none, /<div class="basalt-composer-actions"><div class="basalt-composer-start"><p class="basalt-composer-status" aria-live="polite"><\/p><\/div>/); + const typing = html(h(B.Composer, { label: "Message", onSend() {}, status: "Ada is typing", actions: h(B.IconButton, { icon: B.PlusGlyph ?? (() => null), label: "Attach" }) })); + assert.match(typing, /<div class="basalt-composer-start"><div class="basalt-composer-extra">[\s\S]*?<\/div><p class="basalt-composer-status" aria-live="polite">Ada is typing<\/p><\/div>/); + }); + test("Button with count renders the seat and the pill", () => { + assert.match(html(h(B.Button, { count: 3 }, "Cart")), /<span class="basalt-button-count" aria-hidden="true"><span>3<\/span><\/span>/); + }); + test("Button edge on a non-ghost variant renders no data-edge and warns once", () => { + const warn = console.warn; + const said = []; + console.warn = (message) => said.push(message); + try { + const out = html(h(B.Button, { variant: "secondary", edge: "end" }, "Go")); + html(h(B.Button, { variant: "primary", edge: "start" }, "Go")); + assert.ok(!out.includes("data-edge")); + assert.equal(said.filter((m) => String(m).includes("`edge`")).length, 1); + } finally { + console.warn = warn; + } + assert.match(html(h(B.Button, { variant: "ghost", edge: "end" }, "Go")), /data-edge="end"/); + }); + test("CodeBlock's titled copy, Terminal's copies, SheetHeader's Close, SiteHeader's Menu and SocialLinks' first mark carry data-edge", () => { + assert.match(html(h(B.CodeBlock, { code: "x", title: "config" })), /data-edge="end"[^>]*class="basalt-button"|class="basalt-code-copy"><button[^>]*data-edge="end"/); + assert.ok(!html(h(B.CodeBlock, { code: "x" })).includes("data-edge"), "the untitled corner copy is not hung"); + const terminal = html(h(B.Terminal, { title: "Deploy", lines: [{ kind: "command", text: "ls" }] })); + assert.match(terminal, /data-edge="end" class="basalt-button basalt-terminal-copy"/); + assert.match(terminal, /data-edge="end" class="basalt-button basalt-terminal-copy-compact"/); + assert.match(html(h(B.Sheet, { open: true }, h(B.SheetHeader, { closeLabel: "Close" }, "Cart"))), /data-edge="end" class="basalt-button basalt-sheet-close"/); + assert.match(html(h(B.SiteHeader, { brand: "Orbit", links: [{ href: "/", label: "Home" }] })), /data-edge="end" class="basalt-dialog-trigger basalt-button basalt-site-menu-trigger"/); + const social = html(h(B.SocialLinks, { iconOnly: true, "aria-label": "Elsewhere" }, h(B.SocialLink, { service: "github", href: "#a" }, "GitHub"), h(B.SocialLink, { service: "github", href: "#b" }, "Mirror"))); + assert.equal((social.match(/data-edge="start"/g) ?? []).length, 2, "every mark carries the edge"); + const fragment = html(h(B.SocialLinks, { iconOnly: true, "aria-label": "Elsewhere" }, h(React.Fragment, null, h(B.SocialLink, { service: "github", href: "#a" }, "GitHub"), h(B.SocialLink, { service: "x", href: "#b" }, "X")))); + assert.equal((fragment.match(/<li class="basalt-social-item">/g) ?? []).length, 2, "a fragment's links are items of the row"); + assert.ok(ruleFor(REACT, '.basalt-social-links[data-icon-only] > .basalt-social-item:not(:first-child)').some((r) => decl(r.body, "--basalt-edge-room-start") === "initial" && decl(r.body, "--basalt-edge-room") === "initial"), "only the first rendered item has the room"); + }); + test("NotificationCenter's bell takes edge, and the skill's generated bell takes it from an option or its host", () => { + assert.match(html(h(B.NotificationCenter, { entries: [], edge: "end" })), /data-edge="end"[^>]*class="basalt-button basalt-popover-trigger basalt-notifications-trigger"|class="basalt-button basalt-popover-trigger basalt-notifications-trigger"[^>]*data-edge="end"|data-edge="end"/); + assert.match(read(`${SKILL_DIR}/notifications.js`), /_\.pick\(o\.edge \|\| host\.getAttribute\('data-edge'\), \['start', 'end'\], ''\)/); + }); + test("the popups that cannot render on a server hang their controls in source: the search's Close, the notification popup, the checklist foot, the More sheet", () => { + const src = (file) => read(`packages/react/src/${file}`); + assert.match(src("search.tsx"), /label=\{closeLabel\} edge="end" className="basalt-search-close"/); + const notifications = src("notifications.tsx"); + assert.match(notifications, /<MarkAllRead unread=\{unread\} onMarkAllRead=\{onMarkAllRead\} edge="end" \/>/); + assert.match(notifications, /<ClearAll count=\{entries.length\} onClearAll=\{onClearAll\} edge="start" \/>/); + assert.match(notifications, /data-size="sm" data-edge="end" href=\{viewAllHref\}/); + assert.match(src("filter.tsx"), /clear: clearAt\("end"\)/); + assert.match(src("tab-bar.tsx"), /label=\{`Close \$\{label.toLowerCase\(\)\}`\} edge="end"/); + }); + test("StatusBar hangs a ghost first in start (or in sources with no start) and last in end, in both layouts' markup", () => { + const ghost = (words) => h(B.Button, { variant: "ghost", size: "sm" }, words); + const both = html(h(B.StatusBar, { start: ghost("run 4f2a"), sources: ghost("2 sources"), end: ghost("Theme") })); + assert.deepEqual(both.match(/data-edge="\w+"/g), ['data-edge="start"', 'data-edge="end"']); + const noSources = html(h(B.StatusBar, { start: ghost("run 4f2a"), end: ghost("Theme") })); + assert.deepEqual(noSources.match(/data-edge="\w+"/g), ['data-edge="start"', 'data-edge="end"'], "the markup is the same; under 720 the stylesheet gives end no room"); + assert.ok(/\.basalt-status-bar:not\(:has\(> \.basalt-status-bar-sources\)\) > \.basalt-status-bar-end \{ --basalt-edge-room: initial; --basalt-edge-room-end: initial; \}/.test(REACT)); + const sourcesFirst = html(h(B.StatusBar, { sources: ghost("2 sources") })); + assert.match(sourcesFirst, /data-edge="start"/); + const icon = html(h(B.StatusBar, { end: h(B.IconButton, { icon: B.SearchGlyph, label: "Search" }) })); + assert.match(icon, /data-edge="end"/, "an IconButton's default ghost is hung"); + const inFragment = html(h(B.StatusBar, { start: h(React.Fragment, null, ghost("run"), ghost("open")), end: h(React.Fragment, null, ghost("A"), ghost("Theme")) })); + assert.deepEqual(inFragment.match(/data-edge="\w+"/g), ['data-edge="start"', 'data-edge="end"'], "a fragment's first and last are the slot's"); + assert.match(inFragment, /data-edge="start"[^>]*>[\s\S]*?run/); + const drawn = html(h(B.StatusBar, { start: h(B.Button, { variant: "secondary", size: "sm" }, "run") })); + assert.ok(!drawn.includes("data-edge"), "a drawn button sits on the line with its edge"); + }); + test("CommandList holds room only on the open page: a level-1 panel with reserve", () => { + const groups = [{ label: "Run", commands: [{ id: "a", label: "Deploy" }] }]; + assert.match(html(h(B.CommandList, { label: "Console", groups })), /class="basalt-command-host" data-reserve=""/); + assert.ok(!html(h(B.CommandList, { label: "Console", groups, reserve: false })).includes("data-reserve")); + assert.ok(!html(h(B.Card, null, h(B.CardContent, null, h(B.CommandList, { label: "Console", groups })))).includes("data-reserve"), "inside a card (level 2) it holds no room"); + }); +}); + +describe("The legend's forms", () => { + const text = (v) => `${v} min`; + test("a series that can be missing reserves 'Not observed' and never a reason", () => { + const forms = legendForms([12, null, 140], 3, text); + assert.ok(forms.includes("Not observed")); + assert.ok(forms.every((f) => !f.includes("·")), "no form carries a reason"); + assert.deepEqual(forms, ["00 min", "000 min", "Not observed"]); + }); + test("a series with every day observed does not reserve 'Not observed'", () => { + assert.ok(!legendForms([1, 2, 3], 3, text).includes("Not observed")); + }); +}); + +describe("The copy", () => { + test("Terminal's words form keeps its words and draws its glyph through the same seat as the icon-only form", () => { + const out = renderToStaticMarkup(h(B.Terminal, { title: "Deploy", lines: [{ kind: "command", text: "ls" }] })); + const words = out.match(/<button[^>]*basalt-terminal-copy"[^>]*>([\s\S]*?)<\/button>/)[1]; + const compact = out.match(/<button[^>]*basalt-terminal-copy-compact"[^>]*>([\s\S]*?)<\/button>/)[1]; + assert.match(words, /class="basalt-button-swap"/, "the words form has the done seat"); + assert.match(compact, /class="basalt-button-swap"/, "the icon-only form has the same seat"); + assert.match(words, /Copy commands/); + assert.ok(!words.includes("Copied"), "no 'Copied' in the button: the words hold"); + }); + test("CopyButton of words alone is unchanged: both words in one Reserve cell", () => { + const out = renderToStaticMarkup(h(B.CopyButton, { text: "x" }, "Copy address")); + assert.match(out, /class="basalt-reserve basalt-copy-words"/); + }); + test("the skill's copy timers read the confirm token, and the glyph form keeps its words", () => { + const copy = read(`${SKILL_DIR}/copy.js`); + assert.ok(!/\b1600\b/.test(copy), "no hand-written 1600"); + assert.equal((copy.match(/%duration-confirm%/g) ?? []).length, 2); + assert.ok(!/'Copy failed' \+ '<\/span>'|'<span>' \+ \(ok \? 'Copied'/.test(copy), "the words are not replaced"); + const terminal = read(`${SKILL_DIR}/terminal.js`); + assert.ok(!terminal.includes("swap('Copy commands'"), "the terminal's copy words are not a swap cell"); + assert.match(terminal, /'Copy failed'/); + }); +}); + +describe("The open items' ruling (DECISIONS 336): parts with no padding of their own, and the refused icon-only copy", () => { + test("Drawer's Back and a release's Copy link take edge, and neither writes a margin of its own", () => { + assert.match(renderToStaticMarkup(h(B.Drawer, { label: "Record", onBack() {} }, "Body")), /data-edge="start"[^>]*class="basalt-button basalt-drawer-back"/); + assert.match(read("packages/react/src/release-notes.tsx"), /<CopyButton variant="ghost" size="sm" edge="end"/); + assert.match(read("tools/changelog/skill-body.mjs"), /class="btn release-copy" data-variant="ghost" data-size="sm" data-edge="end"/); + assert.equal(decl(ruleFor(REACT, ".basalt-drawer-back")[0].body, "margin-inline-start"), null); + assert.equal(decl(ruleFor(REACT, ".basalt-release-head > .basalt-release-copy")[0].body, "margin-inline-end"), null); + assert.ok(decl(ruleFor(REACT, ".basalt-release-head > .basalt-release-copy")[0].body, "margin-block"), "the head's height stays"); + assert.equal(decl(ruleFor(SKILL_ALL, ".release-head > .release-copy")[0].body, "margin-inline-end"), null); + }); + test("the boxes say their room to their direct children only, and the composer says none", () => { + const shell = ruleFor(REACT, ".basalt-app-main > :is(.basalt-drawer, .basalt-release-notes, .basalt-pane-layout), .basalt-app-foot > .basalt-composer")[0]; + assert.equal(decl(shell.body, "--basalt-edge-room-start"), "calc(var(--_pad-start) - var(--_inset-start))"); + assert.equal(decl(shell.body, "--basalt-edge-room-end"), "calc(var(--_pad-end) - var(--_inset-end))"); + assert.equal(decl(ruleFor(REACT, ".basalt-card-content > .basalt-composer")[0].body, "--basalt-edge-room"), "var(--basalt-space-4)"); + assert.equal(decl(ruleFor(SKILL_ALL, ":is(.page, .page > .section) > .release-notes")[0].body, "--basalt-edge-room"), "var(--basalt-gutter)"); + // PaneLayout's page column passes the page's room on, and beside the pane says the gap to it at the end (the pixel review's finding 2). + assert.ok(ruleFor(REACT, ".basalt-pane-page > :is(.basalt-release-notes, .basalt-drawer)").some((r) => decl(r.body, "--basalt-edge-room-end") === "var(--basalt-size-gutter)")); + assert.ok(ruleFor(SKILL_ALL, ".page .pane-page > .release-notes").some((r) => decl(r.body, "--basalt-edge-room-end") === "var(--basalt-size-gutter)")); + assert.ok(!rules(REACT).some((r) => /^\.basalt-composer\b/.test(r.selector) && /--basalt-edge-room/.test(r.body)), "the composer says no room of its own"); + assert.match(read("packages/react/src/composer.tsx"), /takes `edge="start"`/, "actions' doc says the first ghost action is hung"); + }); + test("a refused copy shows the close and says Copy failed; as its time ends the close is still the done glyph; a copy that worked shows the check", () => { + const refused = nextCopyState(COPY_REST, "failed"); + assert.equal(refused.shown, "failed"); + assert.equal(copyDoneIcon(refused), CloseGlyph); + assert.equal(copyStatus(refused), "Copy failed"); + const after = nextCopyState(refused, "reset"); + assert.equal(after.shown, null, "the done state ends"); + assert.equal(copyDoneIcon(after), CloseGlyph, "the close is what leaves, never a check"); + assert.equal(copyStatus(after), ""); + const worked = nextCopyState(after, "copied"); + assert.equal(copyDoneIcon(worked), CheckGlyph); + assert.equal(copyStatus(worked), "Copied"); + }); + test("Terminal's two copies and CodeBlock's copy go through the one copy state and the done seat", () => { + for (const file of ["terminal.tsx", "feedback.tsx"]) assert.match(read(`packages/react/src/${file}`), /useCopyResult\(\)/); + const terminal = read("packages/react/src/terminal.tsx"); + assert.equal((terminal.match(/done=\{copyResult\.done\} doneIcon=\{copyResult\.doneIcon\}/g) ?? []).length, 2, "both of Terminal's copies"); + assert.match(read("packages/react/src/feedback.tsx"), /done=\{copyResult\.done\} doneIcon=\{copyResult\.doneIcon\} label="Copy code"/); + assert.match(renderToStaticMarkup(h(B.CodeBlock, { code: "x", title: "t" })), /class="basalt-button-swap"/); + }); + test("the skill: the compact copy shows the close after a refused write and every copy says Copy failed", () => { + const terminal = read(`${SKILL_DIR}/terminal.js`); + assert.match(terminal, /glyphTo\(ok \? 1 : 2\)/); + assert.match(terminal, /compact\.setAttribute\('aria-label', ok \? 'Copied' : 'Copy failed'\)/); + const copy = read(`${SKILL_DIR}/copy.js`); + assert.ok(!copy.includes("Could not copy")); + }); +}); diff --git a/packages/react/test/reserved-room.test.mjs b/packages/react/test/reserved-room.test.mjs new file mode 100644 index 00000000..7b3ebba4 --- /dev/null +++ b/packages/react/test/reserved-room.test.mjs @@ -0,0 +1,739 @@ +// Reserved room across every component (DECISIONS 328, 329, 336), in Chromium against the built package with the real stylesheet: the line a hung +// control's glyph or words sit on, its ring, the room it may use, its targets, the toast's hit areas, the selection column, and that nothing moves +// where a seat was decided. At 1440 on a fine pointer and at 390 on touch, in both themes, left to right and right to left. +// WRITTEN, NOT RUN: browser tests are paused (DECISIONS 330). The node-only half is reserved-room-rules.test.mjs. +import assert from "node:assert/strict"; +import { after, before, describe, test } from "node:test"; + +import { HARBOR } from "./release-fixture.mjs"; +import { fixturePage, launch, settle } from "./support.mjs"; + +let browser; +before(async () => { browser = await launch(); }); +after(async () => { await browser?.close(); }); + +const THEMES = ["dark", "light"]; +const DIRS = ["ltr", "rtl"]; +const DESKTOP = { viewport: { width: 1440, height: 900 } }; +const PHONE = { viewport: { width: 390, height: 844 }, hasTouch: true, isMobile: true }; +const TABLET = { viewport: { width: 800, height: 900 }, hasTouch: true, isMobile: true }; +const WIDTHS = [["1440", DESKTOP], ["390 on touch", PHONE]]; +const SHELL = (body, dir = "ltr", prelude = "") => `${prelude} document.documentElement.dir = "${dir}"; document.body.style.margin = "0"; document.body.style.background = "var(--basalt-surface-page)"; document.body.style.color = "var(--basalt-text-primary)"; createRoot(document.getElementById("root")).render(<>${body}</>);`; +// In the page: a control's hit box (its ::before where it draws one, else its box), read in the page's pixels whatever transform the control has. +const HIT = `window.__hit = (el) => { + const r = el.getBoundingClientRect(); + const s = el.offsetWidth ? r.width / el.offsetWidth : 1; + const b = getComputedStyle(el, "::before"); + if (b.content === "none" || b.position !== "absolute") return { left: r.left, top: r.top, right: r.right, bottom: r.bottom, width: r.width, height: r.height }; + const n = (v) => (v === "auto" ? 0 : parseFloat(v)) * s; + const box = { left: r.left + n(b.left), top: r.top + n(b.top), right: r.right - n(b.right), bottom: r.bottom - n(b.bottom) }; + return { ...box, width: box.right - box.left, height: box.bottom - box.top }; +}; +window.__visible = (root, sel) => [...root.querySelectorAll(sel)].find((el) => el.getClientRects().length > 0 && getComputedStyle(el).visibility !== "hidden" && getComputedStyle(el).display !== "none");`; +// A page that emulates a phone (isMobile) lays out at 980 until it has a viewport meta: it is added, then the page settles, so 390 is 390. +const open = async (body, options, theme, dir = "ltr", prelude = "") => { + const { page, errors } = await fixturePage(browser, SHELL(body, dir, prelude), { theme, colorScheme: theme, ...options }); + if (options.isMobile) await page.evaluate(() => { const meta = document.createElement("meta"); meta.name = "viewport"; meta.content = "width=device-width, initial-scale=1"; document.head.append(meta); }); + await page.addScriptTag({ content: HIT }); + await settle(page); + page.errors = errors; + assert.equal(await page.evaluate(() => innerWidth), options.viewport.width, "the layout viewport is the window's width"); + return page; +}; +const token = (page, name) => page.evaluate((n) => getComputedStyle(document.documentElement).getPropertyValue(`--basalt-${n}`).trim(), name); +const ms = (value) => (value.endsWith("ms") ? parseFloat(value) : parseFloat(value) * 1000); + +/** + * The line: where the head's words start from its inner start edge, and where the control's glyph (icon-only) or words end from its inner end edge + * (inner edges are the padding box: the rim is in neither), mirrored right to left. Also the control's box to the inner edge, its hang (the margin + * on its side), and its focused ring: offset, style and width. The control is the first match that is drawn (a hidden form of it is skipped). + */ +const line = (page, head, text, control, side = "end") => page.evaluate(([head, text, control, side]) => { + const h = window.__visible(document, head); + const c = window.__visible(h, control) ?? window.__visible(document, control); + const t = text ? window.__visible(h, text) : null; + const hs = getComputedStyle(h); + const hr = h.getBoundingClientRect(); + const rtl = hs.direction === "rtl"; + const innerStart = rtl ? hr.right - parseFloat(hs.borderRightWidth) : hr.left + parseFloat(hs.borderLeftWidth); + const innerEnd = rtl ? hr.left + parseFloat(hs.borderLeftWidth) : hr.right - parseFloat(hs.borderRightWidth); + const glyph = c.querySelector("svg"); + const range = document.createRange(); + const words = c.querySelector(".basalt-button-label") ?? c; + range.selectNodeContents(words); + const shownRect = glyph && !c.textContent.trim() ? glyph.getBoundingClientRect() : range.getBoundingClientRect(); + const cr = c.getBoundingClientRect(); + const fromStart = (x) => Math.abs(x - innerStart); + const fromEnd = (x) => Math.abs(innerEnd - x); + let textStart = null; + if (t) { const r = document.createRange(); r.selectNodeContents(t); const tr = r.getBoundingClientRect(); textStart = fromStart(rtl ? tr.right : tr.left); } + const shown = side === "end" ? fromEnd(rtl ? shownRect.left : shownRect.right) : fromStart(rtl ? shownRect.right : shownRect.left); + const clear = side === "end" ? fromEnd(rtl ? cr.left : cr.right) : fromStart(rtl ? cr.right : cr.left); + const cs = getComputedStyle(c); + const hang = -parseFloat(side === "end" ? cs.marginInlineEnd : cs.marginInlineStart); + c.focus({ focusVisible: true }); + const fs = getComputedStyle(c); + return { + textStart, shown, clear, hang, focused: document.activeElement === c, + ring: parseFloat(fs.outlineOffset), outline: [fs.outlineStyle, parseFloat(fs.outlineWidth)], + box: [cr.left, cr.top, cr.right, cr.bottom], head: [hr.left, hr.top, hr.right, hr.bottom], + pad: parseFloat(side === "end" ? (rtl ? hs.paddingLeft : hs.paddingRight) : (rtl ? hs.paddingRight : hs.paddingLeft)), + }; +}, [head, text, control, side]); +/** The focused ring is drawn (2px, solid) at the offset wanted, and its four sides are inside the head's box. */ +const ringIsWhole = (m, want) => { + assert.ok(m.focused, "the control takes focus"); + assert.equal(m.ring, want); + assert.deepEqual(m.outline, ["solid", 2], "the ring is drawn"); + const reach = m.ring + 2; + assert.ok(m.box[0] - reach >= m.head[0] - 0.5 && m.box[2] + reach <= m.head[2] + 0.5, "the ring's start and end are inside the head"); + assert.ok(m.box[1] - reach >= m.head[1] - 0.5 && m.box[3] + reach <= m.head[3] + 0.5, "the ring's top and bottom are inside the head"); +}; + +// Section 1's table: [name, fixture, head, the head's words, the control, side, at 1440 { shown, ring }, at 390 { shown, ring }]. +const SITES = [ + ["sheet head", `<B.Sheet open><B.SheetContent side="right"><B.SheetHeader closeLabel="Close cart"><B.SheetTitle>Your cart</B.SheetTitle></B.SheetHeader><B.SheetBody><p>Lines</p></B.SheetBody></B.SheetContent></B.Sheet>`, ".basalt-sheet-head", ".basalt-dialog-title", ".basalt-sheet-close", "end", { shown: 20, ring: 2 }, { shown: 20, ring: 2 }], + ["search dialog's Close", `<B.SearchDialog open onOpenChange={() => {}} title="Search" label="Search products" query="" onQueryChange={() => {}} count="Type to search"><B.SearchResults /></B.SearchDialog>`, ".basalt-search-form", null, ".basalt-search-close", "end", { shown: 16, ring: -2 }, { shown: 16, ring: -2 }], + ["app header's last ghost icon", `<B.AppHeader title="Runs" actions={<B.IconButton icon={B.SearchGlyph} label="Search" edge="end" />} />`, ".basalt-app-header", ".basalt-app-title", ".basalt-bar-actions > .basalt-button", "end", { shown: 24, ring: 2 }, { shown: 16, ring: -2 }], + ["status bar's last ghost button", `<B.StatusBar start={<B.Button variant="ghost" size="sm">run 4f2a</B.Button>} sources={<B.Button variant="ghost" size="sm">2 sources</B.Button>} end={<B.Button variant="ghost" size="sm">Theme</B.Button>} />`, ".basalt-status-bar", null, ".basalt-status-bar-end .basalt-button", "end", { shown: 24, ring: 2 }, { shown: 16, ring: 2 }], + ["status bar's first ghost button", `<B.StatusBar start={<B.Button variant="ghost" size="sm">run 4f2a</B.Button>} sources={<B.Button variant="ghost" size="sm">2 sources</B.Button>} end={<B.Button variant="ghost" size="sm">Theme</B.Button>} />`, ".basalt-status-bar", null, ".basalt-status-bar-start .basalt-button", "start", { shown: 24, ring: 2 }, { shown: 16, ring: 2 }], + ["code block's titled copy", `<div style={{ padding: 24 }}><B.CodeBlock title="config.json" code={'{ "a": 1 }'} /></div>`, ".basalt-code-title", ".basalt-code-title > span", ".basalt-code-copy .basalt-button", "end", { shown: 16, ring: 2 }, { shown: 16, ring: -2 }], + ["terminal's copy", `<div style={{ padding: 24 }}><B.Terminal title="Deploy" lines={[{ kind: "command", text: "npm run build" }]} /></div>`, ".basalt-terminal-head", ".basalt-terminal-title", ".basalt-terminal-actions .basalt-button:not([hidden])[data-edge]", "end", { shown: 16, ring: 2 }, { shown: 16, ring: -2 }], + ["icon links in a card", `<div style={{ padding: 24, width: 320 }}><B.Card><B.CardContent><p style={{ margin: 0 }}>Ada</p><B.SocialLinks iconOnly aria-label="Elsewhere"><B.SocialLink service="github" href="#a">GitHub</B.SocialLink><B.SocialLink service="github" href="#b">Mirror</B.SocialLink></B.SocialLinks></B.CardContent></B.Card></div>`, ".basalt-card-content", "p", ".basalt-social-links .basalt-button", "start", { shown: 16, ring: 2 }, { shown: 16, ring: -2 }], +]; + + +describe("The line and the ring", () => { + for (const [name, fixture, head, text, control, side, wide, narrow] of SITES) { + for (const [width, options] of WIDTHS) { + for (const dir of DIRS) { + for (const theme of THEMES) { + test(`${name}, ${width}, ${dir}, ${theme}: what it shows is on the head's line, its ring drawn at the room's offset and whole inside the head`, async () => { + const page = await open(fixture, options, theme, dir); + const m = await line(page, head, text, control, side); + const want = width === "1440" ? wide : narrow; + assert.ok(Math.abs(m.shown - want.shown) <= 0.5, `shown ${m.shown}, want ${want.shown}`); + if (m.textStart !== null) assert.ok(Math.abs(m.textStart - m.shown) <= 0.5, `the words start at ${m.textStart}, the control ends at ${m.shown}`); + ringIsWhole(m, want.ring); + assert.deepEqual(page.errors, []); + await page.close(); + }); + } + } + } + } + // The popups' heads and feet (section 1's More sheet, notification centre and checklist rows): each opened, then measured as the heads above. + const POPUPS = [ + ["the More sheet's Close", PHONE, `<B.TabBar><B.TabBarItem href="#h" icon={B.HomeGlyph}>Home</B.TabBarItem><B.TabBarMore><B.NavItem href="#s" icon={B.SettingsGlyph}>Settings</B.NavItem></B.TabBarMore></B.TabBar>`, ".basalt-tabbar-more", ".basalt-tabbar-sheet-head", ".basalt-tabbar-sheet-head > :first-child", ".basalt-button", "end", { shown: 24, ring: 2 }], + ["the notification centre's Mark all as read", DESKTOP, `<div style={{ display: "flex", justifyContent: "flex-end", padding: 16 }}><B.NotificationCenter defaultOpen entries={[{ id: "1", title: "Deploy finished", time: "2m ago", unread: true }]} onMarkAllRead={() => {}} onClearAll={() => {}} onViewAll={() => {}} /></div>`, null, ".basalt-notifications-head", ".basalt-notifications-title", ".basalt-notifications-mark", "end", { shown: 16, ring: 2 }], + ["the notification centre's Clear all", DESKTOP, `<div style={{ display: "flex", justifyContent: "flex-end", padding: 16 }}><B.NotificationCenter defaultOpen entries={[{ id: "1", title: "Deploy finished", time: "2m ago" }]} onClearAll={() => {}} onViewAll={() => {}} /></div>`, null, ".basalt-notifications-foot", null, ".basalt-notifications-clear", "start", { shown: 16, ring: 2 }], + ["the notification centre's View all", DESKTOP, `<div style={{ display: "flex", justifyContent: "flex-end", padding: 16 }}><B.NotificationCenter defaultOpen entries={[{ id: "1", title: "Deploy finished", time: "2m ago" }]} onClearAll={() => {}} onViewAll={() => {}} /></div>`, null, ".basalt-notifications-foot", null, ".basalt-button:last-child", "end", { shown: 16, ring: 2 }], + ["the checklist's Clear", DESKTOP, `<div style={{ padding: 16 }}><B.MultiSelect label="Region" options={["Alpha", "Beta", "Gamma", "Delta", "Epsilon", "Zeta", "Eta", "Theta"].map((l) => ({ value: l, label: l }))} /></div>`, ".basalt-filter-trigger", ".basalt-filter-foot", ".basalt-filter-count", ".basalt-filter-clear", "end", { shown: 16, ring: 2 }], + ]; + for (const [name, options, fixture, opener, head, text, control, side, want] of POPUPS) { + for (const dir of DIRS) { + for (const theme of THEMES) { + test(`${name}, ${options === PHONE ? "390 on touch" : "1440"}, ${dir}, ${theme}: on the line, its ring whole`, async () => { + const page = await open(fixture, options, theme, dir); + if (opener) { await page.locator(opener).first().click(); await settle(page); } + await page.waitForSelector(head); + const m = await line(page, head, text, control, side); + assert.ok(Math.abs(m.shown - want.shown) <= 0.5, `shown ${m.shown}, want ${want.shown}`); + if (m.textStart !== null && side === "end") assert.ok(Math.abs(m.textStart - want.shown) <= 0.5, `the head's words start at ${m.textStart}`); + ringIsWhole(m, want.ring); + assert.deepEqual(page.errors, []); + await page.close(); + }); + } + } + } + test("a control with edge in a head that declares no room has no margin and the ordinary +2", async () => { + const page = await open(`<div id="h" style={{ display: "flex", padding: 16 }}><span style={{ flex: 1 }}>Head</span><B.IconButton id="c" icon={B.SearchGlyph} label="Search" edge="end" /></div>`, DESKTOP, "dark"); + const m = await line(page, "#h", null, "#c", "end"); + assert.equal(m.hang, 0); + assert.ok(Math.abs(m.clear - 16) <= 0.5, "its box stands on the head's padding"); + ringIsWhole(m, 2); + await page.close(); + }); + test("at 800 on a coarse pointer: a 44px icon button at a 24 gutter hangs 14 with its glyph on the line; an xs 'Go' is its word's width, its word on the line, and its hit area stops at its neighbour", async () => { + const page = await open(`<B.StatusBar start={<><B.Button variant="ghost" size="xs" id="go">Go</B.Button><B.Button variant="ghost" size="sm" id="next">Next</B.Button></>} end={<B.IconButton icon={B.SearchGlyph} label="Search" id="i" />} />`, TABLET, "dark"); + const go = await line(page, ".basalt-status-bar", null, "#go", "start"); + assert.ok(Math.abs(go.shown - 24) <= 0.5, `the word starts ${go.shown} from the inner edge`); + const icon = await line(page, ".basalt-status-bar", null, "#i", "end"); + assert.ok(Math.abs(icon.hang - 14) <= 0.5, `the icon hangs ${icon.hang}`); + assert.ok(Math.abs(icon.shown - 24) <= 0.5, `the glyph ends ${icon.shown} from the inner edge`); + const boxes = await page.evaluate(() => { const g = document.querySelector("#go"); const n = document.querySelector("#next"); return { w: g.getBoundingClientRect().width, hit: window.__hit(g), next: n.getBoundingClientRect().toJSON(), nextHit: window.__hit(n) }; }); + assert.ok(boxes.w < 44, `the box is as wide as its word: ${boxes.w}`); + assert.ok(boxes.hit.width >= 44 && boxes.hit.height >= 44, `Go's hit area is ${boxes.hit.width} by ${boxes.hit.height}`); + assert.ok(boxes.hit.right <= boxes.nextHit.left + 0.5, `Go's hit area ends at ${boxes.hit.right}, Next's starts at ${boxes.nextHit.left}`); + // Every pixel along the row from Go's hit start to Next's end answers to one of the two, Go first, and never Go inside Next's box. + const y = (boxes.next.top + boxes.next.bottom) / 2; + const owners = await page.evaluate(([x0, x1, y]) => { let out = ""; for (let x = Math.ceil(x0); x < x1; x += 1) { const el = document.elementFromPoint(x + 0.5, y); out += el?.closest("#go") ? "g" : el?.closest("#next") ? "n" : "-"; } return out; }, [boxes.hit.left, boxes.next.right, y]); + assert.match(owners, /^g+-*n+$/, owners); + assert.equal(owners.slice(-Math.floor(boxes.next.right - boxes.next.left)).includes("g"), false, "Go never answers inside Next's box"); + await page.close(); + }); + test("a 360px terminal at 1440 on a fine pointer hangs its compact copy by 6", async () => { + const page = await open(`<div style={{ width: 360, padding: 24 }}><B.Terminal title="Deploy" lines={[{ kind: "command", text: "ls" }]} /></div>`, DESKTOP, "dark"); + const m = await line(page, ".basalt-terminal-head", ".basalt-terminal-title", ".basalt-terminal-copy-compact", "end"); + assert.ok(Math.abs(m.shown - 16) <= 0.5); + assert.ok(Math.abs(m.hang - 6) <= 0.5, `it hangs ${m.hang}`); + ringIsWhole(m, 2); + await page.close(); + }); +}); + +describe("The room", () => { + for (const dir of DIRS) { + test(`a row of icon links with nothing round it, at the viewport's start, ${dir}: nothing hangs and the first link is wholly on screen`, async () => { + for (const options of [DESKTOP, PHONE]) { + const page = await open(`<B.SocialLinks iconOnly aria-label="Elsewhere"><B.SocialLink service="github" href="#a">GitHub</B.SocialLink></B.SocialLinks>`, options, "dark", dir); + const r = await page.evaluate(() => { const el = document.querySelector(".basalt-social-links .basalt-button"); const cs = getComputedStyle(el); return { ...el.getBoundingClientRect().toJSON(), margins: [cs.marginInlineStart, cs.marginInlineEnd] }; }); + assert.deepEqual(r.margins, ["0px", "0px"]); + assert.ok(r.left >= 0 && r.right <= options.viewport.width, `${r.left} to ${r.right}`); + await page.close(); + } + }); + } + const BARS = [ + ["the site bar", `<B.SiteHeader brand="Orbit" links={[{ href: "/", label: "Home" }]} />`, ".basalt-site-menu-trigger"], + ["the app header", `<B.AppHeader title="Runs" actions={<B.IconButton icon={B.SearchGlyph} label="Search" edge="end" />} />`, ".basalt-bar-actions > .basalt-button"], + ["the status bar", `<B.StatusBar start={<B.Button variant="ghost" size="sm">run</B.Button>} sources={<B.Button variant="ghost" size="sm">2 sources</B.Button>} end={<B.Button variant="ghost" size="sm">Theme</B.Button>} />`, ".basalt-status-bar-end .basalt-button"], + ["a sheet's head", `<B.Sheet open><B.SheetContent side="right"><B.SheetHeader closeLabel="Close"><B.SheetTitle>Cart</B.SheetTitle></B.SheetHeader></B.SheetContent></B.Sheet>`, ".basalt-sheet-close"], + ]; + // Wholly outside the inset: the drawn box and the hit area (a short word's ::before), both. + const outside = (r, dir) => (dir === "ltr" ? r.right <= 390 - 34 + 0.5 : r.left >= 34 - 0.5); + for (const [name, fixture, control] of BARS) { + for (const dir of DIRS) { + test(`${name}, 390, ${dir}, a 34px inset on the line's end side: the last control is drawn and wholly outside the inset, its hit area too`, async () => { + const page = await open(fixture, PHONE, "dark", dir); + // The safe area is simulated on the root's own reads (env() is 0 in a test browser). + await page.addStyleTag({ content: `:root { --_inset-${dir === "rtl" ? "left" : "right"}: 34px !important; }` }); + await settle(page); + const r = await page.evaluate((sel) => { const el = window.__visible(document, sel); return el ? { box: el.getBoundingClientRect().toJSON(), hit: window.__hit(el) } : null; }, control); + assert.ok(r && r.box.width > 0, "the control is drawn at 390"); + assert.ok(outside(r.box, dir), `the box: ${JSON.stringify(r.box)}`); + assert.ok(outside(r.hit, dir), `the hit area: ${JSON.stringify(r.hit)}`); + await page.close(); + }); + } + } + for (const dir of DIRS) { + test(`the open site menu's band, ${dir}: Close is wholly outside a 34px inset on the end side`, async () => { + const page = await open(`<B.SiteHeader brand="Orbit" links={[{ href: "/", label: "Home" }]} />`, PHONE, "dark", dir); + await page.addStyleTag({ content: `:root { --_inset-${dir === "rtl" ? "left" : "right"}: 34px !important; }` }); + await page.locator(".basalt-site-menu-trigger").click(); + await settle(page); + const r = await page.evaluate(() => { const el = window.__visible(document, ".basalt-site-menu-close"); return { box: el.getBoundingClientRect().toJSON(), hit: window.__hit(el) }; }); + assert.ok(outside(r.box, dir) && outside(r.hit, dir), JSON.stringify(r)); + await page.close(); + }); + } +}); + +describe("Targets", () => { + const LINKS = (n) => Array.from({ length: n }, (_, i) => `<B.SocialLink key={${i}} service="github" href="#${i}">Link ${i}</B.SocialLink>`).join(""); + for (const [form, inner] of [["as children", LINKS(8)], ["in a fragment", `<>${LINKS(8)}</>`]]) { + test(`two rows of icon links ${form} keep their full 44 each, no two meet, and none crosses the card's rim on any side`, async () => { + const page = await open(`<div style={{ width: 200, padding: 24 }}><B.Card><B.CardContent><B.SocialLinks iconOnly aria-label="Elsewhere">${inner}</B.SocialLinks></B.CardContent></B.Card></div>`, PHONE, "dark"); + const boxes = await page.locator(".basalt-social-links .basalt-button").evaluateAll((els) => els.map((el) => window.__hit(el))); + assert.equal(boxes.length, 8); + assert.ok(new Set(boxes.map((b) => Math.round(b.top))).size >= 2, "the links wrap onto two rows or more"); + for (const b of boxes) assert.ok(b.width >= 44 - 0.5 && b.height >= 44 - 0.5, `${b.width} by ${b.height}`); + for (let i = 0; i < boxes.length; i++) for (let j = i + 1; j < boxes.length; j++) { + const a = boxes[i]; const b = boxes[j]; + assert.ok(a.right <= b.left + 0.5 || b.right <= a.left + 0.5 || a.bottom <= b.top + 0.5 || b.bottom <= a.top + 0.5, `${i} and ${j} overlap`); + } + const card = await page.evaluate(() => { const el = document.querySelector(".basalt-card"); const r = el.getBoundingClientRect(); const cs = getComputedStyle(el); return { left: r.left + parseFloat(cs.borderLeftWidth), top: r.top + parseFloat(cs.borderTopWidth), right: r.right - parseFloat(cs.borderRightWidth), bottom: r.bottom - parseFloat(cs.borderBottomWidth) }; }); + for (const b of boxes) assert.ok(b.left >= card.left - 0.5 && b.right <= card.right + 0.5 && b.top >= card.top - 0.5 && b.bottom <= card.bottom + 0.5, `inside the card's rim: ${JSON.stringify(b)}`); + await page.close(); + }); + } +}); + +describe("The toast's targets", () => { + const TOAST = (title = "Saved", action = true) => `<B.ToastProvider>{React.createElement(function Show() { const t = B.useToast(); React.useEffect(() => { t.show({ title: ${JSON.stringify(title)}, ${action ? `action: { label: "Go", onClick() {} }, ` : ""}timeout: 0 }); }, []); return null; })}</B.ToastProvider>`; + const targets = (page) => page.evaluate(() => { + const toast = document.querySelector(".basalt-toast").getBoundingClientRect().toJSON(); + return { toast, action: window.__hit(document.querySelector(".basalt-toast-action")), dismiss: window.__hit(document.querySelector(".basalt-toast-close")) }; + }); + const apart = (a, b) => a.right <= b.left + 0.5 || b.right <= a.left + 0.5 || a.bottom <= b.top + 0.5 || b.bottom <= a.top + 0.5; + const inside = (t, toast) => t.left >= toast.left - 0.5 && t.right <= toast.right + 0.5 && t.top >= toast.top - 0.5 && t.bottom <= toast.bottom + 0.5; + for (const theme of THEMES) { + test(`${theme}, 390 on touch, at rest: Dismiss and a 'Go' action are 46 by 46 hit areas, inside the toast, apart, and the row answers action, toast, Dismiss across their whole boxes`, async () => { + const page = await open(TOAST(), PHONE, theme); + await page.waitForSelector(".basalt-toast-close"); + await settle(page); + const t = await targets(page); + assert.deepEqual([Math.round(t.dismiss.width), Math.round(t.dismiss.height)], [46, 46]); + assert.ok(t.action.width >= 46 - 0.5 && t.action.height >= 46 - 0.5, `${t.action.width} by ${t.action.height}`); + for (const box of [t.dismiss, t.action]) assert.ok(inside(box, t.toast), "inside the toast"); + assert.ok(apart(t.action, t.dismiss), "apart"); + // From the action's hit start to Dismiss's hit end, through Dismiss's centre: the action for its whole hit width, then the toast, then Dismiss for its whole. + const y = (t.dismiss.top + t.dismiss.bottom) / 2; + const owners = await page.evaluate(([from, to, y]) => { let out = ""; for (let x = Math.ceil(from); x < Math.floor(to); x += 1) { const el = document.elementFromPoint(x + 0.5, y); out += el?.closest(".basalt-toast-close") ? "d" : el?.closest(".basalt-toast-action") ? "a" : el?.closest(".basalt-toast") ? "t" : "-"; } return out; }, [t.action.left, t.dismiss.right, y]); + const m = /^(a+)(t+)(d+)$/.exec(owners); + assert.ok(m, `the action, then the toast, then Dismiss: ${owners}`); + assert.ok(Math.abs(m[1].length - Math.floor(t.action.width)) <= 1, `the action answers across ${m[1].length} of its ${t.action.width}`); + assert.ok(Math.abs(m[3].length - Math.floor(t.dismiss.width)) <= 1, `Dismiss answers across ${m[3].length} of its ${t.dismiss.width}`); + await page.close(); + }); + for (const held of [".basalt-toast-action", ".basalt-toast-close"]) { + test(`${theme}, 390 on touch, ${held} held down: both hit areas at least 44, inside the toast and apart, after duration-fast and in the frame after it is let go`, async () => { + // A toast of its own for each press: Dismiss closes on pointer-up, and so does the action. + const page = await open(TOAST(), PHONE, theme); + await page.waitForSelector(".basalt-toast-close"); + await settle(page); + const b = await page.locator(held).boundingBox(); + await page.mouse.move(b.x + b.width / 2, b.y + b.height / 2); + await page.mouse.down(); + await page.waitForTimeout(ms(await token(page, "duration-fast")) + 20); + const reads = [await targets(page)]; + await page.mouse.up(); + reads.push(await page.evaluate(() => new Promise((done) => requestAnimationFrame(() => { + const toast = document.querySelector(".basalt-toast"); + const a = document.querySelector(".basalt-toast-action"); + const d = document.querySelector(".basalt-toast-close"); + done(toast && a && d ? { toast: toast.getBoundingClientRect().toJSON(), action: window.__hit(a), dismiss: window.__hit(d) } : null); + })))); + for (const t of reads.filter(Boolean)) { + for (const box of [t.dismiss, t.action]) { + assert.ok(box.width >= 44 - 0.5 && box.height >= 44 - 0.5, `held: ${box.width} by ${box.height}`); + assert.ok(inside(box, t.toast), "inside the toast"); + } + assert.ok(apart(t.action, t.dismiss), "apart"); + } + await page.close(); + }); + } + } + test("the toast is one height on a fine and a coarse pointer: a title alone 50, two lines 65, one with an action; Dismiss's ring is whole inside it", async () => { + const FORMS = [["a title alone", TOAST("Saved", false), 50], ["two lines", `<B.ToastProvider>{React.createElement(function Show() { const t = B.useToast(); React.useEffect(() => { t.show({ title: "Draft moved", description: "It is in Archive now.", timeout: 0 }); }, []); return null; })}</B.ToastProvider>`, 65], ["with an action", TOAST(), null]]; + for (const [form, fixture, want] of FORMS) { + const heights = []; + for (const options of [{ viewport: { width: 1024, height: 800 } }, { viewport: { width: 1024, height: 800 }, hasTouch: true, isMobile: true }]) { + const page = await open(fixture, options, "dark"); + await page.waitForSelector(".basalt-toast-close"); + await settle(page); + heights.push((await page.locator(".basalt-toast").boundingBox()).height); + const m = await line(page, ".basalt-toast", null, ".basalt-toast-close", "end"); + assert.ok(m.focused && m.outline[0] === "solid", `${form}: Dismiss's ring is drawn`); + const reach = m.ring + 2; + assert.ok(m.box[0] - reach >= m.head[0] - 0.5 && m.box[2] + reach <= m.head[2] + 0.5 && m.box[1] - reach >= m.head[1] - 0.5 && m.box[3] + reach <= m.head[3] + 0.5, `${form}: Dismiss's ring is inside the toast`); + await page.close(); + } + assert.equal(heights[0], heights[1], `${form}: one height on both pointers (${heights})`); + if (want !== null) assert.ok(Math.abs(heights[0] - want) <= 0.5, `${form}: ${heights[0]}, want ${want}`); + } + }); +}); + +describe("The selection column", () => { + const TABLE = (width) => `<B.TableContainer label="Runs"><B.Table columns={[{ width: "${width}" }, {}]} minWidth={320} pinned={2}><B.TableHeader><B.TableRow><B.TableHead><B.Checkbox aria-label="Select all" /></B.TableHead><B.TableHead onSortChange={() => {}}>Run</B.TableHead></B.TableRow></B.TableHeader><B.TableBody><B.TableRow><B.TableCell><B.Checkbox aria-label="Select run-1" /></B.TableCell><B.TableCell><a href="#r">run-1</a></B.TableCell></B.TableRow></B.TableBody></B.Table></B.TableContainer>`; + // Who answers at every pixel across a row, from the column's start to 12 past its end: c the checkbox, s the name's sort button, n the name cell. + // Sampled at whole pixels (the polish ruling, item 3): Chromium answers a point for the pixel that starts at it, so a sample half a pixel in lies + // across two cells at the column's last pixel. The column's start is asserted whole, so x0 + x is the start of each of its pixels. + const owners = (page, x0, y) => { + assert.equal(x0, Math.round(x0), `the column starts on a whole pixel: ${x0}`); + return page.evaluate(([x0, y]) => { let out = ""; for (let x = 0; x < 56; x += 1) { const el = document.elementFromPoint(x0 + x, y); out += el?.closest("[role=checkbox]") ? "c" : el?.closest("th button, .basalt-table-sort, th[aria-sort]") ? "s" : el?.closest("td, th") ? "n" : "-"; } return out; }, [x0, y]); + }; + test("on touch the column is 44, given 32 or 40: the checkbox answers across exactly its 44 and the name from the next pixel, in the header and down a body row", async () => { + for (const width of ["var(--basalt-select-column)", "max(40px, var(--basalt-select-column))"]) { + const page = await open(TABLE(width), PHONE, "dark"); + const r = await page.locator("thead th").first().boundingBox(); + assert.ok(Math.abs(r.width - 44) <= 0.5, `${width}: the column is ${r.width}`); + const head = await owners(page, r.x, r.y + r.height / 2); + assert.equal(head, "c".repeat(44) + "s".repeat(12), `the header row: ${head}`); + const cell = await page.locator("tbody td").first().boundingBox(); + const body = await owners(page, cell.x, cell.y + cell.height / 2); + assert.equal(body.slice(0, 44), "c".repeat(44), `the body row's checkbox: ${body}`); + assert.equal(body.slice(44).includes("c"), false, `nothing past the column is the checkbox: ${body}`); + await page.close(); + } + }); + test("on a fine pointer the column is the width given, the checkbox centred in it, and the next header starts where the column ends", async () => { + for (const [width, px] of [["var(--basalt-select-column)", 32], ["40px", 40]]) { + const page = await open(TABLE(width), DESKTOP, "light"); + const cell = await page.locator("tbody td").first().boundingBox(); + const box = await page.locator("tbody td [role=checkbox]").first().boundingBox(); + const heads = await page.locator("thead th").evaluateAll((els) => els.map((el) => el.getBoundingClientRect().x)); + assert.ok(Math.abs(cell.width - px) <= 0.5, `the column is ${cell.width}`); + assert.ok(Math.abs((box.x - cell.x) - (cell.x + cell.width - box.x - box.width)) <= 0.5, "centred"); + assert.ok(Math.abs(heads[1] - heads[0] - px) <= 0.5, `the next header starts ${heads[1] - heads[0]} in`); + await page.close(); + } + }); +}); + +// The polish ruling, item 1: the box is centred in its column only as far as the cell's own line, never more than space-4 from the column's start; a +// column a word heads is sized for its word, and its boxes start on the cell's line, under the word. +describe("The selection box keeps to the cell's line", () => { + const PICK = (width) => `<B.TableContainer label="Runs"><B.Table columns={[{ width: ${width} }, { width: 120 }, {}]} minWidth={360}><B.TableHeader><B.TableRow><B.TableHead>Pick</B.TableHead><B.TableHead>Run</B.TableHead><B.TableHead>Name</B.TableHead></B.TableRow></B.TableHeader><B.TableBody><B.TableRow><B.TableCell><B.Checkbox aria-label="Select run-1" /></B.TableCell><B.TableRowHead>run-1</B.TableRowHead><B.TableCell>Alpha</B.TableCell></B.TableRow></B.TableBody></B.Table></B.TableContainer>`; + const sides = (page) => page.evaluate(() => { + const cell = document.querySelector("tbody td").getBoundingClientRect(); + const box = document.querySelector("tbody td [role=checkbox]").getBoundingClientRect(); + const rtl = getComputedStyle(document.querySelector("tbody td")).direction === "rtl"; + const start = rtl ? cell.right - box.right : box.left - cell.left; + const end = rtl ? box.left - cell.left : cell.right - box.right; + return [start, end].map((v) => Math.round(v * 10) / 10); + }); + for (const dir of DIRS) { + test(`${dir}, on a fine pointer: the box's two sides are 8 / 8 in 32, 12 / 12 in 40, 14 / 14 in 44, 16 / 16 in 48, 16 / 28 in 60 and 16 / 48 in 80`, async () => { + for (const [width, want] of [[32, [8, 8]], [40, [12, 12]], [44, [14, 14]], [48, [16, 16]], [60, [16, 28]], [80, [16, 48]]]) { + const page = await open(PICK(width), DESKTOP, "dark", dir); + assert.deepEqual(await sides(page), want, `${width}`); + await page.close(); + } + }); + } + for (const [width, options] of WIDTHS) { + for (const dir of DIRS) { + test(`${width}, ${dir}: in a 60 column "Pick" is whole, and the word and the box start on one x`, async () => { + const page = await open(PICK(60), options, "light", dir); + const m = await page.evaluate(() => { + const th = document.querySelector("thead th"); + const label = [...th.querySelectorAll("*")].find((el) => el.children.length === 0 && el.textContent === "Pick") ?? th; + const range = document.createRange(); range.selectNodeContents(label); const word = range.getBoundingClientRect(); + const box = document.querySelector("tbody td [role=checkbox]").getBoundingClientRect(); + const rtl = getComputedStyle(th).direction === "rtl"; + return { whole: [label.scrollWidth, label.clientWidth], word: rtl ? word.right : word.left, box: rtl ? box.right : box.left }; + }); + assert.equal(m.whole[0], m.whole[1], `the word is not cut: ${m.whole}`); + assert.ok(Math.abs(m.word - m.box) <= 0.5, `the word starts at ${m.word}, the box at ${m.box}`); + await page.close(); + }); + } + } + test("390 on touch: in a 60 column the box's 44px hit area is inside its own column, and the next column's header starts at 60", async () => { + for (const dir of DIRS) { + const page = await open(PICK(60), PHONE, "dark", dir); + const m = await page.evaluate(() => { + const cell = document.querySelector("tbody td").getBoundingClientRect(); + const hit = window.__hit(document.querySelector("tbody td [role=checkbox]")); + const heads = [...document.querySelectorAll("thead th")].map((th) => th.getBoundingClientRect()); + return { cell: cell.toJSON(), hit, next: heads[1].toJSON() }; + }); + assert.ok(m.hit.width >= 44 - 0.5 && m.hit.height >= 44 - 0.5, `${dir}: the hit area is ${m.hit.width} by ${m.hit.height}`); + assert.ok(m.hit.left >= m.cell.left - 0.5 && m.hit.right <= m.cell.right + 0.5, `${dir}: inside its column: ${m.hit.left} to ${m.hit.right} in ${m.cell.left} to ${m.cell.right}`); + assert.ok(Math.abs(m.cell.width - 60) <= 0.5, `${dir}: the column is ${m.cell.width}`); + assert.ok(dir === "ltr" ? Math.abs(m.next.left - m.cell.right) <= 0.5 : Math.abs(m.next.right - m.cell.left) <= 0.5, `${dir}: the next header starts where the column ends`); + await page.close(); + } + }); +}); + +describe("Nothing moves", () => { + test("the filter's Clear and count keep their x with nothing, some and all chosen, and those are the selections reached", async () => { + const page = await open(`<B.MultiSelect label="Status" options={[{ value: "a", label: "Alpha" }, { value: "b", label: "Beta" }, { value: "c", label: "Gamma" }]} />`, DESKTOP, "dark"); + const read = async () => ({ xs: [await page.locator(".basalt-filter-clear").boundingBox(), await page.locator(".basalt-filter-count").boundingBox()].map((b) => b.x), on: await page.locator(".basalt-chip[aria-checked=\"true\"]").count() }); + const none = await read(); + assert.equal(none.on, 0); + await page.locator(".basalt-chip").first().click(); + const some = await read(); + assert.equal(some.on, 1, "one chosen"); + assert.deepEqual(some.xs, none.xs); + for (let i = 0; i < 3; i++) { const chip = page.locator(".basalt-chip").nth(i); if ((await chip.getAttribute("aria-checked")) !== "true") await chip.click(); } + const all = await read(); + assert.equal(all.on, 3, "all chosen"); + assert.deepEqual(all.xs, none.xs); + await page.close(); + }); + const SEARCH = `{React.createElement(function S() { const [n, setN] = React.useState(0); window.__setN = setN; return <B.SearchDialog open onOpenChange={() => {}} title="Search" label="Search" query="q" onQueryChange={() => {}} count={n + " results"}><B.SearchResults>{Array.from({ length: n }, (_, i) => <B.SearchResult key={i} href={"#" + i}>{"Result " + i}</B.SearchResult>)}</B.SearchResults></B.SearchDialog>; })}`; + /** In the one open dialog: the field's and count's y, and whether the box ends under what it shows (its last row and the list's padding, or the count with an empty list of no height). */ + const searchRead = (page) => page.evaluate(() => { + const dialog = document.querySelector(".basalt-search"); + const list = document.querySelector(".basalt-search-results"); + const rows = list.querySelectorAll(".basalt-search-result"); + const d = dialog.getBoundingClientRect(); const l = list.getBoundingClientRect(); const ds = getComputedStyle(dialog); const ls = getComputedStyle(list); + const last = rows.length ? rows[rows.length - 1].getBoundingClientRect() : null; + const scrolls = list.scrollHeight > list.clientHeight + 1; + return { + ys: [document.querySelector(".basalt-search-input").getBoundingClientRect().y, document.querySelector(".basalt-search-count").getBoundingClientRect().y], + endsUnderList: Math.abs(d.bottom - parseFloat(ds.borderBottomWidth) - l.bottom) <= 0.5, + listHugs: rows.length === 0 ? l.height === 0 : scrolls || Math.abs(l.bottom - parseFloat(ls.paddingBottom) - last.bottom) <= 0.5, + height: d.height, + }; + }); + test("the search dialog's field and count keep their y as one open dialog's results change, and its box ends under its last row (or its count)", async () => { + const page = await open(SEARCH, DESKTOP, "dark"); + const reads = []; + for (const n of [0, 2, 8, 2, 0]) { await page.evaluate((n) => window.__setN(n), n); await settle(page); reads.push(await searchRead(page)); } + for (const r of reads) { assert.deepEqual(r.ys, reads[0].ys); assert.ok(r.endsUnderList, "the box ends under the results"); assert.ok(r.listHugs, "the list hugs its rows"); } + assert.ok(reads[0].height < reads[2].height, `the box grows with its results: ${reads.map((r) => r.height)}`); + assert.equal(reads[4].height, reads[0].height); + await page.close(); + }); + test("on a phone with the on-screen keyboard up (a shorter window), the field and count keep their y as the results change", async () => { + const page = await open(SEARCH, PHONE, "dark"); + await page.setViewportSize({ width: 390, height: 480 }); + await settle(page); + const reads = []; + for (const n of [0, 2, 8, 0]) { await page.evaluate((n) => window.__setN(n), n); await settle(page); reads.push(await searchRead(page)); } + for (const r of reads) { assert.deepEqual(r.ys, reads[0].ys); assert.ok(r.endsUnderList); } + await page.close(); + }); + const groups = (n) => `[{ label: "Run", commands: Array.from({ length: ${n} }, (_, i) => ({ id: "c" + i, label: "Command " + i })) }]`; + for (const n of [6, 1]) { + test(`what follows a command list of ${n} on the open page keeps its y from no query to no match, while the panel hugs its rows`, async () => { + const page = await open(`<div style={{ padding: 24 }}><B.CommandList label="Console" groups={${groups(n)}} /><p id="after">After</p></div>`, DESKTOP, "dark"); + await page.waitForSelector(".basalt-command-input:not([aria-describedby])"); + const before = (await page.locator("#after").boundingBox()).y; + const panelBefore = (await page.locator(".basalt-command-page").boundingBox()).height; + await page.locator(".basalt-command-input").fill("zzzz"); + await settle(page); + assert.equal((await page.locator("#after").boundingBox()).y, before); + const panelAfter = (await page.locator(".basalt-command-page").boundingBox()).height; + if (n === 6) assert.ok(panelAfter < panelBefore, "the panel hugs the empty state"); + await page.locator(".basalt-command-input").fill(""); + await settle(page); + assert.equal((await page.locator("#after").boundingBox()).y, before, "and back"); + await page.close(); + }); + } + test("in a card, in a dialog and with reserve={false}, the list holds no room: the wrapper is the panel's height, and a card ends under the panel by its padding", async () => { + const g = `[{ label: "Run", commands: [{ id: "a", label: "Deploy" }, { id: "b", label: "Build" }] }]`; + const FORMS = [ + ["card", `<B.Card><B.CardContent><B.CommandList label="Console" groups={${g}} /></B.CardContent></B.Card>`], + ["dialog", `<B.Dialog open><B.DialogContent><B.DialogTitle>Run</B.DialogTitle><B.CommandList label="Console" groups={${g}} /></B.DialogContent></B.Dialog>`], + ["reserve={false}", `<B.CommandList reserve={false} label="Console" groups={${g}} />`], + ]; + for (const [form, fixture] of FORMS) { + const page = await open(`<div style={{ padding: 24 }}>${fixture}</div>`, DESKTOP, "light"); + await page.waitForSelector(".basalt-command-input:not([aria-describedby])"); + for (const query of ["", "zzzz"]) { + await page.locator(".basalt-command-input").fill(query); + await settle(page); + const m = await page.evaluate(() => { + const host = document.querySelector(".basalt-command-split").getBoundingClientRect(); + const panel = document.querySelector(".basalt-command-page").getBoundingClientRect(); + const content = document.querySelector(".basalt-card-content"); + const card = content ? { bottom: content.getBoundingClientRect().bottom, pad: parseFloat(getComputedStyle(content).paddingBottom) } : null; + return { host: host.height, panel: panel.height, panelBottom: panel.bottom, card }; + }); + assert.ok(Math.abs(m.host - m.panel) <= 0.5, `${form}, "${query}": the wrapper ${m.host}, the panel ${m.panel}`); + if (form === "card") assert.ok(Math.abs(m.card.bottom - m.card.pad - m.panelBottom) <= 0.5, `${form}: the card ends under the panel by its padding`); + } + await page.close(); + } + }); +}); + +describe("Boxes", () => { + test("the count pill is 24 round one figure, and the button one width for 1, 10 and 99", async () => { + const page = await open(`<div>{[1, 10, 99].map((n) => <div key={n}><B.Button id={"b" + n} count={n}>Cart</B.Button></div>)}</div>`, DESKTOP, "dark"); + const w = async (id) => (await page.locator(id).boundingBox()).width; + assert.equal(Math.round((await page.locator("#b1 .basalt-button-count > span").boundingBox()).width), 24); + assert.equal(await w("#b1"), await w("#b10")); + assert.equal(await w("#b10"), await w("#b99")); + await page.close(); + }); + test("in a menu with a checkable row all three labels start at one x", async () => { + const page = await open(`<B.Menu open><B.MenuTrigger>Open</B.MenuTrigger><B.MenuContent><B.MenuItem>Plain</B.MenuItem><B.MenuCheckboxItem checked>Checked</B.MenuCheckboxItem><B.MenuItem icon={B.SearchGlyph}>Glyph</B.MenuItem></B.MenuContent></B.Menu>`, DESKTOP, "dark"); + const xs = await page.locator(".basalt-menu-item-label").evaluateAll((els) => els.map((el) => Math.round(el.getBoundingClientRect().x))); + assert.equal(xs.length, 3, `three rows: ${xs}`); + assert.equal(new Set(xs).size, 1, xs.join(", ")); + await page.close(); + }); + // What is drawn to the box's edges, rim included: the decided gaps (section 5 and S11), not merely equal paddings. + const gaps = (page, row, first, last) => page.evaluate(([row, first, last]) => { + const r = document.querySelector(row); + const a = r.querySelector(first).getBoundingClientRect(); const z = r.querySelector(last); const rr = r.getBoundingClientRect(); + const range = document.createRange(); range.selectNodeContents(z); const zr = range.getBoundingClientRect(); + return [a.left - rr.left, rr.right - zr.right].map((v) => Math.round(v * 10) / 10); + }, [row, first, last]); + test("an option chip is 12 and 12 from its rim to its seat and its words; a switch row with no tile 13 and 13 (9 and 9 under 720)", async () => { + const fixture = `<div style={{ width: 360 }}><B.SwitchRowGroup aria-label="Sources"><B.SwitchRow value="a">Alerts</B.SwitchRow></B.SwitchRowGroup><B.OptionChips legend="Size" options={[{ value: "s", label: "Small" }]} /></div>`; + for (const [options, row] of [[DESKTOP, [13, 13]], [PHONE, [9, 9]]]) { + const page = await open(fixture, options, "dark"); + assert.deepEqual(await gaps(page, ".basalt-option-chip", ".basalt-option-chip-seat", ".basalt-option-chip-label"), [12, 12], "the option chip"); + const sw = await page.evaluate(() => { const r = document.querySelector(".basalt-switch-row"); const rr = r.getBoundingClientRect(); const range = document.createRange(); range.selectNodeContents(r.querySelector(".basalt-switch-row-name")); const w = range.getBoundingClientRect(); const seat = r.querySelector(".basalt-switch-row-seat").getBoundingClientRect(); return [w.left - rr.left, rr.right - seat.right].map((v) => Math.round(v * 10) / 10); }); + assert.deepEqual(sw, row, "the switch row"); + await page.close(); + } + }); +}); + +describe("The composer", () => { + const COMPOSER = (width, status) => `<div style={{ width: ${width} }}>{React.createElement(function C() { const [s, setS] = React.useState(${JSON.stringify(status)}); window.__setStatus = setS; return <B.Composer label="Message" onSend={() => {}} actions={<><B.IconButton icon={B.PlusGlyph} label="Attach" /><B.IconButton icon={B.SearchGlyph} label="Find" /></>} status={s} />; })}</div>`; + const read = (page) => page.evaluate(() => { + const r = (s) => document.querySelector(s).getBoundingClientRect().toJSON(); + return { send: r(".basalt-composer-send"), status: r(".basalt-composer-status"), extra: r(".basalt-composer-extra"), composer: r(".basalt-composer") }; + }); + const apart = (a, b) => a.right <= b.left + 0.5 || b.right <= a.left + 0.5 || a.bottom <= b.top + 0.5 || b.bottom <= a.top + 0.5; + test("no status: nothing under the row", async () => { + const page = await open(COMPOSER(600, ""), DESKTOP, "dark"); + const m = await read(page); + assert.equal(m.status.height, 0, "the empty status has no height"); + assert.ok(Math.abs(m.composer.bottom - Math.max(m.send.bottom, m.extra.bottom)) <= 0.5, "the composer ends under its row"); + await page.close(); + }); + test("a status that fits is in the row and overlaps nothing; at 290 with two actions a long one takes its own row and Send stays on the first; the live region is one element throughout", async () => { + const page = await open(COMPOSER(600, "Ada is typing"), DESKTOP, "dark"); + const fit = await read(page); + assert.ok(Math.abs((fit.status.top + fit.status.bottom) / 2 - (fit.send.top + fit.send.bottom) / 2) <= 6, "the status is in Send's row"); + assert.ok(apart(fit.status, fit.send) && apart(fit.status, fit.extra), "it overlaps nothing"); + await page.close(); + const narrow = await open(COMPOSER(290, "Ada, Grace and Edsger are typing"), PHONE, "dark"); + await narrow.evaluate(() => { document.querySelector(".basalt-composer-status").__mark = true; }); + const long = await read(narrow); + assert.ok(long.status.top >= long.extra.bottom - 0.5, "the status is under the actions"); + assert.ok(Math.abs(long.send.top - long.extra.top) <= 6, "Send is on the first row"); + for (const s of ["", "Ada is typing", "Ada, Grace and Edsger are typing"]) { + await narrow.evaluate((s) => window.__setStatus(s), s); + await settle(narrow); + assert.equal(await narrow.evaluate(() => document.querySelectorAll(".basalt-composer [aria-live=polite]").length), 1); + assert.equal(await narrow.evaluate(() => document.querySelector(".basalt-composer [aria-live=polite]").__mark === true), true, `the same live region after "${s}"`); + } + await narrow.close(); + }); +}); + +// The drawing a copy button shows: the morph's frame while it runs, else the glyph at the front (the most opaque of the seat's two). +const DRAWING = `window.__drawing = (b) => { + const swap = b.querySelector(".basalt-button-swap"); + const frame = swap.querySelector(".basalt-glyph-frame"); + if (frame) return { glyph: "frame:" + frame.getAttribute("data-glyph"), paths: [...frame.querySelectorAll("path")].map((p) => p.getAttribute("d")).join(" ") }; + const front = [...swap.querySelectorAll(":scope > .basalt-icon")].filter((g) => getComputedStyle(g).visibility !== "hidden").sort((a, z) => parseFloat(getComputedStyle(z).opacity) - parseFloat(getComputedStyle(a).opacity))[0]; + return { glyph: front?.getAttribute("data-glyph") ?? "", paths: front ? [...front.querySelectorAll("path")].map((p) => p.getAttribute("d")).join(" ") : "" }; +};`; + +describe("The copy's motion", () => { + test("after a copy that succeeds the words form's drawing changes over more than one frame and stops by duration-slow plus a frame; under reduced motion it changes once", async () => { + for (const reduced of [false, true]) { + const page = await open(`<div style={{ padding: 24 }}><B.Terminal title="Deploy" lines={[{ kind: "command", text: "ls" }]} /></div>`, { ...DESKTOP, reducedMotion: reduced ? "reduce" : "no-preference" }, "dark"); + await page.addScriptTag({ content: DRAWING }); + // The test origin is not secure, so there is no clipboard: a write that succeeds is stubbed. + await page.evaluate(() => Object.defineProperty(navigator, "clipboard", { value: { writeText: () => Promise.resolve() }, configurable: true })); + const slow = ms(await token(page, "duration-slow")); + const seen = await page.evaluate(async () => { + const b = window.__visible(document, ".basalt-terminal-copy"); + const key = () => { const d = window.__drawing(b); return d.glyph + "|" + d.paths; }; + let last = key(); + const rest = last; + const changes = []; + const t0 = performance.now(); + b.click(); + await new Promise((done) => { const tick = (now) => { const k = key(); if (k !== last) { changes.push({ at: now - t0, k }); last = k; } if (now - t0 > 600) done(); else requestAnimationFrame(tick); }; requestAnimationFrame(tick); }); + return { rest, changes, words: b.textContent, done: b.hasAttribute("data-done") }; + }); + assert.match(seen.words, /Copy commands/); + assert.ok(seen.rest.startsWith("copy|"), `the copy glyph at rest: ${seen.rest.slice(0, 20)}`); + assert.ok(seen.changes.at(-1).k.startsWith("check|"), "it ends on the check"); + if (reduced) assert.equal(seen.changes.length, 1, `${seen.changes.length} changes`); + else { assert.ok(seen.changes.length > 1, `${seen.changes.length} changes`); assert.ok(seen.changes.at(-1).at <= slow + 17, `the last at ${seen.changes.at(-1).at}`); } + await page.close(); + } + }); +}); + +describe("Kept", () => { + test("R-1: the replay's words are centred in their button", async () => { + const page = await open(`<div style={{ padding: 24 }}><B.Terminal title="Deploy" replay lines={[{ kind: "command", text: "ls" }]} /></div>`, DESKTOP, "dark"); + const gaps = await page.locator(".basalt-terminal-actions .basalt-button").first().evaluate((el) => { const r = el.getBoundingClientRect(); const on = el.querySelector("[data-on]").getBoundingClientRect(); return [on.left - r.left, r.right - on.right]; }); + assert.ok(Math.abs(gaps[0] - gaps[1]) <= 0.5, gaps.join(" / ")); + await page.close(); + }); + test("R-9: at 390 the pager's count is centred between its arrows, on page 3 and on page 12", async () => { + for (const at of [3, 12]) { + const page = await open(`<div style={{ padding: 16 }}><B.Pagination page={${at}} pageCount={12} onPageChange={() => {}} compact /></div>`, PHONE, "dark"); + const gaps = await page.evaluate((at) => { + const nav = document.querySelector(".basalt-pagination"); + const buttons = [...nav.querySelectorAll(":scope > .basalt-button, :scope > a.basalt-button, :scope > button")]; + const prev = buttons[0].getBoundingClientRect(); const next = buttons.at(-1).getBoundingClientRect(); + const words = [...nav.querySelectorAll(".basalt-pagination-summary *")].find((el) => el.children.length === 0 && el.textContent === `Page ${at} of 12` && getComputedStyle(el).visibility !== "hidden"); + const range = document.createRange(); range.selectNodeContents(words); const w = range.getBoundingClientRect(); + return [w.left - prev.right, next.left - w.right]; + }, at); + assert.ok(Math.abs(gaps[0] - gaps[1]) <= 0.5, `page ${at}: ${gaps.join(" / ")}`); + await page.close(); + } + }); +}); + +// ---- The open items' ruling (DECISIONS 336): parts with no padding of their own hang into the room of the box they sit in, and the refused icon-only copy. +describe("A drawer, a release and a composer hang into the room of the box they sit in", () => { + const SHELL_ROOM = (child) => `<div className="basalt-app-main" style={{ "--_pad-start": "16px", "--_pad-end": "16px", paddingInline: 16 }}>${child}</div>`; + const plain = (c) => `<div id="plain">${c}</div>`; + // [name, fixture by room, the box whose room it is, the control, side, the widths it is drawn at] + const PARTS = [ + ["the drawer's Back", (room) => (room ? SHELL_ROOM : plain)(`<B.Drawer label="Record" onBack={() => {}}><div>Half</div><div>Half</div></B.Drawer>`), (room) => (room ? ".basalt-app-main" : "#plain"), ".basalt-drawer-back", "start", ["390 on touch"]], + ["a release's Copy link", (room) => (room ? SHELL_ROOM : plain)(`<B.ReleaseNotes releases={HARBOR} form="notes" product="Harbor" />`), (room) => (room ? ".basalt-app-main" : "#plain"), ".basalt-release-copy", "end", ["1440", "390 on touch"]], + ["the composer's first ghost action", (room) => `<B.Card><B.CardContent>${room ? "" : "<div id=\"plain\">"}<B.Composer label="Message" onSend={() => {}} actions={<B.IconButton icon={B.PlusGlyph} label="Attach" edge="start" />} />${room ? "" : "</div>"}</B.CardContent></B.Card>`, (room) => (room ? ".basalt-card-content" : "#plain"), ".basalt-composer-extra .basalt-button", "start", ["1440", "390 on touch"]], + ]; + const PRELUDE = `const HARBOR = ${JSON.stringify(HARBOR)};`; + for (const [name, fixture, box, control, side, drawn] of PARTS) { + for (const [width, options] of WIDTHS) { + for (const dir of DIRS) { + for (const room of [true, false]) { + test(`${name}, ${width}, ${dir}, ${room ? "the box says its room" : "nothing said"}: ${drawn.includes(width) ? "on the box's line where room is said, else on its own, its ring drawn and whole" : "not drawn"}`, async () => { + const page = await open(fixture(room), options, "dark", dir, PRELUDE); + if (!drawn.includes(width)) { + assert.equal(await page.evaluate((sel) => window.__visible(document, sel) === undefined, control), true, "it is not drawn at this width"); + await page.close(); + return; + } + const m = await line(page, box(room), null, control, side); + if (room) { + assert.ok(m.hang > 0 && m.hang <= m.pad + 0.5, `it hangs ${m.hang}, at most the room's ${m.pad}`); + assert.ok(Math.abs(m.shown - m.pad) <= 0.5, `what it shows is on the box's line: ${m.shown} from the edge, the box's padding ${m.pad}`); + } else { + assert.equal(m.hang, 0, "it stands on its own line"); + assert.ok(Math.abs(m.clear - m.pad) <= 0.5, `its box stands at the box's own edge: ${m.clear}`); + } + // The ring: where room is said, +2 if the hung box keeps 4 from the room's edge, else inside at -2, and whole; with none, the ordinary +2. + if (room) ringIsWhole(m, m.clear >= 4 - 0.5 ? 2 : -2); + else { assert.ok(m.focused); assert.equal(m.ring, 2); assert.deepEqual(m.outline, ["solid", 2]); } + const r = await page.evaluate((sel) => window.__visible(document, sel).getBoundingClientRect().toJSON(), control); + assert.ok(r.left >= 0 && r.right <= options.viewport.width, "wholly on screen"); + await page.close(); + }); + } + } + } + } + test("a drawer in a page with no padding is wholly on screen", async () => { + const page = await open(`<B.Drawer label="Record" onBack={() => {}}><div>Half</div><div>Half</div></B.Drawer>`, PHONE, "light"); + assert.ok((await page.locator(".basalt-drawer-back").boundingBox()).x >= 0); + await page.close(); + }); +}); + +describe("An icon-only copy that is refused shows the close for 1500ms, then Copy returns", () => { + for (const [name, fixture, button] of [ + ["Terminal's compact copy", `<div style={{ width: 360 }}><B.Terminal title="Deploy" lines={[{ kind: "command", text: "ls" }]} /></div>`, ".basalt-terminal-copy-compact"], + ["CodeBlock's copy", `<B.CodeBlock title="config" code="x" />`, ".basalt-code-copy .basalt-button"], + ]) { + test(`${name}: the close at the front through the done seat with "Copy failed", for the interval, then Copy at the front with data-done cleared, and never the check`, async () => { + const page = await open(fixture, DESKTOP, "dark"); + await page.addScriptTag({ content: DRAWING }); + await page.evaluate(() => Object.defineProperty(navigator, "clipboard", { value: { writeText: () => Promise.reject(new Error("refused")) }, configurable: true })); + const fast = ms(await token(page, "duration-fast")); + const seen = await page.evaluate(async ([sel, fast]) => { + const b = window.__visible(document, sel); + const status = () => [...document.querySelectorAll('[role="status"]')].map((s) => s.textContent).join("|"); + const out = { check: false, closeAt: null, closeUntil: null, doneOff: null, statusShown: "", end: null }; + const t0 = performance.now(); + b.click(); + await new Promise((done) => { + const tick = (now) => { + const t = now - t0; + const d = window.__drawing(b); + if (d.glyph === "check" || d.glyph === "frame:check") out.check = true; + if (d.glyph === "close") { if (out.closeAt === null) out.closeAt = t; out.closeUntil = t; } + if (b.hasAttribute("data-done")) { if (/Copy failed/.test(status())) out.statusShown = status(); } else if (out.closeAt !== null && out.doneOff === null) out.doneOff = t; + if (out.doneOff !== null && t > out.doneOff + fast + 34) { out.end = { glyph: d.glyph, done: b.hasAttribute("data-done"), status: status() }; done(); } else if (t > 2600) done(); else requestAnimationFrame(tick); + }; + requestAnimationFrame(tick); + }); + return out; + }, [button, fast]); + assert.equal(seen.check, false, "the check is never at the front"); + assert.ok(seen.closeAt !== null && seen.closeAt <= fast + 34, `the close is at the front by ${seen.closeAt}`); + assert.match(seen.statusShown, /Copy failed/); + assert.ok(seen.doneOff !== null && Math.abs(seen.doneOff - 1500) <= 100, `the done state lasts the interval: it ends at ${seen.doneOff}`); + assert.ok(seen.closeUntil >= 1500 - 100, `the close stays until ${seen.closeUntil}`); + assert.deepEqual([seen.end?.glyph, seen.end?.done], ["copy", false], `then Copy, with data-done cleared: ${JSON.stringify(seen.end)}`); + await page.close(); + }); + } +}); diff --git a/tools/changelog/skill-body.mjs b/tools/changelog/skill-body.mjs index 749834ba..bc59479a 100644 --- a/tools/changelog/skill-body.mjs +++ b/tools/changelog/skill-body.mjs @@ -100,7 +100,7 @@ function release(item, { form, product, running, runningBuild, level }) { ? `<p class="release-meta release-number-line" aria-hidden="true">${dots([esc(item.version), date])}</p><${h} class="release-heading" id="${id}__heading" data-headline><span class="visually-hidden">${esc(item.version)}${item.date ? `, ${usDate(item.date)}` : ""}: </span><span class="release-title">${esc(item.title)}</span></${h}>` + (facts.some(Boolean) || badges ? `<p class="release-meta">${dots(facts)}${badges}</p>` : "") : `<${h} class="release-heading" id="${id}__heading"><span class="release-version"${item.unreleased ? " data-words" : ""}>${item.unreleased ? "Unreleased" : esc(item.version)}</span>${date ? `<span class="visually-hidden">, ${usDate(item.date)}</span>` : ""}</${h}>` + (date || facts.some(Boolean) || badges ? `<p class="release-meta">${dots([date, ...facts])}${badges}</p>` : ""); const name = item.unreleased ? "Unreleased" : `${product} ${item.version}`; - const head = `<header class="release-head"><div class="release-head-text"><span class="release-word" aria-hidden="true">Linked</span>${heading}</div><button class="btn release-copy" data-variant="ghost" data-size="sm" data-copy-text="#${id}" data-copy-fragment="${id}" data-copy-words="Copied" data-copy-status="Link copied" aria-label="Copy link to ${esc(name)}"><span>Copy link</span></button></header>`; + const head = `<header class="release-head"><div class="release-head-text"><span class="release-word" aria-hidden="true">Linked</span>${heading}</div><button class="btn release-copy" data-variant="ghost" data-size="sm" data-edge="end" data-copy-text="#${id}" data-copy-fragment="${id}" data-copy-words="Copied" data-copy-status="Link copied" aria-label="Copy link to ${esc(name)}"><span>Copy link</span></button></header>`; const summary = item.summary ? `<p class="release-summary">${esc(item.summary)}</p>` : ""; const upgrade = form === "reference" ? upgradeLine(item) : null; const callout = action.length ? `<div class="callout release-action" data-status="warning" id="${id}__action"><i data-icon="Warning"></i><div><div class="callout-title"><h${level + 1} class="release-callout-title">Action needed${count(action.length)}</h${level + 1}></div><div class="callout-body">${upgrade ? `<p class="release-upgrade">${esc(upgrade)}</p>` : ""}${list(action)}</div></div></div>` : ""; diff --git a/tools/html-skill/build.mjs b/tools/html-skill/build.mjs index 94c185b1..5d4a2a29 100644 --- a/tools/html-skill/build.mjs +++ b/tools/html-skill/build.mjs @@ -274,7 +274,9 @@ function diagramZoomCss() { .replaceAll(".basalt-dialog", ".dialog") .replaceAll(".basalt-sheet-", ".sheet-") .replaceAll(".basalt-button", ".btn") - .replaceAll(".basalt-icon", ".icon"); + .replaceAll(".basalt-icon", ".icon") + .replaceAll("var(--_inset-start)", "var(--bh-inset-start)") + .replaceAll("var(--_inset-end)", "var(--bh-inset-end)"); if (/basalt-(?!duration|space|size|text|font|border|surface)/.test(css.replace(/--basalt-[\w-]+/g, ""))) throw new Error("html-skill: the diagram viewer section names a React class diagramZoomCss does not rename"); return `@layer basalt {\n${css}\n}\n`; } diff --git a/tools/html-skill/src/core.css b/tools/html-skill/src/core.css index 370b10bd..42999ec2 100644 --- a/tools/html-skill/src/core.css +++ b/tools/html-skill/src/core.css @@ -75,6 +75,10 @@ /* The row's inline padding: size-gutter, or size-gutter-narrow under the medium breakpoint (foundations, "Layout"). Apps and bars use this one. */ :root { accent-color: var(--basalt-action-primary); --basalt-gutter: var(--basalt-size-gutter); } + /* The side safe areas by direction (DECISIONS 336): start and end are left and right, swapped right to left, so a bar, a sheet or a toast + pads the side its inset is on. Read only through start and end. */ + :root { --bh-inset-left: env(safe-area-inset-left, var(--basalt-space-0)); --bh-inset-right: env(safe-area-inset-right, var(--basalt-space-0)); --bh-inset-start: var(--bh-inset-left); --bh-inset-end: var(--bh-inset-right); } + :root:dir(rtl) { --bh-inset-start: var(--bh-inset-right); --bh-inset-end: var(--bh-inset-left); } @media (width < %bp-md%) { :root { --basalt-gutter: var(--basalt-size-gutter-narrow); } } a, button, summary, [role="tab"], .row, .disclosure, .segment button { -webkit-tap-highlight-color: transparent; } [hidden] { display: none !important; } @@ -128,6 +132,9 @@ @media (width < %bp-md%) { .hide-narrow { display: none !important; } } .section { margin-top: var(--basalt-space-12); } .section > .section-head { margin-bottom: var(--basalt-space-4); } + /* A head's last ghost .btn is hung at its end by itself (DECISIONS 336, Q10): a .panel-head into its own space-4, a page's own section head into the + gutter. A section head in a column, a grid or a card declares no room, and its button stays on the line with its edge. */ + .page > .section > .section-head { --basalt-edge-room: var(--basalt-gutter); --basalt-edge-room-start: initial; --basalt-edge-room-end: initial; } .footer { margin-top: var(--basalt-space-16); padding-top: var(--basalt-space-4); border-top: var(--basalt-size-hairline) solid var(--basalt-border-divider); color: var(--basalt-text-secondary); font-size: var(--basalt-text-sm-size); } /* Outside .page the footer sits on the page's column by itself: the .page above already ends in its own bottom padding, so no top margin doubles it. */ @@ -186,7 +193,7 @@ } .panel-pad, .card { padding: var(--basalt-space-4); } @media (width >= %bp-md%) { .panel-pad.lg, .card.lg { padding: var(--basalt-space-6); } } - .panel-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--basalt-space-2); padding: var(--basalt-space-3) var(--basalt-space-4); border-bottom: var(--basalt-size-hairline) solid var(--basalt-border-divider); font-weight: var(--basalt-font-weight-medium); } + .panel-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--basalt-space-2); padding: var(--basalt-space-3) var(--basalt-space-4); --basalt-edge-room: var(--basalt-space-4); --basalt-edge-room-start: initial; --basalt-edge-room-end: initial; border-bottom: var(--basalt-size-hairline) solid var(--basalt-border-divider); font-weight: var(--basalt-font-weight-medium); } /* Only a surface that leaves the flow floats: a menu, popover, dialog or palette (with a shadow). A popup is its opener plus one with a floor of 1: from the page it is level 1, and inside a panel the nesting rules above make it the next level. A modal (dialog, palette) @@ -263,8 +270,28 @@ /* stylelint-disable-next-line unit-disallowed-list -- the ring's 1.5px stroke; no token */ .btn[aria-busy="true"]::after { content: ""; position: absolute; inset: 0; margin: auto; width: var(--basalt-size-icon-sm); height: var(--basalt-size-icon-sm); border: 1.5px solid color-mix(in oklch, currentColor 25%, transparent); border-top-color: currentColor; border-radius: var(--basalt-radius-full); animation: bh-spin var(--basalt-duration-loop-ring) linear infinite; } .btn svg { flex: none; } - /* Radius follows the box as it is drawn (decision 138, E1): a button is at least 44 on touch, so it is radius 8, as every control that size is. */ - @media (pointer: coarse), (width < %bp-md%) { .btn { min-height: var(--basalt-size-tap-min); border-radius: var(--basalt-radius-md); } .btn[data-icon-only] { min-width: var(--basalt-size-tap-min); } } + /* A ghost control at an edge (DECISIONS 336), React's `edge`: `data-edge="start"` or `"end"` puts its glyph or words on the head's line and + hangs its box into the padding by its inset (its padding with words; half its drawn size less its glyph, icon-only), only into the room + its head declares (`--basalt-edge-room`, `-start`, `-end`; none when it declares nothing). The ring is +2 where 4 of room is left, else -2. */ + .btn { --_drawn: var(--_h); --_glyph: var(--basalt-size-icon-sm); } + .btn[data-variant="ghost"]:is([data-edge], :is(.panel-head, .section-head) > :last-child) { --_inset: var(--_px); } + .btn[data-variant="ghost"][data-icon-only]:is([data-edge], :is(.panel-head, .section-head) > :last-child) { --_inset: calc((var(--_drawn) - var(--_glyph)) / 2); } + .btn[data-variant="ghost"][data-edge="start"] { --_hang: min(var(--_inset), var(--basalt-edge-room-start, var(--basalt-edge-room, var(--basalt-space-0)))); margin-inline-start: calc(-1 * var(--_hang)); } + .btn[data-variant="ghost"]:is([data-edge="end"], :is(.panel-head, .section-head) > :last-child) { --_hang: min(var(--_inset), var(--basalt-edge-room-end, var(--basalt-edge-room, var(--basalt-space-0)))); margin-inline-end: calc(-1 * var(--_hang)); } + .btn[data-variant="ghost"][data-edge="start"]:focus-visible { outline-offset: clamp(calc(-1 * var(--basalt-size-focus-width)), calc((var(--basalt-edge-room-start, var(--basalt-edge-room, calc(var(--_hang) + var(--basalt-size-tap-min)))) - var(--_hang) - var(--basalt-size-focus-offset) - var(--basalt-size-focus-width)) * 999 + var(--basalt-size-focus-offset)), var(--basalt-size-focus-offset)); } + .btn[data-variant="ghost"]:is([data-edge="end"], :is(.panel-head, .section-head) > :last-child):focus-visible { outline-offset: clamp(calc(-1 * var(--basalt-size-focus-width)), calc((var(--basalt-edge-room-end, var(--basalt-edge-room, calc(var(--_hang) + var(--basalt-size-tap-min)))) - var(--_hang) - var(--basalt-size-focus-offset) - var(--basalt-size-focus-width)) * 999 + var(--basalt-size-focus-offset)), var(--basalt-size-focus-offset)); } + /* Radius follows the box as it is drawn (decision 138, E1): a button is at least 44 on touch, so it is radius 8, as every control that size is. + A hung .btn with words keeps its own width there and takes what it lacks of 44 as hit area (46, so the press's .98 keeps 45.08). */ + @media (pointer: coarse), (width < %bp-md%) { + .btn { min-height: var(--basalt-size-tap-min); border-radius: var(--basalt-radius-md); --_drawn: max(var(--_h), var(--basalt-size-tap-min)); } + .btn[data-icon-only] { min-width: var(--basalt-size-tap-min); } + .btn[data-variant="ghost"]:is([data-edge], :is(.panel-head, .section-head) > :last-child):not([data-icon-only]) { --_miss: max(var(--basalt-space-0), calc(var(--basalt-size-tap-min) + 2 * var(--basalt-size-hairline) - 100%)); min-width: max(var(--basalt-space-0), min(var(--basalt-size-tap-min), calc(var(--basalt-size-tap-min) + 2 * var(--basalt-size-hairline) - 2 * var(--_reach)))); } + .btn[data-variant="ghost"]:is([data-edge="end"], :is(.panel-head, .section-head) > :last-child):not([data-icon-only]) { --_reach: calc(var(--basalt-edge-room-end, var(--basalt-edge-room, var(--basalt-space-0))) - var(--_hang)); } + .btn[data-variant="ghost"][data-edge="start"]:not([data-icon-only]) { --_reach: calc(var(--basalt-edge-room-start, var(--basalt-edge-room, var(--basalt-space-0))) - var(--_hang)); } + .btn[data-variant="ghost"]:is([data-edge], :is(.panel-head, .section-head) > :last-child):not([data-icon-only])::before { content: ""; position: absolute; inset-block: min(var(--basalt-space-0), calc((100% - var(--basalt-size-tap-min)) / 2 - var(--basalt-size-hairline))); } + .btn[data-variant="ghost"]:is([data-edge="end"], :is(.panel-head, .section-head) > :last-child):not([data-icon-only])::before { --_out: min(calc(var(--_miss) / 2), calc(var(--basalt-edge-room-end, var(--basalt-edge-room, var(--basalt-space-0))) - var(--_hang))); inset-inline: calc(var(--_out) - var(--_miss)) calc(-1 * var(--_out)); } + .btn[data-variant="ghost"][data-edge="start"]:not([data-icon-only])::before { --_out: min(calc(var(--_miss) / 2), calc(var(--basalt-edge-room-start, var(--basalt-edge-room, var(--basalt-space-0))) - var(--_hang))); inset-inline: calc(-1 * var(--_out)) calc(var(--_out) - var(--_miss)); } + } /* A link on its own is a touch target (44px); a link inside running text is not, so a paragraph, list item, quote, caption, hint, `.prose` or `.small` keeps its inline links as they are. The brand, the skip link and the footer's links always count. `.tap` opts any other link in. The negative block margin makes the link's margin box one line tall, so a linked row sits diff --git a/tools/html-skill/src/examples/interactive.body.html b/tools/html-skill/src/examples/interactive.body.html index 46665a30..a946be74 100644 --- a/tools/html-skill/src/examples/interactive.body.html +++ b/tools/html-skill/src/examples/interactive.body.html @@ -88,7 +88,7 @@ <h1>Egress cost planner</h1> <div class="tabpanel" style="padding-top: var(--basalt-space-4)" id="view-json" role="tabpanel" aria-labelledby="tab-json" hidden> <div class="code"> - <div class="code-head"><span>estimate.json</span><span class="spacer"></span><button class="btn" data-variant="ghost" data-size="sm" data-copy="#json"><span data-glyph="copy"></span><span>Copy</span></button></div> + <div class="code-head"><span>estimate.json</span><span class="spacer"></span><button class="btn" data-variant="ghost" data-size="sm" data-edge="end" data-copy="#json"><span data-glyph="copy"></span><span>Copy</span></button></div> <pre class="code-body" tabindex="0"><code id="json"></code></pre> </div> </div> diff --git a/tools/html-skill/src/examples/static.body.html b/tools/html-skill/src/examples/static.body.html index 77c5dc61..85cae250 100644 --- a/tools/html-skill/src/examples/static.body.html +++ b/tools/html-skill/src/examples/static.body.html @@ -82,7 +82,7 @@ <h1>Reliability report</h1> <p>Press <kbd class="kbd" data-doc>Esc</kbd> to close any dialog.</p> </div> <div class="code"> - <div class="code-head"><span>alerts.json</span><span class="spacer"></span><button class="btn" data-variant="ghost" data-size="sm" data-copy="#alerts"><span data-glyph="copy"></span><span>Copy</span></button></div> + <div class="code-head"><span>alerts.json</span><span class="spacer"></span><button class="btn" data-variant="ghost" data-size="sm" data-edge="end" data-copy="#alerts"><span data-glyph="copy"></span><span>Copy</span></button></div> <pre class="code-body" tabindex="0"><code id="alerts">{ <span class="tok-k">"queue"</span>: { <span class="tok-k">"alertAt"</span>: <span class="tok-n">0.4</span>, diff --git a/tools/html-skill/src/modules.json b/tools/html-skill/src/modules.json index e37b5a8b..fc6b29ca 100644 --- a/tools/html-skill/src/modules.json +++ b/tools/html-skill/src/modules.json @@ -1,8 +1,8 @@ { - "$comment": "Which parts of the skill's CSS and JS a page gets. The core is always in. A module is in when the page's body has one of its classes, attributes or tags, matches one of its text patterns, or is named in a <!-- basalt:use name --> comment, and when another module needs it (requires). Modules are added in the order listed here, which is the order of the source files' cascade. classes: every class the module's CSS styles (the test checks them against the CSS and against SKILL.md). budget: the most bytes its minified CSS and JS may reach together. budgets: skillMd (SKILL.md, the context an agent pays: never above what it was), core (the CSS and JS of every page). icons: Phosphor names the module's script draws itself. Raised in the first parity PR (the owner's \"bring up the parity\"): forms (the number-input, search-clear and file-input chrome), disclosure (the native details marker), status (the accent reader and the forced-colours badge border), spinner (a fixed 16px ring), and the new number, range and accent modules. skillMd rose 10555 to 10900 for the new rules (number field, native chrome, the braille rule, the accent). Raised in the second parity PR (popup rows, levels and the segment's pill): segment 1400 to 3700 (the shared sliding pill: its script, 1.5 KB, and its CSS with the pill's two fallbacks), rows 3600 to 4300 (#27's plate-in-a-row geometry, the plate per level, the glide's shared plate and the forced-colours lit row, net of the removed bar), palette 9400 to 11300 (the glide's script, 2.4 KB: it follows the lit row, travels on a pointer, snaps on a key, and fades in place on leaving). The art module (DECISIONS 101 and 104) is the token groups only some pages name, taken out of the core so the core stays under its cap: the chart roles and lengths, the art colours, the aspect ratios and the stage headroom, in both themes (2087 bytes at 2100; it grows only when a token of those groups is added). A page gets it when its body names one of them, a var() in its own style included. The every-module page has no cap of its own (owner, DECISIONS 79): each part is capped, and a page carries only the parts it uses. usage: the most bytes of a module's usage text (src/usage/NAME.md; core.usage for core.md), which compose.mjs --usage prints on demand. It is context an agent pays only for the modules its page uses, so it is capped per part as SKILL.md and the CSS and script are (DECISIONS 79 and 109). Each is set a little above what its text was when the usage moved out of SKILL.md (DECISIONS 109); raising one needs a reason in the PR, and a rise of 40 to 50% is the owner's. textWords: each text pattern said in words, which compose.mjs --usage prints instead of the regular expression (one for each entry of text, in order). builds: modules a module requires whose markup its script writes, so --usage prints a line saying so instead of their usage text (the palette builds its own rows and key chips). The council's clarity check of the usage texts (all three: not yet clear) raised eight caps because the texts gained what an agent had to guess: callout 200 to 700 (the icon and one wrapper div around the title and body as markup, the four status icons, the role React's Callout renders), palette 1100 to 1300 (an item shown whole, keys as an array, keywords), stats 450 to 800 (a snippet of the figures and of the dl), tabs 500 to 650 (the unselected panels), code 250 to 450 (the markup and what each token class means), segment 150 to 300 (a click does not switch it), progress 150 to 350 (the empty span that paints the fill), theme 250 to 400 (leave the button empty), and accent 250 to 300. Topbar went down, 700 to 500, as its build detail was cut. Raised in the usage PR (the council's clarity check): palette 11300 to 11450 (the module grew 11283 to 11448, +165, about 1.5%), for the guard that makes a string `keys` warn and draw no chip instead of throwing in `keys.filter`, which the palette's usage already promised. Round 2 of the clarity check: tabs 650 to 750 (the panel's top space shown in the snippet, and that the script selects a tab on click). Raised in the site-icons and status PR (skill-parity part A, DECISIONS 106 and 107): status 1650 to 1900 (the neutral, pending and running marks, the badge's real border, and the forced-colours disc, net of the red danger word it drops) and its usage 400 to 1000 (every status in words, the word alone, running, forced colours); rows 4300 to 4450 (the profile list's seat rule and the status parts on a lit row) and its usage 300 to 600 (the profile list, with the one mistake: never an empty element for the seat). New: the links module (2671 bytes: the social row, the new-tab arrow's CSS and the script that draws it; budget 2750) and its usage (1746 bytes; cap 1850), which carries the social link, the glyph set, icon only and the new tab. Dropping Regular halves icons.json. Added in the overlay PR (skill-parity-4, batch 7 step 2, DECISIONS 108): the shared plate leaves palette.js for a glide module (the palette, a menu and the notification centre all call it), so the palette's cap went down, 11450 to 9250, and rows 4450 to 3850 (the plate's CSS moved to glide); and the overlay layer comes in as seven modules a page carries only when it uses them, each with its own cap and usage cap set a little above its size: popover (the native popup shell), menu, dialog (the dialog and alert dialog), sheet (on every side, the top one the site header's narrow menu), tooltip, toast and notifications (the centre). skillMd is unchanged in its cap (the eight new index lines fit within it); the core is unchanged in bytes. Added in the figures and charts PR (skill-parity-5, batch 7 step 3, DECISIONS 108): four modules a page carries only when it uses them, each with its own cap and usage cap set a little above its size: meter (React's Meter, CSS only, 2581 bytes), dlist (the description list, CSS only, 1265), terminal (the code block's transcript: its CSS, 3242, and the script that draws the gutter, the copy button and the replay, 4824) and chart (React's TimeChart and ChartGroup: 7313 of CSS and 23262 of script, which port chart.tsx's scale, layout, lane, labels, sentences, keyboard and table; it needs the art tokens, the table and the kbd chips, and a page without a chart carries none of it). Stats grew for the source line (budget 700 to 850, 798 bytes; its usage 800 to 950, 675 to 899 bytes, +33%, under the owner's 40 to 50%). skillMd is unchanged in its cap (four index lines fit within it); the core is unchanged in bytes. Added in the forms and selection PR (skill-parity-6, batch 7 step 4, DECISIONS 108): six modules a page carries only when it uses them, each with its own cap and usage cap set a little above its size: select (React's Select: the native select's closed trigger in every browser and, where `appearance: base-select` is shipped, the styled list with its two-line rows; a small script that says which input lit a row, 7740 bytes before it, choice (Checkbox, Radio, RadioGroup and Switch as styled native inputs; CSS only, with the first-frame rule), choice-card (ChoiceCard; CSS only), toggle (the pressed toggle's plate and check seat on .btn; CSS only), selection (a table's checkbox column: its fixed width and the script that sets aria-selected, the mixed header box and the count) and loops (the page-level hold on every loop with its switch: the held look and the script that stores it). The select's styles left forms, whose budget fell 3650 to 3250. skillMd rose 8621 to the size of its six new index lines, within its cap; the core is unchanged in bytes; compose adds the stored-hold line to the head of a page that has the loops module. Revised in the same PR (the lead's review of the build): the select gains select.js (one row is lit at a time, by whichever of the pointer and the keys moved last), and choice, toggle, selection and loops carry the first-frame rule, so a state a script sets on load (a mixed header box, the stored hold) paints at once with no crossfade. Added in the navigation and layout PR (skill-parity-7, batch 7 step 5, DECISIONS 108): five modules a page carries only when it uses them, each with its own cap and usage cap set a little above its size: glyph (Basalt's core glyphs drawn by name, at rest and selected, from a table the build works out from the drawn set; a page carries only the glyphs it names, and the drawing of a core glyph from data-glyph left the sheet module, which draws none now), nav (React's Nav: the sidebar's, the narrow menu's and More's rows, with the shared hugging pill), topbar-nav (the site header's links, one action and narrow menu, built by script from the bar's markup), app-shell (the shell, its sidebar and rail, and the app header) and tab-bar (the phone tab bar). The topbar module became the site header's bar (React's SiteHeader, DECISIONS 108: 56px with its line inside, the 44 by 44 brand target, the narrow-screen buttons, the derived sticky offset), budget 1600 to 3200 because its rules gained the app header's shared smoke, and its usage 500 to 750 (+50%) for the lockup's markup (the links, action and menu are topbar-nav's usage). Glide 3700 to 3950: the navigation's pill is a shape inside the row that the plate follows (about 200 bytes). The core's usage 2000 to 2100 (+5%): h2 is the Section step, the prose column's measure, and a link already 44px tall needs no margin. skillMd rose 9317 to 9863 for five index lines, under its cap; the core CSS grew 38 bytes (the layout tokens replace raw lengths, the gutter is one derived property, h2, .prose and .lead follow foundations) and the core script is unchanged. A module's media query writes %bp-md%, %bp-lg% or %bp-container% and the build substitutes the breakpoint tokens. Added in the tables and filters PR (skill-parity-8, batch 7 step 6, DECISIONS 108): the existing table module gains React's table additions (DECISIONS 95: the row header, \"Not observed\", the row density and the scroll hint with its small script), budget 1400 to 3000 (it was 1134 bytes of CSS; it is 2168 of CSS and 693 of script) and its usage 700 to 950 (+36%); and two modules a page carries only when it uses them, each with its own cap and usage cap set a little above its size: still-table (React's Table with `columns`: the fixed layout from a colgroup, the whole header cell as the sort button with its reserved seat, aria-sort, the pinned columns and their divider, the empty row; 4767 of CSS and 3264 of script, budget 8200) and filter (React's MultiSelect and FilterResult: the chips, the trigger and checklist with the search band from ten values, Clear held in place, the one debounced result line, and the narrowing of a table by `data-column`; 8240 of CSS and 7978 of script, budget 16400; it needs the popover, glide, glyph and choice modules). The core is unchanged in bytes. skillMd rose 9863 to 10128 for two index lines and the CaretUpDown icon's name, within its cap. Added in the commands PR (skill-parity-9, batch 7 step 7, DECISIONS 103 and 108): one new module a page carries only when it uses it, command-list (React's CommandList: the command panel set in the page, list plus preview, the push; it extends the palette and needs rows, kbd and glide; 5229 of CSS and 8734 of script, budget 14000, usage 2150). Two-line rows come to the existing modules: rows 3850 to 5350 (the described row's grid and description line, the push's chevron: 1481 bytes of CSS, the same rules React's menu rows carry), palette 9250 to 9900 (its rows are one function the list shares, with the description and the two-tier ranking of title matches over keyword and description matches; +636) and its usage 1300 to 1350, rows' usage 600 to 800, and glide 3950 to 4000 (a host that is idle counts as having no lit row, +54). skillMd rose 10128 to 10259 for one index line, within its cap; the core's CSS grew 24 bytes (.split.aside takes size-list-width in place of its raw 20rem: the same 320px, so no pixel moves) and the core script is unchanged. Added in the art PR (skill-parity-10, batch 7 step 8, DECISIONS 104 and 108): two modules a page carries only when it uses them, each with its own cap and usage cap set a little above its size: stage (React's Stage and PairedArt: full-bleed art under the site header, the pull-up by the sticky offset, the headroom, the paired art that follows the page's theme, and the forced-colours and print rules; CSS only, 1179 bytes) and framed-art (React's FramedArt: the figure, its rim and radius, the reserved box, the placeholder and the failed alt, the caption and credit; 2208 bytes of CSS and the 733-byte script that sets the frame's phase); both need the art tokens. The bar stays smoked over a stage: React clears it only over a stage that passed the headroom test helper, and a page has no test run (DECISIONS 108's note), so the skill builds no clear state. skillMd rose 10259 to 10500 for two index lines, within its cap; the core is unchanged in bytes. The callout gained the status rim in the same PR (DECISIONS 82, D8's status callouts): success, warning and danger draw their border in the status colour at 45% mixed in sRGB over the callout's own level, one solid colour on every side, and CanvasText in forced colours with the icon; the status colour is now one property the icon and the rim read. Its budget rose 900 to 1150 (the module is 1089 bytes, from 792: +297, about 37%); its usage is unchanged. Added in the overlays-and-the-rest PR (skill-parity-11, batch 7 step 9, DECISIONS 90 and 108): the last two parts of D8's part 5, each a module a page carries only when it uses it, with its own cap and usage cap set a little above its size: combobox (React's Combobox: the input with its caret button inside, the popup of the menu's rows with the glide's shared plate and two-line options, the filtering, the keys, the hidden value, the empty message and the check; 4342 of CSS and 6423 of script, budget 10900, usage 2150; it needs forms, popover and glide, and builds the last two) and sparkline (React's Sparkline: the label and latest value, the line, the axis, the empty sentence and the loading line that breathes; 1609 of CSS and 1874 of script, budget 3600, usage 950). The combobox copies the menu's row rules, as the select's list does, because React's Combobox renders MenuItem rows (a 40px hit area, a 36px plate) and the skill's .row is the palette's 44px: it carries no menu script. popover.js gains the combobox popup in the list of popups that keep focus where it is (+21 bytes, within its cap). skillMd rose 10500 to 10724 for two index lines, within its cap; the core is unchanged in bytes. Added in the motion-rules PR (DECISIONS 136 and 139): one module, ambient (a page's one ambient loop: CSS 828 bytes, script 433, budget 1300, usage 800), taken out of loops so the hold's own module grows only by the icon toggle's glyph swap (loops 2000 to 2200, +10%; its usage 1300 to 1650 for the icon form and the new settings-row sentence, +27%); and the chart's entrance (`entrance: true`: the marks' animations, their conditions and the redraw that restarts them at the elapsed time, 23262 to 25299 bytes of script; budget 30700 to 32800, +7%, usage 2500 to 2950, +18%). The core grew by the three tokens (27704 to 27862 bytes of CSS, under its cap). its stage usage gained the ambient art's line (1650 to 1750, +6%). skillMd rose 10724 to the size of the ambient index line, within its cap. Raised again in the motion-rules amendment (DECISIONS 143): chart 32800 to 33800 (script 25299 to 26375 bytes, +4%; +10% over the 30700 it began with) for the glide a new data set makes mid-entrance, print settling it, and `Basalt.pageChange()`; its usage 2950 to 3150 (+26% over the 2500 it began with). Raised in the second motion-rules amendment (DECISIONS 148): chart 33800 to 34400 (script 26375 to 26970 bytes: a line and its markers glide from their drawn geometry, and `beforeprint` settles the entrance; +12% over the 30700 it began with); topbar-nav 6900 to 7500 (+8.7%: the narrow menu's pause row, its CSS and 275 bytes of script, DECISIONS 148 item 2); loops usage 1650 to 1800 (+38% over the 1300 it began with, for the icon form's `title` and the menu row). Raised in the audit-design-b PR (DECISIONS 138 and 139): still-table 8200 to 13400 (+63%: the module was 7927 bytes and is 13311; the cut cell's plate, its focus stops and its dismissal, ported from React's cell-peek.ts, are 4273 bytes of script and 1111 of CSS; a still table that truncates needs them). The same PR: core usage 2100 to 2250 (+7%: the skip link, one bullet), forms usage 350 to 480 (+37%: the required mark), still-table usage 1950 to 2150 (+10%: the cut cell and the width rule), notifications usage 1050 to 1100 (+5%: the 44px entry on touch). The skip link's rim and radius took the core 30457 to 30609 bytes, under its cap (the rules that hang it under the bar are the topbar module's: 3200 to 3600, +12.5%); core 30720 to 31050 (+1.1%, DECISIONS 147: also the bar's links left out of the rule: the pseudo-element that makes a short standalone link a 44 by 44 target), skip-link script in the topbar module (3200 to 4150 over this PR, +30%: the rules that hang the link under the bar, 3600, and the script that reads the bar's real edge, 4150), sparkline 3600 to 4050 (+12.5%: React's ticker structure, so the value copies once on its line, and in forced colours the strips go and the number is plain text), forms budget 3250 to 3500 (+7.7%: the necessity word), notifications 9050 to 9250 (+2.2%: the 44px entry). Raised in the audit-design-b PR's E2 port (DECISIONS 138 and 139: the core set draws check, close, the chevrons, copy, plus, minus and search wherever a component draws them): the modules that drew a Phosphor icon for one of those now carry the core glyph's whole SVG, written in at build time (`%glyph-svg:name%`, the markup the glyph module's `_.glyph(name)` returns, so no module needs the glyph module and a page pays for nothing it does not use), and the Phosphor path of the same icon leaves the page. Each module's own bytes rose by that markup, and a page's total moved by what the Phosphor path it no longer carries saves: menu 8600 to 8900 (+303), combobox 10900 to 11200 (+303), copy 1900 to 2400 (+640), terminal 8100 to 8850 (+761), toast 13850 to 14150 (+325), number 2900 to 3400 (+557), filter 16400 to 17050 (+785), palette 9900 to 10450 (+536); the command list shares the palette's search drawing and fell 20 bytes. Set in integration-nov15, where the type-layout, motion-rules and audit-design-b branches meet: the combined tree measured SKILL.md 10959 bytes (each side's cap was 10900: both added index lines), core 31192 bytes (caps 30720 and 31050: the page-row and display rules, the three motion tokens and the skip link and 44px target rules all land in the core CSS) and core usage 2348 bytes (caps 2300 and 2250: type-layout's line and the skip-link bullet), so each is set to the measured bytes rounded up to the next 50: skillMd 10900 to 11000, core 31050 to 31200, core usage 2300 to 2350. Raised in the audit-design PR (decisions 138 and 139, parts A, D and C11): core 30720 to 31600 (+2.9%: the more-contrast block and its three aliases, and the field boundary token, every page carries as React does; the shadow-pill token is gone; the script gained `reserve`, 240 bytes), segment 3700 to 4100 and tabs 2300 to 2700 (the chosen label is 600 against 400, its width reserved by a span that carries its own copy, drawn unseen at 600; the pill's drop shadow is gone), and the segment's usage 300 to 380 (the weight and the glyph-only button). Raised again in the audit-design-a amendment (decision 145): core 31600 to 32300 (reserve() also reserves a label that is not plain text), segment 4100 to 5100 and tabs 2700 to 3500 (the second copy of such a label, and an icon drawn in both its forms), glyph 1100 to 1300 (a glyph in a segment or tab is drawn in both forms). Raised in the second audit-design-a amendment (decision 149): core 32300 to 32800 (reserve() builds the second copy of a label without any id, name, reference or hidden control, and does not copy a frame or media), segment 5100 to 5400 and its usage 380 to 500 (the 600 is on the label, the one-line rule and the usage text); the still-table cap is back at 8200, as the wash is on every cell again. Return 3 of the audit-design-a build (decision 149): tabs 3500 to 3700 (a tab the script has not reserved is 600 itself when selected, and one it declined is marked; the same two lines are in segment, which stays under 5400). Raised in the audit-fix-c2 PR (engineering, no pixel changes): toast 13850 to 14350 (the module was 13789 bytes and is 14288, +499, 3.6%) for F6, which focuses the Notifications region and Shift+Tab or Escape from it (or from the first toast) leaves it for where focus came from (and keeps a dialog's focus trap from wrapping it), as Base UI's viewport does in React, and for placing the region from focus (in the modal that holds it, or in the body), so a toast is never under a backdrop or in an inert modal whatever order the modals opened in (A3-09); the palette module grew 9864 to 9897 of its 9900 so that a palette opened over a modal sits inside it; topbar 3200 to 3250 (3123 to 3233, +110) for the scroll margin on what the bar holds, so a Tab into the bar from a scrolled page does not scroll the page (React's rule from PR #66); stage usage 1650 to 1750 (1580 to 1713, +8%) for the art's new place in the markup, after the content (A1-09), the stage's own CSS rising 1179 to 1208 within its 1250. skillMd rose 10724 to 10876 for the sentence that says a body may carry head tags, within its 10900. compose.mjs, the tool an agent runs, has no cap here (it is never in a page): it grew 21673 to 38153 bytes for the tokenizer that reads a body as HTML does and the head tags. Raised in the site-parts PR (DECISIONS 146, round 39), which folds each new part into the module it belongs with, so SKILL.md gains no index line (it has 41 bytes under its cap and a new module needs about 100): topbar 4150 to 17600 (+13450: the site footer and its disclosures, the lockup by pixel density, and a bar that arrives or leaves and returns, with its observer; a page that has a .topbar and no footer carries them too: the alternative, a module for each, needs its own index line and so SKILL.md bytes) and its usage 950 to 2900 (the footer's markup, the lockup's and the phase's); theme 650 to 4550 (the three-word theme choice: its CSS 2230 bytes and its script, 2277, with arrows, storage and the system listener) and its usage 400 to 1150 (the choice's markup written in full, so the right word is chosen before any script); segment 3700 to 3800 (a radio group's checked state besides a pressed button); stage 1250 to 2150 (its first script, 768 bytes, for fit and anchor) and its usage 1750 to 2000; framed-art 3000 to 3900 (drawn art in the frame: fit, anchor, no scaling strokes) and its usage 1250 to 1400. SKILL.md rose 10959 to 10992 (the topbar and theme index lines name .site-footer and .theme-choice). The head's theme line also writes data-theme-choice. Raised in site-parts return 2 (DECISIONS 146 B1 and B4): theme 4550 to 5350 (+800: the icon form of the theme choice, [data-theme-menu], whose button shows the theme in use, is named for the choice and opens the page's own .menu of three radio rows, in the theme script's 3073 bytes; the menu and popover modules are the page's, brought by its markup, so no module line was added and SKILL.md is 10993 of 11000) and its usage 1150 to 2200 (+91%: the menu's markup is written in full, and the deprecated toggle is said once); app-shell usage 2000 to 2100 and topbar-nav usage 1900 to 1950 (the theme control leaves the bar's text; the tools and the end cluster come in). The two example bodies still carry the deprecated data-theme-toggle. Return 2, F3 (DECISIONS 146 F): stage 2150 to 2250 (script 842 bytes: slice is the stage's default, as a frame's, and a drawing's own preserveAspectRatio stands unless the stage names data-fit or data-anchor) and its usage 2000 to 2150. framed-art 3900 to 4000 (a drawing's own preserveAspectRatio stands unless the figure names data-fit or data-anchor, +101 bytes). Return 3: theme 5350 to 5900 (script +569 bytes: who wrote data-theme, so System follows the system's change live and a theme the page set by hand, or a .dark or .light root, survives it). Raised in the controls port (DECISIONS 154): skillMd 11000 to 11200 for two index lines (link-tabs and option-chips, 214 bytes together), and core 31200 to 31600 for the nine tokens the port adds to every page's token CSS (the control rungs 44 to 64, two container widths, the confirm hold and the amount's opacity, 311 bytes). New modules (DECISIONS 154): link-tabs 2700 (its sizes, the 640 container step, the forced-colours underline, and the select that replaces the row under 720 with its 590-byte script, A15; it requires the select module), option-chips 5700 (the chip's states each written for a native radio inside a label, which needs :has on every one, plus the 1 KB script that keeps an aria-disabled chip reachable and never chosen). Return 3 (DECISIONS 154 conformance): link-tabs 2700 to 3100 and its usage 1650 to 1850 (the select's height for each row size, and a script that reads aria-current when it is needed and watches it move: 3,048 bytes), option-chips 5700 to 6700 (each state written twice, as a state attribute and as :has(), so no browser needs :has(): 4,975 CSS and 1,623 script). Return 4 (DECISIONS 158, Q2): link-tabs 3100 to 4300 and its usage 1850 to 2400 (the \"Go to\" label drawn at the select's start with its measured clearance, the select's accessible name kept as the words and the chosen page's, and the key hold that keeps a letter or an arrow on the closed select from navigating: 4,174 bytes, CSS 2,951 and script 1,223). Raised in the links-and-rows port (DECISIONS 152; the owner's approval is the lead's to confirm): the new link-rows module (5050 bytes of CSS, 50 of them for Castle's big-row arrow stepping colour over duration-fast, return 1, 1500 of usage: the directory's and the big rows' CSS, whose arrow is a core glyph drawn as a mask, and their tokens, size-row taken out of the core like type-layout's), disclosure 1550 to 3500 (Show all: the track, the clip and the settle, 1.5 KB of script and 1.8 KB of CSS), copy 2400 to 3500 (the form with words: the one cell and its script). SKILL.md rose 10959 to 10997 for one line, within its 11000 cap. Raised in the charts port PR (DECISIONS 153, D7a): chart 34400 to 34650 (script 26970 to 27270 bytes, +1.1% on the 34283 it was: `Basalt.trailingMean`, the trend maths React exports as `trailingMean`, 300 bytes), its usage 3150 to 3350 (+6%: one line for it). The tokens the batch adds (chart-lit-top, -mid and -base in both themes, size-chart-plot-sm, size-chart-row, size-meter-marker and radius-2xs) took the art module 2087 to 2546 bytes (budget 2100 to 2600, +24%: the chart tokens are its group) and the core 31192 to 31250 (cap 31200 to 31300, +0.3%: radius-2xs). Only D7a names a skill module in the charts ballot; the lit marks, the headline frame, the phase chart, the share bar, the coverage strip, the marks row and the range meter are React-only in this batch. Added in the overlays-and-search PR (DECISIONS 155, D10b and D13a): the sheet gains React's head, body and foot (the 44px close, the 20/28 title over a 13px count, the divider and the safe areas; its CSS 3.6 to 5.2 KB, budget 4050 to 5250, +30%) and its usage 1050 to 1450 (+38%: the anatomy and the step's focus, two bullets); and one new module a page carries only when it uses it, search (React's SearchDialog: the form, the field's -2 outline, the count line, the fixed-height results area and the rows with their picture slots and full-bleed hover wash; CSS only, 4368 bytes, budget 4400, usage 2050; it requires the dialog). The dialog's title draws no ring when script focuses it. skillMd rose 10959 to 11079 for the search line (the sheet's line is unchanged: its usage carries the anatomy), so its cap rose 11000 to 11100 (+0.9%). The core's CSS grew 31192 to 31421 bytes for the six new size tokens (the wide dialog, the search trigger and the logo and picture slots of a search result): its cap rose 31200 to 31450 (+0.8%). The two 44px values (the sheet's close and the search field) are local to their modules, with a lint exception that says they join the controls batch's size token (DECISIONS 154). Set in integration-nov15b, where audit-design-a, audit-fix-c2, site-parts, port-controls, port-links-rows, port-charts and port-overlays-search meet: the combined tree measured SKILL.md 11560 bytes (the caps were 11000, 11100 and 11200: each side added index lines), core 34086 bytes (caps 31300 to 33550: every side's rules land in the core CSS and script), topbar 17660 (17600 from site-parts, plus audit-fix-c2's skip-link and focus work), number 3453 (3400), palette 11379 (11000, audit-fix-c2's hosted scrim plus the core search glyph), dialog 5120 (5100), toast 15692 (15400) and stage usage 2248 (2150), each over every side's cap, so each is set to the measured bytes rounded up to the next 50: skillMd 11200 to 11600, core 33550 to 34100, topbar 17600 to 17700, number 3400 to 3500, palette 11000 to 11400, dialog 5100 to 5150, toast 15400 to 15700, stage usage 2150 to 2250. The segment cap is the base's 5400 plus port-controls' 100 (5500), unchanged by the merge. Raised in integration-nov15b, join 2 (a link tab takes the selected state, DECISIONS 138 A, 145, 149 and 154's D12 row): link-tabs 4300 to 5750 (+34%: the module was 4174 bytes and is 5736; the 600 against 400, the reserved width and the second copy of a composed label, an icon drawn in both its forms, the same rules a tab carries, 1,530 bytes of CSS and script) and its usage 2400 to 2550 (+6%: one bullet). The cap is the measured bytes rounded up to the next 50; a module that needs the tab's rules carries them as the segment and tabs modules do, so a page without link tabs pays nothing. Raised in the panels, art and parts port (DECISIONS 162): table 3000 to 3150 and its usage 950 to 1450 (the flat form and the two-line cell), stage 2250 to 2600 and its usage 2250 to 3100 (the closing block: its held art, forced colours and print; its section gap is type-layout's --basalt-section-gap, which a page with data-closing brings), the new app-tile 4300 (a 120-point polygon clip and the hairline's mask of the same outline), captioned 2000 and period 1400; skillMd 11600 to 11950 for one index line each for captioned, app-tile and period (358 bytes; the file is 11918). Raised in the logs, status and forms port (DECISIONS 162): core 34100 to 34200 (the new size-field-label-inline token, 80px, is written into every page's tokens: 25 bytes); dlist 1300 to 1900 and its usage 950 to 1060 (the stacked form, R9 and R10: a title over its text, 20px between entries, no divider; one usage line). Raised in audit-fix-c6 (the owner's cap, raised by the builder and for the owner to confirm): glyph 1300 to 1900, for redrawing a glyph when its ancestor's aria-current or data-current moves (the lists that hold glyphs are watched). Raised in the colour-ink-ladder build (DECISIONS 166): core 34200 to 34350 (the four lifted dark inks are four new primitives, each written into every page's tokens: the core measured 34307). Raised in the audit-2-design build (DECISIONS 167, Q7a): disclosure 3500 to 3800 (the core chevron drawn as a mask in place of two borders: the module measured 3755). Joined in the integration of c7 (#86) and c10 (#91): option-chips 6750 to 6850 (c7's reset resync and c10's data-ready together measure 6839). Raised in table-sort-3 (DECISIONS 257 and 261, the owner's pick: three sort states, the arrow after the label, explainers on column titles): still-table 13400 to 14650 (+9.3%: the module was 13343 bytes and is 14602; the end-aligned label's move by a transform, its right-to-left sign and the indicator that waits for it on a fine pointer, 912 bytes of CSS; the third state, the sort from the table's own order and a .explainer kept out of the button, 347 bytes of script) and its usage 2150 to 2250 (2197: the third state and the own order); the new explainer module 5850 (5842: a manual native popover opened from the sort button on hover, keyboard focus and a long press, placed above the header or beside it, 1752 bytes of CSS and 4090 of script; a page without explainers pays nothing) and its usage 900; skillMd 12250 to 12400 for the explainer's index line (113 bytes; the file is 12352). Each cap is the measured bytes rounded up to the next 50. Raised in table-sort-3's fix pass (Astra's review): explainer 5850 to 6900 (+18%: 5842 to 6864 bytes; the gap between the header and the card kept while a pointer crosses it, the close when its header leaves the view whatever has focus, the dismissal held until pointer and focus have both left, and its page-wide listeners and timers scoped to an open card and stopped when the table leaves the page, 1,022 bytes of script). Raised in cimip-gaps-2 batch B5 (the touch sizes under 720 whatever the pointer: each coarse-pointer target rule also answers a window under 720, about 20 bytes a rule; forms merged its three into one and stays under 3500): select 9000 to 9100 (measured 9064), selection 1480 to 1500 (1486), filter 17450 to 17500 (17473), option-chips 6850 to 6900 (6853), menu 8900 to 8950 (8902). B5 fix pass 1 (Astra): core 34550 to 34950 (measured 34911: 30762 CSS and 4149 JS) for stacked links in a column, each giving up the side of its 44px box that meets a neighbour, so a tap on a link's words is always that link's; core had 12 bytes free. DECISIONS 274 (the owner's pick: under 720 the toast stack hangs from the bar): toast 15700 to 16050 (measured 16035; 8 bytes were free; the stack's direction became one sign variable, trimming 585 of the 920 bytes the phone form first took). B5 merged with main (5ad5345a): main's own core measured 34930 against its 34550 cap before B5; with B5 (the touch sizes under 720 and stacked links in a column) it is 35331, so core is 35350; nav 5350 to 5400 (measured 5364: B4's nav plus the touch size under 720). The full run after the stream (DECISIONS 246): the site footer's links keep their own flex column under 720, as React's, out of the bare-link touch rule (26 bytes), so core is 35400 (measured 35357); sheet 5250 to 5400 (measured 5368: React's B5 ring room, ported: the held actions reach space-1-5 above their band, clipped, and the body keeps space-1-5 at each end). Raised for diagram motion and service marks (DECISIONS 292): skillMd 12550 to 12650 for the diagram-motion module's one line; diagram 87200 to 91000 for what a still diagram now carries (a card's mark and its seat, the pending frame, the comparison that writes a drawing only when it changed, and the print rule), and its usage 2600 to 4300 for the decision's four lines and the list of mark ids; the new diagram-motion module (the motion engine, its stylesheet and the motion tokens, in a page only when a diagram is animated) at 26200. Raised when the diagram tests were first run (DECISIONS 298): diagram 91000 to 91250 and diagram-motion 26200 to 26850. Raised in batch A of the diagrams backlog (DECISIONS 301): diagram 91250 to 92400, for the engine fixes it bundles (a decision kept no taller than it is wide, labels on whole pixels, slots beside a straight line, a one-column schema's turn-back); the skill keeps the development checks a production React build now drops. Raised again in that batch's review fixes: diagram 92400 to 92650, for the drawn layout refusing two lines laid on one another (Neon's blocking finding 1 on #126). Fix round 1 of #124 had already taken them to 91205 and 26621 with the tests unrun; this round added 1 byte (every focal node prints its fill; a one-form mark's dark form falls back to its light one) and 180 (the entrance keeps its own clock when it is drawn again while paused). DECISIONS 320 (versions and release notes): the release module is new (budget 15900 at first, usage 2400); topbar, app-shell and tab-bar gain the version link's classes (budgets: topbar 17700 to 19900, app-shell 4300 to 5200 with the rail's tooltip for it, tab-bar 4850 to 5200), their usage caps rising 2900 to 3100, 2600 to 2850 and 2250 to 2400 for its one line each; skillMd rose 12650 to 12800 for the release module's line and .version-link in topbar's. The code review of round 68 adds data-focus-self to the popover module (its Tab walk; budget 4950 to 5600, usage cap 950 to 1100) and logical start and end for its alignment; the release module's header grid and the Sources panel's touch rows take it to 16900. The spacing sweep of round 68 (DECISIONS 326: Copy link's words on the edge, the callout's last change, its reference column, the last release, the touch rows' end and the whole code chip) takes the release module to 17400. The ruling on where a release ends (DECISIONS 331: no padding under the last change in a release, a release-ending fold's hang, an arrived change keeping its padding, the panel holding its first margin, Build details 44 on touch and a closed Fixed panel taking no room) takes it to 19000. The code recheck of round 68 (recheck 5) has the popover's Tab walk follow Safari's own rule (Tab skips links on Apple's WebKit, Option-Tab reaches them): popover 5600 to 5900. The pixel recheck of round 68 has the Sources panel's touch rows keep their 20px lines with the link's box as hit area, space-3 rows and space-6 between two linked values (recheck-pixels 4), and the release's whole header take the arrival's plate: release 19000 to 19600. Merging #127 (stages, DECISIONS 316 and 328) into the versioning branch: both had raised skillMd from 12650 to 12800 for their own module's line, and together they came to 12886; SKILL.md was tightened in its wording (no rule dropped) to stay within 12800. Raised in diagram batch B's fix round (DECISIONS 318, the owner's diagram raise; and 326's sweep), each to its measured size: diagram 137700 to 144100 (the two reviews' fixes in the shared engine: right to left frames and self-calls, the corridors' and lanes' development words, the unusable-placement check, the transcript's hanging lines, the text art's frame widening, the frame-side fit check, the sequence's layers, the stacked group's turn room), diagram-motion 28450 to 30450 (the text sequence's build by ink and its colour-only run, moved into the motion module), diagram-zoom 17000 to 17600 (a linked card closes the viewer; the text art's own width; a placed model for the key hint), diagram-export 7850 to 10450 (an export at rest: sized drawing SVGs, no reveal masks, the pseudo-element rules, the lines under the cards, a viewer's figure read at 100% with its head and key, the rim's lit top). Raised at the batch B re-check (the decider's four rulings): diagram 144100 to 145100 (5.1's first list reported as errors apart from the warnings, a turn's label lines on the group entered by it and the seats beside its turn, the bare stack applied, the text art's reset of the core's inline code chip). Merging main (#127 and #128) into diagram batch B: skillMd keeps main's 12800 (batch B had raised it to 12950 for its diagram lines); SKILL.md was tightened in its wording to stay within it, no rule dropped; core takes main's 35550.Raised in the repo review (23 Nov 2026; budgets are soft, the owner's word): notifications 12450 to 12700 (a link is written only when relative, http, https or mailto, and side and align are checked before they reach the markup), combobox 11200 to 11350 (a disabled field's hidden input is disabled too, now and later), tooltip 3200 to 3550 (the gap to the opener is the tooltip's own, and hover and keyboard focus each hold it open; WCAG 1.4.13), chart 34750 to 34800 (the scale's step search and gridlines are bounded, so extreme values cannot hang the page), spinner 650 to 720 (its held rule moved in from loops, so a ring-only page keeps a stored hold), kbd 2900 to 2950, palette 11400 to 11500 (and its usage text 1350 to 1400, for the Mod line) and toast 16050 to 16200 (Mod in a palette item's keys is bound as it is drawn, and a toast action's aria-keyshortcuts resolves Mod). The safe-sinks rule (decided by the owner, Fable, Astra and Muse, 23 Nov 2026): skillMd 12650 to 12900, and 13050 with main's own raise merged in (one line: data goes in as textContent, a link passes Basalt.safeHref, an option comes from a fixed list), core 35400 to 35650, and 35800 with main's own raise merged in, and its usage 2950 to 3200 (one safeHref, published as Basalt.safeHref, and _.pick, in place of a copy in each module; esc escapes the apostrophe), link-tabs 5750 to 5900 (a refused link dispatches no event), diagram 92650 to 93000 (a card's mark is a relative path, https or a data: image). Merging #129 into diagram batch B: diagram keeps batch B's 145100 plus #129's mark check, set to its measure, and batch B's usage 4600.", + "$comment": "Which parts of the skill's CSS and JS a page gets. The core is always in. A module is in when the page's body has one of its classes, attributes or tags, matches one of its text patterns, or is named in a <!-- basalt:use name --> comment, and when another module needs it (requires). Modules are added in the order listed here, which is the order of the source files' cascade. classes: every class the module's CSS styles (the test checks them against the CSS and against SKILL.md). budget: the most bytes its minified CSS and JS may reach together. budgets: skillMd (SKILL.md, the context an agent pays: never above what it was), core (the CSS and JS of every page). icons: Phosphor names the module's script draws itself. Raised in the first parity PR (the owner's \"bring up the parity\"): forms (the number-input, search-clear and file-input chrome), disclosure (the native details marker), status (the accent reader and the forced-colours badge border), spinner (a fixed 16px ring), and the new number, range and accent modules. skillMd rose 10555 to 10900 for the new rules (number field, native chrome, the braille rule, the accent). Raised in the second parity PR (popup rows, levels and the segment's pill): segment 1400 to 3700 (the shared sliding pill: its script, 1.5 KB, and its CSS with the pill's two fallbacks), rows 3600 to 4300 (#27's plate-in-a-row geometry, the plate per level, the glide's shared plate and the forced-colours lit row, net of the removed bar), palette 9400 to 11300 (the glide's script, 2.4 KB: it follows the lit row, travels on a pointer, snaps on a key, and fades in place on leaving). The art module (DECISIONS 101 and 104) is the token groups only some pages name, taken out of the core so the core stays under its cap: the chart roles and lengths, the art colours, the aspect ratios and the stage headroom, in both themes (2087 bytes at 2100; it grows only when a token of those groups is added). A page gets it when its body names one of them, a var() in its own style included. The every-module page has no cap of its own (owner, DECISIONS 79): each part is capped, and a page carries only the parts it uses. usage: the most bytes of a module's usage text (src/usage/NAME.md; core.usage for core.md), which compose.mjs --usage prints on demand. It is context an agent pays only for the modules its page uses, so it is capped per part as SKILL.md and the CSS and script are (DECISIONS 79 and 109). Each is set a little above what its text was when the usage moved out of SKILL.md (DECISIONS 109); raising one needs a reason in the PR, and a rise of 40 to 50% is the owner's. textWords: each text pattern said in words, which compose.mjs --usage prints instead of the regular expression (one for each entry of text, in order). builds: modules a module requires whose markup its script writes, so --usage prints a line saying so instead of their usage text (the palette builds its own rows and key chips). The council's clarity check of the usage texts (all three: not yet clear) raised eight caps because the texts gained what an agent had to guess: callout 200 to 700 (the icon and one wrapper div around the title and body as markup, the four status icons, the role React's Callout renders), palette 1100 to 1300 (an item shown whole, keys as an array, keywords), stats 450 to 800 (a snippet of the figures and of the dl), tabs 500 to 650 (the unselected panels), code 250 to 450 (the markup and what each token class means), segment 150 to 300 (a click does not switch it), progress 150 to 350 (the empty span that paints the fill), theme 250 to 400 (leave the button empty), and accent 250 to 300. Topbar went down, 700 to 500, as its build detail was cut. Raised in the usage PR (the council's clarity check): palette 11300 to 11450 (the module grew 11283 to 11448, +165, about 1.5%), for the guard that makes a string `keys` warn and draw no chip instead of throwing in `keys.filter`, which the palette's usage already promised. Round 2 of the clarity check: tabs 650 to 750 (the panel's top space shown in the snippet, and that the script selects a tab on click). Raised in the site-icons and status PR (skill-parity part A, DECISIONS 106 and 107): status 1650 to 1900 (the neutral, pending and running marks, the badge's real border, and the forced-colours disc, net of the red danger word it drops) and its usage 400 to 1000 (every status in words, the word alone, running, forced colours); rows 4300 to 4450 (the profile list's seat rule and the status parts on a lit row) and its usage 300 to 600 (the profile list, with the one mistake: never an empty element for the seat). New: the links module (2671 bytes: the social row, the new-tab arrow's CSS and the script that draws it; budget 2750) and its usage (1746 bytes; cap 1850), which carries the social link, the glyph set, icon only and the new tab. Dropping Regular halves icons.json. Added in the overlay PR (skill-parity-4, batch 7 step 2, DECISIONS 108): the shared plate leaves palette.js for a glide module (the palette, a menu and the notification centre all call it), so the palette's cap went down, 11450 to 9250, and rows 4450 to 3850 (the plate's CSS moved to glide); and the overlay layer comes in as seven modules a page carries only when it uses them, each with its own cap and usage cap set a little above its size: popover (the native popup shell), menu, dialog (the dialog and alert dialog), sheet (on every side, the top one the site header's narrow menu), tooltip, toast and notifications (the centre). skillMd is unchanged in its cap (the eight new index lines fit within it); the core is unchanged in bytes. Added in the figures and charts PR (skill-parity-5, batch 7 step 3, DECISIONS 108): four modules a page carries only when it uses them, each with its own cap and usage cap set a little above its size: meter (React's Meter, CSS only, 2581 bytes), dlist (the description list, CSS only, 1265), terminal (the code block's transcript: its CSS, 3242, and the script that draws the gutter, the copy button and the replay, 4824) and chart (React's TimeChart and ChartGroup: 7313 of CSS and 23262 of script, which port chart.tsx's scale, layout, lane, labels, sentences, keyboard and table; it needs the art tokens, the table and the kbd chips, and a page without a chart carries none of it). Stats grew for the source line (budget 700 to 850, 798 bytes; its usage 800 to 950, 675 to 899 bytes, +33%, under the owner's 40 to 50%). skillMd is unchanged in its cap (four index lines fit within it); the core is unchanged in bytes. Added in the forms and selection PR (skill-parity-6, batch 7 step 4, DECISIONS 108): six modules a page carries only when it uses them, each with its own cap and usage cap set a little above its size: select (React's Select: the native select's closed trigger in every browser and, where `appearance: base-select` is shipped, the styled list with its two-line rows; a small script that says which input lit a row, 7740 bytes before it, choice (Checkbox, Radio, RadioGroup and Switch as styled native inputs; CSS only, with the first-frame rule), choice-card (ChoiceCard; CSS only), toggle (the pressed toggle's plate and check seat on .btn; CSS only), selection (a table's checkbox column: its fixed width and the script that sets aria-selected, the mixed header box and the count) and loops (the page-level hold on every loop with its switch: the held look and the script that stores it). The select's styles left forms, whose budget fell 3650 to 3250. skillMd rose 8621 to the size of its six new index lines, within its cap; the core is unchanged in bytes; compose adds the stored-hold line to the head of a page that has the loops module. Revised in the same PR (the lead's review of the build): the select gains select.js (one row is lit at a time, by whichever of the pointer and the keys moved last), and choice, toggle, selection and loops carry the first-frame rule, so a state a script sets on load (a mixed header box, the stored hold) paints at once with no crossfade. Added in the navigation and layout PR (skill-parity-7, batch 7 step 5, DECISIONS 108): five modules a page carries only when it uses them, each with its own cap and usage cap set a little above its size: glyph (Basalt's core glyphs drawn by name, at rest and selected, from a table the build works out from the drawn set; a page carries only the glyphs it names, and the drawing of a core glyph from data-glyph left the sheet module, which draws none now), nav (React's Nav: the sidebar's, the narrow menu's and More's rows, with the shared hugging pill), topbar-nav (the site header's links, one action and narrow menu, built by script from the bar's markup), app-shell (the shell, its sidebar and rail, and the app header) and tab-bar (the phone tab bar). The topbar module became the site header's bar (React's SiteHeader, DECISIONS 108: 56px with its line inside, the 44 by 44 brand target, the narrow-screen buttons, the derived sticky offset), budget 1600 to 3200 because its rules gained the app header's shared smoke, and its usage 500 to 750 (+50%) for the lockup's markup (the links, action and menu are topbar-nav's usage). Glide 3700 to 3950: the navigation's pill is a shape inside the row that the plate follows (about 200 bytes). The core's usage 2000 to 2100 (+5%): h2 is the Section step, the prose column's measure, and a link already 44px tall needs no margin. skillMd rose 9317 to 9863 for five index lines, under its cap; the core CSS grew 38 bytes (the layout tokens replace raw lengths, the gutter is one derived property, h2, .prose and .lead follow foundations) and the core script is unchanged. A module's media query writes %bp-md%, %bp-lg% or %bp-container% and the build substitutes the breakpoint tokens. Added in the tables and filters PR (skill-parity-8, batch 7 step 6, DECISIONS 108): the existing table module gains React's table additions (DECISIONS 95: the row header, \"Not observed\", the row density and the scroll hint with its small script), budget 1400 to 3000 (it was 1134 bytes of CSS; it is 2168 of CSS and 693 of script) and its usage 700 to 950 (+36%); and two modules a page carries only when it uses them, each with its own cap and usage cap set a little above its size: still-table (React's Table with `columns`: the fixed layout from a colgroup, the whole header cell as the sort button with its reserved seat, aria-sort, the pinned columns and their divider, the empty row; 4767 of CSS and 3264 of script, budget 8200) and filter (React's MultiSelect and FilterResult: the chips, the trigger and checklist with the search band from ten values, Clear held in place, the one debounced result line, and the narrowing of a table by `data-column`; 8240 of CSS and 7978 of script, budget 16400; it needs the popover, glide, glyph and choice modules). The core is unchanged in bytes. skillMd rose 9863 to 10128 for two index lines and the CaretUpDown icon's name, within its cap. Added in the commands PR (skill-parity-9, batch 7 step 7, DECISIONS 103 and 108): one new module a page carries only when it uses it, command-list (React's CommandList: the command panel set in the page, list plus preview, the push; it extends the palette and needs rows, kbd and glide; 5229 of CSS and 8734 of script, budget 14000, usage 2150). Two-line rows come to the existing modules: rows 3850 to 5350 (the described row's grid and description line, the push's chevron: 1481 bytes of CSS, the same rules React's menu rows carry), palette 9250 to 9900 (its rows are one function the list shares, with the description and the two-tier ranking of title matches over keyword and description matches; +636) and its usage 1300 to 1350, rows' usage 600 to 800, and glide 3950 to 4000 (a host that is idle counts as having no lit row, +54). skillMd rose 10128 to 10259 for one index line, within its cap; the core's CSS grew 24 bytes (.split.aside takes size-list-width in place of its raw 20rem: the same 320px, so no pixel moves) and the core script is unchanged. Added in the art PR (skill-parity-10, batch 7 step 8, DECISIONS 104 and 108): two modules a page carries only when it uses them, each with its own cap and usage cap set a little above its size: stage (React's Stage and PairedArt: full-bleed art under the site header, the pull-up by the sticky offset, the headroom, the paired art that follows the page's theme, and the forced-colours and print rules; CSS only, 1179 bytes) and framed-art (React's FramedArt: the figure, its rim and radius, the reserved box, the placeholder and the failed alt, the caption and credit; 2208 bytes of CSS and the 733-byte script that sets the frame's phase); both need the art tokens. The bar stays smoked over a stage: React clears it only over a stage that passed the headroom test helper, and a page has no test run (DECISIONS 108's note), so the skill builds no clear state. skillMd rose 10259 to 10500 for two index lines, within its cap; the core is unchanged in bytes. The callout gained the status rim in the same PR (DECISIONS 82, D8's status callouts): success, warning and danger draw their border in the status colour at 45% mixed in sRGB over the callout's own level, one solid colour on every side, and CanvasText in forced colours with the icon; the status colour is now one property the icon and the rim read. Its budget rose 900 to 1150 (the module is 1089 bytes, from 792: +297, about 37%); its usage is unchanged. Added in the overlays-and-the-rest PR (skill-parity-11, batch 7 step 9, DECISIONS 90 and 108): the last two parts of D8's part 5, each a module a page carries only when it uses it, with its own cap and usage cap set a little above its size: combobox (React's Combobox: the input with its caret button inside, the popup of the menu's rows with the glide's shared plate and two-line options, the filtering, the keys, the hidden value, the empty message and the check; 4342 of CSS and 6423 of script, budget 10900, usage 2150; it needs forms, popover and glide, and builds the last two) and sparkline (React's Sparkline: the label and latest value, the line, the axis, the empty sentence and the loading line that breathes; 1609 of CSS and 1874 of script, budget 3600, usage 950). The combobox copies the menu's row rules, as the select's list does, because React's Combobox renders MenuItem rows (a 40px hit area, a 36px plate) and the skill's .row is the palette's 44px: it carries no menu script. popover.js gains the combobox popup in the list of popups that keep focus where it is (+21 bytes, within its cap). skillMd rose 10500 to 10724 for two index lines, within its cap; the core is unchanged in bytes. Added in the motion-rules PR (DECISIONS 136 and 139): one module, ambient (a page's one ambient loop: CSS 828 bytes, script 433, budget 1300, usage 800), taken out of loops so the hold's own module grows only by the icon toggle's glyph swap (loops 2000 to 2200, +10%; its usage 1300 to 1650 for the icon form and the new settings-row sentence, +27%); and the chart's entrance (`entrance: true`: the marks' animations, their conditions and the redraw that restarts them at the elapsed time, 23262 to 25299 bytes of script; budget 30700 to 32800, +7%, usage 2500 to 2950, +18%). The core grew by the three tokens (27704 to 27862 bytes of CSS, under its cap). its stage usage gained the ambient art's line (1650 to 1750, +6%). skillMd rose 10724 to the size of the ambient index line, within its cap. Raised again in the motion-rules amendment (DECISIONS 143): chart 32800 to 33800 (script 25299 to 26375 bytes, +4%; +10% over the 30700 it began with) for the glide a new data set makes mid-entrance, print settling it, and `Basalt.pageChange()`; its usage 2950 to 3150 (+26% over the 2500 it began with). Raised in the second motion-rules amendment (DECISIONS 148): chart 33800 to 34400 (script 26375 to 26970 bytes: a line and its markers glide from their drawn geometry, and `beforeprint` settles the entrance; +12% over the 30700 it began with); topbar-nav 6900 to 7500 (+8.7%: the narrow menu's pause row, its CSS and 275 bytes of script, DECISIONS 148 item 2); loops usage 1650 to 1800 (+38% over the 1300 it began with, for the icon form's `title` and the menu row). Raised in the audit-design-b PR (DECISIONS 138 and 139): still-table 8200 to 13400 (+63%: the module was 7927 bytes and is 13311; the cut cell's plate, its focus stops and its dismissal, ported from React's cell-peek.ts, are 4273 bytes of script and 1111 of CSS; a still table that truncates needs them). The same PR: core usage 2100 to 2250 (+7%: the skip link, one bullet), forms usage 350 to 480 (+37%: the required mark), still-table usage 1950 to 2150 (+10%: the cut cell and the width rule), notifications usage 1050 to 1100 (+5%: the 44px entry on touch). The skip link's rim and radius took the core 30457 to 30609 bytes, under its cap (the rules that hang it under the bar are the topbar module's: 3200 to 3600, +12.5%); core 30720 to 31050 (+1.1%, DECISIONS 147: also the bar's links left out of the rule: the pseudo-element that makes a short standalone link a 44 by 44 target), skip-link script in the topbar module (3200 to 4150 over this PR, +30%: the rules that hang the link under the bar, 3600, and the script that reads the bar's real edge, 4150), sparkline 3600 to 4050 (+12.5%: React's ticker structure, so the value copies once on its line, and in forced colours the strips go and the number is plain text), forms budget 3250 to 3500 (+7.7%: the necessity word), notifications 9050 to 9250 (+2.2%: the 44px entry). Raised in the audit-design-b PR's E2 port (DECISIONS 138 and 139: the core set draws check, close, the chevrons, copy, plus, minus and search wherever a component draws them): the modules that drew a Phosphor icon for one of those now carry the core glyph's whole SVG, written in at build time (`%glyph-svg:name%`, the markup the glyph module's `_.glyph(name)` returns, so no module needs the glyph module and a page pays for nothing it does not use), and the Phosphor path of the same icon leaves the page. Each module's own bytes rose by that markup, and a page's total moved by what the Phosphor path it no longer carries saves: menu 8600 to 8900 (+303), combobox 10900 to 11200 (+303), copy 1900 to 2400 (+640), terminal 8100 to 8850 (+761), toast 13850 to 14150 (+325), number 2900 to 3400 (+557), filter 16400 to 17050 (+785), palette 9900 to 10450 (+536); the command list shares the palette's search drawing and fell 20 bytes. Set in integration-nov15, where the type-layout, motion-rules and audit-design-b branches meet: the combined tree measured SKILL.md 10959 bytes (each side's cap was 10900: both added index lines), core 31192 bytes (caps 30720 and 31050: the page-row and display rules, the three motion tokens and the skip link and 44px target rules all land in the core CSS) and core usage 2348 bytes (caps 2300 and 2250: type-layout's line and the skip-link bullet), so each is set to the measured bytes rounded up to the next 50: skillMd 10900 to 11000, core 31050 to 31200, core usage 2300 to 2350. Raised in the audit-design PR (decisions 138 and 139, parts A, D and C11): core 30720 to 31600 (+2.9%: the more-contrast block and its three aliases, and the field boundary token, every page carries as React does; the shadow-pill token is gone; the script gained `reserve`, 240 bytes), segment 3700 to 4100 and tabs 2300 to 2700 (the chosen label is 600 against 400, its width reserved by a span that carries its own copy, drawn unseen at 600; the pill's drop shadow is gone), and the segment's usage 300 to 380 (the weight and the glyph-only button). Raised again in the audit-design-a amendment (decision 145): core 31600 to 32300 (reserve() also reserves a label that is not plain text), segment 4100 to 5100 and tabs 2700 to 3500 (the second copy of such a label, and an icon drawn in both its forms), glyph 1100 to 1300 (a glyph in a segment or tab is drawn in both forms). Raised in the second audit-design-a amendment (decision 149): core 32300 to 32800 (reserve() builds the second copy of a label without any id, name, reference or hidden control, and does not copy a frame or media), segment 5100 to 5400 and its usage 380 to 500 (the 600 is on the label, the one-line rule and the usage text); the still-table cap is back at 8200, as the wash is on every cell again. Return 3 of the audit-design-a build (decision 149): tabs 3500 to 3700 (a tab the script has not reserved is 600 itself when selected, and one it declined is marked; the same two lines are in segment, which stays under 5400). Raised in the audit-fix-c2 PR (engineering, no pixel changes): toast 13850 to 14350 (the module was 13789 bytes and is 14288, +499, 3.6%) for F6, which focuses the Notifications region and Shift+Tab or Escape from it (or from the first toast) leaves it for where focus came from (and keeps a dialog's focus trap from wrapping it), as Base UI's viewport does in React, and for placing the region from focus (in the modal that holds it, or in the body), so a toast is never under a backdrop or in an inert modal whatever order the modals opened in (A3-09); the palette module grew 9864 to 9897 of its 9900 so that a palette opened over a modal sits inside it; topbar 3200 to 3250 (3123 to 3233, +110) for the scroll margin on what the bar holds, so a Tab into the bar from a scrolled page does not scroll the page (React's rule from PR #66); stage usage 1650 to 1750 (1580 to 1713, +8%) for the art's new place in the markup, after the content (A1-09), the stage's own CSS rising 1179 to 1208 within its 1250. skillMd rose 10724 to 10876 for the sentence that says a body may carry head tags, within its 10900. compose.mjs, the tool an agent runs, has no cap here (it is never in a page): it grew 21673 to 38153 bytes for the tokenizer that reads a body as HTML does and the head tags. Raised in the site-parts PR (DECISIONS 146, round 39), which folds each new part into the module it belongs with, so SKILL.md gains no index line (it has 41 bytes under its cap and a new module needs about 100): topbar 4150 to 17600 (+13450: the site footer and its disclosures, the lockup by pixel density, and a bar that arrives or leaves and returns, with its observer; a page that has a .topbar and no footer carries them too: the alternative, a module for each, needs its own index line and so SKILL.md bytes) and its usage 950 to 2900 (the footer's markup, the lockup's and the phase's); theme 650 to 4550 (the three-word theme choice: its CSS 2230 bytes and its script, 2277, with arrows, storage and the system listener) and its usage 400 to 1150 (the choice's markup written in full, so the right word is chosen before any script); segment 3700 to 3800 (a radio group's checked state besides a pressed button); stage 1250 to 2150 (its first script, 768 bytes, for fit and anchor) and its usage 1750 to 2000; framed-art 3000 to 3900 (drawn art in the frame: fit, anchor, no scaling strokes) and its usage 1250 to 1400. SKILL.md rose 10959 to 10992 (the topbar and theme index lines name .site-footer and .theme-choice). The head's theme line also writes data-theme-choice. Raised in site-parts return 2 (DECISIONS 146 B1 and B4): theme 4550 to 5350 (+800: the icon form of the theme choice, [data-theme-menu], whose button shows the theme in use, is named for the choice and opens the page's own .menu of three radio rows, in the theme script's 3073 bytes; the menu and popover modules are the page's, brought by its markup, so no module line was added and SKILL.md is 10993 of 11000) and its usage 1150 to 2200 (+91%: the menu's markup is written in full, and the deprecated toggle is said once); app-shell usage 2000 to 2100 and topbar-nav usage 1900 to 1950 (the theme control leaves the bar's text; the tools and the end cluster come in). The two example bodies still carry the deprecated data-theme-toggle. Return 2, F3 (DECISIONS 146 F): stage 2150 to 2250 (script 842 bytes: slice is the stage's default, as a frame's, and a drawing's own preserveAspectRatio stands unless the stage names data-fit or data-anchor) and its usage 2000 to 2150. framed-art 3900 to 4000 (a drawing's own preserveAspectRatio stands unless the figure names data-fit or data-anchor, +101 bytes). Return 3: theme 5350 to 5900 (script +569 bytes: who wrote data-theme, so System follows the system's change live and a theme the page set by hand, or a .dark or .light root, survives it). Raised in the controls port (DECISIONS 154): skillMd 11000 to 11200 for two index lines (link-tabs and option-chips, 214 bytes together), and core 31200 to 31600 for the nine tokens the port adds to every page's token CSS (the control rungs 44 to 64, two container widths, the confirm hold and the amount's opacity, 311 bytes). New modules (DECISIONS 154): link-tabs 2700 (its sizes, the 640 container step, the forced-colours underline, and the select that replaces the row under 720 with its 590-byte script, A15; it requires the select module), option-chips 5700 (the chip's states each written for a native radio inside a label, which needs :has on every one, plus the 1 KB script that keeps an aria-disabled chip reachable and never chosen). Return 3 (DECISIONS 154 conformance): link-tabs 2700 to 3100 and its usage 1650 to 1850 (the select's height for each row size, and a script that reads aria-current when it is needed and watches it move: 3,048 bytes), option-chips 5700 to 6700 (each state written twice, as a state attribute and as :has(), so no browser needs :has(): 4,975 CSS and 1,623 script). Return 4 (DECISIONS 158, Q2): link-tabs 3100 to 4300 and its usage 1850 to 2400 (the \"Go to\" label drawn at the select's start with its measured clearance, the select's accessible name kept as the words and the chosen page's, and the key hold that keeps a letter or an arrow on the closed select from navigating: 4,174 bytes, CSS 2,951 and script 1,223). Raised in the links-and-rows port (DECISIONS 152; the owner's approval is the lead's to confirm): the new link-rows module (5050 bytes of CSS, 50 of them for Castle's big-row arrow stepping colour over duration-fast, return 1, 1500 of usage: the directory's and the big rows' CSS, whose arrow is a core glyph drawn as a mask, and their tokens, size-row taken out of the core like type-layout's), disclosure 1550 to 3500 (Show all: the track, the clip and the settle, 1.5 KB of script and 1.8 KB of CSS), copy 2400 to 3500 (the form with words: the one cell and its script). SKILL.md rose 10959 to 10997 for one line, within its 11000 cap. Raised in the charts port PR (DECISIONS 153, D7a): chart 34400 to 34650 (script 26970 to 27270 bytes, +1.1% on the 34283 it was: `Basalt.trailingMean`, the trend maths React exports as `trailingMean`, 300 bytes), its usage 3150 to 3350 (+6%: one line for it). The tokens the batch adds (chart-lit-top, -mid and -base in both themes, size-chart-plot-sm, size-chart-row, size-meter-marker and radius-2xs) took the art module 2087 to 2546 bytes (budget 2100 to 2600, +24%: the chart tokens are its group) and the core 31192 to 31250 (cap 31200 to 31300, +0.3%: radius-2xs). Only D7a names a skill module in the charts ballot; the lit marks, the headline frame, the phase chart, the share bar, the coverage strip, the marks row and the range meter are React-only in this batch. Added in the overlays-and-search PR (DECISIONS 155, D10b and D13a): the sheet gains React's head, body and foot (the 44px close, the 20/28 title over a 13px count, the divider and the safe areas; its CSS 3.6 to 5.2 KB, budget 4050 to 5250, +30%) and its usage 1050 to 1450 (+38%: the anatomy and the step's focus, two bullets); and one new module a page carries only when it uses it, search (React's SearchDialog: the form, the field's -2 outline, the count line, the fixed-height results area and the rows with their picture slots and full-bleed hover wash; CSS only, 4368 bytes, budget 4400, usage 2050; it requires the dialog). The dialog's title draws no ring when script focuses it. skillMd rose 10959 to 11079 for the search line (the sheet's line is unchanged: its usage carries the anatomy), so its cap rose 11000 to 11100 (+0.9%). The core's CSS grew 31192 to 31421 bytes for the six new size tokens (the wide dialog, the search trigger and the logo and picture slots of a search result): its cap rose 31200 to 31450 (+0.8%). The two 44px values (the sheet's close and the search field) are local to their modules, with a lint exception that says they join the controls batch's size token (DECISIONS 154). Set in integration-nov15b, where audit-design-a, audit-fix-c2, site-parts, port-controls, port-links-rows, port-charts and port-overlays-search meet: the combined tree measured SKILL.md 11560 bytes (the caps were 11000, 11100 and 11200: each side added index lines), core 34086 bytes (caps 31300 to 33550: every side's rules land in the core CSS and script), topbar 17660 (17600 from site-parts, plus audit-fix-c2's skip-link and focus work), number 3453 (3400), palette 11379 (11000, audit-fix-c2's hosted scrim plus the core search glyph), dialog 5120 (5100), toast 15692 (15400) and stage usage 2248 (2150), each over every side's cap, so each is set to the measured bytes rounded up to the next 50: skillMd 11200 to 11600, core 33550 to 34100, topbar 17600 to 17700, number 3400 to 3500, palette 11000 to 11400, dialog 5100 to 5150, toast 15400 to 15700, stage usage 2150 to 2250. The segment cap is the base's 5400 plus port-controls' 100 (5500), unchanged by the merge. Raised in integration-nov15b, join 2 (a link tab takes the selected state, DECISIONS 138 A, 145, 149 and 154's D12 row): link-tabs 4300 to 5750 (+34%: the module was 4174 bytes and is 5736; the 600 against 400, the reserved width and the second copy of a composed label, an icon drawn in both its forms, the same rules a tab carries, 1,530 bytes of CSS and script) and its usage 2400 to 2550 (+6%: one bullet). The cap is the measured bytes rounded up to the next 50; a module that needs the tab's rules carries them as the segment and tabs modules do, so a page without link tabs pays nothing. Raised in the panels, art and parts port (DECISIONS 162): table 3000 to 3150 and its usage 950 to 1450 (the flat form and the two-line cell), stage 2250 to 2600 and its usage 2250 to 3100 (the closing block: its held art, forced colours and print; its section gap is type-layout's --basalt-section-gap, which a page with data-closing brings), the new app-tile 4300 (a 120-point polygon clip and the hairline's mask of the same outline), captioned 2000 and period 1400; skillMd 11600 to 11950 for one index line each for captioned, app-tile and period (358 bytes; the file is 11918). Raised in the logs, status and forms port (DECISIONS 162): core 34100 to 34200 (the new size-field-label-inline token, 80px, is written into every page's tokens: 25 bytes); dlist 1300 to 1900 and its usage 950 to 1060 (the stacked form, R9 and R10: a title over its text, 20px between entries, no divider; one usage line). Raised in audit-fix-c6 (the owner's cap, raised by the builder and for the owner to confirm): glyph 1300 to 1900, for redrawing a glyph when its ancestor's aria-current or data-current moves (the lists that hold glyphs are watched). Raised in the colour-ink-ladder build (DECISIONS 166): core 34200 to 34350 (the four lifted dark inks are four new primitives, each written into every page's tokens: the core measured 34307). Raised in the audit-2-design build (DECISIONS 167, Q7a): disclosure 3500 to 3800 (the core chevron drawn as a mask in place of two borders: the module measured 3755). Joined in the integration of c7 (#86) and c10 (#91): option-chips 6750 to 6850 (c7's reset resync and c10's data-ready together measure 6839). Raised in table-sort-3 (DECISIONS 257 and 261, the owner's pick: three sort states, the arrow after the label, explainers on column titles): still-table 13400 to 14650 (+9.3%: the module was 13343 bytes and is 14602; the end-aligned label's move by a transform, its right-to-left sign and the indicator that waits for it on a fine pointer, 912 bytes of CSS; the third state, the sort from the table's own order and a .explainer kept out of the button, 347 bytes of script) and its usage 2150 to 2250 (2197: the third state and the own order); the new explainer module 5850 (5842: a manual native popover opened from the sort button on hover, keyboard focus and a long press, placed above the header or beside it, 1752 bytes of CSS and 4090 of script; a page without explainers pays nothing) and its usage 900; skillMd 12250 to 12400 for the explainer's index line (113 bytes; the file is 12352). Each cap is the measured bytes rounded up to the next 50. Raised in table-sort-3's fix pass (Astra's review): explainer 5850 to 6900 (+18%: 5842 to 6864 bytes; the gap between the header and the card kept while a pointer crosses it, the close when its header leaves the view whatever has focus, the dismissal held until pointer and focus have both left, and its page-wide listeners and timers scoped to an open card and stopped when the table leaves the page, 1,022 bytes of script). Raised in cimip-gaps-2 batch B5 (the touch sizes under 720 whatever the pointer: each coarse-pointer target rule also answers a window under 720, about 20 bytes a rule; forms merged its three into one and stays under 3500): select 9000 to 9100 (measured 9064), selection 1480 to 1500 (1486), filter 17450 to 17500 (17473), option-chips 6850 to 6900 (6853), menu 8900 to 8950 (8902). B5 fix pass 1 (Astra): core 34550 to 34950 (measured 34911: 30762 CSS and 4149 JS) for stacked links in a column, each giving up the side of its 44px box that meets a neighbour, so a tap on a link's words is always that link's; core had 12 bytes free. DECISIONS 274 (the owner's pick: under 720 the toast stack hangs from the bar): toast 15700 to 16050 (measured 16035; 8 bytes were free; the stack's direction became one sign variable, trimming 585 of the 920 bytes the phone form first took). B5 merged with main (5ad5345a): main's own core measured 34930 against its 34550 cap before B5; with B5 (the touch sizes under 720 and stacked links in a column) it is 35331, so core is 35350; nav 5350 to 5400 (measured 5364: B4's nav plus the touch size under 720). The full run after the stream (DECISIONS 246): the site footer's links keep their own flex column under 720, as React's, out of the bare-link touch rule (26 bytes), so core is 35400 (measured 35357); sheet 5250 to 5400 (measured 5368: React's B5 ring room, ported: the held actions reach space-1-5 above their band, clipped, and the body keeps space-1-5 at each end). Raised for diagram motion and service marks (DECISIONS 292): skillMd 12550 to 12650 for the diagram-motion module's one line; diagram 87200 to 91000 for what a still diagram now carries (a card's mark and its seat, the pending frame, the comparison that writes a drawing only when it changed, and the print rule), and its usage 2600 to 4300 for the decision's four lines and the list of mark ids; the new diagram-motion module (the motion engine, its stylesheet and the motion tokens, in a page only when a diagram is animated) at 26200. Raised when the diagram tests were first run (DECISIONS 298): diagram 91000 to 91250 and diagram-motion 26200 to 26850. Raised in batch A of the diagrams backlog (DECISIONS 301): diagram 91250 to 92400, for the engine fixes it bundles (a decision kept no taller than it is wide, labels on whole pixels, slots beside a straight line, a one-column schema's turn-back); the skill keeps the development checks a production React build now drops. Raised again in that batch's review fixes: diagram 92400 to 92650, for the drawn layout refusing two lines laid on one another (Neon's blocking finding 1 on #126). Fix round 1 of #124 had already taken them to 91205 and 26621 with the tests unrun; this round added 1 byte (every focal node prints its fill; a one-form mark's dark form falls back to its light one) and 180 (the entrance keeps its own clock when it is drawn again while paused). DECISIONS 320 (versions and release notes): the release module is new (budget 15900 at first, usage 2400); topbar, app-shell and tab-bar gain the version link's classes (budgets: topbar 17700 to 19900, app-shell 4300 to 5200 with the rail's tooltip for it, tab-bar 4850 to 5200), their usage caps rising 2900 to 3100, 2600 to 2850 and 2250 to 2400 for its one line each; skillMd rose 12650 to 12800 for the release module's line and .version-link in topbar's. The code review of round 68 adds data-focus-self to the popover module (its Tab walk; budget 4950 to 5600, usage cap 950 to 1100) and logical start and end for its alignment; the release module's header grid and the Sources panel's touch rows take it to 16900. The spacing sweep of round 68 (DECISIONS 326: Copy link's words on the edge, the callout's last change, its reference column, the last release, the touch rows' end and the whole code chip) takes the release module to 17400. The ruling on where a release ends (DECISIONS 331: no padding under the last change in a release, a release-ending fold's hang, an arrived change keeping its padding, the panel holding its first margin, Build details 44 on touch and a closed Fixed panel taking no room) takes it to 19000. The code recheck of round 68 (recheck 5) has the popover's Tab walk follow Safari's own rule (Tab skips links on Apple's WebKit, Option-Tab reaches them): popover 5600 to 5900. The pixel recheck of round 68 has the Sources panel's touch rows keep their 20px lines with the link's box as hit area, space-3 rows and space-6 between two linked values (recheck-pixels 4), and the release's whole header take the arrival's plate: release 19000 to 19600. Merging #127 (stages, DECISIONS 316 and 328) into the versioning branch: both had raised skillMd from 12650 to 12800 for their own module's line, and together they came to 12886; SKILL.md was tightened in its wording (no rule dropped) to stay within 12800. Raised in diagram batch B's fix round (DECISIONS 318, the owner's diagram raise; and 326's sweep), each to its measured size: diagram 137700 to 144100 (the two reviews' fixes in the shared engine: right to left frames and self-calls, the corridors' and lanes' development words, the unusable-placement check, the transcript's hanging lines, the text art's frame widening, the frame-side fit check, the sequence's layers, the stacked group's turn room), diagram-motion 28450 to 30450 (the text sequence's build by ink and its colour-only run, moved into the motion module), diagram-zoom 17000 to 17600 (a linked card closes the viewer; the text art's own width; a placed model for the key hint), diagram-export 7850 to 10450 (an export at rest: sized drawing SVGs, no reveal masks, the pseudo-element rules, the lines under the cards, a viewer's figure read at 100% with its head and key, the rim's lit top). Raised at the batch B re-check (the decider's four rulings): diagram 144100 to 145100 (5.1's first list reported as errors apart from the warnings, a turn's label lines on the group entered by it and the seats beside its turn, the bare stack applied, the text art's reset of the core's inline code chip). Merging main (#127 and #128) into diagram batch B: skillMd keeps main's 12800 (batch B had raised it to 12950 for its diagram lines); SKILL.md was tightened in its wording to stay within it, no rule dropped; core takes main's 35550.Raised in the repo review (23 Nov 2026; budgets are soft, the owner's word): notifications 12450 to 12700 (a link is written only when relative, http, https or mailto, and side and align are checked before they reach the markup), combobox 11200 to 11350 (a disabled field's hidden input is disabled too, now and later), tooltip 3200 to 3550 (the gap to the opener is the tooltip's own, and hover and keyboard focus each hold it open; WCAG 1.4.13), chart 34750 to 34800 (the scale's step search and gridlines are bounded, so extreme values cannot hang the page), spinner 650 to 720 (its held rule moved in from loops, so a ring-only page keeps a stored hold), kbd 2900 to 2950, palette 11400 to 11500 (and its usage text 1350 to 1400, for the Mod line) and toast 16050 to 16200 (Mod in a palette item's keys is bound as it is drawn, and a toast action's aria-keyshortcuts resolves Mod). The safe-sinks rule (decided by the owner, Fable, Astra and Muse, 23 Nov 2026): skillMd 12650 to 12900, and 13050 with main's own raise merged in (one line: data goes in as textContent, a link passes Basalt.safeHref, an option comes from a fixed list), core 35400 to 35650, and 35800 with main's own raise merged in, and its usage 2950 to 3200 (one safeHref, published as Basalt.safeHref, and _.pick, in place of a copy in each module; esc escapes the apostrophe), link-tabs 5750 to 5900 (a refused link dispatches no event), diagram 92650 to 93000 (a card's mark is a relative path, https or a data: image). Merging #129 into diagram batch B: diagram keeps batch B's 145100 plus #129's mark check, set to its measure, and batch B's usage 4600. The fix round after both reviews of 421348e8 sets them to the measured sizes again: core 38950 to 39600 (every room says all three forms, and a hung word's box grows by a short room's shortfall), search to 5700 (it places its top again on a resize and with the keyboard; an empty list holds no padding), command-list to 14700 (it keeps the taller of its two heights), notifications to 12950 (the bell's edge), pane to 1950 (the page column's room), chart to 34950 (the date line's reason), and code, diagram-zoom, filter, links, sheet, still-table, tab-bar and topbar each by under 150 bytes (the three forms of a room; the selection column's width however given). Merged with main at db0bc418 (#129 to #131), DECISIONS 336's caps are set to the measured sizes again: core 35800 to 38950 and its usage 3200 to 3650, toast 16200 to 16750, terminal to 12700 (13050 with the open items' ruling: both copy buttons draw their three glyphs once, so a refused copy shows the close with no markup written after), diagram-zoom 17600 to 17750 (its viewer's Close and Zoom out hung, and the foot's room). Raised in DECISIONS 336 (reserved room across every component, claude/reserved-room), each to its measured size: core 35550 to 38700 (the edge rule a ghost .btn hangs by at a head, its ring and touch hit area, the side insets by direction, the .panel-head and page section-head that hang their last button by themselves) and its usage 2950 to 3450 (how data-edge and --basalt-edge-room are written); search 4400 to 5200 (search.js, the held top), terminal 11950 to 12550 (the close glyph for a refused copy, the edge on both copies), links 2750 to 3300 (the first icon link hung, the card room, the 20px glyph), toast 16050 to 16650 (the 46px hit areas on touch), selection 1500 to 1650 and still-table 14650 to 15000 (the 44px select column), command-list 14000 to 14350 (the panel hugs, the room is page), menu 8950 to 9150 (the column every row keeps when any row has a check or a glyph), notifications 12450 to 12600, filter 17500 to 17600, forms 3500 to 3550, sheet 5400 to 5450, topbar-nav 7550 to 7600 and app-shell 5200 to 5250 (logical sides, the edge and the room); topbar's usage 3100 to 3200 (a bar's last ghost control takes data-edge); command-list's usage 2150 to 2300 (the panel hugs; the room is page, and only on the page); dialog-form's usage 1300 to 1350 (its Close is written data-icon-only data-edge=\"end\"). Raised in the polish ruling of 336 (the selection box keeps to the cell's line): selection 1650 to 1750 (the box's start margin, min(space-4, half the spare room): 1710 measured) and its usage 1150 to 1350 (the rule's sentence: 1313 measured).", "budgets": { "skillMd": 13050, - "core": 35800 + "core": 39600 }, "core": { "classes": [ @@ -44,7 +44,7 @@ "btn", "icon" ], - "usage": 3200 + "usage": 3650 }, "modules": { "glyph": { @@ -83,8 +83,8 @@ "version-link-date", "site-footer-legal-row" ], - "budget": 19900, - "usage": 3100, + "budget": 19950, + "usage": 3200, "attrs": [ "data-phase-after" ] @@ -138,7 +138,7 @@ "select", "textarea" ], - "budget": 3500, + "budget": 3550, "usage": 480 }, "number": { @@ -251,7 +251,7 @@ "text": [ "\\btarget\\s*=\\s*[\"']?_blank\\b" ], - "budget": 2750, + "budget": 3350, "usage": 1850, "textWords": [ "a link with target=\"_blank\"" @@ -352,8 +352,8 @@ "table", "choice" ], - "budget": 1500, - "usage": 1150 + "budget": 1750, + "usage": 1350 }, "still-table": { "classes": [ @@ -375,7 +375,7 @@ "arrow-up", "arrow-down" ], - "budget": 14650, + "budget": 15150, "usage": 2250, "builds": [ "glyph" @@ -407,7 +407,7 @@ "plus", "check" ], - "budget": 17500, + "budget": 17700, "usage": 1650, "builds": [ "popover", @@ -441,7 +441,7 @@ "tok-f", "tok-c" ], - "budget": 1000, + "budget": 1050, "usage": 450 }, "callout": { @@ -637,7 +637,7 @@ "XCircle", "Prohibit" ], - "budget": 11950, + "budget": 13050, "usage": 1800, "builds": [ "braille" @@ -732,7 +732,7 @@ "table", "kbd" ], - "budget": 34800, + "budget": 34950, "usage": 3350, "builds": [ "table", @@ -882,7 +882,7 @@ "dialog-form", "sheet" ], - "budget": 17600, + "budget": 17800, "usage": 900, "builds": [ "dialog", @@ -1003,8 +1003,8 @@ "kbd", "glide" ], - "budget": 14000, - "usage": 2150, + "budget": 14700, + "usage": 2300, "textWords": [ "a call to Basalt.commandList" ], @@ -1118,7 +1118,7 @@ "popover", "glide" ], - "budget": 8950, + "budget": 9150, "usage": 2000, "builds": [ "glide" @@ -1192,7 +1192,7 @@ "requires": [ "dialog" ], - "budget": 5400, + "budget": 5550, "usage": 1450 }, "dialog-form": { @@ -1204,7 +1204,7 @@ "sheet" ], "budget": 2200, - "usage": 1300 + "usage": 1350 }, "search": { "classes": [ @@ -1225,7 +1225,7 @@ "requires": [ "dialog" ], - "budget": 4400, + "budget": 5700, "usage": 2050 }, "tooltip": { @@ -1265,7 +1265,7 @@ "Warning", "XCircle" ], - "budget": 16200, + "budget": 16750, "budgetReason": "audit-fix-c2 Sol build: 14288 to 14780 bytes (+492); observe focus before the first toast, retain the last live modal on blur, release the viewport before modal closure, preserve real keyboard composition state and keep a toast action's Escape from cancelling its native host. Cap 14350 to 14780. Return 1: 14780 to 14866 bytes (+86) for ordinary reverse Tab, clearing stale F6 returns and observing mutations only while hosted; cap 14780 to 15100, leaving 234 bytes. Return 3 and DECISIONS 156: 15031 to 15367 bytes (+336) for distinct pointer/keyboard focus restoration and the front-toast control ring while the region holds focus. Cap 15100 to 15400 (+300), leaving 33 bytes.", "usage": 1100, "builds": [ @@ -1313,7 +1313,7 @@ "XCircle", "Circle" ], - "budget": 12700, + "budget": 12950, "usage": 1100, "builds": [ "popover", @@ -1359,7 +1359,7 @@ "close", "pause" ], - "budget": 7550, + "budget": 7600, "usage": 1950, "builds": [ "glide", @@ -1393,7 +1393,7 @@ "tooltip" ], "viewportFit": true, - "budget": 5200, + "budget": 5250, "usage": 2850 }, "pane": { @@ -1403,7 +1403,7 @@ "pane-page", "pane" ], - "budget": 1700, + "budget": 1950, "usage": 1000 }, "release": { @@ -1476,7 +1476,7 @@ "tab-bar-version" ], "viewportFit": true, - "budget": 5200, + "budget": 5250, "usage": 2400 } } diff --git a/tools/html-skill/src/modules/app-shell.css b/tools/html-skill/src/modules/app-shell.css index 66a6cf31..005c8d38 100644 --- a/tools/html-skill/src/modules/app-shell.css +++ b/tools/html-skill/src/modules/app-shell.css @@ -63,7 +63,8 @@ box-sizing: border-box; min-width: 0; max-width: var(--basalt-size-page-width); - padding: var(--basalt-space-6) var(--bh-pad-right) var(--basalt-space-16) var(--bh-pad-left); + padding-block: var(--basalt-space-6) var(--basalt-space-16); + padding-inline: var(--bh-pad-start) var(--bh-pad-end); } /* The header over the content column: sticky to the document, the page title (18/26 at 600), then the actions. */ @@ -74,7 +75,7 @@ gap: var(--basalt-space-2); height: calc(var(--basalt-size-header) - var(--basalt-size-hairline)); padding-top: var(--basalt-size-hairline); - padding-inline: var(--bh-pad-left) var(--bh-pad-right); + padding-inline: var(--bh-pad-start) var(--bh-pad-end); } .app-title { min-width: 0; diff --git a/tools/html-skill/src/modules/chart.js b/tools/html-skill/src/modules/chart.js index d1929ca1..8a378f82 100644 --- a/tools/html-skill/src/modules/chart.js +++ b/tools/html-skill/src/modules/chart.js @@ -258,7 +258,8 @@ /* ---- The legend, which is the readout: each value reserves the widest of its forms ---- */ function valueOf(s, i) { var v = s.values[i]; - return v == null ? (s.reasons && s.reasons[i] ? NOT_OBSERVED + ' · ' + s.reasons[i] : NOT_OBSERVED) : format(v) + (i === partial ? ' ' + partialSuffix : ''); + // A gap's reason is in the lane, the summary, the table's note and the day's description, never in the legend (DECISIONS 336). + return v == null ? NOT_OBSERVED : format(v) + (i === partial ? ' ' + partialSuffix : ''); } function planValue(i) { var p = plan.values[i]; @@ -269,7 +270,7 @@ var legend = ''; series.forEach(function (s, k) { var forms = []; - for (var i = 0; i < n; i++) forms.push(shapeOf(valueOf(s, i))); + for (var i = 0; i < n; i++) if (s.values[i] != null) forms.push(shapeOf(valueOf(s, i))); if (s.values.some(function (v) { return v == null; })) forms.push(NOT_OBSERVED); legend += '<li class="chart-entry">' + swatch(bar ? 'bar' : 'series', k, id) + '<span class="chart-name">' + esc(s.name) + '</span><span class="visually-hidden"> </span><span class="chart-value" data-series="' + esc(s.id) + '">' + reserves(forms) + '<span data-part="value"></span></span></li>'; }); @@ -280,8 +281,11 @@ } if (hasPartial) legend += '<li class="chart-entry">' + swatch('so-far', 0, id, bar) + '<span class="chart-name">' + esc(partialLabel) + '</span></li>'; if (hasGap) legend += '<li class="chart-entry">' + swatch('missing', 0, id) + '<span class="chart-name">' + NOT_OBSERVED + '</span></li>'; + // On a day a series was not observed the date line says why, as the headline's context line does (the pixel review's finding 1). + function reasonOf(i) { for (var k = 0; k < series.length; k++) { var r = series[k].values[i] == null && series[k].reasons && series[k].reasons[i]; if (r) return r; } return ''; } + function dateText(i, latest) { var r = reasonOf(i); return (latest ? 'Latest · ' : '') + dateOf(i) + (r ? ' · ' + r : ''); } var dateForms = []; - for (var d = 0; d < n; d++) dateForms.push(shapeOf('Latest · ' + dateOf(d))); + for (var d = 0; d < n; d++) dateForms.push(shapeOf(dateText(d, true)), shapeOf(dateText(d, false))); var kbdChip = function (t) { return '<kbd class="kbd">' + t + '</kbd>'; }; figure.textContent = ''; @@ -550,7 +554,7 @@ /* ---- Draw: the frame, the plate, the days and the readout ---- */ function readout(shown, active) { - dateEl.textContent = (active === null ? 'Latest · ' : '') + dateOf(shown); + dateEl.textContent = dateText(shown, active === null); var vi = 0; series.forEach(function (s) { var el = valueEls[vi++].querySelector('[data-part="value"]'); diff --git a/tools/html-skill/src/modules/code.css b/tools/html-skill/src/modules/code.css index 96ae4aab..375cd430 100644 --- a/tools/html-skill/src/modules/code.css +++ b/tools/html-skill/src/modules/code.css @@ -6,7 +6,7 @@ .code { border-radius: var(--basalt-radius-md); background-color: var(--panel-well); font: var(--basalt-font-weight-regular) var(--bh-sm-mono); } pre.code, .code-body { margin: 0; padding: var(--basalt-space-3) var(--basalt-space-4); overflow: auto; tab-size: 2; } .code code { font: inherit; } - .code-head { display: flex; align-items: center; gap: var(--basalt-space-2); min-height: var(--basalt-size-control-lg); padding: var(--basalt-space-1) var(--basalt-space-2) var(--basalt-space-1) var(--basalt-space-4); font: var(--basalt-font-weight-medium) var(--bh-xs); color: var(--basalt-text-secondary); border-bottom: var(--basalt-size-hairline) solid var(--basalt-border-divider); } + .code-head { display: flex; align-items: center; gap: var(--basalt-space-2); min-height: var(--basalt-size-control-lg); padding-block: var(--basalt-space-1); padding-inline: var(--basalt-space-4); --basalt-edge-room: var(--basalt-space-4); --basalt-edge-room-start: initial; --basalt-edge-room-end: initial; font: var(--basalt-font-weight-medium) var(--bh-xs); color: var(--basalt-text-secondary); border-bottom: var(--basalt-size-hairline) solid var(--basalt-border-divider); } .tok-k { color: var(--basalt-syntax-keyword); } .tok-s { color: var(--basalt-syntax-string); } .tok-n { color: var(--basalt-syntax-constant); } diff --git a/tools/html-skill/src/modules/command-list.css b/tools/html-skill/src/modules/command-list.css index 6d3d62bb..dc752667 100644 --- a/tools/html-skill/src/modules/command-list.css +++ b/tools/html-skill/src/modules/command-list.css @@ -5,7 +5,10 @@ palette's. What differs: the field is one stop among many, so it shows the flush-field ring (inset, -2: the .input-row's own); the plate shows only while the list is in use; the list holds its unfiltered height; and a foot counts what is shown. */ - .command-list { display: block; min-width: 0; } + /* On the open page the list's unfiltered height (written by script as --held-page) is kept as page under the panel, never paint, so what follows + never moves while the panel hugs its matches (DECISIONS 336). Inside a panel, a dialog or a popover, or with data-reserve="off", it holds no room. */ + .command-list { display: block; min-width: 0; min-block-size: var(--held-page, auto); } + :is(%panel%, dialog, [popover]) .command-list, .command-list[data-reserve="off"] { min-block-size: 0; } .command-list[data-pane] { container-type: inline-size; } .command-split { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--basalt-space-4); align-items: stretch; min-width: 0; } .command-page, .command-pane { box-sizing: border-box; display: flex; flex-direction: column; min-width: 0; overflow: clip; } @@ -13,13 +16,18 @@ .command-page .input-row > input { letter-spacing: normal; } .command-slot { display: inline-flex; flex: none; align-items: center; justify-content: center; width: var(--basalt-size-icon-sm); height: var(--basalt-size-icon-sm); color: var(--basalt-text-tertiary); } - /* The list holds its unfiltered height (written by script as --held), up to the popup cap, and scrolls inside: filtering never moves what is below it. */ - .command-body { position: relative; flex: none; height: var(--held, auto); max-height: var(--basalt-size-popup-max-height); } - .command-results { position: relative; box-sizing: border-box; height: 100%; max-height: var(--basalt-size-popup-max-height); overflow-y: auto; overscroll-behavior: contain; padding: var(--basalt-space-0-5) var(--basalt-space-1); scroll-padding-block: var(--basalt-space-0-5); } + /* The panel is as tall as its rows, up to the popup cap, and scrolls inside past it. Beside a preview the list holds its unfiltered height (--held), + which it and the pane share. */ + .command-body { position: relative; flex: none; max-height: var(--basalt-size-popup-max-height); } + .command-split[data-mode] .command-body { height: var(--held, auto); } + .command-split[data-mode] .command-results { height: 100%; } + .command-results { position: relative; box-sizing: border-box; max-height: var(--basalt-size-popup-max-height); overflow-y: auto; overscroll-behavior: contain; padding: var(--basalt-space-0-5) var(--basalt-space-1); scroll-padding-block: var(--basalt-space-0-5); } .command-sizer > [role="group"] + [role="group"] { margin-top: var(--basalt-space-1); } - /* No match: one centred sentence and a ghost button, in the held area and outside the listbox. */ - .command-none { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--basalt-space-3); padding: var(--basalt-space-6) var(--basalt-space-4); text-align: center; font: var(--basalt-font-weight-regular) var(--bh-sm); color: var(--basalt-text-secondary); } + /* No match: one centred sentence and a ghost button, in the panel's flow with its own padding, outside the listbox. */ + .command-split[data-mode] .command-none { position: absolute; inset: 0; } + .command-none[data-measure] { position: absolute; inset-inline: 0; top: 0; visibility: hidden; } + .command-none { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--basalt-space-3); padding: var(--basalt-space-6) var(--basalt-space-4); text-align: center; font: var(--basalt-font-weight-regular) var(--bh-sm); color: var(--basalt-text-secondary); } .command-none p { margin: 0; overflow-wrap: anywhere; } /* The foot: the count (shown at once, spoken once) and the key legend. */ diff --git a/tools/html-skill/src/modules/command-list.js b/tools/html-skill/src/modules/command-list.js index 9033e443..3afe090f 100644 --- a/tools/html-skill/src/modules/command-list.js +++ b/tools/html-skill/src/modules/command-list.js @@ -101,11 +101,27 @@ /** Not in use (the field has no focus, the pointer is off the list, and there is no split) the list shows no plate and no lit row. */ function syncIdle() { results.toggleAttribute('data-idle', !(detail && mode === 'split') && !focused && !hovered); } - /** The list holds its unfiltered height, up to the popup cap, and scrolls inside: filtering never changes it, so what is below it never moves. */ + /** Measured while the list is unfiltered: its height (the list's, beside a preview) and the panel's, kept as page under the panel on the open page + so what follows never moves while the panel hugs its matches (DECISIONS 336). */ function hold() { if (query) return; var cs = getComputedStyle(results); - body.style.setProperty('--held', sizer.getBoundingClientRect().height + parseFloat(cs.paddingTop) + parseFloat(cs.paddingBottom) + 'px'); + var pad = parseFloat(cs.paddingTop) + parseFloat(cs.paddingBottom); + var list = sizer.getBoundingClientRect().height + pad; + body.style.setProperty('--held', list + 'px'); + if (detail) return; + // The page keeps the taller of the panel's two heights, the unfiltered list's and "Nothing matches"', so a short list filtered to nothing never + // moves what follows (the code review's finding 6): the sentence is measured unseen, out of the flow. + var wasHidden = none.hidden; + var said = none.firstChild.textContent; + if (!said) none.firstChild.textContent = 'Nothing matches.'; + none.hidden = false; + none.setAttribute('data-measure', ''); + var empty = pad + none.getBoundingClientRect().height; + none.removeAttribute('data-measure'); + none.hidden = wasHidden; + none.firstChild.textContent = said; + host.style.setProperty('--held-page', page.getBoundingClientRect().height - list + Math.max(list, empty) + 'px'); } /** The pane is a region named by its first heading, which also takes focus when it is pushed. */ diff --git a/tools/html-skill/src/modules/copy.js b/tools/html-skill/src/modules/copy.js index 988b70a2..1fde92c2 100644 --- a/tools/html-skill/src/modules/copy.js +++ b/tools/html-skill/src/modules/copy.js @@ -87,14 +87,16 @@ var target = button.dataset.copy ? document.querySelector(button.dataset.copy) : null; var text = button.dataset.copyText != null ? button.dataset.copyText : (target ? target.textContent : ''); copyText(text).then(function (ok) { - button.innerHTML = (ok ? '%glyph-svg:check%' : '%glyph-svg:close%') + (iconOnly ? '' : '<span>' + (ok ? 'Copied' : 'Copy failed') + '</span>'); + // A copy with a glyph and words keeps its words and changes its glyph (DECISIONS 336, Q5); the icon alone also changes its name. + // One write of the button's own markup, its first glyph (an svg, or a span the glyph module has not drawn yet) swapped for a constant. + button.innerHTML = rest[0].replace(/<svg[\s\S]*?<\/svg>|<span data-glyph[^>]*><\/span>/, ok ? '%glyph-svg:check%' : '%glyph-svg:close%'); if (iconOnly) button.setAttribute('aria-label', ok ? 'Copied' : 'Copy failed'); - announce(ok ? 'Copied to clipboard' : 'Could not copy'); + announce(iconOnly ? (ok ? 'Copied to clipboard' : 'Copy failed') : (ok ? 'Copied' : 'Copy failed')); clearTimeout(button.__bhTimer); button.__bhTimer = setTimeout(function () { button.innerHTML = rest[0]; if (iconOnly) { if (rest[1] == null) button.removeAttribute('aria-label'); else button.setAttribute('aria-label', rest[1]); } - }, 1600); + }, %duration-confirm%); }); }); }); diff --git a/tools/html-skill/src/modules/diagram-zoom.js b/tools/html-skill/src/modules/diagram-zoom.js index c90798b4..37c4c8d9 100644 --- a/tools/html-skill/src/modules/diagram-zoom.js +++ b/tools/html-skill/src/modules/diagram-zoom.js @@ -31,7 +31,7 @@ import { attachZoom, measureViewerFigure, revealIn, VIEWER_KEYS, viewerHint, vie d.innerHTML = '<header class="sheet-head"><div class="sheet-head-text"><h2 class="dialog-title" tabindex="-1">' + esc(model.title) + '</h2>' + (spec.source ? '<p class="dialog-description diagram-viewer-source">' + esc(spec.source) + '</p>' : '') + '</div>' + - '<button type="button" class="btn sheet-close" data-variant="ghost" data-dialog-close aria-label="Close">%glyph-svg:close%</button></header>' + + '<button type="button" class="btn sheet-close" data-variant="ghost" data-icon-only data-edge="end" data-dialog-close aria-label="Close">%glyph-svg:close%</button></header>' + '<p class="visually-hidden" id="' + id + '-summary">' + esc(spec.summary) + '</p>' + '<div class="diagram-stage" tabindex="0" role="group" aria-label="Zoomed drawing">' + '<span class="diagram-probe" data-probe="row" aria-hidden="true"></span><span class="diagram-probe" data-probe="contain" aria-hidden="true"></span>' + @@ -39,7 +39,7 @@ import { attachZoom, measureViewerFigure, revealIn, VIEWER_KEYS, viewerHint, vie '<footer class="sheet-foot diagram-viewer-foot">' + (key ? '<div class="diagram-viewer-key">' + kit.toHtml(key) + '</div>' : '') + '<div class="diagram-viewer-row"><div class="diagram-zoom">' + - '<button type="button" class="btn" data-variant="ghost" data-size="sm" data-icon-only data-zoom="out" aria-label="Zoom out">%glyph-svg:minus%</button>' + + '<button type="button" class="btn" data-variant="ghost" data-size="sm" data-icon-only data-edge="start" data-zoom="out" aria-label="Zoom out">%glyph-svg:minus%</button>' + '<span class="diagram-level" aria-hidden="true" data-reserve="400%"><span>100%</span></span>' + '<button type="button" class="btn" data-variant="ghost" data-size="sm" data-icon-only data-zoom="in" aria-label="Zoom in">%glyph-svg:plus%</button>' + '<button type="button" class="btn diagram-fit" data-variant="secondary" data-size="sm" data-zoom="fit"><span>Fit</span></button></div>' + diff --git a/tools/html-skill/src/modules/filter.css b/tools/html-skill/src/modules/filter.css index 90a51a86..5ab4a427 100644 --- a/tools/html-skill/src/modules/filter.css +++ b/tools/html-skill/src/modules/filter.css @@ -29,7 +29,9 @@ gap: var(--basalt-space-1-5); height: var(--basalt-size-control-md); margin: 0; - padding: 0 calc(var(--basalt-space-3) - var(--basalt-size-hairline)) 0 calc(var(--basalt-space-2) - var(--basalt-size-hairline)); + /* 8 before the mark's seat and 12 after the words: the mark is drawn 2.6 inside its seat, so what is drawn is 10.6 and 12 from the edges (DECISIONS 336, S11). */ + padding-block: 0; + padding-inline: calc(var(--basalt-space-2) - var(--basalt-size-hairline)) calc(var(--basalt-space-3) - var(--basalt-size-hairline)); border: var(--basalt-size-hairline) solid var(--basalt-border-hairline); border-radius: var(--basalt-radius-sm); background: transparent; @@ -109,7 +111,7 @@ .filter-row[data-highlighted]::before { background-color: var(--panel-plate); transition-duration: var(--basalt-duration-instant); } .filter-row:has(> input:disabled) { color: var(--basalt-text-disabled); } @media (pointer: coarse), (width < %bp-md%) { .filter-row { height: max(calc(var(--_h) + 2 * var(--_inset)), var(--basalt-size-menu-row-touch)); } } - .filter-foot { display: flex; align-items: center; justify-content: space-between; gap: var(--basalt-space-3); padding: var(--basalt-space-1-5) var(--basalt-space-3); border-top: var(--basalt-size-hairline) solid var(--basalt-border-divider); margin: var(--basalt-space-0-5) calc(-1 * var(--basalt-space-1)) 0; } + .filter-foot { display: flex; align-items: center; justify-content: space-between; gap: var(--basalt-space-3); padding-block: var(--basalt-space-1-5); padding-inline: var(--basalt-space-4); --basalt-edge-room: var(--basalt-space-4); --basalt-edge-room-start: initial; --basalt-edge-room-end: initial; border-top: var(--basalt-size-hairline) solid var(--basalt-border-divider); margin: var(--basalt-space-0-5) calc(-1 * var(--basalt-space-1)) 0; } /* The rows scroll inside the popup cap (nine 40px rows show whole), with the search band and the foot outside them. */ .filter-rows { max-height: var(--basalt-size-popup-max-height); margin-inline: calc(-1 * var(--basalt-space-1)); padding-inline: var(--basalt-space-1); overflow-y: auto; overscroll-behavior: contain; } /* The search band, from ten values: the palette band's recipe at a popup row's size. 40px, the next level's fill, a divider below, the -2 inset ring diff --git a/tools/html-skill/src/modules/filter.js b/tools/html-skill/src/modules/filter.js index 4ff37899..0af7186d 100644 --- a/tools/html-skill/src/modules/filter.js +++ b/tools/html-skill/src/modules/filter.js @@ -92,8 +92,9 @@ head.appendChild(el('span', 'filter-label', { id: id.label }, null)).textContent = label; var count = el('span', 'filter-count', { id: id.count, 'data-reserved': '', 'data-any': 'Any', 'data-widest': opts.length + ' of ' + opts.length }); shell.value = count.appendChild(el('span', 'filter-count-value')); - head.appendChild(count); + // Label, Clear, count (DECISIONS 336): Clear never moves, and the count's spare room is the row's open end. head.appendChild(clear); + head.appendChild(count); var chips = el('div', 'filter-chips', { role: 'group', 'aria-labelledby': id.label, 'aria-describedby': id.count }); opts.forEach(function (o) { var chip = el('label', 'chip'); @@ -144,6 +145,7 @@ pop.appendChild(group); shell.count = el('span', 'filter-count', { id: id.count }); var foot = el('div', 'filter-foot'); + clear.setAttribute('data-edge', 'end'); foot.appendChild(shell.count); foot.appendChild(clear); pop.appendChild(foot); diff --git a/tools/html-skill/src/modules/forms.css b/tools/html-skill/src/modules/forms.css index 2993fd5e..d154a795 100644 --- a/tools/html-skill/src/modules/forms.css +++ b/tools/html-skill/src/modules/forms.css @@ -39,7 +39,7 @@ .input[type="search"]::-webkit-search-cancel-button { appearance: none; width: var(--basalt-size-control-xs); height: var(--basalt-size-control-xs); margin: 0; background: var(--basalt-text-secondary); mask: url("%glyph-mask:close%") center / var(--basalt-size-icon-sm) no-repeat; cursor: pointer; } /* A file input is a secondary button and its file name in secondary ink. */ input[type="file"] { max-width: 100%; color: var(--basalt-text-secondary); font: var(--basalt-font-weight-regular) var(--bh-base); } - input[type="file"]::file-selector-button { height: var(--basalt-size-control-md); margin: 0 var(--basalt-space-2) 0 0; padding: 0 var(--basalt-space-3); border: var(--basalt-size-hairline) solid var(--basalt-border-hairline); border-radius: var(--basalt-radius-sm); background: var(--basalt-surface-1); color: var(--basalt-text-primary); font: var(--basalt-font-weight-medium) var(--basalt-text-base-size) / 1 var(--basalt-font-family-sans); cursor: pointer; } + input[type="file"]::file-selector-button { height: var(--basalt-size-control-md); margin-block: 0; margin-inline: 0 var(--basalt-space-2); padding: 0 var(--basalt-space-3); border: var(--basalt-size-hairline) solid var(--basalt-border-hairline); border-radius: var(--basalt-radius-sm); background: var(--basalt-surface-1); color: var(--basalt-text-primary); font: var(--basalt-font-weight-medium) var(--basalt-text-base-size) / 1 var(--basalt-font-family-sans); cursor: pointer; } input[type="file"]:disabled, input[type="file"]:disabled::file-selector-button { color: var(--basalt-text-disabled); cursor: not-allowed; } /* On touch and under 720 the field, the search field's clear button and the file button are 44px targets. */ @media (pointer: coarse), (width < %bp-md%) { diff --git a/tools/html-skill/src/modules/links.css b/tools/html-skill/src/modules/links.css index c6da904b..b842d82f 100644 --- a/tools/html-skill/src/modules/links.css +++ b/tools/html-skill/src/modules/links.css @@ -28,6 +28,12 @@ .links > li > a:not(.btn) { display: inline-flex; align-items: center; gap: var(--basalt-space-1-5); border-radius: var(--basalt-radius-sm); color: var(--basalt-text-secondary); white-space: nowrap; transition: color var(--basalt-duration-fast) var(--basalt-ease-out); } .links > li > a:not(.btn):is(:hover, :focus-visible) { color: var(--basalt-text-primary); } .links[data-size="20"] > li > a > svg:not(.ext > svg) { width: var(--basalt-size-icon-md); height: var(--basalt-size-icon-md); } + /* An icon-only row's first link is hung at the start (data-edge="start"; the script adds it), its glyph on the line, only where the box round + the row declares room: a card's space-4 (DECISIONS 336, S9). The glyph it hangs by is the one drawn. A row that ends a card hangs its spare + half into the card's padding, so the glyph's foot is the card's line. */ + .links[data-size="20"] .btn { --_glyph: var(--basalt-size-icon-md); } + .card > .links[data-icon-only] { --basalt-edge-room: var(--basalt-space-4); --basalt-edge-room-start: initial; --basalt-edge-room-end: initial; } + .card > .links[data-icon-only]:last-child { margin-block-end: calc((var(--basalt-size-icon-sm) - var(--basalt-size-control-md)) / 2); } /* The arrow follows the name with the glyph's own bearing, not a gap: it cancels the link's gap. */ .links > li > a:not(.btn) > .ext { margin-inline-start: calc(-1 * var(--basalt-space-1-5)); } /* On touch each link is at least 44 by 44 as real layout, and the 16px gap becomes 8px of hit area on either side, so a wrapped line touches the @@ -36,6 +42,7 @@ @media (pointer: coarse), (width < %bp-md%) { .links:not([data-icon-only]) { gap: 0; margin-inline: calc(-1 * var(--basalt-space-2)); } .links:not([data-icon-only]) > li > a { min-width: var(--basalt-size-tap-min); min-height: var(--basalt-size-tap-min); justify-content: center; margin-block: 0; padding-inline: var(--basalt-space-2); } + .card > .links[data-icon-only]:last-child { margin-block-end: calc((var(--basalt-size-icon-sm) - var(--basalt-size-tap-min)) / 2); } } @media (forced-colors: active) { diff --git a/tools/html-skill/src/modules/links.js b/tools/html-skill/src/modules/links.js index ed9571a6..2c05d1b0 100644 --- a/tools/html-skill/src/modules/links.js +++ b/tools/html-skill/src/modules/links.js @@ -27,5 +27,9 @@ } B.newTabCue = cue; - _.step(50, 'newTabCue', function () { cue(); }); + _.step(50, 'newTabCue', function () { + cue(); + // An icon-only row's first link is hung at its start (DECISIONS 336); it hangs only where the row's box declares room. + document.querySelectorAll('.links[data-icon-only] > li:first-child > .btn:not([data-edge])').forEach(function (b) { b.setAttribute('data-edge', 'start'); }); + }); })(window.Basalt); diff --git a/tools/html-skill/src/modules/menu.css b/tools/html-skill/src/modules/menu.css index f2ea24e8..50eafb6d 100644 --- a/tools/html-skill/src/modules/menu.css +++ b/tools/html-skill/src/modules/menu.css @@ -47,6 +47,8 @@ /* The check and the radio's dot sit in a 16px seat, shown only while the row is checked; the seat is always there, so a choice moves nothing. */ .menu-check { display: inline-flex; align-items: center; justify-content: center; width: var(--basalt-size-icon-sm); flex: none; color: var(--basalt-text-primary); } + /* The menu's column (DECISIONS 336): when any row has a check or a glyph, every row keeps their 16px column, so labels align. */ + .menu:has(.menu-item > :is(svg, .menu-check, [data-glyph], [data-icon]):first-child) .menu-item:not(:has(> :is(svg, .menu-check, [data-glyph], [data-icon]):first-child)) { padding-inline-start: calc(var(--basalt-space-3) + var(--basalt-size-icon-sm) + var(--_gap)); } .menu-check > * { visibility: hidden; } [aria-checked="true"] > .menu-check > * { visibility: visible; } .menu-radio-dot { display: block; width: var(--basalt-space-1-5); height: var(--basalt-space-1-5); border-radius: var(--basalt-radius-full); background: currentColor; } diff --git a/tools/html-skill/src/modules/notifications.css b/tools/html-skill/src/modules/notifications.css index 05bfb45d..7db998fe 100644 --- a/tools/html-skill/src/modules/notifications.css +++ b/tools/html-skill/src/modules/notifications.css @@ -8,11 +8,11 @@ .popover.notifications:popover-open { display: flex; } /* stylelint-disable-next-line unit-disallowed-list -- a width that follows the window (a viewport unit), less the margins; a fixed-length token cannot say it */ .popover.notifications { flex-direction: column; width: min(var(--basalt-size-toast-width), calc(100vw - 2 * var(--basalt-space-4))); max-width: none; max-height: var(--available-height, 100vh); padding: 0; overflow: hidden; } - .notifications-head { display: flex; align-items: center; gap: var(--basalt-space-2); padding: var(--basalt-space-2-5) var(--basalt-space-2-5) var(--basalt-space-2-5) var(--basalt-space-4); border-bottom: var(--basalt-size-hairline) solid var(--basalt-border-divider); } + .notifications-head { display: flex; align-items: center; gap: var(--basalt-space-2); padding-block: var(--basalt-space-2-5); padding-inline: var(--basalt-space-4); --basalt-edge-room: var(--basalt-space-4); --basalt-edge-room-start: initial; --basalt-edge-room-end: initial; border-bottom: var(--basalt-size-hairline) solid var(--basalt-border-divider); } .notifications-title { flex: none; line-height: var(--basalt-text-base-line-height); } .notifications-count { flex: 1; min-width: 0; font-size: var(--basalt-text-sm-size); line-height: var(--basalt-text-sm-line-height); color: var(--basalt-text-secondary); font-variant-numeric: tabular-nums; } .notifications-mark { flex: none; } - .notifications-foot { display: flex; justify-content: flex-end; padding: var(--basalt-space-2-5); border-top: var(--basalt-size-hairline) solid var(--basalt-border-divider); } + .notifications-foot { display: flex; justify-content: flex-end; padding-block: var(--basalt-space-2-5); padding-inline: var(--basalt-space-4); --basalt-edge-room: var(--basalt-space-4); --basalt-edge-room-start: initial; --basalt-edge-room-end: initial; border-top: var(--basalt-size-hairline) solid var(--basalt-border-divider); } .notifications-clear { margin-inline-end: auto; } .notifications-empty { margin: 0; padding: var(--basalt-space-6) var(--basalt-space-4); text-align: center; color: var(--basalt-text-secondary); } /* The list keeps space-1-5 (6px) from its clipping edges, so a focusable row's ring (2px offset, 2px wide) is never cut. */ diff --git a/tools/html-skill/src/modules/notifications.js b/tools/html-skill/src/modules/notifications.js index 633007d9..cfc0c23d 100644 --- a/tools/html-skill/src/modules/notifications.js +++ b/tools/html-skill/src/modules/notifications.js @@ -42,11 +42,13 @@ var side = _.pick(o.side, ['top', 'bottom', 'left', 'right'], 'bottom'); var align = _.pick(o.align, ['start', 'center', 'end'], 'end'); var viewAllHref = href(o.viewAllHref); + // The bell is hung at a bar's end when it is the bar's last control (DECISIONS 336): `edge: 'end'`, or data-edge on its host. + var edge = _.pick(o.edge || host.getAttribute('data-edge'), ['start', 'end'], ''); host.innerHTML = - '<button type="button" class="btn" data-variant="ghost" data-icon-only popovertarget="' + id + '" aria-haspopup="dialog">' + BELL + '<span class="notifications-dot" aria-hidden="true" hidden></span></button>' + + '<button type="button" class="btn" data-variant="ghost" data-icon-only' + (edge ? ' data-edge="' + edge + '"' : '') + ' popovertarget="' + id + '" aria-haspopup="dialog">' + BELL + '<span class="notifications-dot" aria-hidden="true" hidden></span></button>' + '<div class="panel float popover notifications" popover id="' + id + '" data-side="' + side + '" data-align="' + align + '" aria-labelledby="' + id + '-title">' + '<div class="notifications-head"><h2 class="popover-title notifications-title" id="' + id + '-title">' + _.esc(label) + '</h2><span class="notifications-count"></span>' + - '<button type="button" class="btn notifications-mark" data-variant="ghost" data-size="sm">Mark all as read</button></div>' + + '<button type="button" class="btn notifications-mark" data-variant="ghost" data-size="sm" data-edge="end">Mark all as read</button></div>' + '<p class="notifications-empty" hidden>Nothing yet.</p>' + '<div class="notifications-scroll"><span class="plate" aria-hidden="true"></span><ul class="notifications-list"></ul></div>' + '<div class="notifications-foot"></div>' + @@ -60,9 +62,9 @@ var scroll = pop.querySelector('.notifications-scroll'); var list = pop.querySelector('.notifications-list'); var foot = pop.querySelector('.notifications-foot'); - foot.innerHTML = (o.onClearAll ? '<button type="button" class="btn notifications-clear" data-variant="ghost" data-size="sm">Clear all</button>' : '') + (viewAllHref - ? '<a class="btn" data-variant="ghost" data-size="sm" href="' + _.esc(viewAllHref) + '"><span>View all</span></a>' - : '<button type="button" class="btn" data-variant="ghost" data-size="sm"><span>View all</span></button>'); + foot.innerHTML = (o.onClearAll ? '<button type="button" class="btn notifications-clear" data-variant="ghost" data-size="sm" data-edge="start">Clear all</button>' : '') + (viewAllHref + ? '<a class="btn" data-variant="ghost" data-size="sm" data-edge="end" href="' + _.esc(viewAllHref) + '"><span>View all</span></a>' + : '<button type="button" class="btn" data-variant="ghost" data-size="sm" data-edge="end"><span>View all</span></button>'); var viewAll = foot.lastElementChild; var clear = pop.querySelector('.notifications-clear'); var unglide; diff --git a/tools/html-skill/src/modules/option-chips.css b/tools/html-skill/src/modules/option-chips.css index 44512884..dd2755ff 100644 --- a/tools/html-skill/src/modules/option-chips.css +++ b/tools/html-skill/src/modules/option-chips.css @@ -20,7 +20,9 @@ gap: var(--basalt-space-2); min-height: var(--basalt-size-control-2xl); margin: 0; - padding: 0 calc(var(--basalt-space-3-5) - var(--basalt-size-hairline)) 0 calc(var(--basalt-space-2-5) - var(--basalt-size-hairline)); + /* 12 on both sides with the rim (DECISIONS 336, S11): the chosen ring fills its seat, so it takes the words' padding. */ + padding-block: 0; + padding-inline: calc(var(--basalt-space-3) - var(--basalt-size-hairline)); border: var(--basalt-size-hairline) solid var(--basalt-border-field); border-radius: var(--basalt-radius-md); background: transparent; diff --git a/tools/html-skill/src/modules/pane.css b/tools/html-skill/src/modules/pane.css index e071e939..ed71d74e 100644 --- a/tools/html-skill/src/modules/pane.css +++ b/tools/html-skill/src/modules/pane.css @@ -9,10 +9,13 @@ .pane-layout { container-type: inline-size; min-width: 0; } .pane-grid { display: grid; grid-template-columns: minmax(0, 1fr); row-gap: var(--basalt-space-8); } :is(.pane-page, .pane) { min-width: 0; } + /* The page column says its room to release notes directly inside it (the pixel review's finding 2): the page's gutter, and beside the pane the gap to it. */ + .page .pane-page > .release-notes { --basalt-edge-room: var(--basalt-gutter); --basalt-edge-room-start: initial; --basalt-edge-room-end: initial; } .pane:focus-visible { outline: var(--basalt-size-focus-width) solid var(--basalt-border-focus); outline-offset: var(--basalt-size-focus-offset); } /* stylelint-disable-next-line basalt/container-length -- size-sidebar-width (256px) + size-gutter (24px) + size-breakpoint-container-lg (640px), where the pane sits beside the page; a container query cannot read a custom property */ @container (width >= 920px) { .pane-grid { grid-template-columns: minmax(0, 1fr) var(--basalt-size-sidebar-width); column-gap: var(--basalt-size-gutter); align-items: start; } + .page .pane-page > .release-notes { --basalt-edge-room: initial; --basalt-edge-room-start: var(--basalt-gutter); --basalt-edge-room-end: var(--basalt-size-gutter); } .pane { position: sticky; top: calc(var(--basalt-sticky-offset, var(--basalt-space-0)) + var(--basalt-space-6) - var(--basalt-space-1-5)); diff --git a/tools/html-skill/src/modules/release.css b/tools/html-skill/src/modules/release.css index 91cb70a2..77c438ef 100644 --- a/tools/html-skill/src/modules/release.css +++ b/tools/html-skill/src/modules/release.css @@ -42,7 +42,9 @@ .release-head-text > .release-heading:not([data-headline]) ~ .release-meta { grid-row: 3; } .release-head-text > :not(.release-word) ~ * { margin-top: var(--basalt-space-1); } /* A ghost button at the column's edge puts its words on the edge: its plate hangs space-2-5 past it (sweep 68-1). */ - .release-head > .release-copy { grid-column: 2; grid-row: 2; align-self: center; margin-block: calc(-1 * var(--basalt-size-tap-min)); margin-inline-end: calc(-1 * var(--basalt-space-2-5)); } + .release-head > .release-copy { grid-column: 2; grid-row: 2; align-self: center; margin-block: calc(-1 * var(--basalt-size-tap-min)); } + /* Release notes have no padding of their own: "Copy link" hangs into the page's gutter where the page says it (DECISIONS 336, the open items' ruling). */ + :is(.page, .page > .section) > .release-notes { --basalt-edge-room: var(--basalt-gutter); --basalt-edge-room-start: initial; --basalt-edge-room-end: initial; } .release-heading { margin: 0; font: var(--basalt-font-weight-semibold) var(--basalt-text-2xl-size) / var(--basalt-text-2xl-line-height) var(--basalt-font-family-sans); letter-spacing: var(--basalt-text-2xl-tracking); text-wrap: balance; overflow-wrap: break-word; } /* The number standing alone is mono; in a line with its date (a headline's meta line) it is Geist, as at the foot. */ .release-version { font-family: var(--basalt-font-family-mono); letter-spacing: 0; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; } diff --git a/tools/html-skill/src/modules/search.css b/tools/html-skill/src/modules/search.css index b9146b74..df7443ef 100644 --- a/tools/html-skill/src/modules/search.css +++ b/tools/html-skill/src/modules/search.css @@ -1,13 +1,16 @@ @layer basalt { /* ---- The search dialog (React's SearchDialog; DECISIONS 155, D13a): <dialog class="panel float modal dialog search"> ---- - The dialog's shell (dialog.css), centred, 560 wide, with no padding: a search form (a field and a close button), a count line, and a - results area of a fixed height that scrolls inside, so the field and the count never move however many results there are. Its height is - that of a full result: three logo rows (60), five picture rows (72) and a "See all" row (48), with 4 above and 10 below. A result is a link and + The dialog's shell (dialog.css), 560 wide, with no padding: a search form (a field and a close button), a count line, and a results area as + tall as its rows up to a full result, scrolling inside past it; the top is held, so the field and the count never move. A full result is: three logo rows (60), five picture rows (72) and a "See all" row (48), with 4 above and 10 below. A result is a link and a tab stop, as tall as its picture plus 6px above and below (never under 48), with the control ring at +2 and a hover wash that runs to the panel's edges (full bleed, not a plate; no ink lifts: a result's name and its detail keep their ink on the hover wash. Measured on the wash over the dialog's level (a modal is always level 1): tertiary ink 6.00:1 in dark and 4.88:1 in light, secondary 9.12:1 and 7.74:1, so tertiary passes 4.5:1 there and the step to secondary the first build had was removed (by the AA rule: it is not needed).). The field's mark is a real 2px outline at -2 round the form's band. */ .search { --_control-44: var(--basalt-size-control-2xl); } + /* Its top is held where a full result has it (search.js writes --_top as it opens) and the results area is as tall as its rows up to a full result, + so the field and the count never move and the box ends under what it shows (DECISIONS 336). */ + /* stylelint-disable-next-line unit-disallowed-list -- a height that follows the window (a viewport unit); a fixed-length token cannot say it */ + dialog.search[data-held] { inset-block: var(--_top) auto; margin-block: 0; max-height: calc(var(--_room, 100dvh) - var(--_top) - var(--basalt-space-4)); } /* stylelint-disable-next-line unit-disallowed-list -- a width that follows the window (a viewport unit), less the margins; a fixed-length token cannot say it */ dialog.search[open] { display: flex; flex-direction: column; width: min(var(--basalt-size-command-width), calc(100vw - 2 * var(--basalt-space-4))); padding: 0; overflow: hidden; } .search-form { @@ -17,7 +20,9 @@ align-items: center; gap: var(--basalt-space-1); margin: 0; - padding: var(--basalt-space-2) var(--basalt-space-2) var(--basalt-space-2) var(--basalt-space-4); + padding-block: var(--basalt-space-2); + padding-inline: var(--basalt-space-4); + --basalt-edge-room: var(--basalt-space-4); --basalt-edge-room-start: initial; --basalt-edge-room-end: initial; border-bottom: var(--basalt-size-hairline) solid var(--basalt-border-divider); border-start-start-radius: var(--basalt-radius-lg); border-start-end-radius: var(--basalt-radius-lg); @@ -63,7 +68,7 @@ box-sizing: border-box; flex: 0 1 auto; min-height: 0; - height: calc(var(--basalt-space-1) + var(--basalt-space-2-5) + var(--_logos, 3) * var(--_logo-row) + var(--_packs, 5) * var(--_pack-row) + var(--_alls, 1) * var(--_floor)); + max-height: calc(var(--basalt-space-1) + var(--basalt-space-2-5) + var(--_logos, 3) * var(--_logo-row) + var(--_packs, 5) * var(--_pack-row) + var(--_alls, 1) * var(--_floor)); margin: 0; padding: var(--basalt-space-1) var(--basalt-space-2) var(--basalt-space-2-5); list-style: none; @@ -71,6 +76,7 @@ overscroll-behavior: contain; scroll-padding-block: var(--basalt-space-1-5); } + .search-results:not(:has(> li)) { padding-block: 0; } .search-results > li { margin: 0; padding: 0; list-style: none; } .search-result { position: relative; diff --git a/tools/html-skill/src/modules/search.js b/tools/html-skill/src/modules/search.js new file mode 100644 index 00000000..eb50bade --- /dev/null +++ b/tools/html-skill/src/modules/search.js @@ -0,0 +1,35 @@ +/* Basalt HTML script, search module: the search dialog's top (DECISIONS 336). It is held where the dialog has it with a full result, measured as + it opens and again when the usable window changes (a resize, the on-screen keyboard), so the field and the count never move while the window + holds still and the box ends under what it shows. React's SearchDialog holds it the same way. + Source: tools/html-skill/src/modules/search.js (do not edit the copy in the skill folder). */ +(function (B) { + 'use strict'; + /** The height a page can use: the visual viewport's where there is one (it shrinks for the on-screen keyboard), else the window's. */ + function usable() { return window.visualViewport ? window.visualViewport.height : innerHeight; } + + function place(d) { + d.removeAttribute('data-held'); + d.style.removeProperty('--_top'); + d.style.removeProperty('--_room'); + var room = usable(); + var max = Math.min(parseFloat(getComputedStyle(d).maxHeight) || room, room); + var r = d.querySelector('.search-results'); + var grow = r ? parseFloat(getComputedStyle(r).maxHeight) - r.offsetHeight : 0; + var h = Math.min(d.offsetHeight + (grow > 0 ? grow : 0), max); + // The top is the full box's, never so low that the box would end past what can be seen. + var top = Math.max((room - max) / 2, Math.round((room - h) / 2)); + d.style.setProperty('--_top', Math.max(0, Math.min(top, room - h)) + 'px'); + d.style.setProperty('--_room', room + 'px'); + d.setAttribute('data-held', ''); + } + + function again() { document.querySelectorAll('dialog.search[open]').forEach(place); } + + B._.step(131, 'searchTop', function () { + new MutationObserver(function (list) { + list.forEach(function (m) { var d = m.target; if (d.matches('dialog.search') && d.open && m.oldValue === null) place(d); }); + }).observe(document.documentElement, { subtree: true, attributes: true, attributeFilter: ['open'], attributeOldValue: true }); + addEventListener('resize', again); + if (window.visualViewport) window.visualViewport.addEventListener('resize', again); + }); +})(window.Basalt); diff --git a/tools/html-skill/src/modules/selection.css b/tools/html-skill/src/modules/selection.css index a0f51769..2f3d5d6e 100644 --- a/tools/html-skill/src/modules/selection.css +++ b/tools/html-skill/src/modules/selection.css @@ -3,12 +3,15 @@ /* ---- Table selection: a checkbox column (React's documented pattern, display.tsx and foundations "Selected rows") ---- The first column is a checkbox per row, labelled "Select NAME", under a header box that is mixed while some rows are selected. A selected row is the wash band (table.css) with no bar and no edge mark, in forced colours too: the wash is about 1.2:1 and says nothing alone, so the - state is the row's checked box and the count in words. The column is size-control-md wide (foundations), the 16px box centred between two 8px insets, so it is the same - width whether a row is selected or not and no column moves. */ + state is the row's checked box and the count in words. The column is --basalt-select-column wide (DECISIONS 336, S10): 32 on a pointer, 44 on touch and under 720, + where it holds the checkbox's whole hit area; a <col> may make it wider. The box is centred in it, so no column moves when a row is selected. */ + :root { --basalt-select-column: var(--basalt-size-control-md); } + @media (pointer: coarse), (width < %bp-md%) { :root { --basalt-select-column: var(--basalt-size-tap-min); } } - .select-col { box-sizing: border-box; width: var(--basalt-size-control-md); padding-inline: var(--basalt-space-2); } - /* Block-level, so the cell's own middle alignment centres the box and no line box adds a pixel above it. */ - .select-col input[type="checkbox"] { display: flex; } + .select-col { box-sizing: border-box; width: var(--basalt-select-column); padding-inline: 0; } + /* Block-level, so the cell's own middle alignment centres the box and no line box adds a pixel above it. Centred, never more than space-4 from the column's start: + in a wider column a word heads, the box starts on the cell's line, under the word (the polish ruling). */ + .select-col input[type="checkbox"] { display: flex; margin-inline: min(var(--basalt-space-4), calc((100% - var(--basalt-size-choice)) / 2)) auto; } /* A tap lands on the box over the cell's 44px, as React's checkbox does: a box around the 16px glyph that draws nothing (a percentage on an offset reads the glyph's own size, so it grows only the missing amount). */ @media (pointer: coarse), (width < %bp-md%) { diff --git a/tools/html-skill/src/modules/sheet.css b/tools/html-skill/src/modules/sheet.css index b368fd19..583ba248 100644 --- a/tools/html-skill/src/modules/sheet.css +++ b/tools/html-skill/src/modules/sheet.css @@ -16,7 +16,8 @@ margin: 0; height: auto; max-height: none; - padding: max(var(--_pad), var(--_safe-top)) max(var(--_pad), env(safe-area-inset-right, var(--basalt-space-0))) max(var(--_pad), env(safe-area-inset-bottom, var(--basalt-space-0))) max(var(--_pad), env(safe-area-inset-left, var(--basalt-space-0))); + padding-block: max(var(--_pad), var(--_safe-top)) max(var(--_pad), env(safe-area-inset-bottom, var(--basalt-space-0))); + padding-inline: max(var(--_pad), var(--bh-inset-start)) max(var(--_pad), var(--bh-inset-end)); border: 0; border-radius: 0; opacity: 1; @@ -52,7 +53,7 @@ @starting-style { dialog.sheet[data-side="top"][open] { opacity: 1; transform: none; clip-path: inset(0 var(--_reach) calc(100% - var(--basalt-size-header) - var(--_safe-top)) var(--_reach)); } } /* The band is the bar's own row, redrawn: the header's height, its line inside, and the gutter or the side safe area, whichever is larger. */ - .sheet-band { box-sizing: border-box; display: flex; align-items: center; flex: none; height: var(--basalt-size-header); padding: var(--basalt-size-hairline) max(var(--basalt-gutter), env(safe-area-inset-right, var(--basalt-space-0))) 0 max(var(--basalt-gutter), env(safe-area-inset-left, var(--basalt-space-0))); border-bottom: var(--basalt-size-hairline) solid var(--basalt-border-divider); } + .sheet-band { box-sizing: border-box; display: flex; align-items: center; flex: none; height: var(--basalt-size-header); padding-block: var(--basalt-size-hairline) 0; padding-inline: max(var(--basalt-gutter), var(--bh-inset-start)) max(var(--basalt-gutter), var(--bh-inset-end)); --basalt-edge-room-end: calc(max(var(--basalt-gutter), var(--bh-inset-end)) - var(--bh-inset-end)); --basalt-edge-room: initial; --basalt-edge-room-start: initial; border-bottom: var(--basalt-size-hairline) solid var(--basalt-border-divider); } /* Actions stay at the foot of the sheet, on a divider, however long the content scrolls. As React's (B5): the box reaches space-1-5 above the band it draws, and that strip is clipped away, so a focused field right before the actions shows its whole ring at the end of the scroll; the band itself @@ -78,26 +79,31 @@ align-items: center; justify-content: space-between; gap: var(--basalt-space-3); - padding: max(var(--basalt-space-3), env(safe-area-inset-top, var(--basalt-space-0))) max(var(--basalt-space-3), env(safe-area-inset-right, var(--basalt-space-0))) var(--basalt-space-3) max(var(--basalt-space-5), env(safe-area-inset-left, var(--basalt-space-0))); + padding-block: max(var(--basalt-space-3), env(safe-area-inset-top, var(--basalt-space-0))) var(--basalt-space-3); + /* The same padding on both sides (DECISIONS 336): Close is hung at the end, its glyph on the line the title starts on; the room is the end + padding less the inset there, so the whole target stays clear of a notch. */ + padding-inline: max(var(--basalt-space-5), var(--bh-inset-start)) max(var(--basalt-space-5), var(--bh-inset-end)); + --basalt-edge-room-end: calc(max(var(--basalt-space-5), var(--bh-inset-end)) - var(--bh-inset-end)); --basalt-edge-room: initial; --basalt-edge-room-start: initial; border-bottom: var(--basalt-size-hairline) solid var(--basalt-border-divider); } .sheet-head-text { flex: 1; min-width: 0; } .sheet-head .dialog-title { font: var(--basalt-font-weight-semibold) var(--basalt-text-xl-size) / var(--basalt-text-xl-line-height) var(--basalt-font-family-sans); letter-spacing: var(--basalt-text-xl-tracking); } .sheet-head .dialog-description { margin: 0; font-size: var(--basalt-text-sm-size); line-height: var(--basalt-text-sm-line-height); color: var(--basalt-text-tertiary); } - .sheet-close { --_h: var(--_control-44); border-radius: var(--basalt-radius-md); flex: none; } + .sheet-close { --_h: var(--_control-44); width: var(--_h); padding: 0; border-radius: var(--basalt-radius-md); flex: none; } .sheet-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; - padding-inline: max(var(--basalt-space-5), env(safe-area-inset-left, var(--basalt-space-0))) max(var(--basalt-space-5), env(safe-area-inset-right, var(--basalt-space-0))); + padding-inline: max(var(--basalt-space-5), var(--bh-inset-start)) max(var(--basalt-space-5), var(--bh-inset-end)); /* The body clips what it scrolls: space-1-5 at each end keeps a focused control's ring (2px at +2) whole against the head and the foot (React's, B5). */ padding-block: var(--basalt-space-1-5); } .sheet-foot { box-sizing: border-box; flex: none; - padding: var(--basalt-space-4) max(var(--basalt-space-5), env(safe-area-inset-right, var(--basalt-space-0))) max(var(--basalt-space-5), env(safe-area-inset-bottom, var(--basalt-space-0))) max(var(--basalt-space-5), env(safe-area-inset-left, var(--basalt-space-0))); + padding-block: var(--basalt-space-4) max(var(--basalt-space-5), env(safe-area-inset-bottom, var(--basalt-space-0))); + padding-inline: max(var(--basalt-space-5), var(--bh-inset-start)) max(var(--basalt-space-5), var(--bh-inset-end)); border-top: var(--basalt-size-hairline) solid var(--basalt-border-divider); } diff --git a/tools/html-skill/src/modules/still-table.js b/tools/html-skill/src/modules/still-table.js index 76a22d5c..6c8a55a2 100644 --- a/tools/html-skill/src/modules/still-table.js +++ b/tools/html-skill/src/modules/still-table.js @@ -247,11 +247,26 @@ mark(); } + /* The selection column's <col> is at least --basalt-select-column wide (32 on a pointer, 44 on touch), so the checkbox's whole hit area is in it (DECISIONS 336). */ + function seatSelect(table) { + var head = table.tHead && table.tHead.rows[0]; + var cells = head ? Array.prototype.slice.call(head.cells) : []; + var at = cells.findIndex(function (c) { return c.classList.contains('select-col'); }); + var col = at < 0 ? null : table.querySelectorAll(':scope > colgroup > col')[at]; + if (!col || col.style.width.indexOf('--basalt-select-column') >= 0) return; + // The width the author gave, however it was given (inline, the width attribute, or a class), kept for a fine pointer (the code review's finding 7). + var attr = col.getAttribute('width'); + var given = col.style.width || (attr && /^\d+(\.\d+)?$/.test(attr) ? attr + 'px' : attr) || getComputedStyle(col).width; + if (!given || given === 'auto' || !/^\d+(\.\d+)?(px)?$/.test(given)) given = '0px'; + col.style.width = 'max(' + given + ', var(--basalt-select-column))'; + } + _.step(65, 'stillTable', function () { document.querySelectorAll('table[data-fixed]').forEach(function (table) { if (table.__bhStill) return; table.__bhStill = true; own(table); + seatSelect(table); wireSort(table); wirePinned(table); wirePeek(table); diff --git a/tools/html-skill/src/modules/tab-bar.css b/tools/html-skill/src/modules/tab-bar.css index d8debb70..bb57d0db 100644 --- a/tools/html-skill/src/modules/tab-bar.css +++ b/tools/html-skill/src/modules/tab-bar.css @@ -10,8 +10,6 @@ --bh-inset-bottom-sim is for previews and tests only: it stands in for a home indicator where env() reads 0. */ :root { --bh-inset-bottom: max(env(safe-area-inset-bottom, var(--basalt-space-0)), var(--bh-inset-bottom-sim, var(--basalt-space-0))); - --bh-inset-left: env(safe-area-inset-left, var(--basalt-space-0)); - --bh-inset-right: env(safe-area-inset-right, var(--basalt-space-0)); --basalt-bottom-offset: var(--basalt-space-0); } @media (width < %bp-md%) { @@ -30,7 +28,7 @@ box-sizing: border-box; display: block; padding-bottom: var(--bh-inset-bottom); - padding-inline: var(--bh-inset-left) var(--bh-inset-right); + padding-inline: var(--bh-inset-start) var(--bh-inset-end); border-top: var(--basalt-size-hairline) solid var(--basalt-border-hairline); background: var(--basalt-surface-page); color: var(--basalt-text-primary); @@ -123,7 +121,8 @@ .tab-bar[data-keys] .tab-bar-item:is(:hover, :active) .tab-bar-glyph { background-color: transparent; } .tab-bar-item:focus-visible { outline: var(--basalt-size-focus-width) solid var(--basalt-border-focus); outline-offset: calc(-1 * var(--basalt-size-focus-width)); } /* More's bottom sheet: a title and Close, then Nav rows. */ - .tab-bar-sheet-head { display: flex; align-items: center; justify-content: space-between; gap: var(--basalt-space-2); margin-bottom: var(--basalt-space-2); } + /* Close is hung at the head's end, its glyph on the sheet's line; the room is the sheet's own end padding less the end inset (DECISIONS 336). */ + .tab-bar-sheet-head { display: flex; align-items: center; justify-content: space-between; gap: var(--basalt-space-2); margin-bottom: var(--basalt-space-2); --basalt-edge-room-end: calc(max(var(--_pad), var(--bh-inset-end)) - var(--bh-inset-end)); --basalt-edge-room: initial; --basalt-edge-room-start: initial; } .tab-bar-sheet-head .dialog-title { margin: 0; } @media (forced-colors: active) { diff --git a/tools/html-skill/src/modules/terminal.css b/tools/html-skill/src/modules/terminal.css index eb24ab73..ae4c408f 100644 --- a/tools/html-skill/src/modules/terminal.css +++ b/tools/html-skill/src/modules/terminal.css @@ -24,13 +24,15 @@ .terminal-hint { grid-column: 1 / -1; margin-inline-start: calc(var(--basalt-size-icon-sm) + var(--basalt-space-2)); color: var(--basalt-text-tertiary); } .terminal-title { min-width: 0; } .terminal-actions { display: inline-flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 0 var(--basalt-space-2); max-width: 100%; margin-inline-start: auto; } - .terminal-actions:has(.btn) { margin-inline-end: calc(-1 * var(--basalt-space-2-5)); } .terminal-state { display: inline-flex; font-weight: var(--basalt-font-weight-regular); } .terminal-state [data-error] { color: var(--basalt-status-danger); } /* A word that changes in place stands in one grid cell with all its forms, the others hidden, so the cell is as wide as the widest and nothing beside it moves. */ .terminal-swap { display: inline-grid; } .terminal-swap > * { grid-area: 1 / 1; justify-self: end; display: inline-flex; align-items: center; gap: var(--basalt-space-1-5); white-space: nowrap; } .terminal-swap > :not([data-on]) { visibility: hidden; } + /* A button's words that change are centred in their cell (DECISIONS 336, S1); the state's face the buttons. */ + .terminal-control .terminal-swap > * { justify-self: center; } + :is(.terminal-copy, .terminal-copy-compact) > svg[data-off] { display: none; } /* Wide: the words. Narrow (the terminal's own width, under 480px): the icon alone, with the same name. */ .terminal-actions .terminal-copy-compact { display: none; } /* size-breakpoint-container: a container query cannot read a token, so the build writes its value here */ diff --git a/tools/html-skill/src/modules/terminal.js b/tools/html-skill/src/modules/terminal.js index 16183399..ff527e0e 100644 --- a/tools/html-skill/src/modules/terminal.js +++ b/tools/html-skill/src/modules/terminal.js @@ -78,8 +78,9 @@ actions += '<button type="button" class="btn terminal-control" data-variant="ghost" data-size="sm">' + swap('Play', words(['Play', 'Pause', 'Resume', 'Replay'])) + '</button>'; } var copyDisabled = commands ? '' : ' disabled'; - actions += '<button type="button" class="btn terminal-copy" data-variant="ghost" data-size="sm"' + copyDisabled + '>' + COPY + swap('Copy commands', words(['Copy commands', 'Copied'])) + '</button>' + - '<button type="button" class="btn terminal-copy-compact" data-variant="ghost" data-size="sm" data-icon-only aria-label="Copy commands"' + copyDisabled + '>' + COPY + '</button>' + + // The words hold and the glyph says what happened (DECISIONS 336, Q5): the check after a write, the close after a refused one. + actions += '<button type="button" class="btn terminal-copy" data-variant="ghost" data-size="sm" data-edge="end"' + copyDisabled + '>' + COPY + '%glyph-svg:check%%glyph-svg:close%<span>Copy commands</span></button>' + + '<button type="button" class="btn terminal-copy-compact" data-variant="ghost" data-size="sm" data-icon-only data-edge="end" aria-label="Copy commands"' + copyDisabled + '>' + COPY + '%glyph-svg:check%%glyph-svg:close%</button>' + '<span class="visually-hidden" role="status"></span>'; head.classList.add('code-head'); head.innerHTML = '<span class="terminal-title">' + esc(title) + '</span><span class="terminal-actions">' + actions + '</span>'; @@ -99,9 +100,12 @@ } var stateEl = root.querySelector('.terminal-state .terminal-swap'); var controlEl = root.querySelector('.terminal-control .terminal-swap'); - var copyEl = root.querySelector('.terminal-copy .terminal-swap'); + var copyEl = root.querySelector('.terminal-copy'); + // Each copy button's three glyphs (copy, check, close) are drawn once; one shows at a time, so no markup is written after the head. + var glyphTo = function (at) { [copyEl, compact].forEach(function (b) { Array.prototype.forEach.call(b.querySelectorAll('svg'), function (g, i) { g.toggleAttribute('data-off', i !== at); }); }); }; var live = root.querySelector('.terminal-actions [role="status"]'); var compact = root.querySelector('.terminal-copy-compact'); + glyphTo(0); var STATES = ['idle', 'running', 'paused', 'done', 'failed']; var CONTROL = ['Play', 'Pause', 'Resume', 'Replay']; @@ -140,13 +144,12 @@ function copy() { if (!commands || !B.copyText) return; B.copyText(commands).then(function (ok) { - if (!ok) return; - show(copyEl, 'Copied', ['Copy commands', 'Copied']); - compact.innerHTML = '%glyph-svg:check%'; - compact.setAttribute('aria-label', 'Copied'); - live.textContent = 'Copied'; + glyphTo(ok ? 1 : 2); + // The icon alone shows the same result: the check, or the close after a refused write (DECISIONS 336, the open items' ruling), swapped at once. + compact.setAttribute('aria-label', ok ? 'Copied' : 'Copy failed'); + live.textContent = ok ? 'Copied' : 'Copy failed'; clearTimeout(reset); - reset = setTimeout(function () { show(copyEl, 'Copy commands', ['Copy commands', 'Copied']); compact.innerHTML = COPY; compact.setAttribute('aria-label', 'Copy commands'); live.textContent = ''; }, %duration-confirm%); + reset = setTimeout(function () { glyphTo(0); compact.setAttribute('aria-label', 'Copy commands'); live.textContent = ''; }, %duration-confirm%); }); } root.querySelector('.terminal-copy').addEventListener('click', copy); diff --git a/tools/html-skill/src/modules/toast.css b/tools/html-skill/src/modules/toast.css index 506e76ab..5693e61e 100644 --- a/tools/html-skill/src/modules/toast.css +++ b/tools/html-skill/src/modules/toast.css @@ -60,7 +60,7 @@ .toast[data-swiping] { transition-property: opacity, height; } .toast::after { content: ""; position: absolute; top: 100%; left: 0; width: 100%; height: calc(var(--_gap) + var(--basalt-size-hairline)); } - .toast-content { display: flex; align-items: flex-start; gap: var(--basalt-space-3); padding: var(--basalt-space-3) var(--basalt-space-3) var(--basalt-space-3) var(--basalt-space-4); overflow: hidden; transition: opacity var(--basalt-duration-base) var(--basalt-ease-out); } + .toast-content { display: flex; align-items: flex-start; gap: var(--basalt-space-3); padding-block: var(--basalt-space-3); padding-inline: var(--basalt-space-4) var(--basalt-space-3); overflow: hidden; transition: opacity var(--basalt-duration-base) var(--basalt-ease-out); } .toast-content[data-behind] { opacity: 0; } .toast-content[data-expanded] { opacity: 1; } /* The mark seat: 16px, centred on the title's first line. It is there for a marked toast and for one that ran (so the result does not move the @@ -80,6 +80,14 @@ .toast-count { margin-inline-start: var(--basalt-space-1-5); font-weight: var(--basalt-font-weight-regular); font-variant-numeric: tabular-nums; color: var(--basalt-text-secondary); } .toast-close { color: var(--basalt-text-secondary); } .toast .btn[data-size="xs"] { --_h: var(--basalt-size-control-xs); --_px: var(--basalt-space-2); font-size: var(--basalt-text-sm-size); } + /* On touch Dismiss and the action keep their pointer size (24 and the action's own height, radius 6) and take their 44 as hit area inside the + toast's padding, so a toast is one height on every pointer (DECISIONS 336, S7). The hit area is 46 (a hairline more on each side), so the + press's .98 never takes it under 44; a short action's missing width is on its start side, over the words and away from Dismiss. */ + @media (pointer: coarse), (width < %bp-md%) { + .toast .btn:is(.toast-close, .toast-action) { min-width: 0; min-height: 0; border-radius: var(--basalt-radius-sm); } + .toast .toast-close::before { content: ""; position: absolute; inset: calc((var(--basalt-size-control-xs) - var(--basalt-size-tap-min)) / 2 - var(--basalt-size-hairline)); } + .toast .toast-action::before { content: ""; position: absolute; inset-block: calc((100% - var(--basalt-size-tap-min)) / 2 - var(--basalt-size-hairline)); inset-inline: min(var(--basalt-space-0), calc(100% - var(--basalt-size-tap-min) - 2 * var(--basalt-size-hairline))) 0; } + } /* The drain line is drawn on top of the bottom rim's straight part: it starts where the corner curve ends. It pauses exactly when every toast's own clock does: the stack hovered or focused (it is then expanded), the window out of focus, or the tab hidden (data-away). */ diff --git a/tools/html-skill/src/modules/topbar-nav.css b/tools/html-skill/src/modules/topbar-nav.css index b622bf49..e49cc023 100644 --- a/tools/html-skill/src/modules/topbar-nav.css +++ b/tools/html-skill/src/modules/topbar-nav.css @@ -77,7 +77,10 @@ @media (width < %bp-md%) { .topbar-links, .topbar-action { display: none; } .topbar-menu-trigger { display: inline-flex; } + /* Menu is the last control shown here, so a tool hung at the end on a wide bar gives no room before it (DECISIONS 336). */ + .topbar-inner:has(> .topbar-menu-trigger) > :not(.topbar-menu-trigger) { --basalt-edge-room-end: initial; } } + .topbar-menu-actions > :not(:last-child) { --basalt-edge-room-end: initial; } /* The narrow menu: a top sheet. Its band is the bar's own row, redrawn (sheet.css); its buttons are the bar's, 44 with radius 8. The list is Nav's rows with no glyph. The foot holds the action, full width. */ @@ -92,15 +95,17 @@ .topbar-menu .sheet-band { gap: var(--basalt-space-2); } /* The hold's row, when the bar has a loops toggle: the pressed-toggle button at the band's own gutter, natural width, 44 tall (React's .basalt-site-menu-loops). */ .topbar-menu-loops { - padding: var(--basalt-space-2) max(var(--basalt-gutter), env(safe-area-inset-right, var(--basalt-space-0))) 0 max(var(--basalt-gutter), env(safe-area-inset-left, var(--basalt-space-0))); + padding-block: var(--basalt-space-2) 0; + padding-inline: max(var(--basalt-gutter), var(--bh-inset-start)) max(var(--basalt-gutter), var(--bh-inset-end)); } .topbar-menu-loops .btn { --_h: var(--basalt-size-tap-min); border-radius: var(--basalt-radius-md); } .topbar-menu .nav { padding-block: var(--basalt-space-2); - padding-inline: max(var(--basalt-space-1-5), env(safe-area-inset-left, var(--basalt-space-0))) max(var(--basalt-space-1-5), env(safe-area-inset-right, var(--basalt-space-0))); + padding-inline: max(var(--basalt-space-1-5), var(--bh-inset-start)) max(var(--basalt-space-1-5), var(--bh-inset-end)); } .topbar-menu-foot { - padding: var(--basalt-space-2) max(var(--basalt-gutter), env(safe-area-inset-right, var(--basalt-space-0))) max(var(--basalt-space-4), env(safe-area-inset-bottom, var(--basalt-space-0))) max(var(--basalt-gutter), env(safe-area-inset-left, var(--basalt-space-0))); + padding-block: var(--basalt-space-2) max(var(--basalt-space-4), env(safe-area-inset-bottom, var(--basalt-space-0))); + padding-inline: max(var(--basalt-gutter), var(--bh-inset-start)) max(var(--basalt-gutter), var(--bh-inset-end)); } .topbar-menu-foot .btn { --_h: var(--basalt-size-tap-min); diff --git a/tools/html-skill/src/modules/topbar-nav.js b/tools/html-skill/src/modules/topbar-nav.js index c930c127..4e3bc1d4 100644 --- a/tools/html-skill/src/modules/topbar-nav.js +++ b/tools/html-skill/src/modules/topbar-nav.js @@ -48,7 +48,7 @@ } // The Menu button, last in the bar. - var trigger = el('button', 'btn topbar-menu-trigger', { type: 'button', 'data-variant': 'ghost', 'data-icon-only': '', 'aria-label': menuLabel, 'aria-expanded': 'false', 'aria-controls': id, 'data-dialog-open': '#' + id }); + var trigger = el('button', 'btn topbar-menu-trigger', { type: 'button', 'data-variant': 'ghost', 'data-icon-only': '', 'data-edge': 'end', 'aria-label': menuLabel, 'aria-expanded': 'false', 'aria-controls': id, 'data-dialog-open': '#' + id }); trigger.innerHTML = '<span data-glyph="menu"></span>'; inner.appendChild(trigger); @@ -63,7 +63,7 @@ inner.querySelectorAll('[data-tool]').forEach(function (tool) { actions.appendChild(copy(tool)); }); var toggle = inner.querySelector('[data-theme-toggle]'); if (toggle) actions.appendChild(copy(toggle)); - var close = el('button', 'btn', { type: 'button', 'data-variant': 'ghost', 'data-icon-only': '', 'aria-label': closeLabel, 'data-dialog-close': '', autofocus: '' }); + var close = el('button', 'btn', { type: 'button', 'data-variant': 'ghost', 'data-icon-only': '', 'data-edge': 'end', 'aria-label': closeLabel, 'data-dialog-close': '', autofocus: '' }); close.innerHTML = '<span data-glyph="close"></span>'; actions.appendChild(close); band.appendChild(actions); diff --git a/tools/html-skill/src/modules/topbar.css b/tools/html-skill/src/modules/topbar.css index 6524bcd0..17ebc960 100644 --- a/tools/html-skill/src/modules/topbar.css +++ b/tools/html-skill/src/modules/topbar.css @@ -9,11 +9,9 @@ screen (viewport-fit=cover, which compose.mjs sets for a page with a tab bar or an app shell). */ :root { --bh-inset-top: env(safe-area-inset-top, var(--basalt-space-0)); - --bh-inset-left: env(safe-area-inset-left, var(--basalt-space-0)); - --bh-inset-right: env(safe-area-inset-right, var(--basalt-space-0)); --basalt-sticky-offset: calc(var(--basalt-size-header) + var(--bh-inset-top)); - --bh-pad-left: max(var(--basalt-gutter), var(--bh-inset-left)); - --bh-pad-right: max(var(--basalt-gutter), var(--bh-inset-right)); + --bh-pad-start: max(var(--basalt-gutter), var(--bh-inset-start)); + --bh-pad-end: max(var(--basalt-gutter), var(--bh-inset-end)); } /* A page with a bar keeps its scrollbar's room (a filter that shortens the page must not widen it) and scrolls anchors and focus clear of the sticky bar. */ :root:has(.topbar, .app-header) { @@ -46,8 +44,8 @@ /* The skip link (core) with a bar: it hangs under the bar, space-2 below the bar's line, on the brand's start edge at every width (the bar's own inline padding, and the page's centred column for a .topbar), fixed to the viewport so it covers nothing in the bar and moves nothing. Unseen until focus: clipped, not moved, so it never shows over the bar on its way out. React's SkipLink does the same under a SiteHeader, AppHeader or .basalt-sticky-bar. */ - .skip-link { position: fixed; top: calc(var(--basalt-sticky-offset) + var(--basalt-space-2)); inset-inline-start: var(--bh-pad-left); transform: none; } - :root:has(.topbar) .skip-link { inset-inline-start: max(var(--bh-pad-left), calc((100% - var(--basalt-size-page-width)) / 2 + var(--bh-pad-left))); } + .skip-link { position: fixed; top: calc(var(--basalt-sticky-offset) + var(--basalt-space-2)); inset-inline-start: var(--bh-pad-start); transform: none; } + :root:has(.topbar) .skip-link { inset-inline-start: max(var(--bh-pad-start), calc((100% - var(--basalt-size-page-width)) / 2 + var(--bh-pad-start))); } .skip-link:not(:focus) { clip-path: inset(50%); } /* Only primary and secondary ink may sit on it: tertiary is promoted to secondary. A pressed ghost button takes primary ink (on its wash). */ :is(.topbar, .app-header) :is(.faint, .necessity) { color: var(--basalt-text-secondary); } @@ -72,8 +70,10 @@ max-width: var(--basalt-size-page-width); margin-inline: auto; padding-top: var(--basalt-size-hairline); - padding-inline: var(--bh-pad-left) var(--bh-pad-right); + padding-inline: var(--bh-pad-start) var(--bh-pad-end); } + /* The room for a control hung at the bar's end (DECISIONS 336): the end padding less the end inset, so it never reaches under a notch. */ + :is(.topbar, .app-header) { --basalt-edge-room-end: calc(var(--bh-pad-end) - var(--bh-inset-end)); --basalt-edge-room: initial; --basalt-edge-room-start: initial; } /* The brand slot: the 32px header lockup (a mark, or a mark and a word) in a target at least 44 by 44. Identity, not a link of the row: no wash. The focus ring is the control ring round the 32px lockup, +2, drawn by a box the height of the lockup. */ @@ -145,7 +145,8 @@ width: 100%; max-width: var(--basalt-size-page-width); margin: var(--_above) auto 0; - padding: 0 var(--bh-pad-right) calc(var(--basalt-space-8) + env(safe-area-inset-bottom, var(--basalt-space-0))) var(--bh-pad-left); + padding-block: 0 calc(var(--basalt-space-8) + env(safe-area-inset-bottom, var(--basalt-space-0))); + padding-inline: var(--bh-pad-start) var(--bh-pad-end); color: var(--basalt-text-secondary); font: var(--basalt-font-weight-regular) var(--bh-sm); letter-spacing: var(--basalt-text-sm-tracking); diff --git a/tools/html-skill/src/modules/type-layout.css b/tools/html-skill/src/modules/type-layout.css index 4d9fdcc0..3e615627 100644 --- a/tools/html-skill/src/modules/type-layout.css +++ b/tools/html-skill/src/modules/type-layout.css @@ -86,7 +86,7 @@ width: 100%; max-width: var(--basalt-size-page-width); margin-inline: auto; - padding-inline: max(var(--basalt-gutter), env(safe-area-inset-left, var(--basalt-space-0))) max(var(--basalt-gutter), env(safe-area-inset-right, var(--basalt-space-0))); + padding-inline: max(var(--basalt-gutter), var(--bh-inset-start)) max(var(--basalt-gutter), var(--bh-inset-end)); } /* The rhythm: sections are one section gap apart, the first starts half a gap below the bar and the page ends a gap above its footer. */ .page-sections { display: block; padding-block-end: var(--basalt-section-gap); } diff --git a/tools/html-skill/src/sinks.allowed.json b/tools/html-skill/src/sinks.allowed.json index 2fa7cc2d..190b030c 100644 --- a/tools/html-skill/src/sinks.allowed.json +++ b/tools/html-skill/src/sinks.allowed.json @@ -23,7 +23,7 @@ "modules/runs.js": { "count": 1, "data": false, "takes": "a stage mark's icon", "safe": "an icon looked up from the stage's known state; an unknown state draws nothing" }, "modules/sparkline.js": { "count": 1, "data": true, "takes": "a sparkline's drawing and its label, from the page's JSON", "safe": "the label and the empty text go through esc; the path is numbers" }, "modules/still-table.js": { "count": 1, "data": false, "takes": "a sortable header's caret glyphs", "safe": "drawings from the icon and glyph sets" }, - "modules/terminal.js": { "count": 4, "data": true, "takes": "a terminal's lines and its stage lines, its title and its copy button", "safe": "each line, stage word and the title go through esc; a stage's mark comes from its known state; the button is constant" }, + "modules/terminal.js": { "count": 3, "data": true, "takes": "a terminal's lines and its stage lines, its title and its copy buttons (drawn once with their three glyphs)", "safe": "each line, stage word and the title go through esc; a stage's mark comes from its known state; the button is constant" }, "modules/theme.js": { "count": 2, "data": false, "takes": "the theme toggle's sun or moon icon", "safe": "icons from the icon set" }, "modules/toast.js": { "count": 2, "data": true, "takes": "a toast's content from Basalt.toast's options, and its drain bar", "safe": "words go through esc; status is a known value; the drain's duration is a number" }, "modules/tooltip.js": { "count": 1, "data": true, "takes": "a tooltip's words from data-tooltip, and its key chips", "safe": "the words and keys go through esc" }, diff --git a/tools/html-skill/src/usage/code.md b/tools/html-skill/src/usage/code.md index 4b25dd15..4d6bdbeb 100644 --- a/tools/html-skill/src/usage/code.md +++ b/tools/html-skill/src/usage/code.md @@ -9,4 +9,6 @@ `tabindex="0"` goes on `pre.code-body` (it scrolls), with `<code>` inside; not on the `<code>`. +Its Copy takes `data-edge="end"`. + Tokens, only inside the `<code>`: `.tok-k` keyword, `.tok-s` string, `.tok-n` number or constant, `.tok-f` function, `.tok-c` comment. diff --git a/tools/html-skill/src/usage/command-list.md b/tools/html-skill/src/usage/command-list.md index 9829c805..2319de11 100644 --- a/tools/html-skill/src/usage/command-list.md +++ b/tools/html-skill/src/usage/command-list.md @@ -17,5 +17,5 @@ Items are the palette's (`label`, `icon`, `keys`, `keywords`, `danger`, `href`, - `data-label` names the region and the Back button; `data-noun` is what the foot counts ("9 commands", "3 of 9", spoken once after 400ms). - Focus stays in the field (a combobox): ↑ ↓ wrap, ↵ runs the row (in a split it runs the pane's first button), Esc clears the search and then does nothing, Tab leaves. Nothing is focused on load. The lit row shows only while the field has focus or the pointer is over the list. - A search ranks title matches above description and keyword matches, each in the order given. -- It keeps its height while you filter, up to 360px, then scrolls; no match is one sentence and a Clear button. +- The panel is as tall as its matches, up to 360px, then scrolls; on the open page its unfiltered height stays as page under it. In a panel, dialog or popover (or with `data-reserve="off"`) it holds no room. No match is one sentence and a Clear button. - ⌘K focuses the field on a page with no palette; with a palette on the page, ⌘K is the palette's. One owner. diff --git a/tools/html-skill/src/usage/copy.md b/tools/html-skill/src/usage/copy.md index cc3131a2..5967d7c1 100644 --- a/tools/html-skill/src/usage/copy.md +++ b/tools/html-skill/src/usage/copy.md @@ -1,6 +1,6 @@ # copy -`<button class="btn" data-copy="#code-id">` or `data-copy-text="…"`; keep an icon and a `<span>` label inside. +`<button class="btn" data-copy="#code-id">` or `data-copy-text="…"`; keep an icon and a `<span>` label inside. Its words hold; the glyph turns check (close if refused). `Basalt.copyText(text)` copies from script. Copy buttons are not printed. diff --git a/tools/html-skill/src/usage/core.md b/tools/html-skill/src/usage/core.md index 3aab1a56..91394741 100644 --- a/tools/html-skill/src/usage/core.md +++ b/tools/html-skill/src/usage/core.md @@ -4,6 +4,7 @@ **Type:** `h1`–`h4`, `.display`, `.text-5xl` (56/60; give it room at 390), `.lead`, `.eyebrow`, `.muted`, `.faint`, `.small`, `.mono`, `.num`, `.prose`, inline `code`. `h2` is 24/30. `.lead` (16/24, under a report's `h1`) and `.prose` are 34rem on the row's start edge; `.page` is the 72rem row. A site page's display type, lead (`.text-lead`, 20/28), row and sections are `type-layout`. **Panels:** `.panel`, `.card`, `.panel-pad`, `.panel-head`, `.float` (+ `.modal`). `.float` is only for what leaves the flow; never to promote a panel. `.card.lg` and `.panel-pad.lg` take wider padding from 720px up. **Buttons:** `.btn[data-variant=primary|ghost|danger]` (default secondary), `data-size=sm|lg`, `data-icon-only`, `aria-busy`. +- **At an edge:** a ghost `.btn` that starts or ends a head, bar or row takes `data-edge="start"` or `"end"`: its glyph or words sit on the head's line and its box hangs into the padding, only as far as the head's `--basalt-edge-room` (its padding less any safe area; a head of your own sets it, `style="--basalt-edge-room: var(--basalt-space-4)"`). A `.panel-head`'s last ghost `.btn`, and a `.page > .section > .section-head`'s, hang by themselves. Never a margin by hand. - **Busy** is `aria-busy="true"` on the button (label in a `<span>`): the label hides and a ring sits over it, so the width holds. - **Press:** a press is a colour step, and `.btn` also scales to .98 (100ms, ease-out) while pressed, never when disabled or busy and never under reduced motion; nothing else scales on press. diff --git a/tools/html-skill/src/usage/dialog-form.md b/tools/html-skill/src/usage/dialog-form.md index fa880daa..a6a45e22 100644 --- a/tools/html-skill/src/usage/dialog-form.md +++ b/tools/html-skill/src/usage/dialog-form.md @@ -5,7 +5,7 @@ A form or task in the center (React's `DialogContent form`): a dialog with the s ```html <dialog class="panel float modal dialog" data-form id="d"> <header class="sheet-head"><div class="sheet-head-text"><h2 class="dialog-title" tabindex="-1">Invite a teammate</h2></div> - <button class="btn sheet-close" data-variant="ghost" data-dialog-close aria-label="Close"><span data-glyph="close"></span></button></header> + <button class="btn sheet-close" data-variant="ghost" data-icon-only data-edge="end" data-dialog-close aria-label="Close"><span data-glyph="close"></span></button></header> <div class="sheet-body"><p class="dialog-description">They get a link to join.</p>…fields…</div> <footer class="sheet-foot"><div class="dialog-actions"><button class="btn" data-dialog-close>Cancel</button><button class="btn" data-variant="primary">Send invite</button></div></footer> </dialog> diff --git a/tools/html-skill/src/usage/filter.md b/tools/html-skill/src/usage/filter.md index 0253b950..224a19f3 100644 --- a/tools/html-skill/src/usage/filter.md +++ b/tools/html-skill/src/usage/filter.md @@ -11,7 +11,7 @@ A filter that takes any number of its values (React's MultiSelect), and the line <p class="filter-result" data-for="runs" data-noun="runs">Showing 24 of 24 runs</p> ``` -- Write the labelled checkboxes only. The script builds the control: up to six values are chips (a plus off, a check on) under the label, a count ("Any", "2 of 4") and Clear; seven or more, or `data-toolbar`, are a trigger and a checklist, with a search field from ten values. The count, never the window, picks the form. `data-label` names the group. +- Write the labelled checkboxes only. The script builds the control: up to six values are chips (a plus off, a check on) under the label, then Clear, then a count ("Any", "2 of 4"); seven or more, or `data-toolbar`, are a trigger and a checklist, with a search field from ten values. The count, never the window, picks the form. `data-label` names the group. - Clear stays in place and is `aria-disabled` at zero, so focus stays on it. Nothing chosen means no filter. - `data-for` (a `table` or its `.table-wrap` by id) and `data-column` (from 1) hide the rows whose cell's `data-value`, else its words, matches no chosen value, and show the table's `tr[data-empty]` when none is left. Without them, listen for `filterchange` (`detail.values`) and filter yourself. - `.filter-result` is the one thing spoken: shown at once, spoken once, 400ms after the text holds still. Put one by each filtered list, with `data-noun`. `Basalt.filterResult(el, text)` sets one by hand; `Basalt.refreshFilter(id)` filters again after you replace the rows. diff --git a/tools/html-skill/src/usage/links.md b/tools/html-skill/src/usage/links.md index 84697b64..89fd4786 100644 --- a/tools/html-skill/src/usage/links.md +++ b/tools/html-skill/src/usage/links.md @@ -13,7 +13,7 @@ - **The link:** secondary ink, primary on hover and focus, the name underlined and the glyph not. The visible name is the accessible name; the link takes its container's text size (a footer's 13px, a profile's 14px). Same tab by default. - **Beside 18 to 24px text** put `data-size="20"` on the `ul`: the glyphs become 20. - **Touch:** each link is at least 44 by 44, wrapped lines touch and never overlap. -- **Icon only,** for a row made entirely of marks (an author card): `<ul class="links" data-icon-only aria-label="Elsewhere">` with `<li><a class="btn" data-variant="ghost" data-icon-only href aria-label="GitHub"><i data-icon="GithubLogo"></i></a></li>`. A row that needs Email or a service without a mark is the labelled row. +- **Icon only,** for a row made entirely of marks (an author card): `<ul class="links" data-icon-only aria-label="Elsewhere">` with `<li><a class="btn" data-variant="ghost" data-icon-only href aria-label="GitHub"><i data-icon="GithubLogo"></i></a></li>`. The first link takes `data-edge="start"`: in a `.card` its glyph sits on the card's line. A row that needs Email or a service without a mark is the labelled row. - **New tab:** `target="_blank"` draws the arrow after the name and adds "(opens in a new tab)" to the name (`data-new-tab-label="words"` translates it); `mailto:` gets no arrow, and neither does an icon-only link, whose name takes the words. Never write the arrow or the words yourself. - The long form, a profile list with handles, is a `rows` list: `--usage rows`. - Not in the top bar. diff --git a/tools/html-skill/src/usage/notifications.md b/tools/html-skill/src/usage/notifications.md index 45b78490..bdf7efc3 100644 --- a/tools/html-skill/src/usage/notifications.md +++ b/tools/html-skill/src/usage/notifications.md @@ -14,4 +14,4 @@ var centre = Basalt.notifications('#bell', { - The page owns the entries and read state; call `setEntries` after a change; `onClearAll` adds Clear all. Newest first; `href` makes a link, else a button. `time` is your words ("2m ago"); `status`: `success`, `warning`, `danger`, `pending` (waiting; the title says it). - A group: `entries: [...]` on an entry, its title naming who and what; the row adds "×N" (`count`) and opens to them. -- Home of a toast's `home: 'centre'`. In a bar's end, 32px; the unread count is in the button's name. +- Home of a toast's `home: 'centre'`. In a bar's end, 32px; the unread count is in the button's name. Last in a bar: `edge: 'end'`. diff --git a/tools/html-skill/src/usage/search.md b/tools/html-skill/src/usage/search.md index b8dbc3da..0a770c76 100644 --- a/tools/html-skill/src/usage/search.md +++ b/tools/html-skill/src/usage/search.md @@ -8,7 +8,7 @@ A search dialog on the dialog's rules (`--usage dialog`): `<dialog class="panel <form class="search-form" role="search"> <label class="search-field"><span data-glyph="search"></span><span class="visually-hidden">Search products</span> <input class="search-input" type="search" placeholder="A brand, whey" autocomplete="off" enterkeyhint="search"></label> - <button type="button" class="btn search-close" data-variant="ghost" data-icon-only aria-label="Close search" data-dialog-close><span data-glyph="close"></span></button> + <button type="button" class="btn search-close" data-variant="ghost" data-icon-only data-edge="end" aria-label="Close search" data-dialog-close><span data-glyph="close"></span></button> </form> <p class="search-count" role="status">2 products</p> <ul class="search-results"> @@ -17,7 +17,7 @@ A search dialog on the dialog's rules (`--usage dialog`): `<dialog class="panel </dialog> ``` -- `.search-results` has a fixed height, a full result's, so the field and the count never move; it scrolls inside. The counts are presets (a shop's: 3 logo rows, 5 picture rows, a "See all" row); set yours: `style="--_logos: 0; --_packs: 6; --_alls: 0"`. +- `.search-results` hugs its rows up to a full result, then scrolls; the top is held, so the field and the count never move. The counts are presets (a shop's: 3 logo rows, 5 picture rows, a "See all" row); set yours: `style="--_logos: 0; --_packs: 6; --_alls: 0"`. - A row is as tall as its `.search-media` plus 6px each side: 72 for a pack (the default, 48 by 60), 60 for a logo (`data-shape="logo"`, 96 by 48), 48 at least with none. A row of its own words, centred: `data-centered` on the link. - The count is one `role="status"` line you rewrite after a pause, not per keystroke; change only its text. - One close button: the browser's clear × is hidden. The title is read on opening and never drawn. diff --git a/tools/html-skill/src/usage/selection.md b/tools/html-skill/src/usage/selection.md index 833f5f08..e9559a67 100644 --- a/tools/html-skill/src/usage/selection.md +++ b/tools/html-skill/src/usage/selection.md @@ -10,4 +10,4 @@ A table with a checkbox column. The header box is `data-select-all`; every cell ``` - The state is the row's checked box and the count in words ("3 of 12 selected", "None selected"), not the wash (about 1.2:1). There is no bar and no edge mark. -- The column is a fixed 40px, so selecting moves no header or column. Set `checked` on a row's box to start it selected; the mixed header box and the count paint at once on load. +- The column is 32 on a pointer, 44 on touch; a `<col>` may make it wider. The box is centred in it, and never more than `space-4` from the column's start: a column a word heads is sized for its word, and its boxes start on the cell's line, under the word. Selecting moves no header or column. Set `checked` on a row's box to start it selected; the mixed header box and the count paint at once on load. diff --git a/tools/html-skill/src/usage/sheet.md b/tools/html-skill/src/usage/sheet.md index 37db7352..c193fa9b 100644 --- a/tools/html-skill/src/usage/sheet.md +++ b/tools/html-skill/src/usage/sheet.md @@ -5,5 +5,5 @@ A modal side panel on the dialog's rules (`--usage dialog`): `<dialog class="pan - Right and left are `min(440px, 100%)` full height; bottom is 90dvh with 16px top corners. Put long content straight in; a `.dialog-actions` as the last child stays at the foot. - **Top** is the site header's narrow menu, which `topbar-nav` builds for you (`--usage topbar-nav`). By hand: it covers the bar and redraws it as a first row `<div class="sheet-band">` (56px, a hairline below, the gutter either side), then the list unrolls beneath. - **Menu and Close:** `<span data-glyph="menu"></span>` and `<span data-glyph="close"></span>` are the core set's glyphs (`--usage glyph`). React morphs Menu into Close; the skill swaps them at once (a recorded difference). -- **Head, body, foot:** `header.sheet-head` > `.sheet-head-text` (a `.dialog-title` with `tabindex="-1"`, a `.dialog-description` count) and a ghost icon-only `.btn.sheet-close` with `data-dialog-close`; then `.sheet-body` (scrolls, `tabindex="0"`) and `footer.sheet-foot`. No sheet padding. +- **Head, body, foot:** `header.sheet-head` > `.sheet-head-text` (a `.dialog-title` with `tabindex="-1"`, a `.dialog-description` count) and a ghost `.btn.sheet-close` with `data-icon-only data-edge="end"` and `data-dialog-close` (its glyph on the title's line); then `.sheet-body` (scrolls, `tabindex="0"`) and `footer.sheet-foot`. No sheet padding. - **Steps:** swap the body and foot, then `title.focus()` on this sheet's title, so the new one is read. diff --git a/tools/html-skill/src/usage/tab-bar.md b/tools/html-skill/src/usage/tab-bar.md index 9837640e..4696dba0 100644 --- a/tools/html-skill/src/usage/tab-bar.md +++ b/tools/html-skill/src/usage/tab-bar.md @@ -13,7 +13,7 @@ The phone tab bar (React's `TabBar`): an app's destinations under 720, glyph ove ``` - Three to five items. With more than five destinations, four links and then More (above), which opens a bottom sheet of `.nav` rows: - `<dialog class="panel float modal sheet" id="more" data-side="bottom"><div class="tab-bar-sheet-head"><h2 class="dialog-title">More</h2><button class="btn" data-variant="ghost" data-icon-only aria-label="Close more" data-dialog-close><span data-glyph="close"></span></button></div><nav class="nav" aria-label="More">…</nav></dialog>` + `<dialog class="panel float modal sheet" id="more" data-side="bottom"><div class="tab-bar-sheet-head"><h2 class="dialog-title">More</h2><button class="btn" data-variant="ghost" data-icon-only data-edge="end" aria-label="Close more" data-dialog-close><span data-glyph="close"></span></button></div><nav class="nav" aria-label="More">…</nav></dialog>` - Every item has a glyph and a label, one word where it can be, both primary ink; the label is 12/16. The current page: `aria-current="page"`, its glyph selected and its label 600, no pill or bar. If it is under More, put `data-current` on the More button and say so in its `aria-label` ("More, Settings, current page"). - `.tab-bar-dot` says something is new; its words follow, visually hidden. Counts are spoken, never drawn. - Inside `.app-shell` give the shell `data-tabbar`: its content pads past the bar. On its own, pad your content's bottom by `calc(var(--basalt-bottom-offset) + var(--basalt-space-6))`, as the shell does. compose adds `viewport-fit=cover` for the safe area. diff --git a/tools/html-skill/src/usage/topbar.md b/tools/html-skill/src/usage/topbar.md index ac41d762..b8c9c92f 100644 --- a/tools/html-skill/src/usage/topbar.md +++ b/tools/html-skill/src/usage/topbar.md @@ -19,7 +19,7 @@ The page's one blurred (smoked) surface; it falls back to opaque on its own. - The skip link finds the first `.topbar` or `.app-header` when it takes focus, and again on scroll, and sits 8px under its real bottom edge (a notice above the bar is cleared). - A lockup by pixel density: a `.lockup-sprite` svg holds one `<symbol>` for each brand drawing (`brand/`'s `lockup-header-1x` and `-2x`), and `.brand` draws both with `<svg class="lockup lockup-1x" viewBox width height aria-hidden="true"><use href="#x1"/></svg>` and a `lockup-2x`. Only the one fitted to the screen shows (2x from 2dppx). No `<img>`, no `<title>`. - A bar that arrives, or leaves and returns: put it in `<div class="site-slot">` and give it `data-phase-after="#hero"` (the first screen, the hero, its mark). It writes `data-phase` (rest, between, pinned) and `data-form` (row, bar) on the bar for your CSS; the slot keeps the row's height. It never returns on scrolling up. -- `data-tool` on up to two ghost icon buttons that stay at every width (a search trigger): the narrow menu draws them again. +- `data-tool` on up to two ghost icon buttons that stay at every width (a search trigger): the narrow menu draws them again. The last ghost control of the bar (a tool, a bell) takes `data-edge="end"`: its glyph sits on the line, and it hangs only where it is last. `.site-footer` ends every site page, on the page, once. Wrap the page in `.site-page` (a column at least `100svh`) so a short page keeps it at the foot. diff --git a/tools/html-skill/test/fixtures/kitchen-sink.body.html b/tools/html-skill/test/fixtures/kitchen-sink.body.html index 9ce4d7e8..77674f0a 100644 --- a/tools/html-skill/test/fixtures/kitchen-sink.body.html +++ b/tools/html-skill/test/fixtures/kitchen-sink.body.html @@ -145,7 +145,7 @@ <h2>Heading two</h2><h3>Heading three</h3><h4>Heading four</h4> </table> </div> <div class="code" style="margin-top: var(--basalt-space-4)"> - <div class="code-head"><span>sample.json</span><span class="spacer"></span><button class="btn" data-variant="ghost" data-size="sm" data-copy="#code1"><span data-glyph="copy"></span><span>Copy</span></button></div> + <div class="code-head"><span>sample.json</span><span class="spacer"></span><button class="btn" data-variant="ghost" data-size="sm" data-edge="end" data-copy="#code1"><span data-glyph="copy"></span><span>Copy</span></button></div> <pre class="code-body" tabindex="0"><code id="code1">{ <span class="tok-k">"key"</span>: <span class="tok-s">"value"</span>, <span class="tok-n">1</span>, <span class="tok-f">f</span>() <span class="tok-c">// note</span> }</code></pre> </div> <div class="stats" style="margin-top: var(--basalt-space-4)"> @@ -224,8 +224,8 @@ <h2>Heading two</h2><h3>Heading three</h3><h4>Heading four</h4> <dialog class="panel float modal dialog" id="ks-dialog"><h2 class="dialog-title">Rename sandbox</h2><p class="dialog-description">The new name shows everywhere.</p><div class="dialog-actions"><button class="btn" data-dialog-close>Cancel</button><button class="btn" data-dialog-close>Save</button></div></dialog> <dialog class="panel float modal dialog" id="ks-alert" role="alertdialog"><h2 class="dialog-title">Delete sandbox?</h2><p class="dialog-description">This cannot be undone.</p><div class="dialog-actions"><button class="btn" data-dialog-close data-cancel>Cancel</button><button class="btn" data-variant="danger" data-dialog-close>Delete</button></div></dialog> <dialog class="panel float modal sheet" id="ks-sheet" data-side="right"><h2 class="dialog-title">Details</h2><p class="dialog-description">A side panel.</p><div class="dialog-actions"><button class="btn" data-dialog-close>Close</button></div></dialog> - <dialog class="panel float modal dialog" id="ks-form" data-form><header class="sheet-head"><div class="sheet-head-text"><h2 class="dialog-title" tabindex="-1">Declare an incident</h2></div><button class="btn sheet-close" data-variant="ghost" data-dialog-close aria-label="Close"><span data-glyph="close"></span></button></header><div class="sheet-body"><p class="dialog-description">Say what is happening.</p><input class="input" aria-label="What is happening"></div><footer class="sheet-foot"><div class="dialog-actions"><button class="btn" data-dialog-close>Cancel</button><button class="btn" data-dialog-close>Declare</button></div></footer></dialog> - <dialog class="panel float modal dialog search" id="ks-search"><h2 class="dialog-title visually-hidden" tabindex="-1">Search</h2><form class="search-form" role="search"><label class="search-field"><span class="visually-hidden">Search</span><input class="search-input" type="search"></label><button type="button" class="btn search-close" data-variant="ghost" data-icon-only aria-label="Close search" data-dialog-close>x</button></form><p class="search-count">0 results</p><ul class="search-results"><li><a class="search-result" href="#s">A result</a></li></ul></dialog> + <dialog class="panel float modal dialog" id="ks-form" data-form><header class="sheet-head"><div class="sheet-head-text"><h2 class="dialog-title" tabindex="-1">Declare an incident</h2></div><button class="btn sheet-close" data-variant="ghost" data-icon-only data-edge="end" data-dialog-close aria-label="Close"><span data-glyph="close"></span></button></header><div class="sheet-body"><p class="dialog-description">Say what is happening.</p><input class="input" aria-label="What is happening"></div><footer class="sheet-foot"><div class="dialog-actions"><button class="btn" data-dialog-close>Cancel</button><button class="btn" data-dialog-close>Declare</button></div></footer></dialog> + <dialog class="panel float modal dialog search" id="ks-search"><h2 class="dialog-title visually-hidden" tabindex="-1">Search</h2><form class="search-form" role="search"><label class="search-field"><span class="visually-hidden">Search</span><input class="search-input" type="search"></label><button type="button" class="btn search-close" data-variant="ghost" data-icon-only data-edge="end" aria-label="Close search" data-dialog-close>x</button></form><p class="search-count">0 results</p><ul class="search-results"><li><a class="search-result" href="#s">A result</a></li></ul></dialog> </section> <section class="section" id="figures"> diff --git a/tools/html-skill/test/lists-modals.test.mjs b/tools/html-skill/test/lists-modals.test.mjs index c1741360..6943a750 100644 --- a/tools/html-skill/test/lists-modals.test.mjs +++ b/tools/html-skill/test/lists-modals.test.mjs @@ -21,7 +21,7 @@ const BODY = `<main id="main" style="padding: 16px"> <span class="select" id="size-wrap"><select class="input" id="size" data-numeric aria-label="Incidents per page"><option>10</option><option selected>25</option><option>50</option><option>100</option></select></span> <button class="btn" id="opener" data-dialog-open="#d">Declare incident</button> <dialog class="panel float modal dialog" data-form id="d"> - <header class="sheet-head"><div class="sheet-head-text"><h2 class="dialog-title" tabindex="-1">Declare an incident</h2></div><button class="btn sheet-close" data-variant="ghost" data-dialog-close aria-label="Close"><span data-glyph="close"></span></button></header> + <header class="sheet-head"><div class="sheet-head-text"><h2 class="dialog-title" tabindex="-1">Declare an incident</h2></div><button class="btn sheet-close" data-variant="ghost" data-icon-only data-edge="end" data-dialog-close aria-label="Close"><span data-glyph="close"></span></button></header> <div class="sheet-body"><p class="dialog-description">Say what is happening.</p><div class="field"><label for="what">What is happening</label><input class="input" id="what"></div><div id="grow" hidden style="height: 40px">An error</div><div id="fill" style="height: 100px"></div></div> <footer class="sheet-foot"><div class="dialog-actions"><button class="btn" id="cancel" data-dialog-close>Cancel</button><button class="btn" data-variant="primary" id="go">Declare</button></div></footer> </dialog> diff --git a/tools/html-skill/test/parity-5.test.mjs b/tools/html-skill/test/parity-5.test.mjs index 2d228823..f03a73b0 100644 --- a/tools/html-skill/test/parity-5.test.mjs +++ b/tools/html-skill/test/parity-5.test.mjs @@ -140,7 +140,8 @@ describe("the chart", () => { await page.keyboard.press("ArrowLeft"); assert.equal(await activeIndex(page), 8); assert.equal(await readoutDate(page, "lines"), "Mon, Nov 9"); - assert.deepEqual(await readoutValues(page, "lines"), ["455 min".replace("455 min", "7 h 35 m"), "Not observed · not worn, travel", "7 h–9 h"], "the readout says why a day was not observed"); + // DECISIONS 336, Q2: the legend says "Not observed" alone; the date line says why (the pixel review's finding 1). + assert.deepEqual(await readoutValues(page, "lines"), ["455 min".replace("455 min", "7 h 35 m"), "Not observed", "7 h–9 h"], "the legend says Not observed alone"); await page.keyboard.press("PageUp"); assert.equal(await activeIndex(page), 1, "a week earlier"); await page.keyboard.press("PageDown"); @@ -424,10 +425,12 @@ describe("the terminal", () => { await page.locator("#static .terminal-copy").click(); await clock.advance(50); assert.equal(await page.evaluate(() => navigator.clipboard.readText()), "npm run build\ngit push"); - assert.equal(await page.locator("#static .terminal-copy .terminal-swap > [data-on]").innerText(), "Copied"); + // DECISIONS 336, Q5: the words hold; the check shows (the copy and the close glyphs drawn once, off), and the status says Copied. + assert.equal(await page.locator("#static .terminal-copy").innerText(), "Copy commands"); + assert.deepEqual(await page.locator("#static .terminal-copy > svg").evaluateAll((g) => g.map((x) => x.hasAttribute("data-off"))), [true, false, true], "the check shows"); assert.equal(await page.locator("#static [role=status]").innerText(), "Copied"); await clock.advance(1600); - assert.equal(await page.locator("#static .terminal-copy .terminal-swap > [data-on]").innerText(), "Copy commands", "back after a moment"); + assert.deepEqual(await page.locator("#static .terminal-copy > svg").evaluateAll((g) => g.map((x) => x.hasAttribute("data-off"))), [false, true, true], "back to the copy glyph after a moment"); assert.equal(await page.locator("#static [role=status]").innerText(), ""); await clock.thaw(); assert.equal(await page.locator("#static .terminal-copy-compact").isHidden(), true); diff --git a/tools/html-skill/test/parity-7.test.mjs b/tools/html-skill/test/parity-7.test.mjs index 56b6b98c..fa33fd6d 100644 --- a/tools/html-skill/test/parity-7.test.mjs +++ b/tools/html-skill/test/parity-7.test.mjs @@ -60,7 +60,7 @@ const APP = `<div class="app-shell" data-tabbar> <li><button class="tab-bar-item" type="button" data-dialog-open="#more" aria-label="More"><span class="tab-bar-glyph"><span data-glyph="more-nav" data-size="24"></span></span><span class="tab-bar-label">More</span></button></li> </ul></nav> </div> -<dialog class="panel float modal sheet" id="more" data-side="bottom"><div class="tab-bar-sheet-head"><h2 class="dialog-title">More</h2><button class="btn" data-variant="ghost" data-icon-only aria-label="Close more" data-dialog-close><span data-glyph="close"></span></button></div> +<dialog class="panel float modal sheet" id="more" data-side="bottom"><div class="tab-bar-sheet-head"><h2 class="dialog-title">More</h2><button class="btn" data-variant="ghost" data-icon-only data-edge="end" aria-label="Close more" data-dialog-close><span data-glyph="close"></span></button></div> <nav class="nav" aria-label="More"><ul class="nav-list"><li><a class="nav-item" href="#settings" id="more-settings"><span class="nav-pill"><span data-glyph="settings" data-size="24"></span><span class="nav-label">Settings</span></span></a></li></ul></nav></dialog> <script>document.getElementById('toast-btn').addEventListener('click', function () { Basalt.toast({ title: 'Saved', status: 'success' }); });</script>`; diff --git a/tools/html-skill/test/parity-9.test.mjs b/tools/html-skill/test/parity-9.test.mjs index 5e57b1f3..9b6d2965 100644 --- a/tools/html-skill/test/parity-9.test.mjs +++ b/tools/html-skill/test/parity-9.test.mjs @@ -176,15 +176,18 @@ describe("the command list in the page", () => { for (const query of ["dup", "zzz", "a", "", "bill", "zz", ""]) { await page.fill(FIELD, query); await settle(page); - assert.deepEqual(await probe(page), rest, `nothing moved for "${query}" (0px)`); + // DECISIONS 336, Q6: the panel hugs its rows; on the open page the room under it is page, so what follows never moves. + const now = await probe(page); + assert.equal(now.below, rest.below, `nothing below moved for "${query}" (0px)`); + assert.ok(now.panel <= Math.max(rest.panel, now.band + now.foot + 200) + 0.5, `the panel hugs for "${query}"`); } // a short list holds its own height, and measures it again when it changes const short = await open({ scheme: theme, body: PAGE({ groups: [GROUPS[0]] }) }); await ready(short.page); const few = await probe(short.page); - assert.ok(few.body < 360, `four rows are held at their own height (${few.body})`); + assert.ok(few.body < 360, `four rows are at their own height (${few.body})`); await short.page.focus(FIELD); - for (const query of ["rename", "zzz", ""]) { await short.page.fill(FIELD, query); await settle(short.page); assert.deepEqual(await probe(short.page), few, `a short list holds too, for "${query}"`); } + for (const query of ["rename", "zzz", ""]) { await short.page.fill(FIELD, query); await settle(short.page); assert.equal((await probe(short.page)).below, few.below, `nothing below a short list moves, for "${query}" (the code review's finding 6)`); } await short.context.close(); await context.close(); }); diff --git a/tools/html-skill/test/parity.test.mjs b/tools/html-skill/test/parity.test.mjs index 29686e46..c92b4a72 100644 --- a/tools/html-skill/test/parity.test.mjs +++ b/tools/html-skill/test/parity.test.mjs @@ -353,7 +353,7 @@ const OVERLAYS = [ id: "sheet, head body and foot", uses: "Sheet, SheetContent, SheetHeader, SheetTitle, SheetDescription, SheetBody, SheetFooter, Button", react: `flushSync(() => createRoot(document.getElementById("root")).render(<Sheet defaultOpen><SheetContent side="right"><SheetHeader closeLabel="Close cart"><SheetTitle>Your cart</SheetTitle><SheetDescription>3 items</SheetDescription></SheetHeader><SheetBody tabIndex={0}><p>Lines</p></SheetBody><SheetFooter><Button>Review order</Button></SheetFooter></SheetContent></Sheet>));`, - skill: `<dialog class="panel float modal sheet" id="s" data-side="right"><header class="sheet-head"><div class="sheet-head-text"><h2 class="dialog-title" tabindex="-1">Your cart</h2><p class="dialog-description">3 items</p></div><button class="btn sheet-close" data-variant="ghost" data-icon-only aria-label="Close cart" data-dialog-close><span data-glyph="close"></span></button></header><div class="sheet-body" tabindex="0"><p>Lines</p></div><footer class="sheet-foot"><button class="btn">Review order</button></footer></dialog>`, + skill: `<dialog class="panel float modal sheet" id="s" data-side="right"><header class="sheet-head"><div class="sheet-head-text"><h2 class="dialog-title" tabindex="-1">Your cart</h2><p class="dialog-description">3 items</p></div><button class="btn sheet-close" data-variant="ghost" data-icon-only data-edge="end" aria-label="Close cart" data-dialog-close><span data-glyph="close"></span></button></header><div class="sheet-body" tabindex="0"><p>Lines</p></div><footer class="sheet-foot"><button class="btn">Review order</button></footer></dialog>`, open: "Basalt.openDialog('#s')", ready: { react: ".basalt-sheet", skill: "dialog.sheet[open]" }, pairs: [ @@ -371,7 +371,7 @@ const OVERLAYS = [ id: "search dialog", uses: "SearchDialog, SearchResults, SearchResult", react: `flushSync(() => createRoot(document.getElementById("root")).render(<SearchDialog open onOpenChange={() => {}} title="Search the shop" label="Search products" placeholder="A brand, whey" query="whey" onQueryChange={() => {}} count="2 products"><SearchResults><SearchResult href="#a" media={<span style={{ display: "block", width: "100%", height: "100%" }} />} mediaShape="logo" detail="Brand" trailing="›">Alpha</SearchResult><SearchResult href="#b" media={<span style={{ display: "block", width: "100%", height: "100%" }} />} detail="Alpha · 2 lb" trailing="$39">Whey</SearchResult><SearchResult href="#c" centered>See all 12</SearchResult></SearchResults></SearchDialog>));`, - skill: `<dialog class="panel float modal dialog search" id="s"><h2 class="dialog-title visually-hidden" tabindex="-1">Search the shop</h2><form class="search-form" role="search"><label class="search-field"><span data-glyph="search"></span><span class="visually-hidden">Search products</span><input class="search-input" type="search" placeholder="A brand, whey" value="whey" autocomplete="off"></label><button type="button" class="btn search-close" data-variant="ghost" data-icon-only aria-label="Close search" data-dialog-close><span data-glyph="close"></span></button></form><p class="search-count">2 products</p><ul class="search-results"><li><a class="search-result" href="#a"><span class="search-media" data-shape="logo"><span style="display:block;width:100%;height:100%"></span></span><span class="search-name"><span class="search-title">Alpha</span><span class="search-detail">Brand</span></span><span class="search-trailing">›</span></a></li><li><a class="search-result" href="#b"><span class="search-media"><span style="display:block;width:100%;height:100%"></span></span><span class="search-name"><span class="search-title">Whey</span><span class="search-detail">Alpha · 2 lb</span></span><span class="search-trailing">$39</span></a></li><li><a class="search-result" href="#c" data-centered><span class="search-name"><span class="search-title">See all 12</span></span></a></li></ul></dialog>`, + skill: `<dialog class="panel float modal dialog search" id="s"><h2 class="dialog-title visually-hidden" tabindex="-1">Search the shop</h2><form class="search-form" role="search"><label class="search-field"><span data-glyph="search"></span><span class="visually-hidden">Search products</span><input class="search-input" type="search" placeholder="A brand, whey" value="whey" autocomplete="off"></label><button type="button" class="btn search-close" data-variant="ghost" data-icon-only data-edge="end" aria-label="Close search" data-dialog-close><span data-glyph="close"></span></button></form><p class="search-count">2 products</p><ul class="search-results"><li><a class="search-result" href="#a"><span class="search-media" data-shape="logo"><span style="display:block;width:100%;height:100%"></span></span><span class="search-name"><span class="search-title">Alpha</span><span class="search-detail">Brand</span></span><span class="search-trailing">›</span></a></li><li><a class="search-result" href="#b"><span class="search-media"><span style="display:block;width:100%;height:100%"></span></span><span class="search-name"><span class="search-title">Whey</span><span class="search-detail">Alpha · 2 lb</span></span><span class="search-trailing">$39</span></a></li><li><a class="search-result" href="#c" data-centered><span class="search-name"><span class="search-title">See all 12</span></span></a></li></ul></dialog>`, open: "Basalt.openDialog('#s')", ready: { react: ".basalt-search", skill: "dialog.search[open]" }, pairs: [ @@ -890,7 +890,7 @@ const appSkill = (tabs) => `<div class="app-shell"${tabs ? " data-tabbar" : ""}> <div class="app-column"><header class="app-header"><div class="app-bar"><h1 class="app-title">Overview</h1><span class="spacer"></span><div class="app-actions"><button class="btn" data-variant="ghost" data-icon-only aria-label="Switch theme"><span data-glyph="settings"></span></button><button class="btn" data-variant="primary">New entry</button></div></div></header> <main class="app-main"><div style="height: 1600px"></div></main></div> ${tabs ? `<nav class="tab-bar" aria-label="Primary"><ul class="tab-bar-list"><li><a class="tab-bar-item" href="#home" aria-current="page"><span class="tab-bar-glyph"><span data-glyph="home" data-size="24"></span></span><span class="tab-bar-label">Home</span></a></li><li><a class="tab-bar-item" href="#search"><span class="tab-bar-glyph"><span data-glyph="search" data-size="24"></span></span><span class="tab-bar-label">Search</span></a></li><li><a class="tab-bar-item" href="#inbox"><span class="tab-bar-glyph"><span data-glyph="notifications" data-size="24"></span><span class="tab-bar-dot" aria-hidden="true"></span></span><span class="tab-bar-label">Inbox</span><span class="visually-hidden">, New activity</span></a></li><li><button class="tab-bar-item" type="button" data-dialog-open="#more" aria-label="More"><span class="tab-bar-glyph"><span data-glyph="more-nav" data-size="24"></span></span><span class="tab-bar-label">More</span></button></li></ul></nav> - <dialog class="panel float modal sheet" id="more" data-side="bottom"><div class="tab-bar-sheet-head"><h2 class="dialog-title">More</h2><button class="btn" data-variant="ghost" data-icon-only aria-label="Close more" data-dialog-close><span data-glyph="close"></span></button></div><nav class="nav" aria-label="More"><ul class="nav-list"><li><a class="nav-item" href="#settings"><span class="nav-pill"><span data-glyph="settings" data-size="24"></span><span class="nav-label">Settings</span></span></a></li></ul></nav></dialog>` : ""}</div>`; + <dialog class="panel float modal sheet" id="more" data-side="bottom"><div class="tab-bar-sheet-head"><h2 class="dialog-title">More</h2><button class="btn" data-variant="ghost" data-icon-only data-edge="end" aria-label="Close more" data-dialog-close><span data-glyph="close"></span></button></div><nav class="nav" aria-label="More"><ul class="nav-list"><li><a class="nav-item" href="#settings"><span class="nav-pill"><span data-glyph="settings" data-size="24"></span><span class="nav-label">Settings</span></span></a></li></ul></nav></dialog>` : ""}</div>`; const TABLE_IMPORTS = "TableContainer, Table, TableHeader, TableBody, TableRow, TableHead, TableHeadExplainer, TableRowHead, TableCell, TableEmpty, TableScrollHint, Checkbox, Button, MultiSelect, FilterResult"; const NAV_IMPORTS = "SiteHeader, IconButton, Button, SettingsGlyph, ToastProvider, AppShell, AppHeader, Nav, NavItem, NavGroup, TabBar, TabBarItem, TabBarMore, HomeGlyph, SearchGlyph, NotificationsGlyph, MessagesGlyph, PlanGlyph, Sheet, SheetContent"; const NAVIGATION = [ diff --git a/tools/html-skill/test/reserved-room.test.mjs b/tools/html-skill/test/reserved-room.test.mjs new file mode 100644 index 00000000..54e2f410 --- /dev/null +++ b/tools/html-skill/test/reserved-room.test.mjs @@ -0,0 +1,177 @@ +// Reserved room in the HTML skill (DECISIONS 336), in a browser, beside packages/react/test/reserved-room.test.mjs: the heads the skill hangs by itself +// (the panel head, the code head, the terminal's compact copy, a card's row of 20px marks), the toast's targets along its row, the search dialog's held top +// while one open dialog's results change, and the selection column from a `width` attribute and from a stylesheet. The data is synthetic. +// WRITTEN, NOT RUN: browser tests are paused (DECISIONS 330). +import assert from "node:assert/strict"; +import { after, before, describe, test } from "node:test"; + +import { compose } from "../../../.agent/skills/basalt-html/compose.mjs"; +import { settle } from "../../../packages/react/test/support.mjs"; +import { launch, openHtml } from "./support.mjs"; + +let browser; +before(async () => { browser = await launch(); }); +after(async () => { await browser?.close(); }); + +const THEMES = ["dark", "light"]; +const DIRS = ["ltr", "rtl"]; +const hit = `(el) => { const r = el.getBoundingClientRect(); const s = el.offsetWidth ? r.width / el.offsetWidth : 1; const b = getComputedStyle(el, "::before"); if (b.content === "none" || b.position !== "absolute") return { left: r.left, top: r.top, right: r.right, bottom: r.bottom, width: r.width, height: r.height }; const n = (v) => (v === "auto" ? 0 : parseFloat(v)) * s; const x = { left: r.left + n(b.left), top: r.top + n(b.top), right: r.right - n(b.right), bottom: r.bottom - n(b.bottom) }; return { ...x, width: x.right - x.left, height: x.bottom - x.top }; }`; +const page = async (body, { theme = "dark", dir = "ltr", width = 1440, touch = false } = {}) => { + const { page: p, errors } = await openHtml(browser, compose(`<title>Reserved room${body}`, { fonts: true }).html, { scheme: theme, width, touch }); + await p.evaluate(([theme, dir]) => { document.documentElement.setAttribute("data-theme", theme); document.documentElement.dir = dir; }, [theme, dir]); + await p.addScriptTag({ content: `window.__hit = ${hit};` }); + await settle(p); + p.errors = errors; + assert.equal(await p.evaluate(() => innerWidth), width); + return p; +}; + +/** As React's: what the control shows from the head's inner edge on its side, its box to that edge, its hang, and its focused ring. */ +const line = (p, head, control, side) => p.evaluate(([head, control, side]) => { + const visible = (root, sel) => [...root.querySelectorAll(sel)].find((el) => el.getClientRects().length > 0 && getComputedStyle(el).visibility !== "hidden"); + const h = visible(document, head); + const c = visible(h, control); + const hs = getComputedStyle(h); const hr = h.getBoundingClientRect(); const rtl = hs.direction === "rtl"; + const innerStart = rtl ? hr.right - parseFloat(hs.borderRightWidth) : hr.left + parseFloat(hs.borderLeftWidth); + const innerEnd = rtl ? hr.left + parseFloat(hs.borderLeftWidth) : hr.right - parseFloat(hs.borderRightWidth); + const glyph = c.querySelector("svg"); + const range = document.createRange(); range.selectNodeContents(c); + const shownRect = glyph && !c.textContent.trim() ? glyph.getBoundingClientRect() : range.getBoundingClientRect(); + const cr = c.getBoundingClientRect(); + const at = (x) => (side === "end" ? Math.abs(innerEnd - x) : Math.abs(x - innerStart)); + const shown = side === "end" ? at(rtl ? shownRect.left : shownRect.right) : at(rtl ? shownRect.right : shownRect.left); + const clear = side === "end" ? at(rtl ? cr.left : cr.right) : at(rtl ? cr.right : cr.left); + const cs = getComputedStyle(c); + const hang = -parseFloat(side === "end" ? cs.marginInlineEnd : cs.marginInlineStart); + c.focus({ focusVisible: true }); + const fs = getComputedStyle(c); + return { shown, clear, hang, focused: document.activeElement === c, ring: parseFloat(fs.outlineOffset), outline: [fs.outlineStyle, parseFloat(fs.outlineWidth)], box: [cr.left, cr.top, cr.right, cr.bottom], head: [hr.left, hr.top, hr.right, hr.bottom] }; +}, [head, control, side]); +const ringIsWhole = (m, want) => { + assert.ok(m.focused); + assert.equal(m.ring, want); + assert.deepEqual(m.outline, ["solid", 2]); + const reach = m.ring + 2; + assert.ok(m.box[0] - reach >= m.head[0] - 0.5 && m.box[2] + reach <= m.head[2] + 0.5 && m.box[1] - reach >= m.head[1] - 0.5 && m.box[3] + reach <= m.head[3] + 0.5, "the ring is inside the head"); +}; + +const MARKS = ``; +// [name, body, head, control, side, widths: { width: [shown, ring, hang] }] +const SITES = [ + ["the core's panel head", `
A panel head
Body.
`, ".panel-head", ".btn", "end", { 1440: [16, 2, 10] }], + ["the code head's Copy", `
alerts.json
{ "alerts": 3 }
`, ".code-head", ".btn", "end", { 1440: [16, 2, 10] }], + ["the terminal's compact copy", `
Deploy
npm ci
`, ".terminal figcaption, .terminal .code-head", ".btn[data-icon-only]", "end", { 390: [16, -2, 14] }], + ["a card's row of 20px marks", `

Ada Byron

${MARKS}
`, ".card", ".links .btn", "start", { 1440: [16, 2, 6], 390: [16, 2, 12] }], +]; + +describe("The heads the skill hangs by itself", () => { + for (const [name, body, head, control, side, widths] of SITES) { + for (const [width, [shown, ring, hang]] of Object.entries(widths)) { + for (const dir of DIRS) { + for (const theme of THEMES) { + test(`${name}, ${width}, ${dir}, ${theme}: on the head's line, hung ${hang}, its ring at ${ring} and whole`, async () => { + const p = await page(body, { theme, dir, width: Number(width), touch: width === "390" }); + const m = await line(p, head, control, side); + assert.ok(Math.abs(m.shown - shown) <= 0.5, `shown ${m.shown}, want ${shown}`); + assert.ok(Math.abs(m.hang - hang) <= 0.5, `hang ${m.hang}, want ${hang}`); + ringIsWhole(m, ring); + assert.deepEqual(p.errors, []); + await p.close(); + }); + } + } + } + } +}); + +describe("The toast's targets", () => { + for (const theme of THEMES) { + test(`${theme}, 390 on touch: the action and Dismiss are at least 44, inside the toast and apart, and the row answers action, toast, Dismiss across their whole hit areas`, async () => { + const p = await page(`

A toast.

`, { theme, width: 390, touch: true }); + await p.waitForSelector(".toast-close"); + await settle(p); + const t = await p.evaluate(() => { + const toast = document.querySelector(".toast"); + return { toast: toast.getBoundingClientRect().toJSON(), action: window.__hit(toast.querySelector(".toast-action")), dismiss: window.__hit(toast.querySelector(".toast-close")) }; + }); + for (const box of [t.action, t.dismiss]) { + assert.ok(box.width >= 44 - 0.5 && box.height >= 44 - 0.5, `${box.width} by ${box.height}`); + assert.ok(box.left >= t.toast.left - 0.5 && box.right <= t.toast.right + 0.5 && box.top >= t.toast.top - 0.5 && box.bottom <= t.toast.bottom + 0.5, "inside the toast"); + } + const y = (t.dismiss.top + t.dismiss.bottom) / 2; + const owners = await p.evaluate(([from, to, y]) => { let out = ""; for (let x = Math.ceil(from); x < Math.floor(to); x += 1) { const el = document.elementFromPoint(x + 0.5, y); out += el?.closest(".toast-close") ? "d" : el?.closest(".toast-action") ? "a" : el?.closest(".toast") ? "t" : "-"; } return out; }, [t.action.left, t.dismiss.right, y]); + const m = /^(a+)(t+)(d+)$/.exec(owners); + assert.ok(m, owners); + assert.ok(Math.abs(m[1].length - Math.floor(t.action.width)) <= 1 && Math.abs(m[3].length - Math.floor(t.dismiss.width)) <= 1, owners); + await p.close(); + }); + } +}); + +describe("The search dialog's held top", () => { + const SEARCH = ` + +

0 products

+`; + // Rows are written with DOM calls, as a page's own search would. + const rows = (p, n) => p.evaluate((n) => { + const list = document.querySelector(".search-results"); + list.replaceChildren(...Array.from({ length: n }, (_, i) => { const li = document.createElement("li"); const a = document.createElement("a"); a.className = "search-result"; a.href = `#r${i}`; const name = document.createElement("span"); name.className = "search-name"; name.textContent = `Result ${i + 1}`; a.append(name); li.append(a); return li; })); + document.querySelector(".search-count").textContent = `${n} products`; + }, n); + const read = (p) => p.evaluate(() => { + const d = document.querySelector("dialog.search").getBoundingClientRect(); + const l = document.querySelector(".search-results").getBoundingClientRect(); + return { ys: [document.querySelector(".search-input").getBoundingClientRect().y, document.querySelector(".search-count").getBoundingClientRect().y], gap: d.bottom - l.bottom, list: l.height, height: d.height }; + }); + for (const [form, width, shorter] of [["1440", 1440, null], ["390 with the keyboard up", 390, 480]]) { + test(`${form}: the field and count keep their y as one open dialog's results change, and the box ends under its results`, async () => { + const p = await page(SEARCH, { width, touch: width === 390 }); + await p.waitForSelector("dialog.search[data-held]"); + if (shorter) { await p.setViewportSize({ width, height: shorter }); await settle(p); } + const reads = []; + for (const n of [0, 2, 8, 2, 0]) { await rows(p, n); await settle(p); reads.push(await read(p)); } + for (const r of reads) { assert.deepEqual(r.ys, reads[0].ys, JSON.stringify(reads.map((x) => x.ys))); assert.ok(Math.abs(r.gap - reads[0].gap) <= 0.5, "the box ends under its results"); } + assert.equal(reads[0].list, 0, "an empty list has no height"); + assert.ok(reads[2].height > reads[0].height, "the box grows with its results"); + await p.close(); + }); + } + test("the top is placed again when the usable window changes", async () => { + const p = await page(SEARCH, { width: 390, touch: true }); + await p.waitForSelector("dialog.search[data-held]"); + const top = () => p.evaluate(() => document.querySelector("dialog.search").style.getPropertyValue("--_top")); + const tall = await top(); + await p.setViewportSize({ width: 390, height: 480 }); + await settle(p); + assert.notEqual(await top(), tall, "a shorter window places it again"); + await p.close(); + }); +}); + +describe("The selection column", () => { + const TABLE = (col, style = "") => `
${col} + +
RunStatus
run-0142Ready
`; + test("the box's two sides on a fine pointer: 8 / 8 in 32, 12 / 12 in 40, 14 / 14 in 44, 16 / 16 in 48, 16 / 28 in 60, 16 / 48 in 80 (never more than space-4 from the start)", async () => { + for (const dir of DIRS) { + for (const [w, want] of [[32, [8, 8]], [40, [12, 12]], [44, [14, 14]], [48, [16, 16]], [60, [16, 28]], [80, [16, 48]]]) { + const p = await page(TABLE(``), { width: 1440, dir }); + const sides = await p.evaluate(() => { const td = document.querySelector("tbody td.select-col"); const cell = td.getBoundingClientRect(); const box = td.querySelector("input").getBoundingClientRect(); const rtl = getComputedStyle(td).direction === "rtl"; return (rtl ? [cell.right - box.right, box.left - cell.left] : [box.left - cell.left, cell.right - box.right]).map((v) => Math.round(v * 10) / 10); }); + assert.deepEqual(sides, want, `${dir}, ${w}`); + await p.close(); + } + } + }); + for (const [given, col, style] of [["a width attribute", ``, ""], ["a stylesheet", ``, ".pick { width: 40px; }"]]) { + test(`the select column given 40 by ${given}: 40 on a fine pointer with the box centred, 44 on touch`, async () => { + for (const [width, touch, want] of [[1440, false, 40], [390, true, 44]]) { + const p = await page(TABLE(col, style), { width, touch }); + const m = await p.evaluate(() => { const cell = document.querySelector("tbody td.select-col").getBoundingClientRect(); const box = document.querySelector("tbody td.select-col input").getBoundingClientRect(); return { w: cell.width, gaps: [box.left - cell.left, cell.right - box.right] }; }); + assert.ok(Math.abs(m.w - want) <= 0.5, `${width}: ${m.w}`); + assert.ok(Math.abs(m.gaps[0] - m.gaps[1]) <= 0.5, `centred: ${m.gaps}`); + await p.close(); + } + }); + } +}); diff --git a/tools/review/assets/round-69/eye-01-search-default-1440-dark.jpg b/tools/review/assets/round-69/eye-01-search-default-1440-dark.jpg new file mode 100644 index 00000000..2638681c Binary files /dev/null and b/tools/review/assets/round-69/eye-01-search-default-1440-dark.jpg differ diff --git a/tools/review/assets/round-69/eye-01-search-default-1440-light.jpg b/tools/review/assets/round-69/eye-01-search-default-1440-light.jpg new file mode 100644 index 00000000..fca5b0b3 Binary files /dev/null and b/tools/review/assets/round-69/eye-01-search-default-1440-light.jpg differ diff --git a/tools/review/assets/round-69/eye-01-search-default-390-dark.jpg b/tools/review/assets/round-69/eye-01-search-default-390-dark.jpg new file mode 100644 index 00000000..6d28103c Binary files /dev/null and b/tools/review/assets/round-69/eye-01-search-default-390-dark.jpg differ diff --git a/tools/review/assets/round-69/eye-01-search-default-390-light.jpg b/tools/review/assets/round-69/eye-01-search-default-390-light.jpg new file mode 100644 index 00000000..8545e75e Binary files /dev/null and b/tools/review/assets/round-69/eye-01-search-default-390-light.jpg differ diff --git a/tools/review/assets/round-69/eye-01-search-full-1440-dark.jpg b/tools/review/assets/round-69/eye-01-search-full-1440-dark.jpg new file mode 100644 index 00000000..2638681c Binary files /dev/null and b/tools/review/assets/round-69/eye-01-search-full-1440-dark.jpg differ diff --git a/tools/review/assets/round-69/eye-01-search-full-1440-light.jpg b/tools/review/assets/round-69/eye-01-search-full-1440-light.jpg new file mode 100644 index 00000000..fca5b0b3 Binary files /dev/null and b/tools/review/assets/round-69/eye-01-search-full-1440-light.jpg differ diff --git a/tools/review/assets/round-69/eye-01-search-full-390-dark.jpg b/tools/review/assets/round-69/eye-01-search-full-390-dark.jpg new file mode 100644 index 00000000..6d28103c Binary files /dev/null and b/tools/review/assets/round-69/eye-01-search-full-390-dark.jpg differ diff --git a/tools/review/assets/round-69/eye-01-search-full-390-light.jpg b/tools/review/assets/round-69/eye-01-search-full-390-light.jpg new file mode 100644 index 00000000..8545e75e Binary files /dev/null and b/tools/review/assets/round-69/eye-01-search-full-390-light.jpg differ diff --git a/tools/review/assets/round-69/eye-01-search-none-1440-dark.jpg b/tools/review/assets/round-69/eye-01-search-none-1440-dark.jpg new file mode 100644 index 00000000..cd552628 Binary files /dev/null and b/tools/review/assets/round-69/eye-01-search-none-1440-dark.jpg differ diff --git a/tools/review/assets/round-69/eye-01-search-none-1440-light.jpg b/tools/review/assets/round-69/eye-01-search-none-1440-light.jpg new file mode 100644 index 00000000..691553f9 Binary files /dev/null and b/tools/review/assets/round-69/eye-01-search-none-1440-light.jpg differ diff --git a/tools/review/assets/round-69/eye-01-search-none-390-dark.jpg b/tools/review/assets/round-69/eye-01-search-none-390-dark.jpg new file mode 100644 index 00000000..c0cb0628 Binary files /dev/null and b/tools/review/assets/round-69/eye-01-search-none-390-dark.jpg differ diff --git a/tools/review/assets/round-69/eye-01-search-none-390-light.jpg b/tools/review/assets/round-69/eye-01-search-none-390-light.jpg new file mode 100644 index 00000000..470b5e02 Binary files /dev/null and b/tools/review/assets/round-69/eye-01-search-none-390-light.jpg differ diff --git a/tools/review/assets/round-69/eye-01-search-two-1440-dark.jpg b/tools/review/assets/round-69/eye-01-search-two-1440-dark.jpg new file mode 100644 index 00000000..993a15c6 Binary files /dev/null and b/tools/review/assets/round-69/eye-01-search-two-1440-dark.jpg differ diff --git a/tools/review/assets/round-69/eye-01-search-two-1440-light.jpg b/tools/review/assets/round-69/eye-01-search-two-1440-light.jpg new file mode 100644 index 00000000..8d4f432d Binary files /dev/null and b/tools/review/assets/round-69/eye-01-search-two-1440-light.jpg differ diff --git a/tools/review/assets/round-69/eye-01-search-two-390-dark.jpg b/tools/review/assets/round-69/eye-01-search-two-390-dark.jpg new file mode 100644 index 00000000..270b05b0 Binary files /dev/null and b/tools/review/assets/round-69/eye-01-search-two-390-dark.jpg differ diff --git a/tools/review/assets/round-69/eye-01-search-two-390-light.jpg b/tools/review/assets/round-69/eye-01-search-two-390-light.jpg new file mode 100644 index 00000000..2ec3c23f Binary files /dev/null and b/tools/review/assets/round-69/eye-01-search-two-390-light.jpg differ diff --git a/tools/review/assets/round-69/eye-02-filter-default-1440-dark.jpg b/tools/review/assets/round-69/eye-02-filter-default-1440-dark.jpg new file mode 100644 index 00000000..b93497e4 Binary files /dev/null and b/tools/review/assets/round-69/eye-02-filter-default-1440-dark.jpg differ diff --git a/tools/review/assets/round-69/eye-02-filter-default-1440-light.jpg b/tools/review/assets/round-69/eye-02-filter-default-1440-light.jpg new file mode 100644 index 00000000..40c3113b Binary files /dev/null and b/tools/review/assets/round-69/eye-02-filter-default-1440-light.jpg differ diff --git a/tools/review/assets/round-69/eye-02-filter-default-390-dark.jpg b/tools/review/assets/round-69/eye-02-filter-default-390-dark.jpg new file mode 100644 index 00000000..9ebcf949 Binary files /dev/null and b/tools/review/assets/round-69/eye-02-filter-default-390-dark.jpg differ diff --git a/tools/review/assets/round-69/eye-02-filter-default-390-light.jpg b/tools/review/assets/round-69/eye-02-filter-default-390-light.jpg new file mode 100644 index 00000000..b07d06fc Binary files /dev/null and b/tools/review/assets/round-69/eye-02-filter-default-390-light.jpg differ diff --git a/tools/review/assets/round-69/eye-03-legend-chart-gap-1440-dark.jpg b/tools/review/assets/round-69/eye-03-legend-chart-gap-1440-dark.jpg new file mode 100644 index 00000000..aab43b44 Binary files /dev/null and b/tools/review/assets/round-69/eye-03-legend-chart-gap-1440-dark.jpg differ diff --git a/tools/review/assets/round-69/eye-03-legend-chart-gap-1440-light.jpg b/tools/review/assets/round-69/eye-03-legend-chart-gap-1440-light.jpg new file mode 100644 index 00000000..99cee26a Binary files /dev/null and b/tools/review/assets/round-69/eye-03-legend-chart-gap-1440-light.jpg differ diff --git a/tools/review/assets/round-69/eye-03-legend-chart-gap-390-dark.jpg b/tools/review/assets/round-69/eye-03-legend-chart-gap-390-dark.jpg new file mode 100644 index 00000000..fd395735 Binary files /dev/null and b/tools/review/assets/round-69/eye-03-legend-chart-gap-390-dark.jpg differ diff --git a/tools/review/assets/round-69/eye-03-legend-chart-gap-390-light.jpg b/tools/review/assets/round-69/eye-03-legend-chart-gap-390-light.jpg new file mode 100644 index 00000000..b0aa9e70 Binary files /dev/null and b/tools/review/assets/round-69/eye-03-legend-chart-gap-390-light.jpg differ diff --git a/tools/review/assets/round-69/eye-03-legend-default-1440-dark.jpg b/tools/review/assets/round-69/eye-03-legend-default-1440-dark.jpg new file mode 100644 index 00000000..57d6e48c Binary files /dev/null and b/tools/review/assets/round-69/eye-03-legend-default-1440-dark.jpg differ diff --git a/tools/review/assets/round-69/eye-03-legend-default-1440-light.jpg b/tools/review/assets/round-69/eye-03-legend-default-1440-light.jpg new file mode 100644 index 00000000..b611f1ee Binary files /dev/null and b/tools/review/assets/round-69/eye-03-legend-default-1440-light.jpg differ diff --git a/tools/review/assets/round-69/eye-03-legend-default-390-dark.jpg b/tools/review/assets/round-69/eye-03-legend-default-390-dark.jpg new file mode 100644 index 00000000..42e19f34 Binary files /dev/null and b/tools/review/assets/round-69/eye-03-legend-default-390-dark.jpg differ diff --git a/tools/review/assets/round-69/eye-03-legend-default-390-light.jpg b/tools/review/assets/round-69/eye-03-legend-default-390-light.jpg new file mode 100644 index 00000000..6688aaeb Binary files /dev/null and b/tools/review/assets/round-69/eye-03-legend-default-390-light.jpg differ diff --git a/tools/review/assets/round-69/eye-04-composer-default-1440-dark.jpg b/tools/review/assets/round-69/eye-04-composer-default-1440-dark.jpg new file mode 100644 index 00000000..eac6758a Binary files /dev/null and b/tools/review/assets/round-69/eye-04-composer-default-1440-dark.jpg differ diff --git a/tools/review/assets/round-69/eye-04-composer-default-1440-light.jpg b/tools/review/assets/round-69/eye-04-composer-default-1440-light.jpg new file mode 100644 index 00000000..d149038c Binary files /dev/null and b/tools/review/assets/round-69/eye-04-composer-default-1440-light.jpg differ diff --git a/tools/review/assets/round-69/eye-04-composer-default-390-dark.jpg b/tools/review/assets/round-69/eye-04-composer-default-390-dark.jpg new file mode 100644 index 00000000..9d843aa5 Binary files /dev/null and b/tools/review/assets/round-69/eye-04-composer-default-390-dark.jpg differ diff --git a/tools/review/assets/round-69/eye-04-composer-default-390-light.jpg b/tools/review/assets/round-69/eye-04-composer-default-390-light.jpg new file mode 100644 index 00000000..dd0b9e5f Binary files /dev/null and b/tools/review/assets/round-69/eye-04-composer-default-390-light.jpg differ diff --git a/tools/review/assets/round-69/eye-04-composer-empty-1440-dark.jpg b/tools/review/assets/round-69/eye-04-composer-empty-1440-dark.jpg new file mode 100644 index 00000000..eac6758a Binary files /dev/null and b/tools/review/assets/round-69/eye-04-composer-empty-1440-dark.jpg differ diff --git a/tools/review/assets/round-69/eye-04-composer-empty-1440-light.jpg b/tools/review/assets/round-69/eye-04-composer-empty-1440-light.jpg new file mode 100644 index 00000000..d149038c Binary files /dev/null and b/tools/review/assets/round-69/eye-04-composer-empty-1440-light.jpg differ diff --git a/tools/review/assets/round-69/eye-04-composer-empty-390-dark.jpg b/tools/review/assets/round-69/eye-04-composer-empty-390-dark.jpg new file mode 100644 index 00000000..9d843aa5 Binary files /dev/null and b/tools/review/assets/round-69/eye-04-composer-empty-390-dark.jpg differ diff --git a/tools/review/assets/round-69/eye-04-composer-empty-390-light.jpg b/tools/review/assets/round-69/eye-04-composer-empty-390-light.jpg new file mode 100644 index 00000000..dd0b9e5f Binary files /dev/null and b/tools/review/assets/round-69/eye-04-composer-empty-390-light.jpg differ diff --git a/tools/review/assets/round-69/eye-04-composer-narrow-390-dark.jpg b/tools/review/assets/round-69/eye-04-composer-narrow-390-dark.jpg new file mode 100644 index 00000000..3d76d349 Binary files /dev/null and b/tools/review/assets/round-69/eye-04-composer-narrow-390-dark.jpg differ diff --git a/tools/review/assets/round-69/eye-04-composer-narrow-390-light.jpg b/tools/review/assets/round-69/eye-04-composer-narrow-390-light.jpg new file mode 100644 index 00000000..2df8146a Binary files /dev/null and b/tools/review/assets/round-69/eye-04-composer-narrow-390-light.jpg differ diff --git a/tools/review/assets/round-69/eye-04-composer-typing-1440-dark.jpg b/tools/review/assets/round-69/eye-04-composer-typing-1440-dark.jpg new file mode 100644 index 00000000..a4c25157 Binary files /dev/null and b/tools/review/assets/round-69/eye-04-composer-typing-1440-dark.jpg differ diff --git a/tools/review/assets/round-69/eye-04-composer-typing-1440-light.jpg b/tools/review/assets/round-69/eye-04-composer-typing-1440-light.jpg new file mode 100644 index 00000000..db9297be Binary files /dev/null and b/tools/review/assets/round-69/eye-04-composer-typing-1440-light.jpg differ diff --git a/tools/review/assets/round-69/eye-04-composer-typing-390-dark.jpg b/tools/review/assets/round-69/eye-04-composer-typing-390-dark.jpg new file mode 100644 index 00000000..76c6a809 Binary files /dev/null and b/tools/review/assets/round-69/eye-04-composer-typing-390-dark.jpg differ diff --git a/tools/review/assets/round-69/eye-04-composer-typing-390-light.jpg b/tools/review/assets/round-69/eye-04-composer-typing-390-light.jpg new file mode 100644 index 00000000..b73c1044 Binary files /dev/null and b/tools/review/assets/round-69/eye-04-composer-typing-390-light.jpg differ diff --git a/tools/review/assets/round-69/eye-05-copy-copied-1440-dark.jpg b/tools/review/assets/round-69/eye-05-copy-copied-1440-dark.jpg new file mode 100644 index 00000000..9ad2c172 Binary files /dev/null and b/tools/review/assets/round-69/eye-05-copy-copied-1440-dark.jpg differ diff --git a/tools/review/assets/round-69/eye-05-copy-copied-1440-light.jpg b/tools/review/assets/round-69/eye-05-copy-copied-1440-light.jpg new file mode 100644 index 00000000..63193e09 Binary files /dev/null and b/tools/review/assets/round-69/eye-05-copy-copied-1440-light.jpg differ diff --git a/tools/review/assets/round-69/eye-05-copy-copied-390-dark.jpg b/tools/review/assets/round-69/eye-05-copy-copied-390-dark.jpg new file mode 100644 index 00000000..ab30b436 Binary files /dev/null and b/tools/review/assets/round-69/eye-05-copy-copied-390-dark.jpg differ diff --git a/tools/review/assets/round-69/eye-05-copy-copied-390-light.jpg b/tools/review/assets/round-69/eye-05-copy-copied-390-light.jpg new file mode 100644 index 00000000..4173fdfa Binary files /dev/null and b/tools/review/assets/round-69/eye-05-copy-copied-390-light.jpg differ diff --git a/tools/review/assets/round-69/eye-05-copy-default-1440-dark.jpg b/tools/review/assets/round-69/eye-05-copy-default-1440-dark.jpg new file mode 100644 index 00000000..9ad2c172 Binary files /dev/null and b/tools/review/assets/round-69/eye-05-copy-default-1440-dark.jpg differ diff --git a/tools/review/assets/round-69/eye-05-copy-default-1440-light.jpg b/tools/review/assets/round-69/eye-05-copy-default-1440-light.jpg new file mode 100644 index 00000000..63193e09 Binary files /dev/null and b/tools/review/assets/round-69/eye-05-copy-default-1440-light.jpg differ diff --git a/tools/review/assets/round-69/eye-05-copy-default-390-dark.jpg b/tools/review/assets/round-69/eye-05-copy-default-390-dark.jpg new file mode 100644 index 00000000..ab30b436 Binary files /dev/null and b/tools/review/assets/round-69/eye-05-copy-default-390-dark.jpg differ diff --git a/tools/review/assets/round-69/eye-05-copy-default-390-light.jpg b/tools/review/assets/round-69/eye-05-copy-default-390-light.jpg new file mode 100644 index 00000000..4173fdfa Binary files /dev/null and b/tools/review/assets/round-69/eye-05-copy-default-390-light.jpg differ diff --git a/tools/review/assets/round-69/eye-05-copy-refused-1440-dark.jpg b/tools/review/assets/round-69/eye-05-copy-refused-1440-dark.jpg new file mode 100644 index 00000000..81d3e24a Binary files /dev/null and b/tools/review/assets/round-69/eye-05-copy-refused-1440-dark.jpg differ diff --git a/tools/review/assets/round-69/eye-05-copy-refused-1440-light.jpg b/tools/review/assets/round-69/eye-05-copy-refused-1440-light.jpg new file mode 100644 index 00000000..4a748c9b Binary files /dev/null and b/tools/review/assets/round-69/eye-05-copy-refused-1440-light.jpg differ diff --git a/tools/review/assets/round-69/eye-05-copy-refused-390-dark.jpg b/tools/review/assets/round-69/eye-05-copy-refused-390-dark.jpg new file mode 100644 index 00000000..fac7c4e1 Binary files /dev/null and b/tools/review/assets/round-69/eye-05-copy-refused-390-dark.jpg differ diff --git a/tools/review/assets/round-69/eye-05-copy-refused-390-light.jpg b/tools/review/assets/round-69/eye-05-copy-refused-390-light.jpg new file mode 100644 index 00000000..b9fb4d49 Binary files /dev/null and b/tools/review/assets/round-69/eye-05-copy-refused-390-light.jpg differ diff --git a/tools/review/assets/round-69/eye-05-copy-rest-1440-dark.jpg b/tools/review/assets/round-69/eye-05-copy-rest-1440-dark.jpg new file mode 100644 index 00000000..81d3e24a Binary files /dev/null and b/tools/review/assets/round-69/eye-05-copy-rest-1440-dark.jpg differ diff --git a/tools/review/assets/round-69/eye-05-copy-rest-1440-light.jpg b/tools/review/assets/round-69/eye-05-copy-rest-1440-light.jpg new file mode 100644 index 00000000..4a748c9b Binary files /dev/null and b/tools/review/assets/round-69/eye-05-copy-rest-1440-light.jpg differ diff --git a/tools/review/assets/round-69/eye-05-copy-rest-390-dark.jpg b/tools/review/assets/round-69/eye-05-copy-rest-390-dark.jpg new file mode 100644 index 00000000..fac7c4e1 Binary files /dev/null and b/tools/review/assets/round-69/eye-05-copy-rest-390-dark.jpg differ diff --git a/tools/review/assets/round-69/eye-05-copy-rest-390-light.jpg b/tools/review/assets/round-69/eye-05-copy-rest-390-light.jpg new file mode 100644 index 00000000..b9fb4d49 Binary files /dev/null and b/tools/review/assets/round-69/eye-05-copy-rest-390-light.jpg differ diff --git a/tools/review/assets/round-69/eye-06-command-card-1440-dark.jpg b/tools/review/assets/round-69/eye-06-command-card-1440-dark.jpg new file mode 100644 index 00000000..5ed36410 Binary files /dev/null and b/tools/review/assets/round-69/eye-06-command-card-1440-dark.jpg differ diff --git a/tools/review/assets/round-69/eye-06-command-card-1440-light.jpg b/tools/review/assets/round-69/eye-06-command-card-1440-light.jpg new file mode 100644 index 00000000..5d5e2e02 Binary files /dev/null and b/tools/review/assets/round-69/eye-06-command-card-1440-light.jpg differ diff --git a/tools/review/assets/round-69/eye-06-command-card-390-dark.jpg b/tools/review/assets/round-69/eye-06-command-card-390-dark.jpg new file mode 100644 index 00000000..b8129317 Binary files /dev/null and b/tools/review/assets/round-69/eye-06-command-card-390-dark.jpg differ diff --git a/tools/review/assets/round-69/eye-06-command-card-390-light.jpg b/tools/review/assets/round-69/eye-06-command-card-390-light.jpg new file mode 100644 index 00000000..06755621 Binary files /dev/null and b/tools/review/assets/round-69/eye-06-command-card-390-light.jpg differ diff --git a/tools/review/assets/round-69/eye-06-command-default-1440-dark.jpg b/tools/review/assets/round-69/eye-06-command-default-1440-dark.jpg new file mode 100644 index 00000000..1375c1d4 Binary files /dev/null and b/tools/review/assets/round-69/eye-06-command-default-1440-dark.jpg differ diff --git a/tools/review/assets/round-69/eye-06-command-default-1440-light.jpg b/tools/review/assets/round-69/eye-06-command-default-1440-light.jpg new file mode 100644 index 00000000..8e1b8738 Binary files /dev/null and b/tools/review/assets/round-69/eye-06-command-default-1440-light.jpg differ diff --git a/tools/review/assets/round-69/eye-06-command-default-390-dark.jpg b/tools/review/assets/round-69/eye-06-command-default-390-dark.jpg new file mode 100644 index 00000000..b860213c Binary files /dev/null and b/tools/review/assets/round-69/eye-06-command-default-390-dark.jpg differ diff --git a/tools/review/assets/round-69/eye-06-command-default-390-light.jpg b/tools/review/assets/round-69/eye-06-command-default-390-light.jpg new file mode 100644 index 00000000..f26a5c27 Binary files /dev/null and b/tools/review/assets/round-69/eye-06-command-default-390-light.jpg differ diff --git a/tools/review/assets/round-69/eye-06-command-empty-1440-dark.jpg b/tools/review/assets/round-69/eye-06-command-empty-1440-dark.jpg new file mode 100644 index 00000000..1375c1d4 Binary files /dev/null and b/tools/review/assets/round-69/eye-06-command-empty-1440-dark.jpg differ diff --git a/tools/review/assets/round-69/eye-06-command-empty-1440-light.jpg b/tools/review/assets/round-69/eye-06-command-empty-1440-light.jpg new file mode 100644 index 00000000..8e1b8738 Binary files /dev/null and b/tools/review/assets/round-69/eye-06-command-empty-1440-light.jpg differ diff --git a/tools/review/assets/round-69/eye-06-command-empty-390-dark.jpg b/tools/review/assets/round-69/eye-06-command-empty-390-dark.jpg new file mode 100644 index 00000000..b860213c Binary files /dev/null and b/tools/review/assets/round-69/eye-06-command-empty-390-dark.jpg differ diff --git a/tools/review/assets/round-69/eye-06-command-empty-390-light.jpg b/tools/review/assets/round-69/eye-06-command-empty-390-light.jpg new file mode 100644 index 00000000..f26a5c27 Binary files /dev/null and b/tools/review/assets/round-69/eye-06-command-empty-390-light.jpg differ diff --git a/tools/review/assets/round-69/eye-06-command-rest-1440-dark.jpg b/tools/review/assets/round-69/eye-06-command-rest-1440-dark.jpg new file mode 100644 index 00000000..ce155c25 Binary files /dev/null and b/tools/review/assets/round-69/eye-06-command-rest-1440-dark.jpg differ diff --git a/tools/review/assets/round-69/eye-06-command-rest-1440-light.jpg b/tools/review/assets/round-69/eye-06-command-rest-1440-light.jpg new file mode 100644 index 00000000..1f40c247 Binary files /dev/null and b/tools/review/assets/round-69/eye-06-command-rest-1440-light.jpg differ diff --git a/tools/review/assets/round-69/eye-06-command-rest-390-dark.jpg b/tools/review/assets/round-69/eye-06-command-rest-390-dark.jpg new file mode 100644 index 00000000..48c00082 Binary files /dev/null and b/tools/review/assets/round-69/eye-06-command-rest-390-dark.jpg differ diff --git a/tools/review/assets/round-69/eye-06-command-rest-390-light.jpg b/tools/review/assets/round-69/eye-06-command-rest-390-light.jpg new file mode 100644 index 00000000..792030d9 Binary files /dev/null and b/tools/review/assets/round-69/eye-06-command-rest-390-light.jpg differ diff --git a/tools/review/assets/round-69/eye-07-chips-default-1440-dark.jpg b/tools/review/assets/round-69/eye-07-chips-default-1440-dark.jpg new file mode 100644 index 00000000..c0e31560 Binary files /dev/null and b/tools/review/assets/round-69/eye-07-chips-default-1440-dark.jpg differ diff --git a/tools/review/assets/round-69/eye-07-chips-default-1440-light.jpg b/tools/review/assets/round-69/eye-07-chips-default-1440-light.jpg new file mode 100644 index 00000000..451590bc Binary files /dev/null and b/tools/review/assets/round-69/eye-07-chips-default-1440-light.jpg differ diff --git a/tools/review/assets/round-69/eye-07-chips-default-390-dark.jpg b/tools/review/assets/round-69/eye-07-chips-default-390-dark.jpg new file mode 100644 index 00000000..d4e8fd55 Binary files /dev/null and b/tools/review/assets/round-69/eye-07-chips-default-390-dark.jpg differ diff --git a/tools/review/assets/round-69/eye-07-chips-default-390-light.jpg b/tools/review/assets/round-69/eye-07-chips-default-390-light.jpg new file mode 100644 index 00000000..4e1dc5f3 Binary files /dev/null and b/tools/review/assets/round-69/eye-07-chips-default-390-light.jpg differ diff --git a/tools/review/assets/round-69/eye-08-count-default-1440-dark.jpg b/tools/review/assets/round-69/eye-08-count-default-1440-dark.jpg new file mode 100644 index 00000000..a00f2c6c Binary files /dev/null and b/tools/review/assets/round-69/eye-08-count-default-1440-dark.jpg differ diff --git a/tools/review/assets/round-69/eye-08-count-default-1440-light.jpg b/tools/review/assets/round-69/eye-08-count-default-1440-light.jpg new file mode 100644 index 00000000..2cd6167c Binary files /dev/null and b/tools/review/assets/round-69/eye-08-count-default-1440-light.jpg differ diff --git a/tools/review/assets/round-69/eye-09-toast-default-1440-dark.jpg b/tools/review/assets/round-69/eye-09-toast-default-1440-dark.jpg new file mode 100644 index 00000000..6fe742e1 Binary files /dev/null and b/tools/review/assets/round-69/eye-09-toast-default-1440-dark.jpg differ diff --git a/tools/review/assets/round-69/eye-09-toast-default-1440-light.jpg b/tools/review/assets/round-69/eye-09-toast-default-1440-light.jpg new file mode 100644 index 00000000..fc6894cb Binary files /dev/null and b/tools/review/assets/round-69/eye-09-toast-default-1440-light.jpg differ diff --git a/tools/review/assets/round-69/eye-09-toast-default-390-dark.jpg b/tools/review/assets/round-69/eye-09-toast-default-390-dark.jpg new file mode 100644 index 00000000..9a8ace78 Binary files /dev/null and b/tools/review/assets/round-69/eye-09-toast-default-390-dark.jpg differ diff --git a/tools/review/assets/round-69/eye-09-toast-default-390-light.jpg b/tools/review/assets/round-69/eye-09-toast-default-390-light.jpg new file mode 100644 index 00000000..efe74641 Binary files /dev/null and b/tools/review/assets/round-69/eye-09-toast-default-390-light.jpg differ diff --git a/tools/review/assets/round-69/eye-09-toast-go-390-dark.jpg b/tools/review/assets/round-69/eye-09-toast-go-390-dark.jpg new file mode 100644 index 00000000..48978c6d Binary files /dev/null and b/tools/review/assets/round-69/eye-09-toast-go-390-dark.jpg differ diff --git a/tools/review/assets/round-69/eye-09-toast-go-390-light.jpg b/tools/review/assets/round-69/eye-09-toast-go-390-light.jpg new file mode 100644 index 00000000..9d1e551e Binary files /dev/null and b/tools/review/assets/round-69/eye-09-toast-go-390-light.jpg differ diff --git a/tools/review/assets/round-69/eye-09-toast-undo-390-dark.jpg b/tools/review/assets/round-69/eye-09-toast-undo-390-dark.jpg new file mode 100644 index 00000000..9a8ace78 Binary files /dev/null and b/tools/review/assets/round-69/eye-09-toast-undo-390-dark.jpg differ diff --git a/tools/review/assets/round-69/eye-09-toast-undo-390-light.jpg b/tools/review/assets/round-69/eye-09-toast-undo-390-light.jpg new file mode 100644 index 00000000..efe74641 Binary files /dev/null and b/tools/review/assets/round-69/eye-09-toast-undo-390-light.jpg differ diff --git a/tools/review/assets/round-69/eye-11-headline-chart-gap-1440-dark.jpg b/tools/review/assets/round-69/eye-11-headline-chart-gap-1440-dark.jpg new file mode 100644 index 00000000..c7f765ce Binary files /dev/null and b/tools/review/assets/round-69/eye-11-headline-chart-gap-1440-dark.jpg differ diff --git a/tools/review/assets/round-69/eye-11-headline-chart-gap-1440-light.jpg b/tools/review/assets/round-69/eye-11-headline-chart-gap-1440-light.jpg new file mode 100644 index 00000000..fdac66fe Binary files /dev/null and b/tools/review/assets/round-69/eye-11-headline-chart-gap-1440-light.jpg differ diff --git a/tools/review/assets/round-69/eye-11-headline-chart-gap-390-dark.jpg b/tools/review/assets/round-69/eye-11-headline-chart-gap-390-dark.jpg new file mode 100644 index 00000000..7ac3d5af Binary files /dev/null and b/tools/review/assets/round-69/eye-11-headline-chart-gap-390-dark.jpg differ diff --git a/tools/review/assets/round-69/eye-11-headline-chart-gap-390-light.jpg b/tools/review/assets/round-69/eye-11-headline-chart-gap-390-light.jpg new file mode 100644 index 00000000..ff05a994 Binary files /dev/null and b/tools/review/assets/round-69/eye-11-headline-chart-gap-390-light.jpg differ diff --git a/tools/review/assets/round-69/eye-11-headline-default-1440-dark.jpg b/tools/review/assets/round-69/eye-11-headline-default-1440-dark.jpg new file mode 100644 index 00000000..57d6e48c Binary files /dev/null and b/tools/review/assets/round-69/eye-11-headline-default-1440-dark.jpg differ diff --git a/tools/review/assets/round-69/eye-11-headline-default-1440-light.jpg b/tools/review/assets/round-69/eye-11-headline-default-1440-light.jpg new file mode 100644 index 00000000..b611f1ee Binary files /dev/null and b/tools/review/assets/round-69/eye-11-headline-default-1440-light.jpg differ diff --git a/tools/review/assets/round-69/eye-11-headline-default-390-dark.jpg b/tools/review/assets/round-69/eye-11-headline-default-390-dark.jpg new file mode 100644 index 00000000..42e19f34 Binary files /dev/null and b/tools/review/assets/round-69/eye-11-headline-default-390-dark.jpg differ diff --git a/tools/review/assets/round-69/eye-11-headline-default-390-light.jpg b/tools/review/assets/round-69/eye-11-headline-default-390-light.jpg new file mode 100644 index 00000000..6688aaeb Binary files /dev/null and b/tools/review/assets/round-69/eye-11-headline-default-390-light.jpg differ diff --git a/tools/review/assets/round-69/eye-13-select-default-1440-dark.jpg b/tools/review/assets/round-69/eye-13-select-default-1440-dark.jpg new file mode 100644 index 00000000..e48c040d Binary files /dev/null and b/tools/review/assets/round-69/eye-13-select-default-1440-dark.jpg differ diff --git a/tools/review/assets/round-69/eye-13-select-default-1440-light.jpg b/tools/review/assets/round-69/eye-13-select-default-1440-light.jpg new file mode 100644 index 00000000..49970876 Binary files /dev/null and b/tools/review/assets/round-69/eye-13-select-default-1440-light.jpg differ diff --git a/tools/review/assets/round-69/eye-13-select-default-390-dark.jpg b/tools/review/assets/round-69/eye-13-select-default-390-dark.jpg new file mode 100644 index 00000000..d22c8bab Binary files /dev/null and b/tools/review/assets/round-69/eye-13-select-default-390-dark.jpg differ diff --git a/tools/review/assets/round-69/eye-13-select-default-390-light.jpg b/tools/review/assets/round-69/eye-13-select-default-390-light.jpg new file mode 100644 index 00000000..6f80714e Binary files /dev/null and b/tools/review/assets/round-69/eye-13-select-default-390-light.jpg differ diff --git a/tools/review/assets/round-69/eye-14-go-default-800-dark.jpg b/tools/review/assets/round-69/eye-14-go-default-800-dark.jpg new file mode 100644 index 00000000..387f1250 Binary files /dev/null and b/tools/review/assets/round-69/eye-14-go-default-800-dark.jpg differ diff --git a/tools/review/assets/round-69/eye-14-go-default-800-light.jpg b/tools/review/assets/round-69/eye-14-go-default-800-light.jpg new file mode 100644 index 00000000..0671e176 Binary files /dev/null and b/tools/review/assets/round-69/eye-14-go-default-800-light.jpg differ diff --git a/tools/review/assets/round-69/eye-14-go-touch-800-dark.jpg b/tools/review/assets/round-69/eye-14-go-touch-800-dark.jpg new file mode 100644 index 00000000..2b6dae75 Binary files /dev/null and b/tools/review/assets/round-69/eye-14-go-touch-800-dark.jpg differ diff --git a/tools/review/assets/round-69/eye-14-go-touch-800-light.jpg b/tools/review/assets/round-69/eye-14-go-touch-800-light.jpg new file mode 100644 index 00000000..354f158a Binary files /dev/null and b/tools/review/assets/round-69/eye-14-go-touch-800-light.jpg differ diff --git a/tools/review/assets/round-69/eye-14-go-touch-focus-800-dark.jpg b/tools/review/assets/round-69/eye-14-go-touch-focus-800-dark.jpg new file mode 100644 index 00000000..bde3ef3a Binary files /dev/null and b/tools/review/assets/round-69/eye-14-go-touch-focus-800-dark.jpg differ diff --git a/tools/review/assets/round-69/eye-14-go-touch-focus-800-light.jpg b/tools/review/assets/round-69/eye-14-go-touch-focus-800-light.jpg new file mode 100644 index 00000000..80b6b776 Binary files /dev/null and b/tools/review/assets/round-69/eye-14-go-touch-focus-800-light.jpg differ diff --git a/tools/review/assets/round-69/index.ts b/tools/review/assets/round-69/index.ts new file mode 100644 index 00000000..ea7e1aba --- /dev/null +++ b/tools/review/assets/round-69/index.ts @@ -0,0 +1,223 @@ +// Written by tools/review/round69-pairs.mjs: main's pictures of round 69's owner's-eye states, keyed by step, state, width and theme, each with the width it is drawn at. +import p_eye_01_search_default_1440_dark from "./eye-01-search-default-1440-dark.jpg"; +import p_eye_01_search_default_1440_light from "./eye-01-search-default-1440-light.jpg"; +import p_eye_01_search_default_390_dark from "./eye-01-search-default-390-dark.jpg"; +import p_eye_01_search_default_390_light from "./eye-01-search-default-390-light.jpg"; +import p_eye_01_search_full_1440_dark from "./eye-01-search-full-1440-dark.jpg"; +import p_eye_01_search_full_1440_light from "./eye-01-search-full-1440-light.jpg"; +import p_eye_01_search_full_390_dark from "./eye-01-search-full-390-dark.jpg"; +import p_eye_01_search_full_390_light from "./eye-01-search-full-390-light.jpg"; +import p_eye_01_search_none_1440_dark from "./eye-01-search-none-1440-dark.jpg"; +import p_eye_01_search_none_1440_light from "./eye-01-search-none-1440-light.jpg"; +import p_eye_01_search_none_390_dark from "./eye-01-search-none-390-dark.jpg"; +import p_eye_01_search_none_390_light from "./eye-01-search-none-390-light.jpg"; +import p_eye_01_search_two_1440_dark from "./eye-01-search-two-1440-dark.jpg"; +import p_eye_01_search_two_1440_light from "./eye-01-search-two-1440-light.jpg"; +import p_eye_01_search_two_390_dark from "./eye-01-search-two-390-dark.jpg"; +import p_eye_01_search_two_390_light from "./eye-01-search-two-390-light.jpg"; +import p_eye_02_filter_default_1440_dark from "./eye-02-filter-default-1440-dark.jpg"; +import p_eye_02_filter_default_1440_light from "./eye-02-filter-default-1440-light.jpg"; +import p_eye_02_filter_default_390_dark from "./eye-02-filter-default-390-dark.jpg"; +import p_eye_02_filter_default_390_light from "./eye-02-filter-default-390-light.jpg"; +import p_eye_03_legend_chart_gap_1440_dark from "./eye-03-legend-chart-gap-1440-dark.jpg"; +import p_eye_03_legend_chart_gap_1440_light from "./eye-03-legend-chart-gap-1440-light.jpg"; +import p_eye_03_legend_chart_gap_390_dark from "./eye-03-legend-chart-gap-390-dark.jpg"; +import p_eye_03_legend_chart_gap_390_light from "./eye-03-legend-chart-gap-390-light.jpg"; +import p_eye_03_legend_default_1440_dark from "./eye-03-legend-default-1440-dark.jpg"; +import p_eye_03_legend_default_1440_light from "./eye-03-legend-default-1440-light.jpg"; +import p_eye_03_legend_default_390_dark from "./eye-03-legend-default-390-dark.jpg"; +import p_eye_03_legend_default_390_light from "./eye-03-legend-default-390-light.jpg"; +import p_eye_04_composer_default_1440_dark from "./eye-04-composer-default-1440-dark.jpg"; +import p_eye_04_composer_default_1440_light from "./eye-04-composer-default-1440-light.jpg"; +import p_eye_04_composer_default_390_dark from "./eye-04-composer-default-390-dark.jpg"; +import p_eye_04_composer_default_390_light from "./eye-04-composer-default-390-light.jpg"; +import p_eye_04_composer_empty_1440_dark from "./eye-04-composer-empty-1440-dark.jpg"; +import p_eye_04_composer_empty_1440_light from "./eye-04-composer-empty-1440-light.jpg"; +import p_eye_04_composer_empty_390_dark from "./eye-04-composer-empty-390-dark.jpg"; +import p_eye_04_composer_empty_390_light from "./eye-04-composer-empty-390-light.jpg"; +import p_eye_04_composer_narrow_390_dark from "./eye-04-composer-narrow-390-dark.jpg"; +import p_eye_04_composer_narrow_390_light from "./eye-04-composer-narrow-390-light.jpg"; +import p_eye_04_composer_typing_1440_dark from "./eye-04-composer-typing-1440-dark.jpg"; +import p_eye_04_composer_typing_1440_light from "./eye-04-composer-typing-1440-light.jpg"; +import p_eye_04_composer_typing_390_dark from "./eye-04-composer-typing-390-dark.jpg"; +import p_eye_04_composer_typing_390_light from "./eye-04-composer-typing-390-light.jpg"; +import p_eye_05_copy_copied_1440_dark from "./eye-05-copy-copied-1440-dark.jpg"; +import p_eye_05_copy_copied_1440_light from "./eye-05-copy-copied-1440-light.jpg"; +import p_eye_05_copy_copied_390_dark from "./eye-05-copy-copied-390-dark.jpg"; +import p_eye_05_copy_copied_390_light from "./eye-05-copy-copied-390-light.jpg"; +import p_eye_05_copy_default_1440_dark from "./eye-05-copy-default-1440-dark.jpg"; +import p_eye_05_copy_default_1440_light from "./eye-05-copy-default-1440-light.jpg"; +import p_eye_05_copy_default_390_dark from "./eye-05-copy-default-390-dark.jpg"; +import p_eye_05_copy_default_390_light from "./eye-05-copy-default-390-light.jpg"; +import p_eye_05_copy_refused_1440_dark from "./eye-05-copy-refused-1440-dark.jpg"; +import p_eye_05_copy_refused_1440_light from "./eye-05-copy-refused-1440-light.jpg"; +import p_eye_05_copy_refused_390_dark from "./eye-05-copy-refused-390-dark.jpg"; +import p_eye_05_copy_refused_390_light from "./eye-05-copy-refused-390-light.jpg"; +import p_eye_05_copy_rest_1440_dark from "./eye-05-copy-rest-1440-dark.jpg"; +import p_eye_05_copy_rest_1440_light from "./eye-05-copy-rest-1440-light.jpg"; +import p_eye_05_copy_rest_390_dark from "./eye-05-copy-rest-390-dark.jpg"; +import p_eye_05_copy_rest_390_light from "./eye-05-copy-rest-390-light.jpg"; +import p_eye_06_command_card_1440_dark from "./eye-06-command-card-1440-dark.jpg"; +import p_eye_06_command_card_1440_light from "./eye-06-command-card-1440-light.jpg"; +import p_eye_06_command_card_390_dark from "./eye-06-command-card-390-dark.jpg"; +import p_eye_06_command_card_390_light from "./eye-06-command-card-390-light.jpg"; +import p_eye_06_command_default_1440_dark from "./eye-06-command-default-1440-dark.jpg"; +import p_eye_06_command_default_1440_light from "./eye-06-command-default-1440-light.jpg"; +import p_eye_06_command_default_390_dark from "./eye-06-command-default-390-dark.jpg"; +import p_eye_06_command_default_390_light from "./eye-06-command-default-390-light.jpg"; +import p_eye_06_command_empty_1440_dark from "./eye-06-command-empty-1440-dark.jpg"; +import p_eye_06_command_empty_1440_light from "./eye-06-command-empty-1440-light.jpg"; +import p_eye_06_command_empty_390_dark from "./eye-06-command-empty-390-dark.jpg"; +import p_eye_06_command_empty_390_light from "./eye-06-command-empty-390-light.jpg"; +import p_eye_06_command_rest_1440_dark from "./eye-06-command-rest-1440-dark.jpg"; +import p_eye_06_command_rest_1440_light from "./eye-06-command-rest-1440-light.jpg"; +import p_eye_06_command_rest_390_dark from "./eye-06-command-rest-390-dark.jpg"; +import p_eye_06_command_rest_390_light from "./eye-06-command-rest-390-light.jpg"; +import p_eye_07_chips_default_1440_dark from "./eye-07-chips-default-1440-dark.jpg"; +import p_eye_07_chips_default_1440_light from "./eye-07-chips-default-1440-light.jpg"; +import p_eye_07_chips_default_390_dark from "./eye-07-chips-default-390-dark.jpg"; +import p_eye_07_chips_default_390_light from "./eye-07-chips-default-390-light.jpg"; +import p_eye_08_count_default_1440_dark from "./eye-08-count-default-1440-dark.jpg"; +import p_eye_08_count_default_1440_light from "./eye-08-count-default-1440-light.jpg"; +import p_eye_09_toast_default_1440_dark from "./eye-09-toast-default-1440-dark.jpg"; +import p_eye_09_toast_default_1440_light from "./eye-09-toast-default-1440-light.jpg"; +import p_eye_09_toast_default_390_dark from "./eye-09-toast-default-390-dark.jpg"; +import p_eye_09_toast_default_390_light from "./eye-09-toast-default-390-light.jpg"; +import p_eye_09_toast_go_390_dark from "./eye-09-toast-go-390-dark.jpg"; +import p_eye_09_toast_go_390_light from "./eye-09-toast-go-390-light.jpg"; +import p_eye_09_toast_undo_390_dark from "./eye-09-toast-undo-390-dark.jpg"; +import p_eye_09_toast_undo_390_light from "./eye-09-toast-undo-390-light.jpg"; +import p_eye_11_headline_chart_gap_1440_dark from "./eye-11-headline-chart-gap-1440-dark.jpg"; +import p_eye_11_headline_chart_gap_1440_light from "./eye-11-headline-chart-gap-1440-light.jpg"; +import p_eye_11_headline_chart_gap_390_dark from "./eye-11-headline-chart-gap-390-dark.jpg"; +import p_eye_11_headline_chart_gap_390_light from "./eye-11-headline-chart-gap-390-light.jpg"; +import p_eye_11_headline_default_1440_dark from "./eye-11-headline-default-1440-dark.jpg"; +import p_eye_11_headline_default_1440_light from "./eye-11-headline-default-1440-light.jpg"; +import p_eye_11_headline_default_390_dark from "./eye-11-headline-default-390-dark.jpg"; +import p_eye_11_headline_default_390_light from "./eye-11-headline-default-390-light.jpg"; +import p_eye_13_select_default_1440_dark from "./eye-13-select-default-1440-dark.jpg"; +import p_eye_13_select_default_1440_light from "./eye-13-select-default-1440-light.jpg"; +import p_eye_13_select_default_390_dark from "./eye-13-select-default-390-dark.jpg"; +import p_eye_13_select_default_390_light from "./eye-13-select-default-390-light.jpg"; +import p_eye_14_go_default_800_dark from "./eye-14-go-default-800-dark.jpg"; +import p_eye_14_go_default_800_light from "./eye-14-go-default-800-light.jpg"; +import p_eye_14_go_touch_800_dark from "./eye-14-go-touch-800-dark.jpg"; +import p_eye_14_go_touch_800_light from "./eye-14-go-touch-800-light.jpg"; +import p_eye_14_go_touch_focus_800_dark from "./eye-14-go-touch-focus-800-dark.jpg"; +import p_eye_14_go_touch_focus_800_light from "./eye-14-go-touch-focus-800-light.jpg"; +import p_x_round68_changelog_default_1440_dark from "./x-round68-changelog-default-1440-dark.jpg"; +import p_x_round68_changelog_default_1440_light from "./x-round68-changelog-default-1440-light.jpg"; +import p_x_round68_changelog_default_390_dark from "./x-round68-changelog-default-390-dark.jpg"; +import p_x_round68_changelog_default_390_light from "./x-round68-changelog-default-390-light.jpg"; +export const BEFORE: Record = { + "eye-01-search-default-1440-dark": { src: p_eye_01_search_default_1440_dark, width: 591 }, + "eye-01-search-default-1440-light": { src: p_eye_01_search_default_1440_light, width: 596 }, + "eye-01-search-default-390-dark": { src: p_eye_01_search_default_390_dark, width: 389 }, + "eye-01-search-default-390-light": { src: p_eye_01_search_default_390_light, width: 390 }, + "eye-01-search-full-1440-dark": { src: p_eye_01_search_full_1440_dark, width: 591 }, + "eye-01-search-full-1440-light": { src: p_eye_01_search_full_1440_light, width: 596 }, + "eye-01-search-full-390-dark": { src: p_eye_01_search_full_390_dark, width: 389 }, + "eye-01-search-full-390-light": { src: p_eye_01_search_full_390_light, width: 390 }, + "eye-01-search-none-1440-dark": { src: p_eye_01_search_none_1440_dark, width: 591 }, + "eye-01-search-none-1440-light": { src: p_eye_01_search_none_1440_light, width: 596 }, + "eye-01-search-none-390-dark": { src: p_eye_01_search_none_390_dark, width: 389 }, + "eye-01-search-none-390-light": { src: p_eye_01_search_none_390_light, width: 390 }, + "eye-01-search-two-1440-dark": { src: p_eye_01_search_two_1440_dark, width: 591 }, + "eye-01-search-two-1440-light": { src: p_eye_01_search_two_1440_light, width: 596 }, + "eye-01-search-two-390-dark": { src: p_eye_01_search_two_390_dark, width: 389 }, + "eye-01-search-two-390-light": { src: p_eye_01_search_two_390_light, width: 390 }, + "eye-02-filter-default-1440-dark": { src: p_eye_02_filter_default_1440_dark, width: 388 }, + "eye-02-filter-default-1440-light": { src: p_eye_02_filter_default_1440_light, width: 388 }, + "eye-02-filter-default-390-dark": { src: p_eye_02_filter_default_390_dark, width: 300 }, + "eye-02-filter-default-390-light": { src: p_eye_02_filter_default_390_light, width: 300 }, + "eye-03-legend-chart-gap-1440-dark": { src: p_eye_03_legend_chart_gap_1440_dark, width: 744 }, + "eye-03-legend-chart-gap-1440-light": { src: p_eye_03_legend_chart_gap_1440_light, width: 744 }, + "eye-03-legend-chart-gap-390-dark": { src: p_eye_03_legend_chart_gap_390_dark, width: 353 }, + "eye-03-legend-chart-gap-390-light": { src: p_eye_03_legend_chart_gap_390_light, width: 353 }, + "eye-03-legend-default-1440-dark": { src: p_eye_03_legend_default_1440_dark, width: 744 }, + "eye-03-legend-default-1440-light": { src: p_eye_03_legend_default_1440_light, width: 744 }, + "eye-03-legend-default-390-dark": { src: p_eye_03_legend_default_390_dark, width: 353 }, + "eye-03-legend-default-390-light": { src: p_eye_03_legend_default_390_light, width: 353 }, + "eye-04-composer-default-1440-dark": { src: p_eye_04_composer_default_1440_dark, width: 551 }, + "eye-04-composer-default-1440-light": { src: p_eye_04_composer_default_1440_light, width: 551 }, + "eye-04-composer-default-390-dark": { src: p_eye_04_composer_default_390_dark, width: 357 }, + "eye-04-composer-default-390-light": { src: p_eye_04_composer_default_390_light, width: 357 }, + "eye-04-composer-empty-1440-dark": { src: p_eye_04_composer_empty_1440_dark, width: 551 }, + "eye-04-composer-empty-1440-light": { src: p_eye_04_composer_empty_1440_light, width: 551 }, + "eye-04-composer-empty-390-dark": { src: p_eye_04_composer_empty_390_dark, width: 357 }, + "eye-04-composer-empty-390-light": { src: p_eye_04_composer_empty_390_light, width: 357 }, + "eye-04-composer-narrow-390-dark": { src: p_eye_04_composer_narrow_390_dark, width: 321 }, + "eye-04-composer-narrow-390-light": { src: p_eye_04_composer_narrow_390_light, width: 321 }, + "eye-04-composer-typing-1440-dark": { src: p_eye_04_composer_typing_1440_dark, width: 551 }, + "eye-04-composer-typing-1440-light": { src: p_eye_04_composer_typing_1440_light, width: 551 }, + "eye-04-composer-typing-390-dark": { src: p_eye_04_composer_typing_390_dark, width: 357 }, + "eye-04-composer-typing-390-light": { src: p_eye_04_composer_typing_390_light, width: 357 }, + "eye-05-copy-copied-1440-dark": { src: p_eye_05_copy_copied_1440_dark, width: 671 }, + "eye-05-copy-copied-1440-light": { src: p_eye_05_copy_copied_1440_light, width: 671 }, + "eye-05-copy-copied-390-dark": { src: p_eye_05_copy_copied_390_dark, width: 357 }, + "eye-05-copy-copied-390-light": { src: p_eye_05_copy_copied_390_light, width: 357 }, + "eye-05-copy-default-1440-dark": { src: p_eye_05_copy_default_1440_dark, width: 671 }, + "eye-05-copy-default-1440-light": { src: p_eye_05_copy_default_1440_light, width: 671 }, + "eye-05-copy-default-390-dark": { src: p_eye_05_copy_default_390_dark, width: 357 }, + "eye-05-copy-default-390-light": { src: p_eye_05_copy_default_390_light, width: 357 }, + "eye-05-copy-refused-1440-dark": { src: p_eye_05_copy_refused_1440_dark, width: 671 }, + "eye-05-copy-refused-1440-light": { src: p_eye_05_copy_refused_1440_light, width: 671 }, + "eye-05-copy-refused-390-dark": { src: p_eye_05_copy_refused_390_dark, width: 357 }, + "eye-05-copy-refused-390-light": { src: p_eye_05_copy_refused_390_light, width: 357 }, + "eye-05-copy-rest-1440-dark": { src: p_eye_05_copy_rest_1440_dark, width: 671 }, + "eye-05-copy-rest-1440-light": { src: p_eye_05_copy_rest_1440_light, width: 671 }, + "eye-05-copy-rest-390-dark": { src: p_eye_05_copy_rest_390_dark, width: 357 }, + "eye-05-copy-rest-390-light": { src: p_eye_05_copy_rest_390_light, width: 357 }, + "eye-06-command-card-1440-dark": { src: p_eye_06_command_card_1440_dark, width: 591 }, + "eye-06-command-card-1440-light": { src: p_eye_06_command_card_1440_light, width: 591 }, + "eye-06-command-card-390-dark": { src: p_eye_06_command_card_390_dark, width: 357 }, + "eye-06-command-card-390-light": { src: p_eye_06_command_card_390_light, width: 357 }, + "eye-06-command-default-1440-dark": { src: p_eye_06_command_default_1440_dark, width: 591 }, + "eye-06-command-default-1440-light": { src: p_eye_06_command_default_1440_light, width: 591 }, + "eye-06-command-default-390-dark": { src: p_eye_06_command_default_390_dark, width: 357 }, + "eye-06-command-default-390-light": { src: p_eye_06_command_default_390_light, width: 357 }, + "eye-06-command-empty-1440-dark": { src: p_eye_06_command_empty_1440_dark, width: 591 }, + "eye-06-command-empty-1440-light": { src: p_eye_06_command_empty_1440_light, width: 591 }, + "eye-06-command-empty-390-dark": { src: p_eye_06_command_empty_390_dark, width: 357 }, + "eye-06-command-empty-390-light": { src: p_eye_06_command_empty_390_light, width: 357 }, + "eye-06-command-rest-1440-dark": { src: p_eye_06_command_rest_1440_dark, width: 591 }, + "eye-06-command-rest-1440-light": { src: p_eye_06_command_rest_1440_light, width: 591 }, + "eye-06-command-rest-390-dark": { src: p_eye_06_command_rest_390_dark, width: 357 }, + "eye-06-command-rest-390-light": { src: p_eye_06_command_rest_390_light, width: 357 }, + "eye-07-chips-default-1440-dark": { src: p_eye_07_chips_default_1440_dark, width: 451 }, + "eye-07-chips-default-1440-light": { src: p_eye_07_chips_default_1440_light, width: 451 }, + "eye-07-chips-default-390-dark": { src: p_eye_07_chips_default_390_dark, width: 357 }, + "eye-07-chips-default-390-light": { src: p_eye_07_chips_default_390_light, width: 357 }, + "eye-08-count-default-1440-dark": { src: p_eye_08_count_default_1440_dark, width: 522 }, + "eye-08-count-default-1440-light": { src: p_eye_08_count_default_1440_light, width: 522 }, + "eye-09-toast-default-1440-dark": { src: p_eye_09_toast_default_1440_dark, width: 1000 }, + "eye-09-toast-default-1440-light": { src: p_eye_09_toast_default_1440_light, width: 1000 }, + "eye-09-toast-default-390-dark": { src: p_eye_09_toast_default_390_dark, width: 389 }, + "eye-09-toast-default-390-light": { src: p_eye_09_toast_default_390_light, width: 390 }, + "eye-09-toast-go-390-dark": { src: p_eye_09_toast_go_390_dark, width: 389 }, + "eye-09-toast-go-390-light": { src: p_eye_09_toast_go_390_light, width: 390 }, + "eye-09-toast-undo-390-dark": { src: p_eye_09_toast_undo_390_dark, width: 389 }, + "eye-09-toast-undo-390-light": { src: p_eye_09_toast_undo_390_light, width: 390 }, + "eye-11-headline-chart-gap-1440-dark": { src: p_eye_11_headline_chart_gap_1440_dark, width: 752 }, + "eye-11-headline-chart-gap-1440-light": { src: p_eye_11_headline_chart_gap_1440_light, width: 752 }, + "eye-11-headline-chart-gap-390-dark": { src: p_eye_11_headline_chart_gap_390_dark, width: 357 }, + "eye-11-headline-chart-gap-390-light": { src: p_eye_11_headline_chart_gap_390_light, width: 357 }, + "eye-11-headline-default-1440-dark": { src: p_eye_11_headline_default_1440_dark, width: 744 }, + "eye-11-headline-default-1440-light": { src: p_eye_11_headline_default_1440_light, width: 744 }, + "eye-11-headline-default-390-dark": { src: p_eye_11_headline_default_390_dark, width: 353 }, + "eye-11-headline-default-390-light": { src: p_eye_11_headline_default_390_light, width: 353 }, + "eye-13-select-default-1440-dark": { src: p_eye_13_select_default_1440_dark, width: 451 }, + "eye-13-select-default-1440-light": { src: p_eye_13_select_default_1440_light, width: 451 }, + "eye-13-select-default-390-dark": { src: p_eye_13_select_default_390_dark, width: 357 }, + "eye-13-select-default-390-light": { src: p_eye_13_select_default_390_light, width: 357 }, + "eye-14-go-default-800-dark": { src: p_eye_14_go_default_800_dark, width: 800 }, + "eye-14-go-default-800-light": { src: p_eye_14_go_default_800_light, width: 800 }, + "eye-14-go-touch-800-dark": { src: p_eye_14_go_touch_800_dark, width: 800 }, + "eye-14-go-touch-800-light": { src: p_eye_14_go_touch_800_light, width: 800 }, + "eye-14-go-touch-focus-800-dark": { src: p_eye_14_go_touch_focus_800_dark, width: 800 }, + "eye-14-go-touch-focus-800-light": { src: p_eye_14_go_touch_focus_800_light, width: 800 }, + "x-round68-changelog-default-1440-dark": { src: p_x_round68_changelog_default_1440_dark, width: 1000 }, + "x-round68-changelog-default-1440-light": { src: p_x_round68_changelog_default_1440_light, width: 1000 }, + "x-round68-changelog-default-390-dark": { src: p_x_round68_changelog_default_390_dark, width: 325 }, + "x-round68-changelog-default-390-light": { src: p_x_round68_changelog_default_390_light, width: 325 }, +}; diff --git a/tools/review/assets/round-69/x-round68-changelog-default-1440-dark.jpg b/tools/review/assets/round-69/x-round68-changelog-default-1440-dark.jpg new file mode 100644 index 00000000..87607756 Binary files /dev/null and b/tools/review/assets/round-69/x-round68-changelog-default-1440-dark.jpg differ diff --git a/tools/review/assets/round-69/x-round68-changelog-default-1440-light.jpg b/tools/review/assets/round-69/x-round68-changelog-default-1440-light.jpg new file mode 100644 index 00000000..c2bceb53 Binary files /dev/null and b/tools/review/assets/round-69/x-round68-changelog-default-1440-light.jpg differ diff --git a/tools/review/assets/round-69/x-round68-changelog-default-390-dark.jpg b/tools/review/assets/round-69/x-round68-changelog-default-390-dark.jpg new file mode 100644 index 00000000..d3c87292 Binary files /dev/null and b/tools/review/assets/round-69/x-round68-changelog-default-390-dark.jpg differ diff --git a/tools/review/assets/round-69/x-round68-changelog-default-390-light.jpg b/tools/review/assets/round-69/x-round68-changelog-default-390-light.jpg new file mode 100644 index 00000000..74e8db99 Binary files /dev/null and b/tools/review/assets/round-69/x-round68-changelog-default-390-light.jpg differ diff --git a/tools/review/build.mjs b/tools/review/build.mjs index c581fe65..1f59a335 100644 --- a/tools/review/build.mjs +++ b/tools/review/build.mjs @@ -100,6 +100,7 @@ const skillPages = { ...(!wanted.length || wanted.includes("32") ? (await import("./round32-skill.mjs")).skillPages() : {}), ...(!wanted.length || wanted.includes("39") ? (await import("./round39-skill.mjs")).skillPages39() : {}), ...(!wanted.length || wanted.includes("47") ? (await import("./round47-skill.mjs")).skillPages47() : {}), + ...(!wanted.length || wanted.includes("69") ? (await import("./round69-skill.mjs")).skillPages69() : {}), }; const bundle = await esbuild.build({ @@ -318,7 +319,7 @@ for (const id of rounds) { // ends in one of them (an open menu "menu-forced-colours-lit") takes the same emulation, with or without "-lit". const mode = state.replace(/-lit$/, ""); const media = mode.endsWith("forced-colours") ? { forcedColors: "active", colorScheme: theme } : mode.endsWith("forced-mixed") ? { forcedColors: "active", colorScheme: theme === "dark" ? "light" : "dark" } : mode.endsWith("reduced-motion") ? { reducedMotion: "reduce" } : mode.endsWith("more-contrast") ? { contrast: "more" } : {}; - const page = await browser.newPage({ viewport: { width, height: step.heights?.[`${state}@${width}`] ?? step.height ?? (overlay ? 640 : 400) }, deviceScaleFactor: scale, hasTouch: state.startsWith("chart-touch") || state === "touch" || Boolean(step.touch && width < 720), isMobile: (id === "48" && state === "touch") || Boolean(step.touch && width < 720), ...media }); + const page = await browser.newPage({ viewport: { width, height: step.heights?.[`${state}@${width}`] ?? step.height ?? (overlay ? 640 : 400) }, deviceScaleFactor: scale, hasTouch: state.startsWith("chart-touch") || state === "touch" || (id === "69" && state.startsWith("touch")) || Boolean(step.touch && width < 720), isMobile: (id === "48" && state === "touch") || (id === "69" && state.startsWith("touch")) || Boolean(step.touch && width < 720), ...media }); page.on("pageerror", (e) => errors.push(`${step.id}/${state}/${theme}: ${e.message}`)); // Round 25's framed art: one address that never answers (the loading state, held) and one that is refused (the failed state). if (id === "25") { diff --git a/tools/review/round47.tsx b/tools/review/round47.tsx index b0af9c6d..c590013d 100644 --- a/tools/review/round47.tsx +++ b/tools/review/round47.tsx @@ -227,7 +227,7 @@ function SmallDemo() { )} - +
PickRunName run-1Alpha diff --git a/tools/review/round68.tsx b/tools/review/round68.tsx index c3ba6a26..14d53769 100644 --- a/tools/review/round68.tsx +++ b/tools/review/round68.tsx @@ -100,7 +100,7 @@ function Harbor({ state, page = "notes" }: { state: string; page?: "home" | "not // ---- a package: Slate's changelog on a site page, the versions beside it, the version in the footer ---- -function Slate({ state }: { state: string }) { +export function Slate({ state }: { state: string }) { const kind = kindOf(state); const press: string[] = []; if (kind === "sources") press.push('[id="pr41-1"] .basalt-release-source'); @@ -114,7 +114,7 @@ function Slate({ state }: { state: string }) { const arrived = kind === "arrived" ? "pr49-1" : kind === "release-arrived" ? "v0.2.0" : null; return ( -
+

Changelog

Every version of @example/slate and @example/slate-tokens. The two packages share one version number.

To see the version you have installed, run npm ls @example/slate.

diff --git a/tools/review/round69-pairs.mjs b/tools/review/round69-pairs.mjs new file mode 100644 index 00000000..2904c390 --- /dev/null +++ b/tools/review/round69-pairs.mjs @@ -0,0 +1,112 @@ +// Round 69's pictures of main (DECISIONS 336): the owner's-eye states of this round, built on main by the same tool, cropped to what they draw and +// written as JPEGs under assets/round-69, with an index the round imports; each "before-" state then shows main's picture beside this branch's live part. +// (in a worktree of main, with this round's files copied in) node tools/review/build.mjs 69 --out +// node tools/review/round69-pairs.mjs /basalt-round-69-screenshots +// npm run review -- 69 +// Only the owner's-eye steps are drawn into the walkthrough; every step's main shots go into the screenshots zip beside this branch's (`before/`). +import fs from "node:fs"; +import path from "node:path"; +import { fileURLToPath } from "node:url"; + +import { chromium } from "playwright"; + +const HERE = path.dirname(fileURLToPath(import.meta.url)); +const [SHOTS] = process.argv.slice(2); +if (!SHOTS) { + process.stderr.write("usage: node tools/review/round69-pairs.mjs \n"); + process.exit(2); +} +const OUT = path.join(HERE, "assets", "round-69"); +// What is read is bounded (the code review's finding 9): the input folder's own regular files, a count, a size and a picture's pixels, each checked +// before anything is decoded; the new set is written beside the old one and replaces it only when every picture was written. +const MAX_FILES = 2000; +const MAX_BYTES = 25 * 1024 * 1024; +const MAX_PIXELS = 4000 * 12000; +const ROOT = fs.realpathSync(SHOTS); +/** A PNG's width and height from its header, or null when the file is not one. */ +function pngSize(file) { + const fd = fs.openSync(file, "r"); + try { + const head = Buffer.alloc(24); + if (fs.readSync(fd, head, 0, 24, 0) < 24 || head.readUInt32BE(0) !== 0x89504e47 || head.toString("ascii", 12, 16) !== "IHDR") return null; + return { width: head.readUInt32BE(16), height: head.readUInt32BE(20) }; + } finally { + fs.closeSync(fd); + } +} +/** The steps whose main pictures are drawn into the walkthrough: the owner's eye. */ +const OWNERS = ["x-round68-changelog", "eye-01-search", "eye-02-filter", "eye-03-legend", "eye-04-composer", "eye-05-copy", "eye-06-command", "eye-07-chips", "eye-08-count", "eye-09-toast", "eye-13-select", "eye-14-go", "eye-11-headline"]; +/** Widest a picture is written (2x of the walkthrough's widest column), as round 68's. */ +const WIDEST = 2000; + +const files = fs.readdirSync(ROOT).filter((f) => f.endsWith(".png") && !f.startsWith("00-")); +if (files.length > MAX_FILES) throw new Error(`${files.length} pictures is more than ${MAX_FILES}`); +for (const file of files) { + const full = path.join(ROOT, file); + const stat = fs.lstatSync(full); + if (!stat.isFile()) throw new Error(`${file} is not a regular file`); + if (path.dirname(fs.realpathSync(full)) !== ROOT) throw new Error(`${file} is outside ${ROOT}`); + if (stat.size > MAX_BYTES) throw new Error(`${file} is ${stat.size} bytes, more than ${MAX_BYTES}`); + const size = pngSize(full); + if (!size || size.width * size.height > MAX_PIXELS) throw new Error(`${file} is not a PNG of at most ${MAX_PIXELS} pixels`); +} +const NEXT = `${OUT}.next`; +const browser = await chromium.launch(); +const page = await browser.newPage(); +fs.rmSync(NEXT, { recursive: true, force: true }); +fs.mkdirSync(NEXT, { recursive: true }); +const entries = []; +for (const file of files) { + const m = /^\d\d-(.+)-(\d+)-(dark|light)\.png$/.exec(file); + if (!m) continue; + const [, rest, width, theme] = m; + const step = OWNERS.find((id) => rest === id || rest.startsWith(`${id}-`)); + if (!step) continue; + const state = rest === step ? "default" : rest.slice(step.length + 1); + const data = `data:image/png;base64,${fs.readFileSync(path.join(ROOT, file)).toString("base64")}`; + // Cropped to what differs from the page's own ground (its top-left pixel), with 32px of it kept round, so a picture is the part and not the page. + const out = await page.evaluate(async ({ data, widest }) => { + const image = new Image(); + image.src = data; + await image.decode(); + const w = image.naturalWidth, h = image.naturalHeight; + const c = document.createElement("canvas"); + c.width = w; c.height = h; + const x = c.getContext("2d"); + x.drawImage(image, 0, 0); + const px = x.getImageData(0, 0, w, h).data; + const ground = [px[0], px[1], px[2]]; + let x0 = w, y0 = h, x1 = 0, y1 = 0; + for (let y = 0; y < h; y += 2) for (let i = 0; i < w; i += 2) { + const at = (y * w + i) * 4; + if (Math.abs(px[at] - ground[0]) + Math.abs(px[at + 1] - ground[1]) + Math.abs(px[at + 2] - ground[2]) > 12) { if (i < x0) x0 = i; if (i > x1) x1 = i; if (y < y0) y0 = y; if (y > y1) y1 = y; } + } + if (x1 < x0) { x0 = 0; y0 = 0; x1 = w - 1; y1 = h - 1; } + const pad = 32; + x0 = Math.max(0, x0 - pad); y0 = Math.max(0, y0 - pad); x1 = Math.min(w, x1 + pad); y1 = Math.min(h, y1 + pad); + const cw = x1 - x0, ch = y1 - y0; + const scale = Math.min(1, widest / cw); + const o = document.createElement("canvas"); + o.width = Math.round(cw * scale); o.height = Math.round(ch * scale); + o.getContext("2d").drawImage(c, x0, y0, cw, ch, 0, 0, o.width, o.height); + return { jpeg: o.toDataURL("image/jpeg", 0.8), width: o.width }; + }, { data, widest: WIDEST }); + const name = `${step}-${state}-${width}-${theme}.jpg`; + fs.writeFileSync(path.join(NEXT, name), Buffer.from(out.jpeg.split(",")[1], "base64")); + entries.push({ key: `${step}-${state}-${width}-${theme}`, name, width: Math.round(out.width / 2) }); +} +await browser.close(); +entries.sort((a, b) => a.key.localeCompare(b.key)); +const ident = (key) => `p_${key.replace(/[^a-zA-Z0-9]/g, "_")}`; +const index = [ + "// Written by tools/review/round69-pairs.mjs: main's pictures of round 69's owner's-eye states, keyed by step, state, width and theme, each with the width it is drawn at.", + ...entries.map((e) => `import ${ident(e.key)} from "./${e.name}";`), + "export const BEFORE: Record = {", + ...entries.map((e) => ` ${JSON.stringify(e.key)}: { src: ${ident(e.key)}, width: ${e.width} },`), + "};", + "", +].join("\n"); +fs.writeFileSync(path.join(NEXT, "index.ts"), index); +fs.rmSync(OUT, { recursive: true, force: true }); +fs.renameSync(NEXT, OUT); +process.stdout.write(`${entries.length} pictures of main in ${path.relative(process.cwd(), OUT)}\n`); diff --git a/tools/review/round69-skill.mjs b/tools/review/round69-skill.mjs new file mode 100644 index 00000000..a3bfd7a7 --- /dev/null +++ b/tools/review/round69-skill.mjs @@ -0,0 +1,63 @@ +// Round 69's HTML-skill pages (DECISIONS 336): every part the decision touches, composed by the skill this tree carries (on main, main's own skill). +// A page sets its own theme from the review page's; the review page reads its height from the frame itself (same origin), so nothing is posted. Synthetic content only. +import { compose } from "../../.agent/skills/basalt-html/compose.mjs"; + +const READY = (_key, open = "") => ``; + +const LINKS = ``; + +const HEADS = `

A page's section head

+
+
A panel head
The head's last ghost button hangs into its padding by itself.
+
alerts.json
{ "alerts": 3 }
+
Deploy preview

+npm run build
+Built in 4.2 s
+
A narrow terminal
npm ci
+

Ada Byron

Writes about engines.

${LINKS}
+

A row with nothing round it.

${LINKS}
+
+ +
RunStatus
run-0142Ready
run-0141Building
+
Size
+ +
+
+`; + +const SHEET = ` +

Your cart

2 items

Two lines in the cart.

`; + +const SEARCH = (n) => ` + +

${n ? `${n} products` : "Nothing found for “zzz”"}

`; + +const CHECKLIST = `
${["Alpha", "Beta", "Gamma", "Delta", "Epsilon", "Zeta", "Eta", "Theta"].map((l, i) => ``).join("")}
`; + +const TOPBAR = `
+

The page.

`; + +const NOTIFICATIONS = `
+`; + +const TOAST = `

Two toasts.

+`; + +export function skillPages69() { + const page = (key, body, open = "") => [key, compose(`Round 69 ${key}${body}${READY(key, open)}`, { fonts: true }).html]; + return Object.fromEntries([ + page("69-heads", HEADS), + page("69-sheet", SHEET, `document.getElementById("s").showModal();`), + page("69-search-none", SEARCH(0), `document.getElementById("q").showModal();`), + page("69-search-two", SEARCH(2), `document.getElementById("q").showModal();`), + page("69-checklist", `
${CHECKLIST}
`, `setTimeout(function () { var t = document.querySelector(".filter-trigger"); if (t) t.click(); }, 200);`), + page("69-topbar", TOPBAR, `setTimeout(function () { var t = document.querySelector(".topbar-menu-trigger"); if (t && getComputedStyle(t).display !== "none") t.click(); }, 200);`), + page("69-notifications", NOTIFICATIONS, `setTimeout(function () { var b = document.querySelector("#bell .btn"); if (b) b.click(); }, 300);`), + page("69-toast", TOAST), + ]); +} diff --git a/tools/review/round69.tsx b/tools/review/round69.tsx new file mode 100644 index 00000000..fe1efc51 --- /dev/null +++ b/tools/review/round69.tsx @@ -0,0 +1,483 @@ +// Round 69: reserved room across every component (DECISIONS 328, 329, 336). A heavy council round: two audits (React and the HTML skill), Astra's +// check, Fable's decision and its answers to Astra's final position, built by Opus; the implementation has not been reviewed. "After" is this branch, +// live. "Before" is main (e396decf) drawn by the same steps: tools/review/round69-pairs.mjs reads the screenshots of this round built on main and +// writes them as pictures under assets/round-69, so each "-before" state shows main's picture of the state it names. The owner's-eye items come first. +// Synthetic content only. + +import * as React from "react"; + +import { + AppHeader, + Button, + Card, + CardContent, + Checkbox, + CodeBlock, + CommandList, + Composer, + IconButton, + Menu, + MenuCheckboxItem, + MenuContent, + MenuItem, + MenuTrigger, + MultiSelect, + NotificationCenter, + OptionChips, + Pagination, + SearchDialog, + SearchGlyph, + SearchResult, + SearchResults, + Sheet, + SheetBody, + SheetContent, + SheetHeader, + SheetTitle, + SiteHeader, + SocialLink, + SocialLinks, + StatusBar, + SwitchRow, + SwitchRowGroup, + TabBar, + TabBarItem, + TabBarMore, + Table, + TableBody, + TableCell, + TableContainer, + TableHead, + TableHeader, + TableRow, + TableRowHead, + Terminal, + TimeChart, + Drawer, + ReleaseNotes, + useToast, + HomeGlyph, + NavItem, + SettingsGlyph, + PlusGlyph, + TrashGlyph, +} from "../../packages/react/src/index"; +import type { CommandGroup, ReleaseRecord } from "../../packages/react/src/index"; +import harborData from "../changelog/fixtures/harbor/releases.json"; +import { lb, weightData } from "../../packages/react/test/fixtures/figure-data"; +import { BEFORE } from "./assets/round-69/index"; +import { Slate } from "./round68"; +import type { Round, Step } from "./rounds"; + +declare const __SKILL_PAGES__: Record; + +const col: React.CSSProperties = { display: "flex", flexDirection: "column", gap: 16, minWidth: 0 }; +const note: React.CSSProperties = { margin: 0, fontSize: 13, lineHeight: "18px", color: "var(--basalt-text-secondary)" }; + +function useTheme() { + const read = () => (typeof document === "undefined" ? "dark" : document.documentElement.getAttribute("data-theme") === "light" ? "light" : document.documentElement.getAttribute("data-theme") === "dark" ? "dark" : matchMedia("(prefers-color-scheme: light)").matches ? "light" : "dark"); + return React.useSyncExternalStore((change) => { const watch = new MutationObserver(change); watch.observe(document.documentElement, { attributes: true, attributeFilter: ["data-theme", "class"] }); return () => watch.disconnect(); }, read, () => "dark"); +} + +/** After the page has drawn, press what a state opens. */ +function usePress(selectors: string[], delay = 150) { + React.useEffect(() => { + const timer = window.setTimeout(() => { for (const s of selectors) document.querySelector(s)?.click(); }, delay); + return () => window.clearTimeout(timer); + }, [selectors.join("|"), delay]); +} + +/** Types into a field the way a reader does, so React and cmdk see it. */ +function useTyped(selector: string, text: string | null, delay = 400) { + React.useEffect(() => { + if (text === null) return undefined; + const timer = window.setTimeout(() => { + const field = document.querySelector(selector); + if (!field) return; + field.focus(); + const set = Object.getOwnPropertyDescriptor(HTMLInputElement.prototype, "value")?.set; + set?.call(field, text); + field.dispatchEvent(new Event("input", { bubbles: true })); + }, delay); + return () => window.clearTimeout(timer); + }, [selector, text, delay]); +} + +/** The clipboard answers yes (or no), so a copy state shows its glyph whatever the browser allows. */ +function useClipboard(ok: boolean) { + React.useLayoutEffect(() => { + const clip = { writeText: () => (ok ? Promise.resolve() : Promise.reject(new Error("refused"))) }; + Object.defineProperty(navigator, "clipboard", { value: clip, configurable: true }); + }, [ok]); +} + +// ---- Before: main's picture of the same state ---- + +/** Main's picture of a state, at the width and theme the page is shot at. On main itself there are none, and the part is drawn live. */ +function Before({ step, state }: { step: string; state: string }) { + const theme = useTheme(); + const width = typeof window === "undefined" ? 1440 : window.innerWidth < 720 ? 390 : window.innerWidth < 1000 ? 800 : 1440; + const key = `${step}-${state}-${width}-${theme}`; + const picture = BEFORE[key]; + if (!picture) return

No picture of main for {key} (it is drawn from this round built on main: tools/review/round69-pairs.mjs).

; + return ( +
+
Before: main (e396decf; items 11 and 14 re-shot on db0bc418; items 3, 4, 14 and round 68's changelog on 152a3248), the same state.
+ {`Main: +
+ ); +} +const HAVE_BEFORE = Object.keys(BEFORE).length > 0; +/** Each state is shot as it is now, then (where main's pictures exist) as main had it. */ +const withBefore = (states: string[]) => (HAVE_BEFORE ? [...states, ...states.map((s) => `before-${s}`)] : states); +const isBefore = (state: string) => state.startsWith("before-"); +const beforeOf = (state: string) => state.replace(/^before-/, ""); + +// ---- the parts, each in the state the decision is about ---- + +const GROUPS: CommandGroup[] = [ + { label: "Sandbox", commands: [ + { id: "new", label: "New sandbox", icon: PlusGlyph, description: "Create a fresh environment from a template", onSelect: () => {} }, + { id: "rename", label: "Rename", onSelect: () => {} }, + { id: "export", label: "Export logs", onSelect: () => {} }, + { id: "delete", label: "Delete sandbox", icon: TrashGlyph, danger: true, onSelect: () => {} }, + ] }, + { label: "Go to", commands: [ + { id: "runs", label: "Runs", onSelect: () => {} }, + { id: "settings", label: "Settings", icon: SettingsGlyph, onSelect: () => {} }, + ] }, +]; + +const RESULTS = (n: number) => Array.from({ length: n }, (_, i) => }>Result {i + 1}); + +function SearchPart({ state }: { state: string }) { + const n = state === "none" ? 0 : state === "two" ? 2 : 9; + return ( + {}} title="Search the shop" label="Search products and brands" query={state === "none" ? "zzz" : "whey"} onQueryChange={() => {}} count={n === 0 ? "Nothing found for “zzz”" : `${n} products`}> + {RESULTS(n)} + + ); +} + +const STATUS = [{ value: "ready", label: "Ready" }, { value: "building", label: "Building" }, { value: "error", label: "Error" }, { value: "queued", label: "Queued" }]; +const MANY = ["Alpha", "Beta", "Gamma", "Delta", "Epsilon", "Zeta", "Eta", "Theta"].map((l) => ({ value: l.toLowerCase(), label: l })); +function FilterPart({ state }: { state: string }) { + usePress(state === "checklist" ? [".basalt-filter-trigger"] : []); + if (state === "checklist") return
; + return ( +
+ + + s.value)} /> +
+ ); +} + +function ChartPart({ state }: { state: string }) { + const w = React.useMemo(() => weightData(28), []); + return ( +
+ {/* Owner's eye 3: four series and the hatch's key, so a gap day shows that no key moves (the pixel review's polish); hovered first, as the build hovers the first gap. */} + {state === "legend" ? ( + (v == null ? null : v + 0.6)), reasons: w.reasons }, + { id: "b", name: "Evening", values: w.values.map((v) => (v == null ? null : v + 1.1)), reasons: w.reasons }, + { id: "c", name: "Week average", values: w.values.map((v) => (v == null ? null : v - 0.4)), reasons: w.reasons }, + ]} /> + ) : null} + +
+ ); +} + +function ComposerPart({ state }: { state: string }) { + const typing = state === "typing" || state === "narrow"; + return ( +
+ {/* In a card, which says its room, so the first action hangs as the open items' ruling has it (the pixel review's polish). */} + + {}} actions={<>} status={typing ? (state === "narrow" ? "Ana, Ben, and Cy are typing" : "Ana is typing") : undefined} /> + +

What follows the composer.

+
+ ); +} + +/** The open items' ruling: a drawer, release notes and a composer have no padding of their own and hang into the room of the box they sit in. */ +function OpenItemsPart({ state }: { state: string }) { + const actions = <>; + if (state === "drawer") return
{}}>

The record's first half.

Its second half.

; + if (state === "drawer-bare") return
{}}>

A page with no padding: Back stands on the line.

; + if (state === "release") return
; + if (state === "composer-foot") return
{}} actions={actions} />
; + return
{}} actions={actions} />
; +} + +function CopyPart({ state }: { state: string }) { + useClipboard(state !== "refused"); + usePress(state === "rest" ? [] : [".basalt-terminal-copy", ".basalt-code-copy .basalt-button"], 300); + return ( +
+ + +
+ ); +} + +function CommandPart({ state }: { state: string }) { + useTyped(".basalt-command-input", state === "rest" ? null : "zzz", 700); + const list = ; + return state === "card" || state === "card-rest" ? ( +

A list inside a card.

{list}

What follows inside the card.

What follows the card.

+ ) : ( +
{list}

What follows the list on the page.

+ ); +} + +const TILE = () => ; +function ChipsPart() { + const [size, setSize] = React.useState("m"); + return ( +
+ + + Watch + Scale, no tile + + +
+ ); +} + +function CountPart() { + return
{[0, 1, 10, 99, 100].map((n) => )}
; +} + +function ToastPart({ state }: { state: string }) { + const toast = useToast(); + React.useEffect(() => { + toast.show({ title: "Saved", timeout: 0 }); + toast.show({ title: "Draft moved", description: "It is in Archive now.", action: { label: state === "go" ? "Go" : "Undo", onClick: () => {} }, timeout: 0 }); + }, [state, toast]); + return

Two toasts: a title alone, and one with a line and an action.

; +} + +function SelectColumnPart() { + return ( +
+ + + {}}>RunStatus + + {["run-0142", "run-0141", "run-0140"].map((id, i) => {id}{["Ready", "Building", "Error"][i]})} + +
+
+
+ ); +} + +function StatusBarPart({ state }: { state: string }) { + const go = state === "go" || state.startsWith("touch"); + const focus = state === "focus" || state === "touch-focus"; + return ( +
+ {go ? "Go" : "run 4f2a"}} + sources={} + end={} + /> +
+ ); +} + +function SheetPart() { + return ( + + + Your cart +

Two lines in the cart.

+
+
+ ); +} + +function SiteBarPart({ state }: { state: string }) { + usePress(state === "menu" ? [".basalt-site-menu-trigger"] : []); + return Orbit
} brandLabel="Orbit home" links={[{ href: "#a", label: "Product", current: true }, { href: "#b", label: "Pricing" }]} action={} solid />; +} + +function AppHeaderPart({ state }: { state: string }) { + return } />; +} + +function CodePart({ state }: { state: string }) { + return ( +
+ + + +
+ ); +} + +function MoreSheetPart() { + usePress([".basalt-tabbar-more"]); + return ( +
+ + Home + Runs + Settings + +
+ ); +} + +function NotificationsPart() { + return ( +
+ {}} onClearAll={() => {}} onMarkAllRead={() => {}} onViewAll={() => {}} entries={[ + { id: "1", title: "Deploy finished", description: "api, production", time: "2m ago", status: "success" }, + { id: "2", title: "Waiting on you: approve the release", time: "1h ago", status: "warning", unread: true }, + ]} /> +
+ ); +} + +function IconLinksPart() { + return ( +
+
+

Ada Byron

Writes about engines.

+ GitHubXLinkedIn +
+
+

A row with nothing round it: nothing hangs.

GitHubYouTube
+
+ ); +} + +function MenuPart() { + return ( +
+ + Options} /> + + Duplicate + No glyph + Show archived + Disabled + Delete + + +
+ ); +} + +function PagerPart() { + return
{}} compact />
; +} + +function RtlPart() { + const toast = useToast(); + React.useEffect(() => { toast.show({ title: "נשמר", description: "הטיוטה הועברה.", action: { label: "בטל", onClick: () => {} }, timeout: 0 }); }, [toast]); + return ( +
+ + + +
+ ); +} + +// ---- the HTML skill: one page of every part the decision touches, composed by the skill (main's skill on main) ---- + +function SkillFrame({ page }: { page: string }) { + const theme = useTheme(); + const source = React.useMemo(() => (__SKILL_PAGES__[page] ?? "").replace("__THEME__", theme), [page, theme]); + const [height, setHeight] = React.useState(900); + // The frame is this page's own (a srcdoc frame shares its origin), so its height is read from it directly, bounded, and no message is listened for + // (the code review's finding 8). + const measure = (frame: HTMLIFrameElement) => { + window.setTimeout(() => { + const tall = frame.contentDocument?.documentElement.scrollHeight ?? 0; + setHeight(Math.min(Math.max(Number.isFinite(tall) ? tall : 0, 640), 4000)); + }, 500); + }; + return ( + // sink: a page compose.mjs built at review-build time from this round's synthetic body (round69-skill.mjs); the frame runs the page's own script, and only its height is read back + // oxlint-disable-next-line react/iframe-missing-sandbox -- a page compose.mjs built at review-build time from a synthetic body; the frame runs the page's own script +