diff --git a/.agent/skills/basalt-html/parts/diagram-motion.js b/.agent/skills/basalt-html/parts/diagram-motion.js index e03f7ada..269fef1f 100644 --- a/.agent/skills/basalt-html/parts/diagram-motion.js +++ b/.agent/skills/basalt-html/parts/diagram-motion.js @@ -1 +1 @@ -(()=>{var T=Object.defineProperty,G=(t,i,e)=>i in t?T(t,i,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[i]=e,c=(t,i,e)=>G(t,typeof i!="symbol"?i+"":i,e);function L(t,i,e=0){const s=r=>String(Math.round(r*100)/100);let n=`M${s(t[0].x)} ${s(t[0].y)}`;for(let r=1;r`basalt-diagram-entrance:${location.pathname}#${t.id}`;function A(t){const i=t.getAttribute("data-entrance");i!=="pending"&&i!=="running"||(t.setAttribute("data-entrance","done"),t.dispatchEvent(new Event("basalt-diagram-settle")))}var m;function N(t){if(!m){const i=()=>{for(const r of m?.figs??[])r.sync()},e=()=>{for(const r of m?.figs??[])A(r.host.fig);i()},s=new IntersectionObserver(r=>{for(const h of r)for(const o of m?.figs??[])o.drawing===h.target&&o.seen(h)},{threshold:Array.from({length:21},(r,h)=>h/20)}),n=new MutationObserver(r=>{for(const h of r){if(h.target===document.documentElement){for(const o of m?.figs??[])o.holdChanged();continue}for(const o of m?.figs??[])o.host.fig===h.target&&o.traceChanged()}});n.observe(document.documentElement,{attributes:!0,attributeFilter:["data-loops"]});const a=["(prefers-reduced-motion: reduce)","(forced-colors: active)","print"].map(r=>matchMedia(r));for(const r of a)r.addEventListener("change",i);window.addEventListener("beforeprint",e),document.addEventListener("visibilitychange",i),m={figs:new Set,io:s,mo:n,media:a,onChange:i,onPrint:e}}return m.figs.add(t),t.drawing&&m.io.observe(t.drawing),m.mo.observe(t.host.fig,{attributes:!0,attributeFilter:["data-tracing","data-viewing"]}),m}function V(t){if(m&&(m.figs.delete(t),t.drawing&&m.io.unobserve(t.drawing),!m.figs.size)){m.io.disconnect(),m.mo.disconnect();for(const i of m.media)i.removeEventListener("change",m.onChange);window.removeEventListener("beforeprint",m.onPrint),document.removeEventListener("visibilitychange",m.onChange),m=void 0}}function I(t){const i=getComputedStyle(t),e=r=>i.getPropertyValue(`--basalt-${r}`).trim(),s=r=>{const h=e(r),o=parseFloat(h);return/ms$/.test(h)?o:/s$/.test(h)?o*1e3:o||0},n=r=>parseFloat(e(r))||0,a=r=>e(`ease-${r}`)||"ease";return{lineMin:s("duration-diagram-line-min"),lineMax:s("duration-diagram-line-max"),stagger:s("duration-diagram-stagger"),step:s("duration-diagram-step"),arrow:s("duration-diagram-arrow"),limit:s("duration-diagram-limit"),legMin:s("duration-diagram-leg-min"),legMax:s("duration-diagram-leg-max"),rest:s("duration-diagram-rest"),pause:s("duration-diagram-pause"),repeat:s("duration-diagram-repeat"),fast:s("duration-fast"),base:s("duration-base"),slow:s("duration-slow"),slower:s("duration-slower"),trace:n("speed-diagram-trace"),packet:n("speed-diagram-packet"),pulse:n("speed-diagram-pulse"),flow:n("speed-diagram-flow"),bead:n("size-diagram-bead"),flowPeriod:n("size-diagram-flow"),inOut:a("in-out"),out:a("out"),in:a("in")}}var P=(t,i,e)=>Math.max(i,Math.min(e,t)),R="http://www.w3.org/2000/svg",b=(t,i,e)=>{const s=document.createElementNS(R,t);for(const[n,a]of Object.entries(i))s.setAttribute(n,String(a));return e?.appendChild(s),s},$=()=>Number(document.timeline.currentTime??performance.now()),q=t=>t instanceof DOMException&&t.name==="AbortError",_={up:{x:0,y:-1},down:{x:0,y:1},left:{x:-1,y:0},right:{x:1,y:0}};function w(t,i){const e=t.pts.map(o=>({...o})),s=_[t.dir],n=e[e.length-1],a=e[e.length-2],r=Math.hypot(n.x-a.x,n.y-a.y),h=Math.min(i,Math.max(0,r-.5));return n.x-=s.x*h,n.y-=s.y*h,e}var E=t=>t.slice(1).reduce((i,e,s)=>i+Math.hypot(e.x-t[s].x,e.y-t[s].y),0),F=(t,i)=>{const e=t.map(n=>n.x),s=t.map(n=>n.y);return{l:Math.floor(Math.min(...e)-i),t:Math.floor(Math.min(...s)-i),r:Math.ceil(Math.max(...e)+i),b:Math.ceil(Math.max(...s)+i)}},D=class{constructor(t){c(this,"host"),c(this,"drawing"),c(this,"page"),c(this,"t"),c(this,"listeners",new Set),c(this,"snapshot",{canLoop:!1,runShown:!1,running:!1}),c(this,"destroyed",!1),c(this,"t0",0),c(this,"factor",1),c(this,"plans",new Map),c(this,"intro",new Set),c(this,"labels",new Set),c(this,"introEnd",null),c(this,"defs",null),c(this,"signature",""),c(this,"inView",!1),c(this,"enough",!1),c(this,"loopGen",0),c(this,"loops",new Set),c(this,"looping",!1),c(this,"flowEls",new Map),c(this,"beadEls",new Map),c(this,"dot",null),c(this,"dotOwner",null),c(this,"resumeAt",0),c(this,"resumeTimer",0),c(this,"runGen",0),c(this,"runAnims",new Set),c(this,"runAt",-1),c(this,"inFlight",!1),c(this,"waiting",!1),c(this,"lastSend",null),c(this,"arrivals",new Map),c(this,"state",()=>this.snapshot),c(this,"subscribe",i=>(this.listeners.add(i),()=>{this.listeners.delete(i)})),c(this,"destroy",()=>{if(!this.destroyed){this.destroyed=!0,this.stopRun(),this.clearLoops(),this.entrance()==="running"&&this.host.fig.setAttribute("data-entrance","done"),this.clearIntro(),this.host.fig.removeEventListener("basalt-diagram-settle",this.onSettle),clearTimeout(this.resumeTimer);for(const i of[...this.flowEls.values(),...this.beadEls.values()])i.remove();this.dot?.remove(),V(this)}}),c(this,"played",!1),c(this,"onSettle",()=>{this.played&&!this.byMode()&&this.markVisit(),this.clearIntro(),this.sync()}),c(this,"redrawn",()=>{if(this.destroyed)return;if(this.entrance()==="running"){const e=this.host.geo();if(!this.textCode())if(!e?.lines.length)this.clearIntro(),this.host.fig.setAttribute("data-entrance","done");else{const s=this.introEnd?.currentTime,n=s!=null?Number(s):$()-this.t0,a=new Set([...this.plans].filter(([,o])=>o.end<=n).map(([o])=>o)),{plans:r,factor:h}=this.plan(this.ordered(e),this.factor);for(const o of a){const l=this.plans.get(o);l&&r.set(o,l)}this.factor=h,this.plans=r,this.build(a,!1)}}this.looping&&this.clearLoops();for(const e of[...this.flowEls.values(),...this.beadEls.values()])e.remove();this.flowEls.clear(),this.beadEls.clear(),this.runAt>=0&&this.playRun(this.runAt),this.sync()}),c(this,"changed",()=>{const i=this.edgeSignature(),e=JSON.stringify([this.host.model().motion.pulse,this.host.model().motion.packet?.path,this.host.model().edges.map(s=>!!s.flow)]);i!==this.signature&&(this.signature=i,A(this.host.fig),this.stopRun()),e!==this.route&&(this.route=e,this.looping&&this.clearLoops()),this.sync()}),c(this,"route",""),c(this,"repeatGap",null),c(this,"sendValue",i=>{if(!this.lastSend){this.lastSend={v:i};return}i===void 0||i===this.lastSend.v||(this.lastSend={v:i},this.send())}),c(this,"toggleRun",()=>{if(this.runAt>=0){this.stopRun(),this.publish();return}A(this.host.fig),this.playRun(0),this.publish()}),this.host=t,this.drawing=t.fig.querySelector(`.${t.P}-drawing`),this.t=I(t.fig),this.signature=this.edgeSignature(),t.fig.addEventListener("basalt-diagram-settle",this.onSettle),this.page=N(this),this.sync()}publish(){const t=this.hasLines(),i=this.host.model(),e=this.modes(),s=i.edges.some(a=>a.flow)||!!i.motion.pulse||!!i.motion.packet?.repeat,n={canLoop:i.motion.animated&&s&&t&&!e.reduce&&!e.forced,runShown:i.motion.animated&&i.motion.run&&t,running:this.runAt>=0};if(!(n.canLoop===this.snapshot.canLoop&&n.runShown===this.snapshot.runShown&&n.running===this.snapshot.running)){this.snapshot=n;for(const a of this.listeners)a()}}modes(){return{reduce:matchMedia("(prefers-reduced-motion: reduce)").matches,forced:matchMedia("(forced-colors: active)").matches,print:matchMedia("print").matches,held:document.documentElement.getAttribute("data-loops")==="held"}}entrance(){return this.host.fig.getAttribute("data-entrance")}byMode(){const t=this.modes();return t.held||t.print||t.reduce||t.forced}markVisit(){const t=this.host.fig;if(!(!t.hasAttribute("data-first-visit")||!t.id))try{localStorage.setItem(O(t),"1")}catch{}}textCode(){return this.host.model().text?this.host.fig.querySelector(`.${this.host.P}-text[data-art] .${this.host.P}-text-ink`):null}hasLines(){return!!this.host.geo()?.lines.length||!!this.textCode()}traced(){return this.host.fig.hasAttribute("data-tracing")||this.host.fig.hasAttribute("data-viewing")}seen(t){this.inView=t.isIntersecting;const i=Math.min(t.boundingClientRect.height,window.innerHeight)*.4;this.enough=t.isIntersecting&&t.intersectionRect.height>=i-.5,this.sync()}holdChanged(){this.modes().held&&A(this.host.fig),this.sync()}traceChanged(){this.traced()?(this.stopRun(),clearTimeout(this.resumeTimer),this.resumeAt=1/0):this.resumeAt===1/0&&(this.resumeAt=$()+this.t.pause,clearTimeout(this.resumeTimer),this.resumeTimer=window.setTimeout(()=>{this.resumeAt=0,this.sync()},this.t.pause)),this.sync()}sync(){if(this.destroyed)return;const t=this.host.fig,i=this.host.model(),e=this.modes(),s=this.entrance();(s==="pending"||s==="running")&&(e.held||e.print||e.reduce||e.forced)?A(t):s==="pending"&&this.enough&&!document.hidden&&this.hasLines()&&this.play(),!s&&this.enough&&this.hasLines()&&t.setAttribute("data-entrance","done"),this.syncLoops(i,e),this.publish()}ordered(t){const i=this.host.model(),e=[...t.lines];return i.type==="schema"?e.sort((s,n)=>s.pts[0].y-n.pts[0].y||s.pts[0].x-n.pts[0].x||s.i-n.i):e.sort((s,n)=>s.i-n.i),e}plan(t,i){const e=this.t,s=this.host.model().type==="sequence",n=s?e.step:e.stagger,a=t.map(o=>{const l=this.lineEl(o)?.querySelector(`.${this.host.P}-line`),d=l?l.getTotalLength():E(o.pts),p=s?e.arrow:P(d/e.trace*1e3,e.lineMin,e.lineMax),u=s?e.base:0;return{lead:u,dur:p,tail:u+Math.max(p,.85*p+e.slow,s?e.slower:0)}});let r=1;if(n>0)for(let o=1;o{const d=l*n*r;h.set(o.i,{start:d+a[l].lead,dur:a[l].dur,end:d+a[l].tail})}),{plans:h,factor:r}}lineEl(t){return this.host.fig.querySelector(`.${this.host.P}-edge[data-edge="${t.i}"]`)}play(){if(this.textCode()){this.playText();return}const t=this.host.geo();if(!t?.lines.length)return;this.host.fig.setAttribute("data-entrance","running"),this.played=!0,this.t0=$();const{plans:i,factor:e}=this.plan(this.ordered(t));this.factor=e,this.plans=i,this.build(new Set,!0)}build(t,i){const e=this.host.geo(),s=this.host.fig,{P:n}=this.host,a=this.t;if(!e)return;const r=this.introEnd?.playState==="paused"&&this.introEnd.currentTime!==null?Number(this.introEnd.currentTime):null;for(const u of this.intro)u.cancel();this.intro.clear(),this.defs?.remove();const h=s.querySelector(`.${n}-ink`),o=h?.querySelector(`.${n}-svg`);if(!h||!o)return;this.defs=b("svg",{class:`${n}-motion-defs`,width:0,height:0,"aria-hidden":"true",focusable:"false"}),o.after(this.defs);const l=b("defs",{},this.defs),d=(u,g=this.intro)=>(r===null?u.startTime=this.t0:(u.pause(),u.currentTime=r),g.add(u),u);let p=0;for(const u of e.lines){const g=this.plans.get(u.i),f=this.lineEl(u);if(!g||!f)continue;if(p=Math.max(p,g.end),t.has(u.i)){f.removeAttribute("mask");continue}const M=`${this.host.base}-reveal-${u.i}`,v=b("mask",{id:M,maskUnits:"userSpaceOnUse",x:-e.w,y:-e.h,width:3*e.w,height:3*e.h},l),S=f.querySelector(`.${n}-line`);if(S){const y=S.getTotalLength(),C=b("path",{d:S.getAttribute("d")??"",fill:"none",stroke:"#fff","stroke-width":u.width+6,"stroke-dasharray":`${y} ${y+8}`,"stroke-dashoffset":y},v);d(C.animate([{strokeDashoffset:`${y}px`},{strokeDashoffset:"0px"}],{duration:g.dur,delay:g.start,easing:a.inOut,fill:"both"}))}const k=f.querySelector(`.${n}-tip`);if(k){const y=b("path",{d:k.getAttribute("d")??"",fill:"#fff",stroke:"#fff","stroke-width":3,"stroke-linejoin":"round"},v);d(y.animate([{opacity:0},{opacity:1}],{duration:a.slow,delay:g.start+.85*g.dur,easing:a.out,fill:"both"}))}const x=f.querySelector(`.${n}-dot`);if(x){const y=b("circle",{cx:x.getAttribute("cx")??0,cy:x.getAttribute("cy")??0,r:Number(x.getAttribute("r")??3)+1,fill:"#fff"},v);d(y.animate([{opacity:0},{opacity:1}],{duration:a.fast,delay:g.start,easing:a.out,fill:"both"}))}f.querySelectorAll(`.${n}-crow, .${n}-ring`).forEach(y=>{const z=y.tagName.toLowerCase()==="circle"?b("circle",{cx:y.getAttribute("cx")??0,cy:y.getAttribute("cy")??0,r:Number(y.getAttribute("r")??3)+1,fill:"#fff"},v):b("path",{d:y.getAttribute("d")??"",fill:"none",stroke:"#fff","stroke-width":3},v),H=y.getAttribute("data-end")==="from";d(z.animate([{opacity:0},{opacity:1}],H?{duration:a.fast,delay:g.start,easing:a.out,fill:"both"}:{duration:a.slow,delay:g.start+.85*g.dur,easing:a.out,fill:"both"}))}),f.setAttribute("mask",`url(#${M})`)}if(i&&this.host.model().type==="sequence"){const u=getComputedStyle(s),g=u.getPropertyValue("--basalt-text-secondary").trim(),f=u.getPropertyValue("--basalt-text-primary").trim(),M=s.querySelectorAll(`.${n}-msg`);this.ordered(e).forEach((v,S)=>{const k=M[S]?.querySelector(`.${n}-mlabel`),x=this.plans.get(v.i);k&&x&&g&&f&&d(k.animate([{color:g},{color:f}],{duration:a.slower,delay:x.start-a.base,easing:a.out,fill:"both"}),this.labels)})}this.introEnd?.cancel(),this.introEnd=d(s.animate([],{duration:Math.max(1,p)}),new Set),this.introEnd.finished.then(()=>this.finishIntro(),()=>{})}finishIntro(){this.entrance()==="running"&&(this.markVisit(),this.host.fig.setAttribute("data-entrance","done"),this.clearIntro(),this.sync())}playText(){const t=this.textCode();if(!t)return;const i=this.host.fig,e=this.t;i.setAttribute("data-entrance","running"),this.played=!0,this.t0=$();const s=[...t.querySelectorAll("[data-n]")],n=Math.max(0,...s.map(l=>Number(l.dataset.n))),a=n>1?Math.min(e.step,(e.limit-e.slower)/(n-1)):0,r=getComputedStyle(i),h=r.getPropertyValue("--basalt-text-secondary").trim(),o=r.getPropertyValue("--basalt-text-tertiary").trim();for(const l of s){const d=Number(l.dataset.n);l.querySelectorAll('[data-ink="label"], [data-ink="main"], [data-ink="plain"]').forEach(p=>{const u=p.dataset.ink==="label"?h:o,g=p.animate([{color:u},{color:u,offset:.001},{color:getComputedStyle(p).color}],{duration:e.slower,delay:(d-1)*a,easing:"ease-out",fill:"backwards"});g.startTime=this.t0,this.intro.add(g)})}this.introEnd?.cancel(),this.introEnd=i.animate([],{duration:Math.max(1,(n-1)*a+e.slower)}),this.introEnd.startTime=this.t0,this.introEnd.finished.then(()=>this.finishIntro(),()=>{})}clearIntro(){for(const t of[...this.intro,...this.labels])t.cancel();this.intro.clear(),this.labels.clear(),this.introEnd?.cancel(),this.introEnd=null,this.defs?.remove(),this.defs=null,this.host.fig.querySelectorAll(`.${this.host.P}-edge[mask]`).forEach(t=>t.removeAttribute("mask"))}edgeSignature(){const t=this.host.model();return(t.type==="sequence"?t.steps.flatMap(e=>"n"in e?[`${e.from}>${e.to}:${e.kind}`]:[]):t.edges.map(e=>`${e.from}>${e.to}:${e.kind}`)).join("|")}syncLoops(t,i){const e=this.entrance()==="done";if(!t.motion.animated||!e||!this.hasLines()||i.reduce||i.forced||i.print||i.held||this.traced()||$(){}):t.motion.packet?.repeat&&this.repeat(e,t.motion.packet.path).catch(()=>{})}clearLoops(){this.looping=!1,this.loopGen++;for(const t of this.loops)t.cancel();this.loops.clear();for(const t of[...this.flowEls.values(),...this.beadEls.values()])t.style.display="none";this.dotOwner==="loop"&&this.dot&&(this.dot.style.display="none",this.dotOwner=null),this.runAt<0&&this.dotOwner!=="run"&&this.clearArrivals()}track(t,i){i.add(t);const e=()=>{i.delete(t)};return t.finished.then(e,e),i===this.loops&&(!this.inView||document.hidden)&&t.pause(),t}wait(t,i){return this.track(this.host.fig.animate([],{duration:Math.max(1,t)}),i).finished.then(e=>{e.cancel()})}overlay(t,i,e){const s=this.host.fig.querySelector(`.${this.host.P}-ink`),n=s?.querySelector(`.${this.host.P}-svg`);if(!s||!n)return null;const a=this.host.tokens(),r=w(t,a?.head??8),h=F(r,i),o=b("svg",{class:`${this.host.P}-${e}`,width:h.r-h.l,height:h.b-h.t,viewBox:`${h.l} ${h.t} ${h.r-h.l} ${h.b-h.t}`,"aria-hidden":"true",focusable:"false"});o.style.left=`${h.l}px`,o.style.top=`${h.t}px`;let d=this.defs??n;for(;d.nextElementSibling&&!d.nextElementSibling.classList.contains(`${this.host.P}-label`);)d=d.nextElementSibling;return d.after(o),{svg:o,d:L(r,t.from===t.to?a?.radiusXs??4:a?.radius??8),pts:r}}visible(t,i){const e=this.host.geo();let s=0;for(const n of e?.labels??[])if(n.i===t.i&&n.on){const a=(n.box.t+n.box.b)/2,r=i.some((h,o)=>o>0&&Math.abs(h.y-i[o-1].y)<.5&&Math.abs(a-h.y)<1.5);s+=r?n.box.r-n.box.l:n.box.b-n.box.t}return E(i)-s}flow(t,i){const e=t.lines.find(h=>h.i===i);if(!e)return;const s=this.host.tokens();if(e.kind==="dashed"){if(this.visible(e,w(e,s?.head??8))<48)return;const h=this.host.fig.querySelector(`.${this.host.P}-edge[data-edge="${i}"] .${this.host.P}-line`);if(!h)return;const o=(s?.dash??6)+(s?.dashGap??4);this.track(h.animate([{strokeDashoffset:"0px"},{strokeDashoffset:`${-o}px`}],{duration:o/this.t.flow*1e3,iterations:1/0,easing:"linear"}),this.loops);return}let n=this.flowEls.get(i);if(n&&!n.isConnected&&(this.flowEls.delete(i),n=void 0),!n){const h=s?.space("1")??4,o=this.overlay({...e,pts:w(e,h)},e.width+2,"flow");if(!o)return;if(this.visible(e,w(e,s?.head??8))<48){o.svg.remove();return}const l=s?.cut??2;b("path",{d:o.d,"stroke-width":e.width+2,"stroke-dasharray":`${l} ${this.t.flowPeriod-l}`},o.svg),n=o.svg,this.flowEls.set(i,n)}n.style.display="";const a=n.firstElementChild,r=this.t.flowPeriod;this.track(a.animate([{strokeDashoffset:"0px"},{strokeDashoffset:`${-r}px`}],{duration:r/this.t.flow*1e3,iterations:1/0,easing:"linear"}),this.loops)}edgeFor(t,i){const s=this.host.model().edges.find(n=>n.from===t&&n.to===i);return s?this.host.geo()?.lines.find(n=>n.i===s.i):void 0}node(t){return this.host.fig.querySelector(`.${this.host.P}-node[data-node="${CSS.escape(t)}"]`)}arrive(t){!t||this.traced()||(clearTimeout(this.arrivals.get(t)),t.removeAttribute("data-arrival-out"),t.setAttribute("data-arrival",""))}depart(t){!t||!t.hasAttribute("data-arrival")||(t.removeAttribute("data-arrival"),t.setAttribute("data-arrival-out",""),this.arrivals.set(t,window.setTimeout(()=>{t.removeAttribute("data-arrival-out"),this.arrivals.delete(t)},this.t.slower*.75)))}clearArrivals(){this.host.fig.querySelectorAll("[data-arrival], [data-arrival-out]").forEach(t=>{t.removeAttribute("data-arrival"),t.removeAttribute("data-arrival-out")});for(const t of this.arrivals.values())clearTimeout(t);this.arrivals.clear()}async pulse(t,i){const e=this.host.tokens();for(;t===this.loopGen;){for(let s=1;st===this.loopGen;try{for(;e();){this.inFlight=!0,this.waiting=!1;try{await this.packetRun(i,this.loops,e)}finally{this.inFlight=!1}if(!e())return;if(this.waiting)continue;const s=this.track(this.host.fig.animate([],{duration:Math.max(1,this.t.repeat)}),this.loops);this.repeatGap=s;try{await s.finished}finally{this.repeatGap===s&&(this.repeatGap=null),s.cancel()}}}finally{!e()&&!this.looping&&(this.waiting=!1)}}send(){const t=this.host.model(),i=t.motion.packet?.path;if(!t.motion.animated||!i||!this.hasLines())return;if(this.inFlight){this.waiting=!0;return}const e=this.modes();if(e.held||e.reduce){const n=this.node(i[i.length-1]);this.arrive(n),this.wait(this.t.rest,this.runAnims).then(()=>this.depart(n),()=>this.depart(n));return}if(this.looping&&t.motion.packet?.repeat){this.waiting=!0,this.repeatGap?.finish();return}this.inFlight=!0;const s=++this.runGen;this.packetRun(i,this.runAnims,()=>s===this.runGen).catch(n=>{if(!q(n))throw n}).finally(()=>{this.inFlight=!1,this.waiting&&s===this.runGen&&(this.waiting=!1,this.send())})}quiet(t,i){const e=this.host.P,s=this.host.fig,n=s.querySelectorAll(`.${e}-msg`);i.forEach((a,r)=>{const h=t>=0&&r>t;n[r]?.toggleAttribute("data-ahead",h),s.querySelector(`.${e}-edge[data-edge="${a.i}"]`)?.toggleAttribute("data-ahead",h)})}stopRun(){this.runGen++,this.runAt=-1,this.host.fig.querySelectorAll("[data-ahead]").forEach(t=>t.removeAttribute("data-ahead"));for(const t of this.runAnims)t.cancel();this.runAnims.clear(),this.dot&&this.dotOwner==="run"&&(this.dot.style.display="none",this.dotOwner=null),this.looping||(this.inFlight=!1),this.looping?this.host.fig.querySelectorAll(`.${this.host.P}-msg[data-arrival]`).forEach(t=>t.removeAttribute("data-arrival")):this.clearArrivals()}playRun(t){if(this.textCode()){this.playTextRun(t);return}const i=this.host.geo();if(!i?.lines.length)return;for(const h of this.runAnims)h.cancel();this.runAnims.clear();const e=++this.runGen,s=()=>e===this.runGen,n=this.ordered(i),a=this.host.fig.querySelectorAll(`.${this.host.P}-msg`);this.runAt=t,(async()=>{for(let h=t;h{if(!q(h))throw h})}playTextRun(t){const i=this.textCode();if(!i)return;for(const o of this.runAnims)o.cancel();this.runAnims.clear();const e=++this.runGen,s=()=>e===this.runGen,n=[...i.querySelectorAll("[data-n]")],a=Math.max(0,...n.map(o=>Number(o.dataset.n))),r=o=>{for(const l of n)l.toggleAttribute("data-ahead",o>=0&&Number(l.dataset.n)>o)};this.runAt=t,(async()=>{for(let o=t;oNumber(d.dataset.n)===o+1);if(await this.wait(this.t.legMin+this.t.base,this.runAnims),!s())return;for(const d of l)d.setAttribute("data-arrival","");await this.wait(this.t.rest,this.runAnims);for(const d of l)d.removeAttribute("data-arrival")}s()&&(this.runAt=-1,r(-1),this.publish())})().catch(o=>{if(!q(o))throw o})}};function B(t){const i=[],e=[],{pulse:s,packet:n}=t.motion;s&&n&&i.push("a figure names both a pulse and a packet: it has one mover at most");const a=s??n?.path,r=s?"pulse":"packet",h=new Set;if(a){for(const o of a)t.byId.has(o)||i.push(`the ${r} names ${o}, which is not a node`);for(let o=1;od.from===a[o-1]&&d.to===a[o]);l?h.add(l.i):i.push(`the ${r} goes from ${a[o-1]} to ${a[o]}, and no line joins them in that direction`)}}for(const o of t.edges)o.flow&&(h.has(o.i)&&i.push(`the line from ${o.from} to ${o.to} flows and is on the ${r}'s route: flow never runs on a line the mover travels`),o.label||e.push(`the line from ${o.from} to ${o.to} flows but has no label: motion never carries a fact alone, so its label says it is a stream`));return{errors:i,warnings:e}}function j(t){return new D(t)}(function(t){"use strict";var i=t._;function e(s,n,a){var r=document.createElement("button");return r.type="button",r.className="btn "+s,r.setAttribute("data-variant","secondary"),r.setAttribute("data-size","sm"),a&&a(r),r.appendChild(document.createTextNode(n)),r}i.diagramMotion=function(s,n,a){var r=B(n.model());r.errors.forEach(function(f){console.error("Basalt diagram: "+f)}),r.warnings.forEach(function(f){console.warn("Basalt diagram: "+f)});var h=j(n),o=s.querySelector(".diagram-foot"),l=null,d=null;o&&(l=e("diagram-play","Play the run"),l.addEventListener("click",function(){h.toggleRun()}),d=e("diagram-pause","Pause animations",function(f){f.setAttribute("data-loops-toggle",""),f.setAttribute("aria-pressed",String(!!(t.loops&&t.loops.held()))),f.insertAdjacentHTML("beforeend",'")}),l.hidden=d.hidden=!0,o.appendChild(l),o.appendChild(d));function p(){var f=h.state();l&&(l.hidden=!f.runShown,l.lastChild.textContent=f.running?"Stop the run":"Play the run"),d&&(d.hidden=!f.canLoop,d.setAttribute("aria-pressed",String(!!(t.loops&&t.loops.held()))))}var u=h.subscribe(p);p();var g=a&&a.packet?a.packet.send:void 0;return h.sendValue("__diagramSend"in s?s.__diagramSend:g),h.sendValue(g),s.__diagramSend=g,{redrawn:h.redrawn,sendValue:function(f){h.sendValue(f),s.__diagramSend=f},destroy:function(){u(),h.destroy(),l&&l.remove(),d&&d.remove()}}}})(window.Basalt)})(); +(()=>{var T=Object.defineProperty,G=(t,i,e)=>i in t?T(t,i,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[i]=e,c=(t,i,e)=>G(t,typeof i!="symbol"?i+"":i,e);function L(t,i,e=0){const s=r=>String(Math.round(r*100)/100);let n=`M${s(t[0].x)} ${s(t[0].y)}`;for(let r=1;r`basalt-diagram-entrance:${location.pathname}#${t.id}`;function A(t){const i=t.getAttribute("data-entrance");i!=="pending"&&i!=="running"||(t.setAttribute("data-entrance","done"),t.dispatchEvent(new Event("basalt-diagram-settle")))}var m;function N(t){if(!m){const i=()=>{for(const r of m?.figs??[])r.sync()},e=()=>{for(const r of m?.figs??[])A(r.host.fig);i()},s=new IntersectionObserver(r=>{for(const h of r)for(const o of m?.figs??[])o.drawing===h.target&&o.seen(h)},{threshold:Array.from({length:21},(r,h)=>h/20)}),n=new MutationObserver(r=>{for(const h of r){if(h.target===document.documentElement){for(const o of m?.figs??[])o.holdChanged();continue}for(const o of m?.figs??[])o.host.fig===h.target&&o.traceChanged()}});n.observe(document.documentElement,{attributes:!0,attributeFilter:["data-loops"]});const a=["(prefers-reduced-motion: reduce)","(forced-colors: active)","print"].map(r=>matchMedia(r));for(const r of a)r.addEventListener("change",i);window.addEventListener("beforeprint",e),document.addEventListener("visibilitychange",i),m={figs:new Set,io:s,mo:n,media:a,onChange:i,onPrint:e}}return m.figs.add(t),t.drawing&&m.io.observe(t.drawing),m.mo.observe(t.host.fig,{attributes:!0,attributeFilter:["data-tracing","data-viewing"]}),m}function V(t){if(m&&(m.figs.delete(t),t.drawing&&m.io.unobserve(t.drawing),!m.figs.size)){m.io.disconnect(),m.mo.disconnect();for(const i of m.media)i.removeEventListener("change",m.onChange);window.removeEventListener("beforeprint",m.onPrint),document.removeEventListener("visibilitychange",m.onChange),m=void 0}}function I(t){const i=getComputedStyle(t),e=r=>i.getPropertyValue(`--basalt-${r}`).trim(),s=r=>{const h=e(r),o=parseFloat(h);return/ms$/.test(h)?o:/s$/.test(h)?o*1e3:o||0},n=r=>parseFloat(e(r))||0,a=r=>e(`ease-${r}`)||"ease";return{lineMin:s("duration-diagram-line-min"),lineMax:s("duration-diagram-line-max"),stagger:s("duration-diagram-stagger"),step:s("duration-diagram-step"),arrow:s("duration-diagram-arrow"),limit:s("duration-diagram-limit"),legMin:s("duration-diagram-leg-min"),legMax:s("duration-diagram-leg-max"),rest:s("duration-diagram-rest"),pause:s("duration-diagram-pause"),repeat:s("duration-diagram-repeat"),fast:s("duration-fast"),base:s("duration-base"),slow:s("duration-slow"),slower:s("duration-slower"),trace:n("speed-diagram-trace"),packet:n("speed-diagram-packet"),pulse:n("speed-diagram-pulse"),flow:n("speed-diagram-flow"),bead:n("size-diagram-bead"),flowPeriod:n("size-diagram-flow"),inOut:a("in-out"),out:a("out"),in:a("in")}}var P=(t,i,e)=>Math.max(i,Math.min(e,t)),R="http://www.w3.org/2000/svg",b=(t,i,e)=>{const s=document.createElementNS(R,t);for(const[n,a]of Object.entries(i))s.setAttribute(n,String(a));return e?.appendChild(s),s},$=()=>Number(document.timeline.currentTime??performance.now()),q=t=>t instanceof DOMException&&t.name==="AbortError",_={up:{x:0,y:-1},down:{x:0,y:1},left:{x:-1,y:0},right:{x:1,y:0}};function w(t,i){const e=t.pts.map(o=>({...o})),s=_[t.dir],n=e[e.length-1],a=e[e.length-2],r=Math.hypot(n.x-a.x,n.y-a.y),h=Math.min(i,Math.max(0,r-.5));return n.x-=s.x*h,n.y-=s.y*h,e}var E=t=>t.slice(1).reduce((i,e,s)=>i+Math.hypot(e.x-t[s].x,e.y-t[s].y),0),F=(t,i)=>{const e=t.map(n=>n.x),s=t.map(n=>n.y);return{l:Math.floor(Math.min(...e)-i),t:Math.floor(Math.min(...s)-i),r:Math.ceil(Math.max(...e)+i),b:Math.ceil(Math.max(...s)+i)}},D=class{constructor(t){c(this,"host"),c(this,"drawing"),c(this,"page"),c(this,"t"),c(this,"listeners",new Set),c(this,"snapshot",{canLoop:!1,runShown:!1,running:!1}),c(this,"destroyed",!1),c(this,"t0",0),c(this,"factor",1),c(this,"plans",new Map),c(this,"intro",new Set),c(this,"labels",new Set),c(this,"introEnd",null),c(this,"defs",null),c(this,"signature",""),c(this,"inView",!1),c(this,"enough",!1),c(this,"loopGen",0),c(this,"loops",new Set),c(this,"looping",!1),c(this,"flowEls",new Map),c(this,"beadEls",new Map),c(this,"dot",null),c(this,"dotOwner",null),c(this,"resumeAt",0),c(this,"resumeTimer",0),c(this,"runGen",0),c(this,"runAnims",new Set),c(this,"runAt",-1),c(this,"inFlight",!1),c(this,"waiting",!1),c(this,"lastSend",null),c(this,"arrivals",new Map),c(this,"state",()=>this.snapshot),c(this,"subscribe",i=>(this.listeners.add(i),()=>{this.listeners.delete(i)})),c(this,"destroy",()=>{if(!this.destroyed){this.destroyed=!0,this.stopRun(),this.clearLoops(),this.entrance()==="running"&&this.host.fig.setAttribute("data-entrance","done"),this.clearIntro(),this.host.fig.removeEventListener("basalt-diagram-settle",this.onSettle),clearTimeout(this.resumeTimer);for(const i of[...this.flowEls.values(),...this.beadEls.values()])i.remove();this.dot?.remove(),V(this)}}),c(this,"played",!1),c(this,"onSettle",()=>{this.played&&!this.byMode()&&this.markVisit(),this.clearIntro(),this.sync()}),c(this,"redrawn",()=>{if(this.destroyed)return;if(this.entrance()==="running"){const e=this.host.geo();if(!this.textCode())if(!e?.lines.length)this.clearIntro(),this.host.fig.setAttribute("data-entrance","done");else{const s=this.introEnd?.currentTime,n=s!=null?Number(s):$()-this.t0,a=new Set([...this.plans].filter(([,o])=>o.end<=n).map(([o])=>o)),{plans:r,factor:h}=this.plan(this.ordered(e),this.factor);for(const o of a){const l=this.plans.get(o);l&&r.set(o,l)}this.factor=h,this.plans=r,this.build(a,!1)}}this.looping&&this.clearLoops();for(const e of[...this.flowEls.values(),...this.beadEls.values()])e.remove();this.flowEls.clear(),this.beadEls.clear(),this.runAt>=0&&this.playRun(this.runAt),this.sync()}),c(this,"changed",()=>{const i=this.edgeSignature(),e=JSON.stringify([this.host.model().motion.pulse,this.host.model().motion.packet?.path,this.host.model().edges.map(s=>!!s.flow)]);i!==this.signature&&(this.signature=i,A(this.host.fig),this.stopRun()),e!==this.route&&(this.route=e,this.looping&&this.clearLoops()),this.sync()}),c(this,"route",""),c(this,"repeatGap",null),c(this,"sendValue",i=>{if(!this.lastSend){this.lastSend={v:i};return}i===void 0||i===this.lastSend.v||(this.lastSend={v:i},this.send())}),c(this,"toggleRun",()=>{if(this.runAt>=0){this.stopRun(),this.publish();return}A(this.host.fig),this.playRun(0),this.publish()}),this.host=t,this.drawing=t.fig.querySelector(`.${t.P}-drawing`),this.t=I(t.fig),this.signature=this.edgeSignature(),t.fig.addEventListener("basalt-diagram-settle",this.onSettle),this.page=N(this),this.sync()}publish(){const t=this.hasLines(),i=this.host.model(),e=this.modes(),s=i.edges.some(a=>a.flow)||!!i.motion.pulse||!!i.motion.packet?.repeat,n={canLoop:i.motion.animated&&s&&t&&!e.reduce&&!e.forced,runShown:i.motion.animated&&i.motion.run&&t,running:this.runAt>=0};if(!(n.canLoop===this.snapshot.canLoop&&n.runShown===this.snapshot.runShown&&n.running===this.snapshot.running)){this.snapshot=n;for(const a of this.listeners)a()}}modes(){return{reduce:matchMedia("(prefers-reduced-motion: reduce)").matches,forced:matchMedia("(forced-colors: active)").matches,print:matchMedia("print").matches,held:document.documentElement.getAttribute("data-loops")==="held"}}entrance(){return this.host.fig.getAttribute("data-entrance")}byMode(){const t=this.modes();return t.held||t.print||t.reduce||t.forced}markVisit(){const t=this.host.fig;if(!(!t.hasAttribute("data-first-visit")||!t.id))try{localStorage.setItem(O(t),"1")}catch{}}textCode(){return this.host.model().text?this.host.fig.querySelector(`.${this.host.P}-text[data-art] .${this.host.P}-text-ink`):null}hasLines(){return!!this.host.geo()?.lines.length||!!this.textCode()}traced(){return this.host.fig.hasAttribute("data-tracing")||this.host.fig.hasAttribute("data-viewing")}seen(t){this.inView=t.isIntersecting;const i=Math.min(t.boundingClientRect.height,window.innerHeight)*.4;this.enough=t.isIntersecting&&t.intersectionRect.height>=i-.5,this.sync()}holdChanged(){this.modes().held&&A(this.host.fig),this.sync()}traceChanged(){this.traced()?(this.stopRun(),clearTimeout(this.resumeTimer),this.resumeAt=1/0):this.resumeAt===1/0&&(this.resumeAt=$()+this.t.pause,clearTimeout(this.resumeTimer),this.resumeTimer=window.setTimeout(()=>{this.resumeAt=0,this.sync()},this.t.pause)),this.sync()}sync(){if(this.destroyed)return;const t=this.host.fig,i=this.host.model(),e=this.modes(),s=this.entrance();(s==="pending"||s==="running")&&(e.held||e.print||e.reduce||e.forced)?A(t):s==="pending"&&this.enough&&!document.hidden&&this.hasLines()&&this.play(),!s&&this.enough&&this.hasLines()&&t.setAttribute("data-entrance","done"),this.syncLoops(i,e),this.publish()}ordered(t){const i=this.host.model(),e=[...t.lines];return i.type==="schema"?e.sort((s,n)=>s.pts[0].y-n.pts[0].y||s.pts[0].x-n.pts[0].x||s.i-n.i):e.sort((s,n)=>s.i-n.i),e}plan(t,i){const e=this.t,s=this.host.model().type==="sequence",n=s?e.step:e.stagger,a=t.map(o=>{const l=this.lineEl(o)?.querySelector(`.${this.host.P}-line`),d=l?l.getTotalLength():E(o.pts),p=s?e.arrow:P(d/e.trace*1e3,e.lineMin,e.lineMax),u=s?e.base:0;return{lead:u,dur:p,tail:u+Math.max(p,.85*p+e.slow,s?e.slower:0)}});let r=1;if(n>0)for(let o=1;o{const d=l*n*r;h.set(o.i,{start:d+a[l].lead,dur:a[l].dur,end:d+a[l].tail})}),{plans:h,factor:r}}lineEl(t){return this.host.fig.querySelector(`.${this.host.P}-edge[data-edge="${t.i}"]`)}play(){if(this.textCode()){this.playText();return}const t=this.host.geo();if(!t?.lines.length)return;this.host.fig.setAttribute("data-entrance","running"),this.played=!0,this.t0=$();const{plans:i,factor:e}=this.plan(this.ordered(t));this.factor=e,this.plans=i,this.build(new Set,!0)}build(t,i){const e=this.host.geo(),s=this.host.fig,{P:n}=this.host,a=this.t;if(!e)return;const r=this.introEnd?.playState==="paused"&&this.introEnd.currentTime!==null?Number(this.introEnd.currentTime):null;for(const u of this.intro)u.cancel();this.intro.clear(),this.defs?.remove();const h=s.querySelector(`.${n}-ink`),o=h?.querySelector(`.${n}-svg`);if(!h||!o)return;this.defs=b("svg",{class:`${n}-motion-defs`,width:0,height:0,"aria-hidden":"true",focusable:"false"}),o.after(this.defs);const l=b("defs",{},this.defs),d=(u,g=this.intro)=>(r===null?u.startTime=this.t0:(u.pause(),u.currentTime=r),g.add(u),u);let p=0;for(const u of e.lines){const g=this.plans.get(u.i),f=this.lineEl(u);if(!g||!f)continue;if(p=Math.max(p,g.end),t.has(u.i)){f.removeAttribute("mask");continue}const M=`${this.host.base}-reveal-${u.i}`,v=b("mask",{id:M,maskUnits:"userSpaceOnUse",x:-e.w,y:-e.h,width:3*e.w,height:3*e.h},l),S=f.querySelector(`.${n}-line`);if(S){const y=S.getTotalLength(),C=b("path",{d:S.getAttribute("d")??"",fill:"none",stroke:"#fff","stroke-width":u.width+6,"stroke-dasharray":`${y} ${y+8}`,"stroke-dashoffset":y},v);d(C.animate([{strokeDashoffset:`${y}px`},{strokeDashoffset:"0px"}],{duration:g.dur,delay:g.start,easing:a.inOut,fill:"both"}))}const k=f.querySelector(`.${n}-tip`);if(k){const y=b("path",{d:k.getAttribute("d")??"",fill:"#fff",stroke:"#fff","stroke-width":3,"stroke-linejoin":"round"},v);d(y.animate([{opacity:0},{opacity:1}],{duration:a.slow,delay:g.start+.85*g.dur,easing:a.out,fill:"both"}))}const x=f.querySelector(`.${n}-dot`);if(x){const y=b("circle",{cx:x.getAttribute("cx")??0,cy:x.getAttribute("cy")??0,r:Number(x.getAttribute("r")??3)+1,fill:"#fff"},v);d(y.animate([{opacity:0},{opacity:1}],{duration:a.fast,delay:g.start,easing:a.out,fill:"both"}))}f.querySelectorAll(`.${n}-crow, .${n}-ring`).forEach(y=>{const z=y.tagName.toLowerCase()==="circle"?b("circle",{cx:y.getAttribute("cx")??0,cy:y.getAttribute("cy")??0,r:Number(y.getAttribute("r")??3)+1,fill:"#fff"},v):b("path",{d:y.getAttribute("d")??"",fill:"none",stroke:"#fff","stroke-width":3},v),H=y.getAttribute("data-end")==="from";d(z.animate([{opacity:0},{opacity:1}],H?{duration:a.fast,delay:g.start,easing:a.out,fill:"both"}:{duration:a.slow,delay:g.start+.85*g.dur,easing:a.out,fill:"both"}))}),f.setAttribute("mask",`url(#${M})`)}if(i&&this.host.model().type==="sequence"){const u=getComputedStyle(s),g=u.getPropertyValue("--basalt-text-secondary").trim(),f=u.getPropertyValue("--basalt-text-primary").trim(),M=s.querySelectorAll(`.${n}-msg`);this.ordered(e).forEach((v,S)=>{const k=M[S]?.querySelector(`.${n}-mlabel`),x=this.plans.get(v.i);k&&x&&g&&f&&d(k.animate([{color:g},{color:f}],{duration:a.slower,delay:x.start-a.base,easing:a.out,fill:"both"}),this.labels)})}this.introEnd?.cancel(),this.introEnd=d(s.animate([],{duration:Math.max(1,p)}),new Set),this.introEnd.finished.then(()=>this.finishIntro(),()=>{})}finishIntro(){this.entrance()==="running"&&(this.markVisit(),this.host.fig.setAttribute("data-entrance","done"),this.clearIntro(),this.sync())}playText(){const t=this.textCode();if(!t)return;const i=this.host.fig,e=this.t;i.setAttribute("data-entrance","running"),this.played=!0,this.t0=$();const s=[...t.querySelectorAll("[data-n]")],n=Math.max(0,...s.map(l=>Number(l.dataset.n))),a=n>1?Math.min(e.step,(e.limit-e.slower)/(n-1)):0,r=getComputedStyle(i),h=r.getPropertyValue("--basalt-text-secondary").trim(),o=r.getPropertyValue("--basalt-text-tertiary").trim();for(const l of s){const d=Number(l.dataset.n);l.querySelectorAll('[data-ink="label"], [data-ink="main"], [data-ink="plain"]').forEach(p=>{const u=p.dataset.ink==="label"?h:o,g=p.animate([{color:u},{color:u,offset:.001},{color:getComputedStyle(p).color}],{duration:e.slower,delay:(d-1)*a,easing:"ease-out",fill:"backwards"});g.startTime=this.t0,this.intro.add(g)})}this.introEnd?.cancel(),this.introEnd=i.animate([],{duration:Math.max(1,(n-1)*a+e.slower)}),this.introEnd.startTime=this.t0,this.introEnd.finished.then(()=>this.finishIntro(),()=>{})}clearIntro(){for(const t of[...this.intro,...this.labels])t.cancel();this.intro.clear(),this.labels.clear(),this.introEnd?.cancel(),this.introEnd=null,this.defs?.remove(),this.defs=null,this.host.fig.querySelectorAll(`.${this.host.P}-edge[mask]`).forEach(t=>t.removeAttribute("mask"))}edgeSignature(){const t=this.host.model();return(t.type==="sequence"?t.steps.flatMap(e=>"n"in e?[`${e.from}>${e.to}:${e.kind}`]:[]):t.edges.map(e=>`${e.from}>${e.to}:${e.kind}`)).join("|")}syncLoops(t,i){const e=this.entrance()==="done";if(!t.motion.animated||!e||!this.hasLines()||i.reduce||i.forced||i.print||i.held||this.traced()||$(){}):t.motion.packet?.repeat&&this.repeat(e,t.motion.packet.path).catch(()=>{})}clearLoops(){this.looping=!1,this.loopGen++;for(const t of this.loops)t.cancel();this.loops.clear();for(const t of[...this.flowEls.values(),...this.beadEls.values()])t.style.display="none";this.dotOwner==="loop"&&this.dot&&(this.dot.style.display="none",this.dotOwner=null),this.runAt<0&&this.dotOwner!=="run"&&this.clearArrivals()}track(t,i){i.add(t);const e=()=>{i.delete(t)};return t.finished.then(e,e),i===this.loops&&(!this.inView||document.hidden)&&t.pause(),t}wait(t,i){return this.track(this.host.fig.animate([],{duration:Math.max(1,t)}),i).finished.then(e=>{e.cancel()})}overlay(t,i,e){const s=this.host.fig.querySelector(`.${this.host.P}-ink`),n=s?.querySelector(`.${this.host.P}-svg`);if(!s||!n)return null;const a=this.host.tokens(),r=w(t,a?.head??8),h=F(r,i),o=b("svg",{class:`${this.host.P}-${e}`,width:h.r-h.l,height:h.b-h.t,viewBox:`${h.l} ${h.t} ${h.r-h.l} ${h.b-h.t}`,"aria-hidden":"true",focusable:"false"});o.style.left=`${h.l}px`,o.style.top=`${h.t}px`;let d=this.defs??n;for(;d.nextElementSibling&&!d.nextElementSibling.classList.contains(`${this.host.P}-label`);)d=d.nextElementSibling;return d.after(o),{svg:o,d:L(r,t.from===t.to?a?.radiusXs??4:a?.radius??8),pts:r}}visible(t,i){const e=this.host.geo();let s=0;for(const n of e?.labels??[])if(n.i===t.i&&n.on){const a=(n.box.t+n.box.b)/2,r=i.some((h,o)=>o>0&&Math.abs(h.y-i[o-1].y)<.5&&Math.abs(a-h.y)<1.5);s+=r?n.box.r-n.box.l:n.box.b-n.box.t}return E(i)-s}flow(t,i){const e=t.lines.find(h=>h.i===i);if(!e)return;const s=this.host.tokens();if(e.kind==="dashed"){if(this.visible(e,w(e,s?.head??8))<48)return;const h=this.host.fig.querySelector(`.${this.host.P}-edge[data-edge="${i}"] .${this.host.P}-line`);if(!h)return;const o=(s?.dash??6)+(s?.dashGap??4);this.track(h.animate([{strokeDashoffset:"0px"},{strokeDashoffset:`${-o}px`}],{duration:o/this.t.flow*1e3,iterations:1/0,easing:"linear"}),this.loops);return}let n=this.flowEls.get(i);if(n&&!n.isConnected&&(this.flowEls.delete(i),n=void 0),!n){const h=s?.space("1")??4,o=this.overlay({...e,pts:w(e,h)},e.width+2,"flow");if(!o)return;if(this.visible(e,w(e,s?.head??8))<48){o.svg.remove();return}const l=s?.cut??2;b("path",{d:o.d,"stroke-width":e.width+2,"stroke-dasharray":`${l} ${this.t.flowPeriod-l}`},o.svg),n=o.svg,this.flowEls.set(i,n)}n.style.display="";const a=n.firstElementChild,r=this.t.flowPeriod;this.track(a.animate([{strokeDashoffset:"0px"},{strokeDashoffset:`${-r}px`}],{duration:r/this.t.flow*1e3,iterations:1/0,easing:"linear"}),this.loops)}edgeFor(t,i){const s=this.host.model().edges.find(n=>n.from===t&&n.to===i);return s?this.host.geo()?.lines.find(n=>n.i===s.i):void 0}node(t){return this.host.fig.querySelector(`.${this.host.P}-node[data-node="${CSS.escape(t)}"]`)}arrive(t){!t||this.traced()||(clearTimeout(this.arrivals.get(t)),t.removeAttribute("data-arrival-out"),t.setAttribute("data-arrival",""))}depart(t){!t||!t.hasAttribute("data-arrival")||(t.removeAttribute("data-arrival"),t.setAttribute("data-arrival-out",""),this.arrivals.set(t,window.setTimeout(()=>{t.removeAttribute("data-arrival-out"),this.arrivals.delete(t)},this.t.slower*.75)))}clearArrivals(){this.host.fig.querySelectorAll("[data-arrival], [data-arrival-out]").forEach(t=>{t.removeAttribute("data-arrival"),t.removeAttribute("data-arrival-out")});for(const t of this.arrivals.values())clearTimeout(t);this.arrivals.clear()}async pulse(t,i){const e=this.host.tokens();for(;t===this.loopGen;){for(let s=1;st===this.loopGen;try{for(;e();){this.inFlight=!0,this.waiting=!1;try{await this.packetRun(i,this.loops,e)}finally{this.inFlight=!1}if(!e())return;if(this.waiting)continue;const s=this.track(this.host.fig.animate([],{duration:Math.max(1,this.t.repeat)}),this.loops);this.repeatGap=s;try{await s.finished}finally{this.repeatGap===s&&(this.repeatGap=null),s.cancel()}}}finally{!e()&&!this.looping&&(this.waiting=!1)}}send(){const t=this.host.model(),i=t.motion.packet?.path;if(!t.motion.animated||!i||!this.hasLines())return;if(this.inFlight){this.waiting=!0;return}const e=this.modes();if(e.held||e.reduce){const n=this.node(i[i.length-1]);this.arrive(n),this.wait(this.t.rest,this.runAnims).then(()=>this.depart(n),()=>this.depart(n));return}if(this.looping&&t.motion.packet?.repeat){this.waiting=!0,this.repeatGap?.finish();return}this.inFlight=!0;const s=++this.runGen;this.packetRun(i,this.runAnims,()=>s===this.runGen).catch(n=>{if(!q(n))throw n}).finally(()=>{this.inFlight=!1,this.waiting&&s===this.runGen&&(this.waiting=!1,this.send())})}quiet(t,i){const e=this.host.P,s=this.host.fig,n=s.querySelectorAll(`.${e}-msg`);i.forEach((a,r)=>{const h=t>=0&&r>t;n[r]?.toggleAttribute("data-ahead",h),s.querySelector(`.${e}-edge[data-edge="${a.i}"]`)?.toggleAttribute("data-ahead",h)})}stopRun(){this.runGen++,this.runAt=-1,this.host.fig.querySelectorAll("[data-ahead]").forEach(t=>t.removeAttribute("data-ahead"));for(const t of this.runAnims)t.cancel();this.runAnims.clear(),this.dot&&this.dotOwner==="run"&&(this.dot.style.display="none",this.dotOwner=null),this.looping||(this.inFlight=!1),this.looping?this.host.fig.querySelectorAll(`.${this.host.P}-msg[data-arrival]`).forEach(t=>t.removeAttribute("data-arrival")):this.clearArrivals()}playRun(t){if(this.textCode()){this.playTextRun(t);return}const i=this.host.geo();if(!i?.lines.length)return;for(const h of this.runAnims)h.cancel();this.runAnims.clear();const e=++this.runGen,s=()=>e===this.runGen,n=this.ordered(i),a=this.host.fig.querySelectorAll(`.${this.host.P}-msg`);this.runAt=t,(async()=>{for(let h=t;h{if(!q(h))throw h})}playTextRun(t){const i=this.textCode();if(!i)return;for(const o of this.runAnims)o.cancel();this.runAnims.clear();const e=++this.runGen,s=()=>e===this.runGen,n=[...i.querySelectorAll("[data-n]")],a=Math.max(0,...n.map(o=>Number(o.dataset.n))),r=o=>{for(const l of n)l.toggleAttribute("data-ahead",o>=0&&Number(l.dataset.n)>o)};this.runAt=t,(async()=>{for(let o=t;oNumber(d.dataset.n)===o+1);if(await this.wait(this.t.legMin+this.t.base,this.runAnims),!s())return;for(const d of l)d.setAttribute("data-arrival","");await this.wait(this.t.rest,this.runAnims);for(const d of l)d.removeAttribute("data-arrival")}s()&&(this.runAt=-1,r(-1),this.publish())})().catch(o=>{if(!q(o))throw o})}};function B(t){const i=[],e=[],{pulse:s,packet:n}=t.motion;s&&n&&i.push("a figure names both a pulse and a packet: it has one mover at most");const a=s??n?.path,r=s?"pulse":"packet",h=new Set;if(a){for(const o of a)t.byId.has(o)||i.push(`the ${r} names ${o}, which is not a node`);for(let o=1;od.from===a[o-1]&&d.to===a[o]);l?h.add(l.i):i.push(`the ${r} goes from ${a[o-1]} to ${a[o]}, and no line joins them in that direction`)}}for(const o of t.edges)o.flow&&(h.has(o.i)&&i.push(`the line from ${o.from} to ${o.to} flows and is on the ${r}'s route: flow never runs on a line the mover travels`),o.label||e.push(`the line from ${o.from} to ${o.to} flows but has no label: motion never carries a fact alone, so its label says it is a stream`));return{errors:i,warnings:e}}function j(t){return new D(t)}(function(t){"use strict";var i=t._;function e(s,n,a){var r=document.createElement("button");return r.type="button",r.className="btn "+s,r.setAttribute("data-variant","secondary"),r.setAttribute("data-size","sm"),a&&a(r),r.appendChild(document.createTextNode(n)),r}i.diagramMotion=function(s,n,a){var r=B(n.model());r.errors.forEach(function(f){console.error("Basalt diagram: "+f)}),r.warnings.forEach(function(f){console.warn("Basalt diagram: "+f)});var h=j(n),o=s.querySelector(".diagram-foot"),l=null,d=null;o&&(l=e("diagram-play","Play the run"),l.addEventListener("click",function(){h.toggleRun()}),d=e("diagram-pause","Pause animations",function(f){f.setAttribute("data-loops-toggle",""),f.setAttribute("aria-pressed",String(!!(t.loops&&t.loops.held()))),f.insertAdjacentHTML("beforeend",'")}),l.hidden=d.hidden=!0,o.appendChild(l),o.appendChild(d));function p(){var f=h.state();l&&(l.hidden=!f.runShown,l.lastChild.textContent=f.running?"Stop the run":"Play the run"),d&&(d.hidden=!f.canLoop,d.setAttribute("aria-pressed",String(!!(t.loops&&t.loops.held()))))}var u=h.subscribe(p);p();var g=a&&a.packet?a.packet.send:void 0;return h.sendValue("__diagramSend"in s?s.__diagramSend:g),h.sendValue(g),s.__diagramSend=g,{redrawn:h.redrawn,sendValue:function(f){h.sendValue(f),s.__diagramSend=f},destroy:function(){u(),h.destroy(),l&&l.remove(),d&&d.remove()}}}})(window.Basalt)})(); diff --git a/.agent/skills/basalt-html/parts/glyph.js b/.agent/skills/basalt-html/parts/glyph.js index 277d63e7..440d56df 100644 --- a/.agent/skills/basalt-html/parts/glyph.js +++ b/.agent/skills/basalt-html/parts/glyph.js @@ -1 +1 @@ -(function(b){"use strict";var o=b._,l={},y=0,v={};function u(t,e){var a=e||{},n=Object.prototype.hasOwnProperty.call(l,t)?l[t]:null;if(!n)return v[t]||(v[t]=1,console.warn('Basalt: unknown glyph "'+t+'" (on this page: '+Object.keys(l).join(", ")+'; write it as data-glyph="'+t+'" in the page and compose again)')),"";var r=Number(a.size);r>0&&r<1/0||(r=16);var i=a.selected&&n[1]||n[0];return i.indexOf("@")>=0&&(i=i.split("@").join("bg"+ ++y)),'"}var f='[aria-current]:not([aria-current="false"]), [data-current]',m='.segment, [role="tab"], .link-tab',w='nav, [role="navigation"], [role="tablist"], [role="menu"], ul, ol, table, .segment, .tab-bar',c=[],d;function h(t,e,a,n){var r=u(e,{size:a,selected:n});if(!r)return null;var i=document.createElement("template");i.innerHTML=!n&&t.closest(m)?""+r+u(e,{size:a,selected:!0})+"":r;var s=i.content.firstChild;return t.matches(".btn-check")?t.replaceChildren(s):t.replaceWith(s),s}function z(t){c.forEach(function(e){var a=!!e.node.closest(f);if(!(a===e.selected||!t.some(function(r){return r.target.contains(e.node)}))){var n=h(e.node,e.name,e.size,a);n&&(e.selected=a,e.node=n.tagName==="svg"?n:null)}}),c=c.filter(function(e){return e.node&&e.node.isConnected})}function p(t){(t||document).querySelectorAll("[data-glyph]").forEach(function(e){var a=e.hasAttribute("data-selected"),n=a||!!e.closest(f),r=e.getAttribute("data-glyph"),i=Number(e.getAttribute("data-size"))||16,s=h(e,r,i,n),g=s&&!a&&s.tagName==="svg"&&s.closest(w);g&&(c.push({node:s,name:r,size:i,selected:n}),d=d||new MutationObserver(z),d.observe(g,{attributes:!0,attributeFilter:["aria-current","data-current"],subtree:!0}))})}o.addGlyphs=function(t){for(var e in t)l[e]=t[e]},o.glyph=u,o.hydrateGlyphs=p,o.step(45,"hydrateGlyphs",function(){p()})})(window.Basalt); +(function(w){"use strict";var o=w._,c={},m=0,f={};function l(t,e){var r=e||{},a=Object.prototype.hasOwnProperty.call(c,t)?c[t]:null;if(!a)return f[t]||(f[t]=1,console.warn('Basalt: unknown glyph "'+t+'" (on this page: '+Object.keys(c).join(", ")+'; write it as data-glyph="'+t+'" in the page and compose again)')),"";var n=Number(r.size);n>0&&n<1/0||(n=16);var i=r.selected&&a[1]||a[0];return i.indexOf("@")>=0&&(i=i.split("@").join("bg"+ ++m)),'"}var h='[aria-current]:not([aria-current="false"]), [data-current]',z='.segment, [role="tab"], .link-tab',E='nav, [role="navigation"], [role="tablist"], [role="menu"], ul, ol, table, .segment, .tab-bar',u=[],v;function d(t,e){return""+l(t,{size:e})+l(t,{size:e,selected:!0})+""}function p(t,e){var r=c[t];return r&&r[1]?d(t,e):l(t,{size:e})}function g(t,e,r,a){var n=l(e,{size:r,selected:a});if(!n)return null;var i=document.createElement("template");i.innerHTML=a?n:t.closest(z)?d(e,r):t.matches(".btn-check")?p(e,r):n;var s=i.content.firstChild;return t.matches(".btn-check")?t.replaceChildren(s):t.replaceWith(s),s}function A(t){u.forEach(function(e){var r=!!e.node.closest(h);if(!(r===e.selected||!t.some(function(n){return n.target.contains(e.node)}))){var a=g(e.node,e.name,e.size,r);a&&(e.selected=r,e.node=a.tagName==="svg"?a:null)}}),u=u.filter(function(e){return e.node&&e.node.isConnected})}function b(t){(t||document).querySelectorAll("[data-glyph]").forEach(function(e){var r=e.hasAttribute("data-selected"),a=r||!!e.closest(h),n=e.getAttribute("data-glyph"),i=Number(e.getAttribute("data-size"))||16,s=g(e,n,i,a),y=s&&!r&&s.tagName==="svg"&&s.closest(E);y&&(u.push({node:s,name:n,size:i,selected:a}),v=v||new MutationObserver(A),v.observe(y,{attributes:!0,attributeFilter:["aria-current","data-current"],subtree:!0}))})}o.addGlyphs=function(t){for(var e in t)c[e]=t[e]},o.glyph=l,o.glyphPair=d,o.glyphSeat=p,o.hydrateGlyphs=b,o.step(45,"hydrateGlyphs",function(){b()})})(window.Basalt); diff --git a/.agent/skills/basalt-html/parts/glyphs.json b/.agent/skills/basalt-html/parts/glyphs.json index b39c30d4..89c06721 100644 --- a/.agent/skills/basalt-html/parts/glyphs.json +++ b/.agent/skills/basalt-html/parts/glyphs.json @@ -1 +1 @@ -{"menu":[""],"plus":[""],"close":[""],"minus":[""],"check":[""],"more":[""],"arrow-right":[""],"arrow-down":[""],"arrow-left":[""],"arrow-up":[""],"chevron-right":[""],"chevron-down":[""],"chevron-left":[""],"chevron-up":[""],"external":[""],"play":[""],"pause":[""],"download":[""],"copy":[""],"edit":[""],"trash":[""],"home":["",""],"search":["",""],"notifications":["",""],"messages":["",""],"profile":["",""],"settings":["",""],"more-nav":["",""],"calendar":["",""],"trends":["",""],"plan":["",""],"sources":["",""],"history":["",""],"runs":["",""],"sandboxes":["",""],"routes":["",""],"policy":["",""],"records":["",""]} +{"menu":[""],"plus":[""],"close":[""],"minus":[""],"check":[""],"more":[""],"arrow-right":[""],"arrow-down":[""],"arrow-left":[""],"arrow-up":[""],"chevron-right":[""],"chevron-down":[""],"chevron-left":[""],"chevron-up":[""],"external":[""],"play":[""],"pause":["",""],"download":[""],"copy":[""],"edit":[""],"trash":[""],"home":["",""],"search":["",""],"notifications":["",""],"messages":["",""],"profile":["",""],"settings":["",""],"more-nav":["",""],"calendar":["",""],"trends":["",""],"plan":["",""],"sources":["",""],"history":["",""],"runs":["",""],"sandboxes":["",""],"routes":["",""],"policy":["",""],"records":["",""]} diff --git a/.agent/skills/basalt-html/parts/loops.js b/.agent/skills/basalt-html/parts/loops.js index a2e10150..11c8b071 100644 --- a/.agent/skills/basalt-html/parts/loops.js +++ b/.agent/skills/basalt-html/parts/loops.js @@ -1 +1 @@ -(function(a){"use strict";var i=a._,r="basalt-loops",n="held",f=i.still||(i.still=function(){var t=document.documentElement;t.setAttribute("data-still",""),requestAnimationFrame(function(){requestAnimationFrame(function(){t.removeAttribute("data-still")})})});function o(){return document.documentElement.getAttribute("data-loops")===n}function m(){typeof document.getAnimations=="function"&&document.getAnimations().forEach(function(t){var e=t.animationName;e&&e.indexOf("bh-")===0&&t.effect&&t.effect.getComputedTiming().iterations===1/0&&(t.startTime=0)})}function c(){var t=o();document.querySelectorAll("[data-loops-toggle]").forEach(function(e){if(e.type==="checkbox"){e.checked=t;return}e.setAttribute("aria-pressed",String(t));var u=e.hasAttribute("data-icon-only")&&i.glyph&&e.querySelector("svg.icon"),d=u&&i.glyph("pause",{size:16,selected:t});d&&(u.outerHTML=d)})}function l(t){var e=document.documentElement;t?e.setAttribute("data-loops",n):e.removeAttribute("data-loops"),t||m(),c(),document.dispatchEvent(new CustomEvent("basalt:loops",{detail:{held:t}}))}function s(t){t=!!t;try{t?localStorage.setItem(r,n):localStorage.removeItem(r)}catch{}return t!==o()?l(t):c(),t}a.loops={held:o,set:s,toggle:function(){return s(!o())}},i.step(60,"loops",function(){if(f(),a.loops.wired){c();return}a.loops.wired=!0;try{localStorage.getItem(r)===n&&!o()&&document.documentElement.setAttribute("data-loops",n)}catch{}c(),document.addEventListener("click",function(t){var e=t.target.closest&&t.target.closest("[data-loops-toggle]");e&&e.type!=="checkbox"&&!e.disabled&&s(!o())}),document.addEventListener("change",function(t){var e=t.target;e&&e.matches&&e.matches("[data-loops-toggle]")&&e.type==="checkbox"&&s(e.checked)}),window.addEventListener("storage",function(t){if(!(t.key!==null&&t.key!==r)){var e=t.newValue===n;e!==o()&&l(e)}})})})(window.Basalt); +(function(a){"use strict";var i=a._,r="basalt-loops",n="held",d=i.still||(i.still=function(){var t=document.documentElement;t.setAttribute("data-still",""),requestAnimationFrame(function(){requestAnimationFrame(function(){t.removeAttribute("data-still")})})});function o(){return document.documentElement.getAttribute("data-loops")===n}function f(){typeof document.getAnimations=="function"&&document.getAnimations().forEach(function(t){var e=t.animationName;e&&e.indexOf("bh-")===0&&t.effect&&t.effect.getComputedTiming().iterations===1/0&&(t.startTime=0)})}function c(){var t=o();document.querySelectorAll("[data-loops-toggle]").forEach(function(e){if(e.type==="checkbox"){e.checked=t;return}e.setAttribute("aria-pressed",String(t));var l=e.hasAttribute("data-icon-only")&&i.glyphPair&&e.querySelector("svg.icon:not([data-pair] > svg)");l&&(l.outerHTML=i.glyphPair("pause",16))})}function u(t){var e=document.documentElement;t?e.setAttribute("data-loops",n):e.removeAttribute("data-loops"),t||f(),c(),document.dispatchEvent(new CustomEvent("basalt:loops",{detail:{held:t}}))}function s(t){t=!!t;try{t?localStorage.setItem(r,n):localStorage.removeItem(r)}catch{}return t!==o()?u(t):c(),t}a.loops={held:o,set:s,toggle:function(){return s(!o())}},i.step(60,"loops",function(){if(d(),a.loops.wired){c();return}a.loops.wired=!0;try{localStorage.getItem(r)===n&&!o()&&document.documentElement.setAttribute("data-loops",n)}catch{}c(),document.addEventListener("click",function(t){var e=t.target.closest&&t.target.closest("[data-loops-toggle]");e&&e.type!=="checkbox"&&!e.disabled&&s(!o())}),document.addEventListener("change",function(t){var e=t.target;e&&e.matches&&e.matches("[data-loops-toggle]")&&e.type==="checkbox"&&s(e.checked)}),window.addEventListener("storage",function(t){if(!(t.key!==null&&t.key!==r)){var e=t.newValue===n;e!==o()&&u(e)}})})})(window.Basalt); diff --git a/.agent/skills/basalt-html/parts/manifest.json b/.agent/skills/basalt-html/parts/manifest.json index c845bcfe..b4f9bcd1 100644 --- a/.agent/skills/basalt-html/parts/manifest.json +++ b/.agent/skills/basalt-html/parts/manifest.json @@ -1,5 +1,5 @@ { - "$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 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). Merging main (#130, #131) into claude/diagram-interop: diagram usage 4600 to 4850 (+5.4%: Batch B's diagram usage plus the basalt-diagram-export rule line, measured 4806), then 4850 to 5050 (noting that .lucid is for Lucid's REST API only and to use .vsdx in Lucid's UI, measured 4999). Raised for right to left (diagrams-rtl): diagram 145450 to 146000 (the stacked figure mirrors, its snap and whole-pixel labels with it; a drawn schema takes its turn-backs, its one-column room and its gutter lanes from the end side); then 146000 to 148000 for Fable's ruling on the stacked group label (the stem gives way, the label slides, the last resort's warning) and the author's strings isolated in ). Raised in the first tab (DECISIONS 358): tabs 3700 to 4600 (the scrollport and its hang, the divider as ::before, the underline's inset, the scroll margin, and the script that wraps the row and brings a focused tab into view: 4524 measured), link-tabs 5900 to 6350 (the hang and the divider as ::before: 6276 measured), tabs usage 750 to 1150 (the .tabs-scroll wrapper in the markup and the sentence on the scrollport, the hang and the underline: 1111 measured) and link-tabs usage 2550 to 2750 (the hang and the underline's width: 2702 measured).", + "$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 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). Merging main (#130, #131) into claude/diagram-interop: diagram usage 4600 to 4850 (+5.4%: Batch B's diagram usage plus the basalt-diagram-export rule line, measured 4806), then 4850 to 5050 (noting that .lucid is for Lucid's REST API only and to use .vsdx in Lucid's UI, measured 4999). Raised for right to left (diagrams-rtl): diagram 145450 to 146000 (the stacked figure mirrors, its snap and whole-pixel labels with it; a drawn schema takes its turn-backs, its one-column room and its gutter lanes from the end side); then 146000 to 148000 for Fable's ruling on the stacked group label (the stem gives way, the label slides, the last resort's warning) and the author's strings isolated in ). Raised in the first tab (DECISIONS 358): tabs 3700 to 4600 (the scrollport and its hang, the divider as ::before, the underline's inset, the scroll margin, and the script that wraps the row and brings a focused tab into view: 4524 measured), link-tabs 5900 to 6350 (the hang and the divider as ::before: 6276 measured), tabs usage 750 to 1150 (the .tabs-scroll wrapper in the markup and the sentence on the scrollport, the hang and the underline: 1111 measured) and link-tabs usage 2550 to 2750 (the hang and the underline's width: 2702 measured). The pause toggle's held look (DECISIONS 361): toggle 1950 to 2400 (a seat whose glyph has a selected form draws both forms in one box with no check, and the hold's icon-only toggle crossfades between its two drawings: 2386 measured) and glyph 1950 to 2100 (the pair and the seat a toggle draws, shared with loops and diagram-motion: 2098 measured).", "budgets": { "skillMd": 13050, "core": 39600 @@ -51,7 +51,7 @@ "attrs": [ "data-glyph" ], - "budget": 1950, + "budget": 2100, "usage": 1000 }, "topbar": { @@ -218,7 +218,7 @@ "textWords": [ "a .btn with aria-pressed" ], - "budget": 1950, + "budget": 2400, "usage": 900 }, "rows": { diff --git a/.agent/skills/basalt-html/parts/toggle.css b/.agent/skills/basalt-html/parts/toggle.css index 238317f9..43400e94 100644 --- a/.agent/skills/basalt-html/parts/toggle.css +++ b/.agent/skills/basalt-html/parts/toggle.css @@ -1 +1 @@ -@layer basalt{.btn-check{position:relative;flex:none;width:var(--basalt-size-icon-sm);height:var(--basalt-size-icon-sm)}.btn-check:before,.btn-check>svg{position:absolute;inset:0;transition:opacity var(--basalt-duration-fast) var(--basalt-ease-out)}.btn-check:before{content:"";background:currentColor;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 13L10 18M10 18L19 7' fill='none' stroke='black' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;opacity:0}.btn[aria-pressed=true]>.btn-check:before{opacity:1}.btn[aria-pressed=true]>.btn-check>svg{opacity:0}.btn.btn[aria-pressed=true]:is(:not([data-variant]),[data-variant=secondary],[data-variant=ghost]){background:light-dark(color-mix(in srgb,var(--basalt-neutral-0) 7%,var(--panel-bg, var(--basalt-surface-page))),color-mix(in srgb,var(--basalt-neutral-100) 9%,var(--panel-next, var(--basalt-surface-1))))}.btn.btn[aria-pressed=true]:is(:not([data-variant]),[data-variant=secondary],[data-variant=ghost]):not([disabled],[aria-disabled=true],[aria-busy=true]){color:var(--basalt-text-primary)}.btn.btn[aria-pressed=true]:is(:not([data-variant]),[data-variant=secondary]){box-shadow:0 0 0 var(--basalt-size-hairline) var(--basalt-border-hover)}.btn.btn[aria-pressed=true][data-variant=ghost]{box-shadow:none}:root[data-still] .btn,:root[data-still] .btn-check:before,:root[data-still] .btn-check>svg{transition:none}@media(forced-colors:active){.btn.btn[aria-pressed=true]:is(:not([data-variant]),[data-variant=secondary],[data-variant=ghost]){forced-color-adjust:none;background:Highlight;border-color:Highlight;box-shadow:none;color:HighlightText}.btn.btn[aria-pressed=true]:is(:not([data-variant]),[data-variant=secondary],[data-variant=ghost]):not([disabled],[aria-disabled=true],[aria-busy=true]){background:Highlight;color:HighlightText}}} +@layer basalt{.btn-check{position:relative;flex:none;width:var(--basalt-size-icon-sm);height:var(--basalt-size-icon-sm)}.btn-check:before,.btn-check>svg{position:absolute;inset:0;transition:opacity var(--basalt-duration-fast) var(--basalt-ease-out)}.btn-check:before{content:"";background:currentColor;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 13L10 18M10 18L19 7' fill='none' stroke='black' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;opacity:0}.btn[aria-pressed=true]>.btn-check:before{opacity:1}.btn[aria-pressed=true]>.btn-check>svg{opacity:0}.btn-check:has(>[data-pair]):before{content:none}:is(.btn-check,.btn[data-icon-only])>[data-pair]{display:grid}:is(.btn-check,.btn[data-icon-only])>[data-pair]>svg{grid-area:1 / 1;transition:opacity var(--basalt-duration-fast) var(--basalt-ease-out)}:is(.btn-check,.btn[data-icon-only])>[data-pair]>:last-child,.btn[aria-pressed=true] [data-pair]>:first-child{opacity:0}.btn[aria-pressed=true] [data-pair]>:last-child{opacity:1}.btn.btn[aria-pressed=true]:is(:not([data-variant]),[data-variant=secondary],[data-variant=ghost]){background:light-dark(color-mix(in srgb,var(--basalt-neutral-0) 7%,var(--panel-bg, var(--basalt-surface-page))),color-mix(in srgb,var(--basalt-neutral-100) 9%,var(--panel-next, var(--basalt-surface-1))))}.btn.btn[aria-pressed=true]:is(:not([data-variant]),[data-variant=secondary],[data-variant=ghost]):not([disabled],[aria-disabled=true],[aria-busy=true]){color:var(--basalt-text-primary)}.btn.btn[aria-pressed=true]:is(:not([data-variant]),[data-variant=secondary]){box-shadow:0 0 0 var(--basalt-size-hairline) var(--basalt-border-hover)}.btn.btn[aria-pressed=true][data-variant=ghost]{box-shadow:none}:root[data-still] .btn,:root[data-still] .btn-check:before,:root[data-still] .btn-check>svg,:root[data-still] .btn [data-pair]>svg{transition:none}@media(forced-colors:active){.btn.btn[aria-pressed=true]:is(:not([data-variant]),[data-variant=secondary],[data-variant=ghost]){forced-color-adjust:none;background:Highlight;border-color:Highlight;box-shadow:none;color:HighlightText}.btn.btn[aria-pressed=true]:is(:not([data-variant]),[data-variant=secondary],[data-variant=ghost]):not([disabled],[aria-disabled=true],[aria-busy=true]){background:Highlight;color:HighlightText}}} diff --git a/.agent/skills/basalt-html/parts/usage/toggle.md b/.agent/skills/basalt-html/parts/usage/toggle.md index 6e8a01fe..19872f4d 100644 --- a/.agent/skills/basalt-html/parts/usage/toggle.md +++ b/.agent/skills/basalt-html/parts/usage/toggle.md @@ -7,6 +7,6 @@ A pressed toggle is a `.btn` with `aria-pressed`. Only the secondary (default) a ``` -- A text toggle's 16px `.btn-check` seat holds its glyph (`data-glyph`): the glyph at rest, the check while pressed. An icon-only toggle has none. +- A text toggle's 16px `.btn-check` seat holds its glyph (`data-glyph`): the glyph at rest, its selected form while pressed, or the check where it has none. An icon-only toggle has none. - A click doesn't switch it. Your script sets `aria-pressed="true"` or `"false"`. Pressed is a solid plate and primary ink, never a bar. - Name it with a fixed label, not one that flips with the state. For on/off text with no button look, use a switch (see choice). diff --git a/AGENTS.md b/AGENTS.md index 67d07b8b..aab3b494 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -207,7 +207,8 @@ Basalt has one owner (Bailey) and a design panel of two independent design revie can be measured for reference and cited in the panel's reasoning. Their colours, sizes, CSS, icons and assets never land here as-is. - **Icons:** the core set on the web (`@srasyndicate/basalt`, one module per glyph: 2.25 units - on 24 at every size, an opening at rest that selected closes and fills, morphs only between rest + on 24 at every size, an opening at rest that selected closes and fills (actions keep their drawing, except pause, whose bars fill + when held), morphs only between rest and selected, within a rotation group, and the four drawn pairs), and Phosphor Bold at 16, 20 and 24 for what the core set does not draw (a component never draws Phosphor's version of a core glyph: check, close, the chevrons, copy, plus, minus and search are the core's; the key glyphs ⌘ ⌥ ⌃ stay Phosphor's; glyphs are drawn at 16, 20 and 24, diff --git a/docs/foundations.md b/docs/foundations.md index a5d7c200..7b5aa3a4 100644 --- a/docs/foundations.md +++ b/docs/foundations.md @@ -414,7 +414,7 @@ kept as a rule so both themes behave alike (DECISIONS 166). Four text levels wer radius does not change. A text toggle carries its glyph (`icon`) in a 16px seat before the label. Pressed, the seat shows the glyph's selected form, or the core check where the glyph has none; the two crossfade over `duration-fast`. The seat is never empty, and both states are one width. An IconButton toggle carries no check: the plate, the ink step and the glyph's - selected form (a core glyph closes and fills; a `fillSafe` Phosphor glyph fills) say it. The momentary .98 press stays + selected form (a core glyph closes and fills (pause fills its bars); a `fillSafe` Phosphor glyph fills) say it. The momentary .98 press stays Button's. In forced colours it is `Highlight` with `HighlightText` for the fill, the label and the seat, at rest, hovered, pressed and focused. Reduced motion is the 100ms crossfade. A text-only on/off with no glyph to fill is a `Switch`; exactly one of many is a segmented control, never toggle buttons. @@ -667,7 +667,7 @@ kept as a rule so both themes behave alike (DECISIONS 166). Four text levels wer (Pause, Stop, Hide, Level A) asks for beside content that runs for more than five seconds: reduced motion alone is OS-wide and leaves the ring fading, so it is not one. **The control is `LoopsToggle`, in the form the place needs, with the fixed name "Pause animations"** (it does not change when - pressed; `aria-pressed` or the switch's state says it is on): on a site, an icon-only ghost toggle (`LoopsToggleIcon`, which loads no `Switch`) with the core `pause` glyph, named by its `title` alone (the browser's own tooltip on a fine pointer; no `aria-label` beside it, so a screen reader hears the name once; no `Tooltip`) in the + pressed; `aria-pressed` or the switch's state says it is on): on a site, an icon-only ghost toggle (`LoopsToggleIcon`, which loads no `Switch`) with the core `pause` glyph, its bars filled while held, in both forms, named by its `title` alone (the browser's own tooltip on a fine pointer; no `aria-label` beside it, so a screen reader hears the name once; no `Tooltip`) in the site header's end cluster, first in it (before any tools and the primary Button), on any page with an ambient loop or a loop that can run past five seconds; in an app, a pressed toggle in the head band of the view that shows running work, in either of two forms: the Button form (`form="button"`, secondary or ghost, labelled "Pause animations", `size` `md` or `sm`) or the icon form (`LoopsToggleIcon`, the same ghost icon toggle as a site's), and a settings row (the @@ -2403,20 +2403,20 @@ A product's own logo is its own; the social marks are Phosphor's (below). A diag marks), and the key glyphs ⌘ ⌥ ⌃ stay Phosphor's. A component never draws Phosphor's version of a core glyph. **Status:** decided by the council (DECISIONS 138) and approved by the owner (DECISIONS 139); the implementation has not been reviewed. - **Drawing.** Actions are exactly three straight lines (copy, edit, trash and download are the - agreed exceptions, drawn richer). Every other glyph is eight cubic slots on the 24 grid, and an + agreed exceptions, drawn richer, and pause is two closed bars; DECISIONS 361). Every other glyph is eight cubic slots on the 24 grid, and an unused slot is an invisible point. The stroke is a constant 2.25 units on 24 (1.5px at 16, 1.875 at 20, 2.25 at 24), with round caps and joins, and a point is drawn 1.5 times the stroke. Colour is `currentColor`. - **Rest and selected come from one drawing.** Most navigation and product glyphs have one intentional opening at the object's own joint, 2 units of air between the caps. Selected closes it, fills every closed loop and turns the strokes inside a loop into holes. Actions keep their - drawing. + drawing, except pause: its two bars fill when selected, because it is the glyph of a held toggle (DECISIONS 361). - **Morphs.** Only rest and selected, a rotation group (the four arrows, the four chevrons, plus and close), and the drawn pairs menu and close, play and pause, copy and check, chevron-down and download, both ways. Every other change swaps at once. A morph in flight keeps its identity: a request for where it is going does nothing, a request for where it came from runs it back, and a request for another member of its group turns on; anything else swaps at once. They run at - `slow` on `ease-out`, and reduced motion swaps at once. Status: Basalt's controls draw their core glyphs through the morph (engineering restoring DECISIONS 38 and 55); the implementation hasn't been reviewed. + `slow` on `ease-out`. Under reduced motion a change swaps at once, except in a pressed toggle's seat, where it crossfades over `duration-fast` on `ease-out` (DECISIONS 361). Status: Basalt's controls draw their core glyphs through the morph (engineering restoring DECISIONS 38 and 55); the implementation hasn't been reviewed. - **Sizes.** Glyphs are drawn at 16, 20 and 24, and at 12 only as a mark inside a box: a choice box's check or dash (the core's) and a key chip's ⌘ ⌥ ⌃ (Phosphor Bold's, which the core does not draw), the chip drawn at its real height, `size-kbd`. Status: decided by the council and approved by the owner (DECISIONS 138 and 139); the implementation hasn't been reviewed. - **The long tail** is Phosphor Bold at 20 and up, as at 16, so its line is the core's. Fill only for selected navigation and object identities whose drawing keeps its silhouette (`fillSafe`). diff --git a/packages/react/glyphs/source.mjs b/packages/react/glyphs/source.mjs index 118a2ea0..a8e6cec9 100644 --- a/packages/react/glyphs/source.mjs +++ b/packages/react/glyphs/source.mjs @@ -12,7 +12,8 @@ // that slot by GAP at that end; the selected drawing is the closed one. So the opening closes as the step into the // fill. A glyph with no joint of its own has no seam. // - Selected: every loop in `loops` fills, every slot in `knock` becomes a hole in the fill, `sel` may move or unfold -// other slots. Actions keep their drawing. +// other slots. Actions keep their drawing, except pause: its two bars fill when selected, because it is the glyph of a +// held toggle (DECISIONS 361). // - Stroke: a constant 2.25 units on 24 (1.125 px at 12, 1.5 at 16, 1.875 at 20, 2.25 at 24). export const GRID = 24; @@ -118,9 +119,20 @@ export const GLYPHS = { "chevron-up": { family: "line", label: "Chevron up", ph: "CaretUp", morphIcon: true, group: "chevron", rotate: 270, of: "chevron-right" }, external: { family: "line", label: "External", ph: "ArrowUpRight", s: [L(7, 17, 17, 7), L(9.5, 7, 17, 7), L(17, 7, 17, 14.5)] }, play: { family: "line", label: "Play", ph: "Play", s: [L(7.5, 4.5, 7.5, 19.5), L(7.5, 4.5, 19, 12), L(19, 12, 7.5, 19.5)] }, - pause: { family: "line", label: "Pause", ph: "Pause", s: [L(8.5, 5, 8.5, 19), L(15.5, 5, 15.5, 19), O(15.5, 12)] }, // ------------------------------------------------------------------------------------ actions: rich, 8 slots + // Pause (the pause toggle, DECISIONS n): the glyph of a held toggle, so the one action with a selected form. Each bar is + // a closed loop 1.5 wide on its own centreline (x 8.5 and 15.5, 3.75 of ink with the stroke), and the loop fills. At + // rest each loop folds to the one line drawn before: slots 1 and 3 (5 and 7) grow from the bar's ends, slot 2 (and 6) + // from its middle, so the bar thickens evenly about its centreline. + pause: { + family: "rich", label: "Pause", ph: "Pause", where: "none: two bars have no joint", + s: [L(7.75, 5, 7.75, 19), L(7.75, 19, 9.25, 19), L(9.25, 19, 9.25, 5), L(9.25, 5, 7.75, 5), + L(14.75, 5, 14.75, 19), L(14.75, 19, 16.25, 19), L(16.25, 19, 16.25, 5), L(16.25, 5, 14.75, 5)], + rest: { 0: L(8.5, 5, 8.5, 19), 1: O(8.5, 19), 2: O(8.5, 12), 3: O(8.5, 5), + 4: L(15.5, 5, 15.5, 19), 5: O(15.5, 19), 6: O(15.5, 12), 7: O(15.5, 5) }, + loops: [[0, 1, 2, 3], [4, 5, 6, 7]], + }, // Download (item 39c): four straight strokes, so a rich glyph. It is arrow-down lifted 3 units over a tray: the same // 11-unit shaft and the same head (5 across, 6 down). Slots 0 and 1 are the head, so chevron-down's two strokes // become them; slot 2, the shaft, takes the chevron's unused third slot and grows from its own middle; the tray grows diff --git a/packages/react/src/button.tsx b/packages/react/src/button.tsx index 022b9fb0..9512c05d 100644 --- a/packages/react/src/button.tsx +++ b/packages/react/src/button.tsx @@ -74,7 +74,7 @@ export type ButtonProps = BaseProps & ButtonToggle & { /** * An icon before the label. On a toggle (`pressed`, which needs it) it is the toggle's glyph, shown at rest; pressed shows its selected form, or - * the core check in the same seat where the glyph has none (an action glyph such as pause, a long-tail glyph not `fillSafe`). The two crossfade. + * the core check in the same seat where the glyph has none (an action glyph, which keeps its drawing; pause is the one that fills; a long-tail glyph not `fillSafe`). The two crossfade. */ icon?: IconComponent; /** An icon after the label, e.g. a caret. A button that opens a new tab has no other trailing icon, so this is ignored there. */ @@ -167,7 +167,7 @@ export function Button({ variant = "secondary", size = "md", fullWidth, edge, ic onClick={wait.press} > {icon && done !== undefined && !toggles ? : null} - {icon && !(toggles && !own) && !(done !== undefined && !toggles) ? : null} + {icon && !(toggles && !own) && !(done !== undefined && !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 ? (