diff --git a/.agent/skills/basalt-html/SKILL.md b/.agent/skills/basalt-html/SKILL.md index 6f9b321a..1f4251ae 100644 --- a/.agent/skills/basalt-html/SKILL.md +++ b/.agent/skills/basalt-html/SKILL.md @@ -31,7 +31,7 @@ Markup built only at run time (a `.row` your script writes) won't be seen: add ` - **select** `
";var l=i.firstElementChild,c=l.querySelector("input"),u=l.querySelector('[role="listbox"]'),C=l.querySelector(".palette-empty"),m=l.querySelector('[role="status"]'),b=l.querySelector("#"+s+"-keys"),n=[],f=0,g="",D;function se(t){clearTimeout(D),t!==g&&(D=setTimeout(function(){m.textContent=g=t},400))}function B(){!matchMedia("(hover: none) and (pointer: coarse)").matches||W()?c.setAttribute("aria-describedby",s+"-hints"):c.removeAttribute("aria-describedby")}function I(){var t=c.value.trim(),d=R(a,s,t);n=d.flat,u.innerHTML=d.html,u.insertBefore(P,u.firstChild),b.innerHTML=d.words,u.hidden=n.length===0,C.hidden=n.length!==0,f=Math.min(f,Math.max(n.length-1,0)),S(n.length?f:-1,!1),se(n.length?n.length+(n.length===1?" result":" results"):"No commands match.")}function S(t,d){var K=u.querySelectorAll('[role="option"]');if(K.forEach(function(F){F.setAttribute("aria-selected","false"),F.removeAttribute("data-active")}),t<0||!K[t]){c.removeAttribute("aria-activedescendant");return}f=t,K[t].setAttribute("aria-selected","true"),K[t].setAttribute("data-active",""),c.setAttribute("aria-activedescendant",K[t].id),d!==!1&&K[t].scrollIntoView({block:"nearest"})}function U(t){var d=n[t];d&&(k(),T(d,r))}var w=o&&o.closest("dialog:modal"),_=[],ce=document.documentElement.style.overflow,x;function G(t){t.newState==="closed"&&k()}var P=document.createElement("span");P.className="plate",P.setAttribute("aria-hidden","true");var j;function $(){clearTimeout(D),j&&j(),document.removeEventListener("keydown",z,!0),x&&x.disconnect(),w&&w.removeEventListener("beforetoggle",G),p.toast&&p.toast.release(i),i.matches(":popover-open")&&i.hidePopover(),i.remove(),_.forEach(function(t){t[1]||t[0].removeAttribute("inert")}),_=[],document.documentElement.style.overflow=ce}function k(){v===M&&(v=null,$(),o&&o.focus&&document.contains(o)&&o.focus(),r.onClose&&r.onClose())}function z(t){if(!(!i.isConnected||!l.contains(t.target)||t.target.closest(".toast-viewport"))&&(B(),!N(t))){if(t.key==="Escape"){t.preventDefault(),t.stopPropagation(),k();return}if(t.key==="ArrowDown"){t.preventDefault(),n.length&&S((f+1)%n.length);return}if(t.key==="ArrowUp"){t.preventDefault(),n.length&&S((f-1+n.length)%n.length);return}if(t.key==="Enter"){if(t.ctrlKey||t.metaKey||t.altKey||t.shiftKey)return;t.preventDefault(),n.length&&U(f);return}t.key==="Tab"&&(t.preventDefault(),c.focus())}}u.addEventListener("pointermove",function(t){var d=t.target.closest('[role="option"]');d&&Number(d.dataset.index)!==f&&S(Number(d.dataset.index),!1)}),u.addEventListener("click",function(t){var d=t.target.closest('[role="option"]');d&&U(Number(d.dataset.index))}),i.addEventListener("pointerdown",function(t){t.target===i&&k()}),i.addEventListener("toggle",function(t){t.newState==="closed"&&k()}),c.addEventListener("input",function(){f=0,I()});var M={close:k,element:l};I(),B();try{[].forEach.call((w||document.body).children,function(t){t.tagName==="DIALOG"||t.tagName==="SCRIPT"||t.id==="basalt-live"||t.classList.contains("toast-viewport")||(_.push([t,t.hasAttribute("inert")]),t.setAttribute("inert",""))}),(w||document.body).appendChild(i),w&&(i.setAttribute("popover","manual"),i.showPopover()),w&&(w.addEventListener("beforetoggle",G),x=new MutationObserver(function(){(!w.open||!w.isConnected)&&k()}),x.observe(document.documentElement,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["open"]})),document.documentElement.style.overflow="hidden",j=p.glide(u,P,{active:".row[data-active]",attr:"data-active"}),document.addEventListener("keydown",z,!0),v=M,c.focus()}catch(t){throw v===M&&(v=null),$(),t}return M}function oe(){v&&v.close()}function ie(e){var r=function(a){if(!(a.defaultPrevented||N(a)||!(a.metaKey||a.ctrlKey||a.altKey))){if((a.metaKey||a.ctrlKey)&&!a.altKey&&!a.shiftKey&&String(a.key).toLowerCase()==="k"){a.preventDefault(),v?v.close():q(typeof e=="function"?e():e);return}var s=typeof e=="function"?e():e,h=!(a.metaKey||a.ctrlKey)&&re(a);(s.groups||[]).some(function(o){return(o.items||[]).some(function(i){var l=H(i);return!l||h||!ae(l,a)?!1:(a.preventDefault(),v&&v.close(),T(i,s),!0)})})}};return document.addEventListener("keydown",r),function(){document.removeEventListener("keydown",r)}}function le(e){if(!e){var r=document.querySelector('script[type="application/json"][data-palette]');r&&(e=JSON.parse(r.textContent))}!e||document.documentElement.__bhPalette||(document.documentElement.__bhPalette=!0,document.querySelectorAll("[data-open-palette]").forEach(function(a){a.addEventListener("click",function(){q(typeof e=="function"?e():e)}),a.hasAttribute("aria-keyshortcuts")||a.setAttribute("aria-keyshortcuts","Meta+K Control+K"),a.setAttribute("aria-haspopup","dialog")}),ie(e))}p.palette={rows:R,tier:O,matches:ne,activate:T,composing:N},A.openPalette=q,A.closePalette=oe,p.step(110,"wirePalette",function(e){le(e.palette)})})(window.Basalt); (function(H){"use strict";var g=H._,k=g.palette,w=g.esc,z=g.kbd.kbdGroup,ce=0,V=!1,G=' viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="2.25" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"',ue='',ve='';function P(a,i,p){var f=parseFloat(getComputedStyle(a).getPropertyValue(i));return isFinite(f)?f:p}function J(a,i){if(a.__bhCommandList)return a.__bhCommandList;var p="bh-cl-"+ ++ce,f=i.label||a.getAttribute("data-label")||"Commands",N=i.noun||a.getAttribute("data-noun")||"command",W=i.placeholder||a.getAttribute("data-placeholder")||"Search commands",U=i.groups||[];U.forEach(function(e,t){(e.items||[]).forEach(function(d,v){d.id==null&&(d.id="g"+t+"c"+v)})});var o=typeof i.detail=="function"?i.detail:a.querySelector("template[data-detail]")?function(e){var t=a.querySelector('template[data-detail="'+String(e.id).replace(/["\\]/g,"\\$&")+'"]');return t?t.content.cloneNode(!0):""}:null,B=k.rows(U,p,"",o?ue:""),E=B.flat,A=E.length;a.insertAdjacentHTML("beforeend",'
'+g.searchSvg+'
'+B.html+'

"+(o?'
':"")+"
");var c=a.lastElementChild;c.setAttribute("data-view","list");var m=c.firstElementChild,u=o?c.lastElementChild:null,n=m.querySelector("input"),l=m.querySelector(".command-results"),C=l.firstElementChild,pe=m.querySelector(".command-body"),K=m.querySelector(".command-none"),$=m.querySelector(".command-count").firstChild,Q=m.querySelector(".command-count").lastChild,_=Array.prototype.slice.call(l.querySelectorAll(".row")),fe=Array.prototype.slice.call(C.children),T=document.createElement("span");T.className="plate",T.setAttribute("aria-hidden","true"),l.insertBefore(T,C),o&&a.setAttribute("data-pane","");var s=_.map(function(e,t){return t}),h=-1,M="",D=!1,I=!1,y="push",X="list",F="key",Y=0,Z=NaN,S=u&&u.querySelector(".command-pane-body"),ee=$.textContent=Q.textContent=A+" "+(A===1?N:N+"s"),te;function me(e){$.textContent=e,clearTimeout(te),e!==ee&&(te=setTimeout(function(){Q.textContent=ee=e},400))}function L(){l.toggleAttribute("data-idle",!(o&&y==="split")&&!D&&!I)}function ae(){if(!M){var e=getComputedStyle(l);pe.style.setProperty("--held",C.getBoundingClientRect().height+parseFloat(e.paddingTop)+parseFloat(e.paddingBottom)+"px")}}function re(){var e=E[h],t=u.querySelector("h1, h2, h3, h4, h5, h6");return t?(t.id=t.id||p+"-h",t.tabIndex=-1,u.setAttribute("aria-labelledby",t.id),u.removeAttribute("aria-label")):(u.removeAttribute("aria-labelledby"),u.setAttribute("aria-label",e?e.label:f)),t}function ne(){var e=E[h];if(e!==Z){Z=e,S.textContent="";var t=e?o(e):null;e?typeof t=="string"?S.innerHTML=t:t&&S.appendChild(t):S.innerHTML='

Nothing to show.

',re()}}function x(e,t){var d=_[h];d&&(d.setAttribute("aria-selected","false"),d.removeAttribute("data-active")),h=e;var v=_[e];v?(v.setAttribute("aria-selected","true"),v.setAttribute("data-active",""),n.setAttribute("aria-activedescendant",v.id),t!==!1&&v.scrollIntoView({block:"nearest"})):n.removeAttribute("aria-activedescendant"),o&&ne()}function O(){M=n.value;var e=M.trim(),t=E.map(function(r){return k.tier(r,e)});_.forEach(function(r,b){r.hidden=t[b]<0});var d=function(r){return t[r]<0?2:t[r]},v=fe.map(function(r,b){var q=Array.prototype.slice.call(r.querySelectorAll(".row")).sort(function(j,be){var se=Number(j.dataset.index),de=Number(be.dataset.index);return d(se)-d(de)||se-de});return q.forEach(function(j){r.appendChild(j)}),r.hidden=!q.length||t[Number(q[0].dataset.index)]<0,{g:r,pos:b,best:q.length?d(Number(q[0].dataset.index)):2}}).sort(function(r,b){return r.best-b.best||r.pos-b.pos});v.forEach(function(r){C.appendChild(r.g)}),s=[],v.forEach(function(r){Array.prototype.forEach.call(r.g.querySelectorAll(".row"),function(b){b.hidden||s.push(Number(b.dataset.index))})}),K.hidden=s.length>0,K.firstChild.textContent="Nothing matches “"+e+"”.",l.scrollTop=0,me(s.length===A?A+" "+(A===1?N:N+"s"):s.length+" of "+A),x(s.length?s[0]:-1,!1)}function R(e){if(X=e,c.setAttribute("data-view",e),e==="detail"){var t=re();t||(u.tabIndex=-1,t=u),t.focus({preventScroll:!0})}else{l.scrollTop=Y;var d=F==="touch"&&document.documentElement.getAttribute("data-keyboard")!=="hardware";(d?m:n).focus({preventScroll:!0})}}function ie(e){var t=E[e];if(t){if(!o){k.activate(t,i);return}x(e,!1),y==="push"&&(Y=l.scrollTop,c.setAttribute("data-enter","next"),R("detail"))}}if(m.addEventListener("keydown",function(e){if(F="key",!k.composing(e)){if(e.key==="Escape"){n.value&&(e.preventDefault(),e.stopPropagation(),n.value="",O());return}if(e.key==="ArrowDown"||e.key==="ArrowUp"){e.preventDefault(),s.length&&x(s[(s.indexOf(h)+(e.key==="ArrowDown"?1:s.length-1))%s.length]);return}if(e.key==="Enter"&&e.target===n&&!(e.ctrlKey||e.metaKey||e.altKey||e.shiftKey))if(e.preventDefault(),o&&y==="split"){var t=S.querySelector("button:not([disabled]), a[href]");t&&t.click()}else h>-1&&ie(h)}}),m.addEventListener("pointerdown",function(e){F=e.pointerType==="touch"?"touch":"pointer"},!0),n.addEventListener("input",O),n.addEventListener("focus",function(){D=!0,L()}),n.addEventListener("blur",function(){D=!1,L()}),l.addEventListener("pointerenter",function(e){e.pointerType!=="touch"&&(I=!0,L())}),l.addEventListener("pointerleave",function(){I=!1,L()}),l.addEventListener("pointermove",function(e){var t=e.target.closest(".row");t&&!(o&&y==="split")&&Number(t.dataset.index)!==h&&x(Number(t.dataset.index),!1)}),l.addEventListener("click",function(e){var t=e.target.closest(".row");t&&ie(Number(t.dataset.index))}),K.querySelector("button").addEventListener("click",function(){n.value="",O(),n.focus()}),o){u.querySelector(".command-back button").addEventListener("click",function(){c.setAttribute("data-enter","prev"),R("list")}),c.addEventListener("animationend",function(e){e.target.parentNode===c&&c.removeAttribute("data-enter")});var oe=function(){var e=P(a,"--basalt-size-list-width",320)+P(a,"--basalt-space-4",16)+P(a,"--basalt-size-breakpoint-container",480);y=a.clientWidth>=e?"split":"push",c.setAttribute("data-mode",y),L(),y==="split"&&X==="detail"&&R("list")};oe(),new ResizeObserver(oe).observe(a)}new ResizeObserver(ae).observe(C),ae(),g.glide(l,T,{active:".row[data-active]",attr:"data-active"}),s.length&&x(0,!1),o&&ne();var le={element:a,focus:function(){n.focus({preventScroll:!0}),n.select(),n.scrollIntoView({block:"nearest",inline:"nearest"})}};return a.__bhCommandList=le,V||(V=!0,document.addEventListener("keydown",function(e){if(!(e.defaultPrevented||document.documentElement.__bhPalette||String(e.key).toLowerCase()!=="k"||!(e.metaKey||e.ctrlKey)||e.altKey||e.shiftKey||k.composing(e))){var t=document.querySelector(".command-list");t&&t.__bhCommandList&&(e.preventDefault(),t.__bhCommandList.focus())}})),le}H.commandList=function(a,i){return J(typeof a=="string"?document.querySelector(a):a,i||{})},g.step(115,"wireCommandLists",function(){document.querySelectorAll(".command-list").forEach(function(a){if(!a.__bhCommandList){var i=a.querySelector('script[type="application/json"][data-commands]'),p={};if(i)try{p=JSON.parse(i.textContent)}catch{console.warn("Basalt: the command list's JSON is not valid");return}J(a,p)}})})})(window.Basalt); diff --git a/tools/html-skill/test/fixtures/baseline-forms.html b/tools/html-skill/test/fixtures/baseline-forms.html index eff925cf..be859936 100644 --- a/tools/html-skill/test/fixtures/baseline-forms.html +++ b/tools/html-skill/test/fixtures/baseline-forms.html @@ -8,21 +8,21 @@ - - - @@ -365,6 +378,7 @@

Heading two

Heading three

Heading four

Rename sandbox

The new name shows everywhere.

Delete sandbox?

This cannot be undone.

Details

A side panel.

+

Declare an incident

Say what is happening.

Search

0 results

@@ -458,6 +472,23 @@

Client work and other projects

+
+

Runs

+
    +
  1. Build Passed142 routes2.1 s
  2. +
  3. Test Failedunit1.4 s
  4. +
  5. Deploy Blocked by Testproduction
  6. +
+
    +
  1. BuildPassed2.1 s
  2. +
  3. ChecksCanceled
  4. +
+
    +
  1. Passed: Read deploy.yaml84 lines · 0.7 s
  2. +
  3. Canceled Page the on-call0.3 s
    Canceled by Priya Shah
  4. +
+
+ diff --git a/tools/html-skill/test/fixtures/baseline-rest.html b/tools/html-skill/test/fixtures/baseline-rest.html index 812f6136..8838693b 100644 --- a/tools/html-skill/test/fixtures/baseline-rest.html +++ b/tools/html-skill/test/fixtures/baseline-rest.html @@ -7,12 +7,12 @@ The rest of the overlays - - - @@ -47,8 +47,8 @@ (function(P){"use strict";var R=P._;R.glide=function(r,a,n){var b=matchMedia("(prefers-reduced-motion: reduce), (forced-colors: active), (hover: none), (pointer: coarse)"),g=n.active,u=n.item?"pointer":"keyboard",f=null,c="",h=!1,l;function E(){return r.hasAttribute("data-idle")?null:r.querySelector(g)}function s(){return!b.matches&&(n.item?u==="pointer":u!=="touch")}function x(){return a.dataset.state==="on"}function q(e){var t=r.getBoundingClientRect(),i=r.offsetWidth>0?t.width/r.offsetWidth:1,o=Math.abs(i-1)<.01?1:i,d=n.shape?e.querySelector(n.shape):null;if(d){var p=d.getBoundingClientRect();return{x:(p.left-t.left)/o-r.clientLeft+r.scrollLeft,y:(p.top-t.top)/o-r.clientTop+r.scrollTop,w:p.width/o,h:p.height/o}}var m=e.getBoundingClientRect(),y=getComputedStyle(e,"::before"),w=function(W){return Math.round(W*64)/64};return{x:(m.left-t.left)/o-r.clientLeft+r.scrollLeft+w(parseFloat(y.left)||0),y:(m.top-t.top)/o-r.clientTop+r.scrollTop+w(parseFloat(y.top)||0),w:w(parseFloat(y.width))||m.width/o,h:w(parseFloat(y.height))||m.height/o}}function L(e){var t=a.style;t.setProperty("--plate-x",e.x+"px"),t.setProperty("--plate-y",e.y+"px"),t.setProperty("--plate-w",e.w+"px"),t.setProperty("--plate-h",e.h+"px")}function F(e){a.setAttribute("data-snap",""),e(),a.offsetWidth,a.removeAttribute("data-snap")}function B(){if(x()){var e=getComputedStyle(a),t=new DOMMatrixReadOnly(e.transform);L({x:t.m41,y:t.m42,w:parseFloat(e.width),h:parseFloat(e.height)}),a.dataset.state="off",f=null,c=""}}function v(){if(clearTimeout(l),l=void 0,r.toggleAttribute("data-glide",s()),!s()){(a.dataset.state!=="off"||f)&&F(function(){a.dataset.state="off"}),f=null,c="";return}var e=E();if(!e){l=setTimeout(function(){E()||B()},0);return}var t=q(e),i=t.x+" "+t.y+" "+t.w+" "+t.h;if(!(e===f&&x()&&i===c)){c=i;var o=x()?1:parseFloat(getComputedStyle(a).opacity)||0,d=!h&&e!==f&&u==="pointer"&&o>.01;h=!1,d?(L(t),a.dataset.state="on"):F(function(){L(t),a.dataset.state="on"}),f=e}}function T(e){var t=u;if(e.type==="keydown"?/^(Shift|Control|Alt|Meta)$/.test(e.key)||(t="keyboard"):t=e.pointerType==="touch"?"touch":"pointer",t!==u){var i=s();u=t,n.item&&r.toggleAttribute("data-keys",u==="keyboard"),s()!==i&&v()}}function C(e){if(e.pointerType!=="touch"){var t=e.target.closest(n.item),i=r.querySelector(g);t!==i&&(i&&i.removeAttribute("data-hovered"),t&&t.setAttribute("data-hovered",""))}}function A(){var e=r.querySelector(g);e&&e.removeAttribute("data-hovered")}n.item&&(r.addEventListener("pointerover",C),r.addEventListener("pointerleave",A)),a.dataset.state="off";var S=new MutationObserver(v);S.observe(r,{subtree:!0,childList:!0,attributes:!0,attributeFilter:[n.item?"data-hovered":n.attr,"data-idle"]});var M=new ResizeObserver(function(){h=!0,c="",v()});M.observe(r),b.addEventListener("change",v);var O=["pointermove","pointerdown","keydown"];return O.forEach(function(e){document.addEventListener(e,T,{capture:!0,passive:!0})}),v(),function(){clearTimeout(l),S.disconnect(),M.disconnect(),b.removeEventListener("change",v),O.forEach(function(e){document.removeEventListener(e,T,{capture:!0})}),n.item&&(r.removeEventListener("pointerover",C),r.removeEventListener("pointerleave",A),A()),r.removeAttribute("data-glide"),r.removeAttribute("data-keys")}}})(window.Basalt); (function(c){"use strict";var i=c._;i.step(60,"tableHint",function(){document.querySelectorAll(".table-hint").forEach(function(e){var t=e.previousElementSibling;if(!(e.__bhHint||!t||!t.classList.contains("table-wrap"))){e.__bhHint=!0,e.setAttribute("aria-hidden","true");var s=e.getAttribute("data-hint")||"Scroll sideways to see all {n} columns",l=function(){var r=t.querySelector("table"),u=r?r.querySelectorAll("colgroup > col").length||(r.querySelector("tr")||{children:[]}).children.length:0,o=t.scrollWidth>t.clientWidth;e.textContent=o?s.replace("{n}",u):"",e.hidden=!o};l();var a=new ResizeObserver(l);a.observe(t);var n=t.querySelector("table");n&&a.observe(n)}})})})(window.Basalt); (function(u){"use strict";var r=u._,f=r.still||(r.still=function(){var t=document.documentElement;t.setAttribute("data-still",""),requestAnimationFrame(function(){requestAnimationFrame(function(){t.removeAttribute("data-still")})})});function i(t){return Array.prototype.slice.call(t.querySelectorAll('tbody td.select-col input[type="checkbox"]'))}function s(t,e){var n=i(t),c=0;n.forEach(function(l){var a=l.closest("tr");a&&a.setAttribute("aria-selected",String(l.checked)),l.checked&&c++}),e.checked=n.length>0&&c===n.length,e.indeterminate=c>0&&c0)||!r||!n)){var i=function(){for(var l=0,u=1;u<=p;u++)l+=n.children[u-1].getBoundingClientRect().width,a.style.setProperty(u===p?"--_pin-end":"--_pin-"+u,l+"px");r.style.scrollPaddingInlineStart=l+"px"};i(),new ResizeObserver(i).observe(a);var f=function(){r.toggleAttribute("data-scrolled",Math.abs(r.scrollLeft)>0)};f(),r.addEventListener("scroll",f,{passive:!0}),r.addEventListener("focusin",function(l){var u=l.target.closest&&l.target.closest("td, th"),d=u&&u.parentElement;if(!(!u||!d||d.hasAttribute("data-empty")||Array.prototype.indexOf.call(d.children,u)0?r.scrollLeft-=c*h:g>0&&(r.scrollLeft+=c*Math.min(g,-h))}})}}function F(a){var p='a[href], button, input, select, textarea, summary, [tabindex], [role="checkbox"], [role="button"]',r=["fontFamily","fontSize","fontWeight","fontVariantNumeric","letterSpacing","wordSpacing","lineHeight","color"],n=null,i=null,f=null,l=null,u=0,d=0,v=0,o=-1e9,c=!1;function A(t){var e=t.children.length===1&&t.childNodes.length===1?t.children[0]:null;return e&&getComputedStyle(e).display==="block"&&getComputedStyle(e).overflowX!=="visible"?e:t}function h(t){var e=A(t),s=getComputedStyle(e);if(e.scrollWidth>e.clientWidth)return!0;var m=document.createRange();return m.selectNodeContents(e),m.getBoundingClientRect().width>e.clientWidth-parseFloat(s.paddingLeft)-parseFloat(s.paddingRight)+.5}function g(){v=0,a.querySelectorAll("tbody > tr:not([data-empty]) > :is(td, th), thead > tr > th:not([data-sortable])").forEach(function(t){var e=t.hasAttribute("tabindex")&&!t.hasAttribute("data-cut")||t.querySelector(p);if(!e){var s=h(t);s&&!t.hasAttribute("data-cut")?(t.setAttribute("data-cut",""),t.setAttribute("tabindex","0")):!s&&t.hasAttribute("data-cut")&&(t.removeAttribute("data-cut"),t.removeAttribute("tabindex"),i===t&&x())}})}function b(){v||(v=requestAnimationFrame(g))}function H(){return n||(n=document.createElement("div"),n.className="cell-peek",n.setAttribute("aria-hidden","true"),n.addEventListener("pointerenter",function(){clearTimeout(d),c=!0}),n.addEventListener("pointerleave",function(t){c=!1,t.relatedTarget instanceof Node&&i&&i.contains(t.relatedTarget)||(f=null),L()}),document.body.appendChild(n),n)}function T(){if(!(!n||!i)){var t=i.getBoundingClientRect(),e=(i.closest(".table-wrap")||a).getBoundingClientRect(),s=getComputedStyle(i).direction==="rtl",m=document.documentElement,y="var(--basalt-space-2)",R="calc("+m.clientWidth+"px - 2 * "+y+")";n.style.minWidth="min("+t.width+"px, "+R+")",n.style.minHeight=t.height+"px",n.style.maxWidth="min(max("+t.width+"px, "+(s?t.right-e.left:e.right-t.left)+"px), "+R+")",n.style.left="0px",n.style.top="0px";var S=n.getBoundingClientRect();n.style.left="max("+y+", min("+(s?t.right-S.width:t.left)+"px, calc("+(m.clientWidth-S.width)+"px - "+y+")))",n.style.top="max("+y+", min("+t.top+"px, calc("+(m.clientHeight-S.height)+"px - "+y+")))"}}function E(t){if(clearTimeout(u),clearTimeout(d),l!==t){var e=getComputedStyle(t),s=H();s.textContent=t.textContent.trim(),r.forEach(function(m){s.style[m]=e[m]}),s.style.paddingInline="calc("+e.paddingLeft+" - var(--basalt-size-hairline)) calc("+e.paddingRight+" - var(--basalt-size-hairline))",s.style.paddingBlock="0px",s.toggleAttribute("data-focus",document.activeElement===t&&t.matches(":focus-visible")),i=t,T(),s.setAttribute("data-open","")}}function x(){if(clearTimeout(u),clearTimeout(d),!i||!n){i=null;return}n.removeAttribute("data-open"),n.removeAttribute("data-focus"),i=null,o=performance.now()}function L(){clearTimeout(d),d=setTimeout(function(){var t=document.activeElement,e=t&&t.hasAttribute&&t.hasAttribute("data-cut")&&a.contains(t)?t:null;if(e){i!==e&&E(e);return}f&&i===f||c||x()},100)}function C(t){var e=t instanceof Element?t.closest("[data-cut]"):null;return e&&a.contains(e)?e:null}a.addEventListener("pointerover",function(t){var e=C(t.target);!e||e===f||(f=e,clearTimeout(u),clearTimeout(d),i!==e&&(i||performance.now()-o<400?E(e):u=setTimeout(function(){E(e)},600)))}),a.addEventListener("pointerout",function(t){var e=C(t.target);if(!(!e||e!==f)){var s=t.relatedTarget;s instanceof Node&&(e.contains(s)||n&&n.contains(s))||(f=null,clearTimeout(u),l===e&&(l=null),L())}}),a.addEventListener("focusin",function(t){var e=C(t.target);e&&(l&&l!==e&&(l=null),E(e))}),a.addEventListener("focusout",function(t){var e=C(t.target);e&&(l===e&&(l=null),L())}),window.addEventListener("keydown",function(t){t.key!=="Escape"||!i||(l=i,x(),t.stopPropagation())},!0),window.addEventListener("scroll",function(){i&&T()},{capture:!0,passive:!0}),new ResizeObserver(b).observe(a),new MutationObserver(b).observe(a,{childList:!0,subtree:!0,characterData:!0});var N=new MutationObserver(b);N.observe(document.head,{childList:!0,subtree:!0,characterData:!0}),N.observe(document.documentElement,{attributes:!0,attributeFilter:["style","class","lang","dir"]}),window.addEventListener("resize",b),document.fonts&&document.fonts.ready.then(b),g()}w.step(65,"stillTable",function(){document.querySelectorAll("table[data-fixed]").forEach(function(a){a.__bhStill||(a.__bhStill=!0,W(a),O(a),F(a))})})})(window.Basalt); -(function(_){"use strict";var y=_._,O=6,K=10,P=0,E="mouse";function l(r,n,a,d){var f=document.createElement(r);n&&(f.className=n);for(var p in a||{})f.setAttribute(p,a[p]);return d!=null&&(f.innerHTML=d),f}function k(r,n,a,d){r.__bhResult||(r.__bhResult=!0,r.innerHTML='',r.lastChild.textContent=n),r.firstChild.textContent=n,clearTimeout(r.__bhTimer);var f=a??(Number(r.getAttribute("data-delay"))||400);d?r.lastChild.textContent=n:r.__bhTimer=setTimeout(function(){r.lastChild.textContent=n},f)}_.filterResult=k;function x(r,n){var a=document.getElementById(r),d=a&&(a.tagName==="TABLE"?a:a.querySelector("table"));if(!(!d||!d.tBodies[0])){var f=Array.prototype.filter.call(document.querySelectorAll('.filter[data-for="'+r+'"]'),function(c){return c.__bhFilter}),p=Array.prototype.filter.call(d.tBodies[0].rows,function(c){return!c.hasAttribute("data-empty")}),u=0;p.forEach(function(c){var m=f.every(function(g){return g.__bhFilter.pass(c)});c.hidden=!m,m&&u++}),d.querySelectorAll("tr[data-empty]").forEach(function(c){c.hidden=u!==0}),document.querySelectorAll('.filter-result[data-for="'+r+'"]').forEach(function(c){k(c,"Showing "+u+" of "+p.length+" "+(c.getAttribute("data-noun")||"rows"),null,n)})}}_.refreshFilter=x;function T(r){return Array.prototype.slice.call(r.querySelectorAll("input:not(:disabled)")).filter(function(n){return!n.closest("[hidden]")})}function j(r){var n=Array.prototype.slice.call(r.querySelectorAll("label")),a=n.map(function(e){var t=e.querySelector('input[type="checkbox"]');return{input:t,label:e.textContent.trim()}}).filter(function(e){return e.input});if(a.length){var d=++P,f=r.getAttribute("data-label")||"Filter",p=f.toLowerCase(),u={label:"bh-filter-label-"+d,count:"bh-filter-count-"+d,pop:"bh-filter-pop-"+d,rows:"bh-filter-rows-"+d},c=r.hasAttribute("data-toolbar")||a.length>O,m=function(){return a.filter(function(e){return e.input.checked})},g=l("button","btn filter-clear",{type:"button","data-variant":"ghost","data-size":"sm"},"Clear"),s={head:null,count:null,value:null,trigger:null,foot:null};if(r.textContent="",c){r.setAttribute("data-popup","");var W=a.length>=K;s.trigger=l("button","btn filter-trigger",{type:"button",popovertarget:u.pop},' '),s.trigger.querySelector(".filter-trigger-label").textContent=f,s.value=s.trigger.querySelector(".filter-trigger-value");var b=l("div","panel float filter-popup",{popover:"",id:u.pop,role:"dialog","aria-labelledby":u.label,tabindex:"-1"}),B=l("span","plate",{"aria-hidden":"true"});b.appendChild(B),b.appendChild(l("span","visually-hidden",{id:u.label})).textContent=f;var o=null;if(W){var D=l("div","filter-band",null,'');o=D.appendChild(l("input","filter-band-input",{type:"text",role:"searchbox","aria-label":"Search "+p,"aria-controls":u.rows,placeholder:"Search "+p,autocomplete:"off",autocorrect:"off",spellcheck:"false"})),b.appendChild(D)}var h=l("div","filter-rows",{id:u.rows,role:"group","aria-labelledby":u.label,"aria-describedby":u.count});a.forEach(function(e){var t=l("label","filter-row");t.appendChild(e.input),t.appendChild(l("span","filter-row-label")).textContent=e.label,e.row=t,h.appendChild(t)});var L=l("p","filter-none",{hidden:""});L.textContent="No "+p+" matches.",h.appendChild(L),b.appendChild(h),s.count=l("span","filter-count",{id:u.count});var S=l("div","filter-foot");S.appendChild(s.count),S.appendChild(g),b.appendChild(S),r.appendChild(s.trigger),r.appendChild(b);var C=null,w=function(e){C!==e&&(C&&C.removeAttribute("data-highlighted"),C=e,e&&e.setAttribute("data-highlighted",""))};h.addEventListener("pointermove",function(e){var t=e.target.closest(".filter-row");t&&w(t)}),h.addEventListener("pointerout",function(e){var t=e.target.closest(".filter-row");t&&t===C&&!t.contains(e.relatedTarget)&&w(null)}),h.addEventListener("focusin",function(e){var t=e.target.closest(".filter-row");t&&w(t)}),h.addEventListener("focusout",function(e){var t=e.target.closest(".filter-row");t&&t===C&&w(null)}),h.addEventListener("keydown",function(e){if(o&&e.key.length===1&&e.key!==" "&&!e.ctrlKey&&!e.metaKey&&!e.altKey){o.focus();return}var t={ArrowDown:1,ArrowUp:-1,Home:-1/0,End:1/0}[e.key];if(t!==void 0){var i=T(h);if(i.length){e.preventDefault();var v=i.indexOf(document.activeElement);if(o&&t===-1&&v<=0){o.focus();return}var F=isFinite(t)?Math.min(i.length-1,Math.max(0,v+t)):t<0?0:i.length-1;i[F].focus()}}});var q=function(){var e=o?o.value.trim().toLowerCase():"",t=!1;a.forEach(function(i){var v=e!==""&&i.label.toLowerCase().indexOf(e)<0;i.row.hidden=v,v||(t=!0)}),L.hidden=t};o&&(o.addEventListener("input",q),o.addEventListener("keydown",function(e){if(e.key==="ArrowDown"){var t=T(h)[0];t&&(e.preventDefault(),t.focus())}else e.key==="Escape"&&o.value&&(e.preventDefault(),e.stopPropagation(),o.value="",q())})),b.__bhFilter={plate:B,band:o,reset:function(){o&&(o.value="",q()),w(null)}}}else{var A=l("div","filter-head");A.appendChild(l("span","filter-label",{id:u.label},null)).textContent=f;var N=l("span","filter-count",{id:u.count,"data-reserved":"","data-any":"Any","data-widest":a.length+" of "+a.length});s.value=N.appendChild(l("span","filter-count-value")),A.appendChild(N),A.appendChild(g);var R=l("div","filter-chips",{role:"group","aria-labelledby":u.label,"aria-describedby":u.count});a.forEach(function(e){var t=l("label","chip");e.input.className="chip-input",t.appendChild(e.input);var i=t.appendChild(l("span","chip-seat",{"aria-hidden":"true"},y.glyph("plus")+y.glyph("check")));i.children[0].classList.add("chip-plus"),i.children[1].classList.add("chip-check"),t.appendChild(l("span","chip-label")).textContent=e.label,R.appendChild(t)}),r.appendChild(A),r.appendChild(R)}var H=Number(r.getAttribute("data-column"))-1,I=r.getAttribute("data-for");r.__bhFilter={pass:function(e){var t=m();if(!t.length||!(H>=0))return!0;var i=e.children[H],v=i?(i.hasAttribute("data-value")?i.getAttribute("data-value"):i.textContent.trim()).toLowerCase():"";return t.some(function(F){return F.input.value.toLowerCase()===v})}};var M=function(e){var t=m(),i=t.length===0?"Any":t.length+" of "+a.length;c?(s.count.textContent=i,s.value.textContent=t.length===0?"Any":t.length===1?t[0].label:t[0].label+" +"+(t.length-1),s.trigger.toggleAttribute("data-active",t.length>0)):s.value.textContent=i,t.length===0?g.setAttribute("aria-disabled","true"):g.removeAttribute("aria-disabled"),I&&x(I,!e),e&&r.dispatchEvent(new CustomEvent("filterchange",{bubbles:!0,detail:{values:t.map(function(v){return v.input.value})}}))};r.addEventListener("change",function(e){e.target.matches&&e.target.matches('input[type="checkbox"]')&&M(!0)}),g.addEventListener("click",function(){g.getAttribute("aria-disabled")!=="true"&&(a.forEach(function(e){e.input.checked=!1}),M(!0))}),M(!1)}}y.step(75,"filter",function(){document.querySelectorAll(".filter-result").forEach(function(n){n.__bhResult||k(n,n.textContent)}),document.querySelectorAll(".filter").forEach(function(n){n.__bhFilter||j(n)});var r={};document.querySelectorAll(".filter[data-for]").forEach(function(n){var a=n.getAttribute("data-for");r[a]||(r[a]=1,x(a,!0))})}),y.step(130,"filterPopup",function(){document.documentElement.__bhFilterWired||(document.documentElement.__bhFilterWired=!0,document.addEventListener("pointerdown",function(r){E=r.pointerType},!0),document.addEventListener("keydown",function(){E="keyboard"},!0),document.addEventListener("toggle",function(r){var n=r.target,a=n.__bhFilter;!a||!n.matches||!n.matches(".filter-popup")||(r.newState==="open"?(n.__unglide=y.glide(n,a.plate,{active:"[data-highlighted]",attr:"data-highlighted"}),a.band&&E==="touch"&&n.focus({preventScroll:!0})):(n.__unglide&&(n.__unglide(),n.__unglide=null),a.reset()))},!0))})})(window.Basalt); +(function(k){"use strict";var w=k._;function W(n,f){var r=n.children[f];if(!r||r.hasAttribute("data-not-observed"))return null;var i=r.hasAttribute("data-value")?r.getAttribute("data-value"):r.textContent.trim();return i===""?null:i}function S(n){var f=n.__bhN||0;Array.prototype.forEach.call(n.tBodies[0]?n.tBodies[0].rows:[],function(r){r.__bhI==null&&(r.__bhI=f++)}),n.__bhN=f}function O(n,f,r,i){var a=n.tBodies[0];if(a){S(n);var p=Array.prototype.filter.call(a.rows,function(o){return!o.hasAttribute("data-empty")}),l=Array.prototype.filter.call(a.rows,function(o){return o.hasAttribute("data-empty")}),u=r==="ascending"?1:-1,c=new Intl.Collator(void 0,{numeric:!0,sensitivity:"base"}),v=p.map(function(o){var s=r?W(o,f):null;return{row:o,i:o.__bhI,v:s,n:i&&s!==null?parseFloat(String(s).replace(/[^\d.eE+-]/g,"")):NaN}});v.sort(function(o,s){if(o.v===null||s.v===null)return o.v===s.v?o.i-s.i:o.v===null?1:-1;var m=i&&!isNaN(o.n)&&!isNaN(s.n)?o.n-s.n:c.compare(o.v,s.v);return m?u*m:o.i-s.i}),v.forEach(function(o){a.appendChild(o.row)}),l.forEach(function(o){a.appendChild(o)})}}function F(n){var f=n.tHead&&n.tHead.rows[0];f&&Array.prototype.forEach.call(f.cells,function(r,i){if(!(!r.hasAttribute("data-sortable")||r.__bhSort)){r.__bhSort=!0,r.hasAttribute("scope")||r.setAttribute("scope","col");var a=document.createElement("button");a.type="button",a.className="sort";var p=document.createElement("span");p.className="sort-label",Array.prototype.slice.call(r.childNodes).forEach(function(u){u.classList&&u.classList.contains("explainer")||p.appendChild(u)});var l=document.createElement("span");l.className="sort-seat",l.setAttribute("aria-hidden","true"),l.innerHTML=w.icon("CaretUpDown")+w.glyph("arrow-up")+w.glyph("arrow-down"),["sort-caret","sort-up","sort-down"].forEach(function(u,c){l.children[c].classList.add(u)}),a.appendChild(p),a.appendChild(l),r.insertBefore(a,r.firstChild),a.addEventListener("click",function(){var u=r.getAttribute("aria-sort"),c=r.getAttribute("data-first-sort")||(r.hasAttribute("data-numeric")?"descending":"ascending"),v=u?u===c?c==="ascending"?"descending":"ascending":null:c,o=r.dispatchEvent(new CustomEvent("sortchange",{bubbles:!0,cancelable:!0,detail:{index:i,direction:v}}));Array.prototype.forEach.call(f.cells,function(s){s.removeAttribute("aria-sort")}),v&&r.setAttribute("aria-sort",v),o&&O(n,i,v,r.hasAttribute("data-numeric"))})}})}function H(n){var f=parseInt(n.getAttribute("data-pinned"),10),r=n.closest(".table-wrap"),i=n.rows[0];if(!(!(f>0)||!r||!i)){var a=function(){for(var l=0,u=1;u<=f;u++)l+=i.children[u-1].getBoundingClientRect().width,n.style.setProperty(u===f?"--_pin-end":"--_pin-"+u,l+"px");r.style.scrollPaddingInlineStart=l+"px"};a(),new ResizeObserver(a).observe(n);var p=function(){r.toggleAttribute("data-scrolled",Math.abs(r.scrollLeft)>0)};p(),r.addEventListener("scroll",p,{passive:!0}),r.addEventListener("focusin",function(l){if(l.target.matches(":focus-visible")){var u=l.target.closest&&l.target.closest("td, th"),c=u&&u.parentElement;if(!(!u||!c||c.hasAttribute("data-empty")||Array.prototype.indexOf.call(c.children,u)0?r.scrollLeft-=s*h:A>0&&(r.scrollLeft+=s*Math.min(A,-h))}}})}}function I(n){var f='a[href], button, input, select, textarea, summary, [tabindex], [role="checkbox"], [role="button"]',r=["fontFamily","fontSize","fontWeight","fontVariantNumeric","letterSpacing","wordSpacing","lineHeight","color"],i=null,a=null,p=null,l=null,u=0,c=0,v=0,o=-1e9,s=!1;function m(t){var e=t.children.length===1&&t.childNodes.length===1?t.children[0]:null;return e&&getComputedStyle(e).display==="block"&&getComputedStyle(e).overflowX!=="visible"?e:t}var h=null;function A(t){var e=m(t),d=getComputedStyle(e);return e.scrollWidth>e.clientWidth?!0:(h=h||document.createRange(),h.selectNodeContents(e),h.getBoundingClientRect().width>e.clientWidth-parseFloat(d.paddingLeft)-parseFloat(d.paddingRight)+.5)}function N(){v=0,n.querySelectorAll("tbody > tr:not([data-empty]) > :is(td, th), thead > tr > th:not([data-sortable])").forEach(function(t){var e=t.hasAttribute("tabindex")&&!t.hasAttribute("data-cut")||t.querySelector(f);if(!e){var d=A(t);d&&!t.hasAttribute("data-cut")?(t.setAttribute("data-cut",""),t.setAttribute("tabindex","0")):!d&&t.hasAttribute("data-cut")&&(t.removeAttribute("data-cut"),t.removeAttribute("tabindex"),a===t&&C())}})}function b(){v||(v=requestAnimationFrame(N))}function z(){return i||(i=document.createElement("div"),i.className="cell-peek",i.setAttribute("aria-hidden","true"),i.addEventListener("pointerenter",function(){clearTimeout(c),s=!0}),i.addEventListener("pointerleave",function(t){s=!1,t.relatedTarget instanceof Node&&a&&a.contains(t.relatedTarget)||(p=null),L()}),document.body.appendChild(i),i)}function T(){if(!(!i||!a)){var t=a.getBoundingClientRect(),e=(a.closest(".table-wrap")||n).getBoundingClientRect(),d=getComputedStyle(a).direction==="rtl",g=document.documentElement,y="var(--basalt-space-2)",R="calc("+g.clientWidth+"px - 2 * "+y+")";i.style.minWidth="min("+t.width+"px, "+R+")",i.style.minHeight=t.height+"px",i.style.maxWidth="min(max("+t.width+"px, "+(d?t.right-e.left:e.right-t.left)+"px), "+R+")",i.style.left="0px",i.style.top="0px";var _=i.getBoundingClientRect();i.style.left="max("+y+", min("+(d?t.right-_.width:t.left)+"px, calc("+(g.clientWidth-_.width)+"px - "+y+")))",i.style.top="max("+y+", min("+t.top+"px, calc("+(g.clientHeight-_.height)+"px - "+y+")))"}}function E(t){if(clearTimeout(u),clearTimeout(c),l!==t){var e=getComputedStyle(t),d=z();d.textContent=t.textContent.trim(),r.forEach(function(g){d.style[g]=e[g]}),d.style.paddingInline="calc("+e.paddingLeft+" - var(--basalt-size-hairline)) calc("+e.paddingRight+" - var(--basalt-size-hairline))",d.style.paddingBlock="0px",d.toggleAttribute("data-focus",document.activeElement===t&&t.matches(":focus-visible")),a=t,T(),d.setAttribute("data-open","")}}function C(){if(clearTimeout(u),clearTimeout(c),!a||!i){a=null;return}i.removeAttribute("data-open"),i.removeAttribute("data-focus"),a=null,o=performance.now()}function L(){clearTimeout(c),c=setTimeout(function(){var t=document.activeElement,e=t&&t.hasAttribute&&t.hasAttribute("data-cut")&&n.contains(t)?t:null;if(e){a!==e&&E(e);return}p&&a===p||s||C()},100)}function x(t){var e=t instanceof Element?t.closest("[data-cut]"):null;return e&&n.contains(e)?e:null}n.addEventListener("pointerover",function(t){var e=x(t.target);!e||e===p||(p=e,clearTimeout(u),clearTimeout(c),a!==e&&(a||performance.now()-o<400?E(e):u=setTimeout(function(){E(e)},600)))}),n.addEventListener("pointerout",function(t){var e=x(t.target);if(!(!e||e!==p)){var d=t.relatedTarget;d instanceof Node&&(e.contains(d)||i&&i.contains(d))||(p=null,clearTimeout(u),l===e&&(l=null),L())}}),n.addEventListener("focusin",function(t){var e=x(t.target);e&&(l&&l!==e&&(l=null),E(e))}),n.addEventListener("focusout",function(t){var e=x(t.target);e&&(l===e&&(l=null),L())}),window.addEventListener("keydown",function(t){t.key!=="Escape"||!a||(l=a,C(),t.stopPropagation())},!0),window.addEventListener("scroll",function(){a&&T()},{capture:!0,passive:!0}),new ResizeObserver(b).observe(n),new MutationObserver(b).observe(n,{childList:!0,subtree:!0,characterData:!0});var B=new MutationObserver(b);B.observe(document.head,{childList:!0,subtree:!0,characterData:!0}),B.observe(document.documentElement,{attributes:!0,attributeFilter:["style","class","lang","dir"]}),window.addEventListener("resize",b),document.fonts&&document.fonts.ready.then(b),N()}w.step(65,"stillTable",function(){document.querySelectorAll("table[data-fixed]").forEach(function(n){n.__bhStill||(n.__bhStill=!0,S(n),F(n),H(n),I(n))})})})(window.Basalt); +(function(_){"use strict";var y=_._,K=6,P=10,j=0,E="mouse";function i(r,a,n,d){var s=document.createElement(r);a&&(s.className=a);for(var p in n||{})s.setAttribute(p,n[p]);return d!=null&&(s.innerHTML=d),s}function x(r,a,n,d){r.__bhResult||(r.__bhResult=!0,r.innerHTML='',r.lastChild.textContent=a),r.firstChild.textContent=a,clearTimeout(r.__bhTimer);var s=n??(Number(r.getAttribute("data-delay"))||400);d?r.lastChild.textContent=a:r.__bhTimer=setTimeout(function(){r.lastChild.textContent=a},s)}_.filterResult=x;function k(r,a){var n=document.getElementById(r),d=n&&(n.tagName==="TABLE"?n:n.querySelector("table"));if(!(!d||!d.tBodies[0])){var s=Array.prototype.filter.call(document.querySelectorAll('.filter[data-for="'+r+'"]'),function(c){return c.__bhFilter}),p=Array.prototype.filter.call(d.tBodies[0].rows,function(c){return!c.hasAttribute("data-empty")}),u=0;p.forEach(function(c){var m=s.every(function(g){return g.__bhFilter.pass(c)});c.hidden=!m,m&&u++}),d.querySelectorAll("tr[data-empty]").forEach(function(c){c.hidden=u!==0}),document.querySelectorAll('.filter-result[data-for="'+r+'"]').forEach(function(c){x(c,"Showing "+u+" of "+p.length+" "+(c.getAttribute("data-noun")||"rows"),null,a)})}}_.refreshFilter=k;function T(r){return Array.prototype.slice.call(r.querySelectorAll("input:not(:disabled)")).filter(function(a){return!a.closest("[hidden]")})}function z(r){var a=Array.prototype.slice.call(r.querySelectorAll("label")),n=a.map(function(e){var t=e.querySelector('input[type="checkbox"]');return{input:t,label:e.textContent.trim()}}).filter(function(e){return e.input});if(n.length){var d=++j,s=r.getAttribute("data-label")||"Filter",p=s.toLowerCase(),u={label:"bh-filter-label-"+d,count:"bh-filter-count-"+d,pop:"bh-filter-pop-"+d,rows:"bh-filter-rows-"+d},c=r.hasAttribute("data-toolbar")||n.length>K,m=function(){return n.filter(function(e){return e.input.checked})},g=i("button","btn filter-clear",{type:"button","data-variant":"ghost","data-size":"sm"},"Clear"),f={head:null,count:null,value:null,trigger:null,foot:null};if(r.textContent="",c){r.setAttribute("data-popup","");var W=n.length>=P;if(f.trigger=i("button","btn filter-trigger",{type:"button",popovertarget:u.pop},' '),f.trigger.querySelector(".filter-trigger-label").textContent=s,f.value=f.trigger.querySelector(".filter-trigger-value"),r.hasAttribute("data-toolbar")){var B=f.value;f.value=B.appendChild(i("span","filter-trigger-now")),["Any"].concat(n.map(function(e){return e.label+(n.length>1?" +"+(n.length-1):"")})).forEach(function(e){B.appendChild(i("span","filter-trigger-sizer",{"aria-hidden":"true"})).textContent=e})}var b=i("div","panel float filter-popup",{popover:"",id:u.pop,role:"dialog","aria-labelledby":u.label,tabindex:"-1"}),D=i("span","plate",{"aria-hidden":"true"});b.appendChild(D),b.appendChild(i("span","visually-hidden",{id:u.label})).textContent=s;var o=null;if(W){var H=i("div","filter-band",null,'');o=H.appendChild(i("input","filter-band-input",{type:"text",role:"searchbox","aria-label":"Search "+p,"aria-controls":u.rows,placeholder:"Search "+p,autocomplete:"off",autocorrect:"off",spellcheck:"false"})),b.appendChild(H)}var h=i("div","filter-rows",{id:u.rows,role:"group","aria-labelledby":u.label,"aria-describedby":u.count});n.forEach(function(e){var t=i("label","filter-row");t.appendChild(e.input),t.appendChild(i("span","filter-row-label")).textContent=e.label,e.row=t,h.appendChild(t)});var L=i("p","filter-none",{hidden:""});L.textContent="No "+p+" matches.",h.appendChild(L),b.appendChild(h),f.count=i("span","filter-count",{id:u.count});var S=i("div","filter-foot");S.appendChild(f.count),S.appendChild(g),b.appendChild(S),r.appendChild(f.trigger),r.appendChild(b);var C=null,w=function(e){C!==e&&(C&&C.removeAttribute("data-highlighted"),C=e,e&&e.setAttribute("data-highlighted",""))};h.addEventListener("pointermove",function(e){var t=e.target.closest(".filter-row");t&&w(t)}),h.addEventListener("pointerout",function(e){var t=e.target.closest(".filter-row");t&&t===C&&!t.contains(e.relatedTarget)&&w(null)}),h.addEventListener("focusin",function(e){var t=e.target.closest(".filter-row");t&&w(t)}),h.addEventListener("focusout",function(e){var t=e.target.closest(".filter-row");t&&t===C&&w(null)}),h.addEventListener("keydown",function(e){if(o&&e.key.length===1&&e.key!==" "&&!e.ctrlKey&&!e.metaKey&&!e.altKey){o.focus();return}var t={ArrowDown:1,ArrowUp:-1,Home:-1/0,End:1/0}[e.key];if(t!==void 0){var l=T(h);if(l.length){e.preventDefault();var v=l.indexOf(document.activeElement);if(o&&t===-1&&v<=0){o.focus();return}var F=isFinite(t)?Math.min(l.length-1,Math.max(0,v+t)):t<0?0:l.length-1;l[F].focus()}}});var q=function(){var e=o?o.value.trim().toLowerCase():"",t=!1;n.forEach(function(l){var v=e!==""&&l.label.toLowerCase().indexOf(e)<0;l.row.hidden=v,v||(t=!0)}),L.hidden=t};o&&(o.addEventListener("input",q),o.addEventListener("keydown",function(e){if(e.key==="ArrowDown"){var t=T(h)[0];t&&(e.preventDefault(),t.focus())}else e.key==="Escape"&&o.value&&(e.preventDefault(),e.stopPropagation(),o.value="",q())})),b.__bhFilter={plate:D,band:o,reset:function(){o&&(o.value="",q()),w(null)}}}else{var A=i("div","filter-head");A.appendChild(i("span","filter-label",{id:u.label},null)).textContent=s;var N=i("span","filter-count",{id:u.count,"data-reserved":"","data-any":"Any","data-widest":n.length+" of "+n.length});f.value=N.appendChild(i("span","filter-count-value")),A.appendChild(N),A.appendChild(g);var R=i("div","filter-chips",{role:"group","aria-labelledby":u.label,"aria-describedby":u.count});n.forEach(function(e){var t=i("label","chip");e.input.className="chip-input",t.appendChild(e.input);var l=t.appendChild(i("span","chip-seat",{"aria-hidden":"true"},y.glyph("plus")+y.glyph("check")));l.children[0].classList.add("chip-plus"),l.children[1].classList.add("chip-check"),t.appendChild(i("span","chip-label")).textContent=e.label,R.appendChild(t)}),r.appendChild(A),r.appendChild(R)}var I=Number(r.getAttribute("data-column"))-1,O=r.getAttribute("data-for");r.__bhFilter={pass:function(e){var t=m();if(!t.length||!(I>=0))return!0;var l=e.children[I],v=l?(l.hasAttribute("data-value")?l.getAttribute("data-value"):l.textContent.trim()).toLowerCase():"";return t.some(function(F){return F.input.value.toLowerCase()===v})}};var M=function(e){var t=m(),l=t.length===0?"Any":t.length+" of "+n.length;c?(f.count.textContent=l,f.value.textContent=t.length===0?"Any":t.length===1?t[0].label:t[0].label+" +"+(t.length-1),f.trigger.toggleAttribute("data-active",t.length>0)):f.value.textContent=l,t.length===0?g.setAttribute("aria-disabled","true"):g.removeAttribute("aria-disabled"),O&&k(O,!e),e&&r.dispatchEvent(new CustomEvent("filterchange",{bubbles:!0,detail:{values:t.map(function(v){return v.input.value})}}))};r.addEventListener("change",function(e){e.target.matches&&e.target.matches('input[type="checkbox"]')&&M(!0)}),g.addEventListener("click",function(){g.getAttribute("aria-disabled")!=="true"&&(n.forEach(function(e){e.input.checked=!1}),M(!0))}),M(!1)}}y.step(75,"filter",function(){document.querySelectorAll(".filter-result").forEach(function(a){a.__bhResult||x(a,a.textContent)}),document.querySelectorAll(".filter").forEach(function(a){a.__bhFilter||z(a)});var r={};document.querySelectorAll(".filter[data-for]").forEach(function(a){var n=a.getAttribute("data-for");r[n]||(r[n]=1,k(n,!0))})}),y.step(130,"filterPopup",function(){document.documentElement.__bhFilterWired||(document.documentElement.__bhFilterWired=!0,document.addEventListener("pointerdown",function(r){E=r.pointerType},!0),document.addEventListener("keydown",function(){E="keyboard"},!0),document.addEventListener("toggle",function(r){var a=r.target,n=a.__bhFilter;!n||!a.matches||!a.matches(".filter-popup")||(r.newState==="open"?(a.__unglide=y.glide(a,n.plate,{active:"[data-highlighted]",attr:"data-highlighted"}),n.band&&E==="touch"&&a.focus({preventScroll:!0})):(a.__unglide&&(a.__unglide(),a.__unglide=null),n.reset()))},!0))})})(window.Basalt); (function(A){"use strict";var h=A._,E=0,i=5,y='.float[popover]:not([role="tooltip"])';h.tabbables=function(t){return Array.prototype.filter.call(t.querySelectorAll('a[href],button:not([disabled]),input:not([disabled]):not([type=hidden]),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex="-1"])'),function(e){return e.getClientRects().length&&!e.closest("[hidden],[inert]")})},h.place=function(t,e,o){o=o||{};var r=o.side||"bottom",n=o.align||"start",s=o.offset==null?6:o.offset,a=e.getBoundingClientRect(),l=document.documentElement.clientWidth,b=document.documentElement.clientHeight,c={top:a.top-s-i,bottom:b-a.bottom-s-i,left:a.left-s-i,right:l-a.right-s-i},g={top:"bottom",bottom:"top",left:"right",right:"left"},_=r==="top"||r==="bottom",u=t.style;u.setProperty("--available-height",Math.max(c[r],c[g[r]])+"px"),u.setProperty("--available-width",l-2*i+"px"),(_?t.offsetHeight:t.offsetWidth)>c[r]&&c[g[r]]>c[r]&&(r=g[r]),u.setProperty("--available-height",Math.max(c[r],0)+"px");var f=t.offsetWidth,v=t.offsetHeight,x=function(d){return _?{x:d==="start"?a.left:d==="end"?a.right-f:a.left+(a.width-f)/2,y:r==="bottom"?a.bottom+s:a.top-s-v}:{x:r==="right"?a.right+s:a.left-s-f,y:d==="start"?a.top:d==="end"?a.bottom-v:a.top+(a.height-v)/2}},w=function(d){return d.x>=i&&d.y>=i&&d.x+f<=l-i&&d.y+v<=b-i},m=x(n);!w(m)&&n!=="center"&&w(x(n==="start"?"end":"start"))&&(n=n==="start"?"end":"start",m=x(n));var L=Math.max(i,Math.min(m.x,l-i-f)),q=Math.max(i,Math.min(m.y,b-i-v));u.left=Math.round(L)+"px",u.top=Math.round(q)+"px";var H=n==="center"?"center":n==="start"?"left":"right";u.setProperty("--origin",_?(r==="bottom"?"top ":"bottom ")+H:(r==="right"?"left ":"right ")+(n==="center"?"center":n==="start"?"top":"bottom")),t.setAttribute("data-placed",r)};function P(t,e){return e&&e.source||document.querySelector('[popovertarget="'+t.id+'"]')||t.dataset.anchor&&document.querySelector(t.dataset.anchor)}function M(t,e){var o=P(t,e);t.__anchor=o,t.hasAttribute("role")||t.setAttribute("role",t.matches(".menu")?"menu":"dialog");var r=t.querySelector(".popover-title");if(r&&!t.hasAttribute("aria-labelledby")&&!t.hasAttribute("aria-label")&&(r.id=r.id||"bh-pop-"+ ++E,t.setAttribute("aria-labelledby",r.id)),o){o.setAttribute("aria-expanded","true"),o.hasAttribute("aria-haspopup")||o.setAttribute("aria-haspopup",t.getAttribute("role")==="menu"?"menu":"dialog");var n=function(){h.place(t,o,{side:t.dataset.side,align:t.dataset.align})};n(),t.__again=n,window.addEventListener("resize",n),window.addEventListener("scroll",n,!0)}if(t.__bhFocus||(t.__bhFocus=!0,t.addEventListener("focusout",function(a){var l=a.relatedTarget;l&&!t.contains(l)&&l!==t.__anchor&&!(l.closest&&l.closest("[popover]:popover-open"))&&t.matches(":popover-open")&&t.hidePopover()})),!t.matches('[role="menu"], .combobox-popup')){var s=h.tabbables(t)[0];s||t.setAttribute("tabindex","-1"),(s||t).focus({preventScroll:!0})}}function S(t){t.__again&&(window.removeEventListener("resize",t.__again),window.removeEventListener("scroll",t.__again,!0),t.__again=null);var e=t.__anchor;e&&(e.setAttribute("aria-expanded","false"),t.__had&&(!document.activeElement||document.activeElement===document.body)&&e.focus({preventScroll:!0})),t.__had=!1}h.step(120,"wirePopover",function(){document.documentElement.__bhPopover||(document.documentElement.__bhPopover=!0,document.addEventListener("beforetoggle",function(t){var e=t.target;t.newState==="closed"&&e.matches&&e.matches(y)&&(e.__had=e.contains(document.activeElement))},!0),document.addEventListener("toggle",function(t){var e=t.target;!e.matches||!e.matches(y)||(t.newState==="open"?M(e,t):S(e))},!0))})})(window.Basalt); Basalt._.addGlyphs({"plus":[""],"check":[""],"arrow-down":[""],"arrow-up":[""]}); diff --git a/tools/html-skill/test/fixtures/kitchen-sink.body.html b/tools/html-skill/test/fixtures/kitchen-sink.body.html index d678238e..9ce4d7e8 100644 --- a/tools/html-skill/test/fixtures/kitchen-sink.body.html +++ b/tools/html-skill/test/fixtures/kitchen-sink.body.html @@ -1,5 +1,5 @@ Basalt kitchen sink - +
@@ -318,6 +318,23 @@

Client work and other projects

+
+

Runs

+
    +
  1. Build Passed142 routes2.1 s
  2. +
  3. Test Failedunit1.4 s
  4. +
  5. Deploy Blocked by Testproduction
  6. +
+
    +
  1. BuildPassed2.1 s
  2. +
  3. ChecksCanceled
  4. +
+
    +
  1. Passed: Read deploy.yaml84 lines · 0.7 s
  2. +
  3. Canceled Page the on-call0.3 s
    Canceled by Priya Shah
  4. +
+
+ diff --git a/tools/html-skill/test/parity.test.mjs b/tools/html-skill/test/parity.test.mjs index c41520ac..29686e46 100644 --- a/tools/html-skill/test/parity.test.mjs +++ b/tools/html-skill/test/parity.test.mjs @@ -829,6 +829,24 @@ const CHOICES = [ ["focus ring", ".basalt-button[data-variant=secondary][aria-pressed=true]", ".btn:not([data-variant])[aria-pressed=true]", OUTLINE, { focus: true }], ], }, + { + // DECISIONS 326: a text toggle carries its glyph; the seat shows it at rest and hands over to the check while pressed. The case above is a page written before. + id: "pressed toggle with its glyph", + react: `<>`, + skill: ``, + pairs: [ + ["secondary pressed", ".basalt-button[data-variant=secondary][aria-pressed=true]", ".btn:not([data-variant])[aria-pressed=true]", [...BOX, "boxWidth"]], + ["secondary rest", ".basalt-button[data-variant=secondary][aria-pressed=false]", ".btn:not([data-variant])[aria-pressed=false]", [...BOX, "boxWidth"]], + ["ghost pressed", ".basalt-button[data-variant=ghost][aria-pressed=true]", ".btn[data-variant=ghost][aria-pressed=true]", [...BOX, "boxWidth"]], + ["ghost rest", ".basalt-button[data-variant=ghost][aria-pressed=false]", ".btn[data-variant=ghost][aria-pressed=false]", [...BOX, "boxWidth"]], + ["seat, pressed", ".basalt-button[data-variant=secondary][aria-pressed=true] .basalt-button-check", ".btn:not([data-variant])[aria-pressed=true] .btn-check", ["boxWidth", "boxHeight", "inLeft"]], + ["seat, rest", ".basalt-button[data-variant=secondary][aria-pressed=false] .basalt-button-check", ".btn:not([data-variant])[aria-pressed=false] .btn-check", ["boxWidth", "boxHeight", "inLeft"]], + ["glyph, rest", ".basalt-button[data-variant=secondary][aria-pressed=false] .basalt-button-check .basalt-icon:first-child", ".btn:not([data-variant])[aria-pressed=false] .btn-check > svg", ["boxWidth", "boxHeight", "opacity", "ink"]], + ["glyph, pressed", ".basalt-button[data-variant=secondary][aria-pressed=true] .basalt-button-check .basalt-icon:first-child", ".btn:not([data-variant])[aria-pressed=true] .btn-check > svg", ["opacity"]], + ["check, pressed", ".basalt-button[data-variant=secondary][aria-pressed=true] .basalt-button-check .basalt-icon:last-child", ".btn:not([data-variant])[aria-pressed=true] .btn-check", ["opacity", "ink"], { skillPseudo: "::before" }], + ["check, rest", ".basalt-button[data-variant=secondary][aria-pressed=false] .basalt-button-check .basalt-icon:last-child", ".btn:not([data-variant])[aria-pressed=false] .btn-check", ["opacity"], { skillPseudo: "::before" }], + ], + }, { id: "table selection", react: `
Runrun-0141run-0140
`, diff --git a/tools/html-skill/test/runs.test.mjs b/tools/html-skill/test/runs.test.mjs new file mode 100644 index 00000000..1c125c79 --- /dev/null +++ b/tools/html-skill/test/runs.test.mjs @@ -0,0 +1,213 @@ +// The skill's runs module and the terminal's stage additions (DECISIONS 316, 1.12): the module only when a page uses it; the art's .stage and a +// .run-stages list on one page, neither's rules reaching the other; a declared stage replay that is never a log; the budget; each mark, the list, +// the rail and the stage lines against React's computed styles at 1440 and 390 in both themes; the hold; forced colours. +import assert from "node:assert/strict"; +import fs from "node:fs"; +import path from "node:path"; +import { after, before, describe, test } from "node:test"; + +import { compose } from "../../../.agent/skills/basalt-html/compose.mjs"; +import { fixturePage, launch as launchReact, settle } from "../../../packages/react/test/support.mjs"; +import { launch, openHtml, skillDir } from "./support.mjs"; + +let browser; +let reactBrowser; +before(async () => { browser = await launch(); reactBrowser = await launchReact(); }); +after(async () => { await browser?.close(); await reactBrowser?.close(); }); + +const page = (body) => compose(`Runs${body}`, { fonts: false }).html; +const BASE = "*, ::before, ::after { box-sizing: border-box; } body { margin: 0; background: var(--basalt-surface-page); color: var(--basalt-text-primary); font: 400 14px / 20px var(--basalt-font-family-sans); }"; +const reactPage = async (body, options) => { const r = await fixturePage(reactBrowser, body, { standards: true, ...options }); await r.page.addStyleTag({ content: BASE }); await settle(r.page); return r.page; }; + +const STATES = ["queued", "running", "success", "failed", "skipped", "canceled", "retrying"]; +const WORDS = { queued: "Queued", running: "Running", success: "Passed", failed: "Failed", skipped: "Skipped", canceled: "Canceled", retrying: "Retrying" }; + +// The row exactly as the usage file writes it: the word beside the name. The fixtures take the page's width up to 640, so 390 is a phone's list. +const SKILL_LIST = `
    ${STATES.map((s) => `
  1. Stage ${s}${WORDS[s]}fact1.2 s
  2. `).join("")}
`; +const REACT_LIST = `createRoot(document.getElementById("root")).render(
{${JSON.stringify(STATES)}.map((s) => )}
);`; + +const SKILL_RAIL = `
    ${["success", "failed", "retrying", "queued"].map((s, i) => `
  1. Node ${i}${WORDS[s]}2.1 s
  2. `).join("")}
`; + +const STAGE_LINES = `
Deploy

+basalt deploy --prod
+Cloned main@4f2a1c0
+cache restore (no cache)
+Build failed
+upload artifacts
+Promoting to production
`; + +describe("the module", () => { + test("comes in only when a page uses it, with its budget held", () => { + const manifest = JSON.parse(fs.readFileSync(path.join(skillDir, "..", "..", "..", "tools", "html-skill", "src", "modules.json"), "utf8")); + assert.ok(!compose("x

A deploy ran in stages.

", { fonts: false }).modules.includes("runs")); + assert.ok(compose(`x${SKILL_LIST}`, { fonts: false }).modules.includes("runs")); + assert.ok(compose('x', { fonts: false }).modules.includes("runs")); + const parts = path.join(skillDir, "parts"); + const bytes = fs.statSync(path.join(parts, "runs.css")).size + fs.statSync(path.join(parts, "runs.js")).size; + assert.ok(bytes <= manifest.modules.runs.budget, `runs is ${bytes} bytes against its budget of ${manifest.modules.runs.budget}`); + }); + + test("a page with the art's .stage and a .run-stages list gets both modules, and a row takes none of the art's rules", async () => { + const body = `
${SKILL_LIST}
${SKILL_LIST.replace("
x${body}`, { fonts: false }); + assert.ok(modules.includes("runs") && modules.includes("stage"), modules.join(", ")); + const { page: p, context } = await openHtml(browser, page(body), { scheme: "dark" }); + const r = await p.evaluate(() => { + const inArt = getComputedStyle(document.querySelector(".stage .run-stage")); + const alone = getComputedStyle(document.querySelector("#alone .run-stage")); + const list = getComputedStyle(document.querySelector("#alone .run-stages")); + return { same: ["marginTop", "paddingTop", "paddingBottom", "backgroundColor", "backgroundImage"].every((k) => inArt[k] === alone[k]), marginTop: list.marginTop, paddingTop: list.paddingTop, bg: list.backgroundImage }; + }); + assert.ok(r.same); + assert.deepEqual([r.marginTop, r.paddingTop, r.bg], ["0px", "0px", "none"], "no pull-up, no headroom, no field"); + await context.close(); + }); +}); + +describe("against React", () => { + for (const scheme of ["dark", "light"]) { + for (const width of [1440, 390]) { + test(`the list's rows, marks, words and connector match React's (${scheme}, ${width})`, async () => { + const { page: s, context } = await openHtml(browser, page(SKILL_LIST), { scheme, width }); + const r = await reactPage(REACT_LIST, { theme: scheme, viewport: { width, height: 900 } }); + const read = (p, row, mark, word) => p.evaluate(({ row, mark, word }) => [...document.querySelectorAll(row)].map((li) => { + const m = li.querySelector(mark); + const w = li.querySelector(word); + const after = getComputedStyle(li, "::after"); + const name = li.querySelector(".basalt-run-stage-label, .run-stage-name").getBoundingClientRect(); + return { gap: w && w.getBoundingClientRect().width > 1 ? Math.round(w.getBoundingClientRect().left - name.right) : null, h: li.getBoundingClientRect().height, markW: m.getBoundingClientRect().width, markColor: getComputedStyle(m.querySelector(".basalt-run-mark-face") ?? m).color, word: w ? [getComputedStyle(w).color, getComputedStyle(w).fontWeight, w.getBoundingClientRect().width > 1] : null, connector: [after.content === "none" ? "none" : "line", after.borderInlineStartColor, after.top, after.bottom, after.left] }; + }), { row, mark, word }); + const react = await read(r, ".basalt-run-stages > .basalt-run-stage", ".basalt-run-mark", ".basalt-run-stage-line .basalt-run-stage-word, .basalt-visually-hidden"); + const skill = await read(s, ".run-stages > .run-stage", ".run-mark", ".run-stage-word"); + for (let i = 0; i < STATES.length; i += 1) { + assert.equal(skill[i].h, react[i].h, `${STATES[i]}: row height`); + if (STATES[i] !== "success") assert.equal(skill[i].gap, react[i].gap, `${STATES[i]}: the word's gap after the name`); + assert.equal(skill[i].markW, react[i].markW, `${STATES[i]}: mark seat`); + assert.equal(skill[i].markColor, react[i].markColor, `${STATES[i]}: mark ink`); + assert.deepEqual(skill[i].connector, react[i].connector, `${STATES[i]}: connector`); + if (STATES[i] !== "success") assert.deepEqual(skill[i].word, react[i].word, `${STATES[i]}: word`); + else assert.equal(skill[i].word[2], false, "a passed stage's word is said, not drawn"); + } + await context.close(); + await r.close(); + }); + } + } + + test("the rail's status seat: the time, or the word in its ink and weight", async () => { + const { page: s, context } = await openHtml(browser, page(SKILL_RAIL), { scheme: "dark" }); + const r = await s.evaluate(() => [...document.querySelectorAll(".run-rail > .run-stage")].map((li) => { const w = li.querySelector(".run-stage-word"); const t = li.querySelector(".run-stage-time"); return [li.dataset.state, w.getBoundingClientRect().width > 1 ? getComputedStyle(w).fontWeight : null, getComputedStyle(t).visibility]; })); + assert.deepEqual(r, [["success", null, "visible"], ["failed", "500", "hidden"], ["retrying", "400", "hidden"], ["queued", null, "visible"]]); + const fill = await s.evaluate(() => getComputedStyle(document.querySelector(".run-rail > .run-stage[data-state=success]"), "::after").transform); + assert.equal(fill, "matrix(1, 0, 0, 1, 0, 0)", "a passed stage's link is full"); + await context.close(); + }); +}); + +describe("stage lines", () => { + test("a declared stage replay is never a log, and each line's mark, word and time are drawn", async () => { + const { page: s, context } = await openHtml(browser, page(STAGE_LINES), { scheme: "dark" }); + const pre = s.locator(".terminal pre"); + await s.getByRole("button", { name: /Play/ }).click(); + for (let i = 0; i < 10; i += 1) { + assert.notEqual(await pre.getAttribute("role"), "log"); + await s.waitForTimeout(80); + } + await s.waitForFunction(() => document.querySelectorAll(".terminal-line").length === 6); + const lines = await s.evaluate(() => [...document.querySelectorAll(".terminal-line[data-kind=stage]")].map((l) => [l.dataset.state, l.querySelector("[role=img]")?.getAttribute("aria-label") ?? null, l.querySelector(".terminal-word")?.textContent ?? null, l.querySelector(".terminal-duration")?.textContent ?? null])); + assert.deepEqual(lines, [["done", "Done", null, "0.7 s"], ["skipped", null, "Skipped ", null], ["failed", "Failed", null, "2.3 s"], ["canceled", null, "Canceled ", null], ["running", "Running", null, null]]); + assert.equal(await s.evaluate(() => getComputedStyle(document.querySelector(".terminal pre")).scrollbarWidth), "none", "no scrollbar on a replay's window"); + await context.close(); + }); + + test("the stage lines match React's inks", async () => { + const { page: s, context } = await openHtml(browser, page(STAGE_LINES.replace(" data-replay", "")), { scheme: "light" }); + const r = await reactPage(`createRoot(document.getElementById("root")).render();`, { theme: "light", viewport: { width: 1024, height: 700 } }); + const read = (p, line, text, mark) => p.evaluate(({ line, text, mark }) => [...document.querySelectorAll(line)].map((l) => [l.dataset.state, getComputedStyle(l.querySelector(text)).color, getComputedStyle(l.querySelector(mark)).color]), { line, text, mark }); + const react = await read(r, ".basalt-code-line[data-kind=stage]", ".basalt-code-text", ".basalt-terminal-mark"); + const skill = await read(s, ".terminal-line[data-kind=stage]:not([data-state=running])", ".terminal-text", ".terminal-mark"); + assert.deepEqual(skill, react); + await context.close(); + await r.close(); + }); +}); + +describe("modes", () => { + test("the hold stops the ring and the queued breath; forced colours leave the queued mark still and the marks in currentColor", async () => { + const { page: s, context } = await openHtml(browser, page(SKILL_LIST), { scheme: "dark" }); + const running = () => s.evaluate(() => document.getAnimations().filter((a) => a.effect?.target?.closest?.(".run-mark") && a.playState === "running").length); + assert.ok((await running()) >= 3); + await s.evaluate(() => document.documentElement.setAttribute("data-loops", "held")); + await s.evaluate(() => new Promise((r) => requestAnimationFrame(() => requestAnimationFrame(r)))); + assert.equal(await running(), 0); + await s.emulateMedia({ forcedColors: "active" }); + await s.evaluate(() => document.documentElement.removeAttribute("data-loops")); + const queued = await s.evaluate(() => getComputedStyle(document.querySelector(".run-mark[data-state=queued]")).animationName); + assert.equal(queued, "none"); + await context.close(); + }); +}); + +// ---- The council's code review (Astra 8, 9, 10) and pixel review (Fable 5, 14) of e5893f80 + +describe("the review's findings", () => { + test("the rail takes the usage's own row (the word beside the name) and draws the word in the status seat; five nodes are rows under 480px", async () => { + const row = (s, i) => `
  • Node ${i}${WORDS[s]}fact2.1 s
  • `; + const four = `
      ${["success", "failed", "retrying", "queued"].map(row).join("")}
    `; + const five = `
      ${["success", "success", "running", "queued", "queued"].map(row).join("")}
    `; + for (const width of [1440, 390]) { + const { page: s, context } = await openHtml(browser, page(`
    ${four}
    ${five}
    `), { scheme: "dark", width }); + const r = await s.evaluate(() => { + const [a, b] = document.querySelectorAll(".run-rail"); + const failed = a.children[1]; + const word = failed.querySelector(".run-stage-word").getBoundingClientRect(); + const name = failed.querySelector(".run-stage-name").getBoundingClientRect(); + const time = a.children[0].querySelector(".run-stage-time").getBoundingClientRect(); + return { wordUnderName: word.top >= name.bottom, wordWithTime: Math.abs(word.top - time.top) < 1, fiveTops: [...b.children].map((li) => Math.round(li.getBoundingClientRect().top)) }; + }); + assert.ok(r.wordUnderName && r.wordWithTime, `${width}: the word stands in the time's seat (${JSON.stringify(r)})`); + const rows = r.fiveTops.every((t, i) => i === 0 || t > r.fiveTops[i - 1]); + assert.equal(rows, width === 390, `${width}: five nodes ${width === 390 ? "are rows" : "are one line"} (${r.fiveTops})`); + await context.close(); + } + }); + + test("every stage line is 20px, a done or skipped line's core glyph included, and code in a row is plain Geist Mono at the row's size", async () => { + const body = `${STAGE_LINES.replace(" data-replay", "")}
    1. Read deploy.yaml84 lines · 0.7 s
    `; + const { page: s, context } = await openHtml(browser, page(body), { scheme: "dark" }); + const r = await s.evaluate(() => ({ + lines: [...document.querySelectorAll(".terminal-line")].map((l) => l.getBoundingClientRect().height), + code: (() => { const c = getComputedStyle(document.querySelector(".run-step code")); return [c.backgroundColor, c.paddingLeft, c.fontSize, c.fontFamily.includes("Mono")]; })(), + time: getComputedStyle(document.querySelector(".run-step-time")).fontFamily.includes("Mono"), + })); + assert.ok(r.lines.every((h) => h === 20), r.lines.join(", ")); + assert.deepEqual(r.code, ["rgba(0, 0, 0, 0)", "0px", "13px", true]); + assert.ok(r.time, "a step's time is in Geist Mono"); + await context.close(); + }); + + test("a runs-only page takes the reader's stored hold before its first frame", async () => { + const html = page(SKILL_LIST); + assert.ok(compose(`x${SKILL_LIST}`, { fonts: false }).modules.includes("loops")); + const context = await browser.newContext(); + await context.addInitScript(() => { try { localStorage.setItem("basalt-loops", "held"); } catch { /* none */ } }); + await context.route("https://basalt.test/**", (route) => route.fulfill({ contentType: "text/html", body: html })); + const p = await context.newPage(); + await p.goto("https://basalt.test/"); + const r = await p.evaluate(() => ({ attr: document.documentElement.getAttribute("data-loops"), running: document.getAnimations().filter((a) => a.effect?.target?.closest?.(".run-mark") && a.playState === "running").length })); + assert.deepEqual(r, { attr: "held", running: 0 }); + await context.close(); + }); + + test("a declared replay ending on a failed stage finishes Failed, and a drawn word hides the mark from assistive technology", async () => { + const body = `
    Deploy
    
    +basalt deploy
    +Tests
    `; + const { page: s, context } = await openHtml(browser, page(body), { scheme: "dark" }); + await s.getByRole("button", { name: /Play/ }).click(); + await s.waitForFunction(() => document.querySelector(".terminal-state")?.getAttribute("data-state") === "failed", null, { timeout: 4000 }); + const tree = await s.locator(".terminal pre").ariaSnapshot(); + assert.equal((tree.match(/Failed/g) ?? []).length, 1, tree); + await context.close(); + }); +}); diff --git a/tools/review/assets/round-67/connector-before-dark-390.png b/tools/review/assets/round-67/connector-before-dark-390.png new file mode 100644 index 00000000..59bdc0fe Binary files /dev/null and b/tools/review/assets/round-67/connector-before-dark-390.png differ diff --git a/tools/review/assets/round-67/connector-before-dark.png b/tools/review/assets/round-67/connector-before-dark.png new file mode 100644 index 00000000..d14b2e23 Binary files /dev/null and b/tools/review/assets/round-67/connector-before-dark.png differ diff --git a/tools/review/assets/round-67/connector-before-light-390.png b/tools/review/assets/round-67/connector-before-light-390.png new file mode 100644 index 00000000..dadda7ab Binary files /dev/null and b/tools/review/assets/round-67/connector-before-light-390.png differ diff --git a/tools/review/assets/round-67/connector-before-light.png b/tools/review/assets/round-67/connector-before-light.png new file mode 100644 index 00000000..a355b27e Binary files /dev/null and b/tools/review/assets/round-67/connector-before-light.png differ diff --git a/tools/review/assets/round-67/held-before-dark-1440.png b/tools/review/assets/round-67/held-before-dark-1440.png new file mode 100644 index 00000000..608450d9 Binary files /dev/null and b/tools/review/assets/round-67/held-before-dark-1440.png differ diff --git a/tools/review/assets/round-67/held-before-dark-390.png b/tools/review/assets/round-67/held-before-dark-390.png new file mode 100644 index 00000000..235d8ab7 Binary files /dev/null and b/tools/review/assets/round-67/held-before-dark-390.png differ diff --git a/tools/review/assets/round-67/held-before-light-1440.png b/tools/review/assets/round-67/held-before-light-1440.png new file mode 100644 index 00000000..c68184ef Binary files /dev/null and b/tools/review/assets/round-67/held-before-light-1440.png differ diff --git a/tools/review/assets/round-67/held-before-light-390.png b/tools/review/assets/round-67/held-before-light-390.png new file mode 100644 index 00000000..9965ccf6 Binary files /dev/null and b/tools/review/assets/round-67/held-before-light-390.png differ diff --git a/tools/review/assets/round-67/log-before-dark-390.png b/tools/review/assets/round-67/log-before-dark-390.png new file mode 100644 index 00000000..6cd08206 Binary files /dev/null and b/tools/review/assets/round-67/log-before-dark-390.png differ diff --git a/tools/review/assets/round-67/log-before-dark.png b/tools/review/assets/round-67/log-before-dark.png new file mode 100644 index 00000000..bb2f015e Binary files /dev/null and b/tools/review/assets/round-67/log-before-dark.png differ diff --git a/tools/review/assets/round-67/log-before-light-390.png b/tools/review/assets/round-67/log-before-light-390.png new file mode 100644 index 00000000..d268cb8b Binary files /dev/null and b/tools/review/assets/round-67/log-before-light-390.png differ diff --git a/tools/review/assets/round-67/log-before-light.png b/tools/review/assets/round-67/log-before-light.png new file mode 100644 index 00000000..8226d669 Binary files /dev/null and b/tools/review/assets/round-67/log-before-light.png differ diff --git a/tools/review/assets/round-67/queued-before-dark-1440-low.png b/tools/review/assets/round-67/queued-before-dark-1440-low.png new file mode 100644 index 00000000..3de56638 Binary files /dev/null and b/tools/review/assets/round-67/queued-before-dark-1440-low.png differ diff --git a/tools/review/assets/round-67/queued-before-dark-1440-rest.png b/tools/review/assets/round-67/queued-before-dark-1440-rest.png new file mode 100644 index 00000000..c405d0b0 Binary files /dev/null and b/tools/review/assets/round-67/queued-before-dark-1440-rest.png differ diff --git a/tools/review/assets/round-67/queued-before-dark-390-low.png b/tools/review/assets/round-67/queued-before-dark-390-low.png new file mode 100644 index 00000000..15ba7c7e Binary files /dev/null and b/tools/review/assets/round-67/queued-before-dark-390-low.png differ diff --git a/tools/review/assets/round-67/queued-before-dark-390-rest.png b/tools/review/assets/round-67/queued-before-dark-390-rest.png new file mode 100644 index 00000000..c14abace Binary files /dev/null and b/tools/review/assets/round-67/queued-before-dark-390-rest.png differ diff --git a/tools/review/assets/round-67/queued-before-light-1440-low.png b/tools/review/assets/round-67/queued-before-light-1440-low.png new file mode 100644 index 00000000..37a2134f Binary files /dev/null and b/tools/review/assets/round-67/queued-before-light-1440-low.png differ diff --git a/tools/review/assets/round-67/queued-before-light-1440-rest.png b/tools/review/assets/round-67/queued-before-light-1440-rest.png new file mode 100644 index 00000000..4f72481a Binary files /dev/null and b/tools/review/assets/round-67/queued-before-light-1440-rest.png differ diff --git a/tools/review/assets/round-67/queued-before-light-390-low.png b/tools/review/assets/round-67/queued-before-light-390-low.png new file mode 100644 index 00000000..34056bf0 Binary files /dev/null and b/tools/review/assets/round-67/queued-before-light-390-low.png differ diff --git a/tools/review/assets/round-67/queued-before-light-390-rest.png b/tools/review/assets/round-67/queued-before-light-390-rest.png new file mode 100644 index 00000000..cf284e5c Binary files /dev/null and b/tools/review/assets/round-67/queued-before-light-390-rest.png differ diff --git a/tools/review/assets/round-67/tail-before-dark-1440.png b/tools/review/assets/round-67/tail-before-dark-1440.png new file mode 100644 index 00000000..fcb93810 Binary files /dev/null and b/tools/review/assets/round-67/tail-before-dark-1440.png differ diff --git a/tools/review/assets/round-67/tail-before-dark-390.png b/tools/review/assets/round-67/tail-before-dark-390.png new file mode 100644 index 00000000..5a3971b7 Binary files /dev/null and b/tools/review/assets/round-67/tail-before-dark-390.png differ diff --git a/tools/review/assets/round-67/tail-before-light-1440.png b/tools/review/assets/round-67/tail-before-light-1440.png new file mode 100644 index 00000000..56f4bc02 Binary files /dev/null and b/tools/review/assets/round-67/tail-before-light-1440.png differ diff --git a/tools/review/assets/round-67/tail-before-light-390.png b/tools/review/assets/round-67/tail-before-light-390.png new file mode 100644 index 00000000..e677733f Binary files /dev/null and b/tools/review/assets/round-67/tail-before-light-390.png differ diff --git a/tools/review/round20.tsx b/tools/review/round20.tsx index 801b31b5..142835e9 100644 --- a/tools/review/round20.tsx +++ b/tools/review/round20.tsx @@ -259,10 +259,10 @@ function TogglesDemo({ state }: { state: string }) {
    Text toggles: a 16px seat at the label's start holds the check while pressed, so pressed and unpressed are one width. Secondary, then ghost. Primary and danger do not toggle.
    - - - - + + + +
    Icon toggles carry no check: the plate, the ink step and the glyph's selected form (a core glyph closes and fills; a fillSafe Phosphor glyph fills)
    @@ -278,8 +278,8 @@ function TogglesDemo({ state }: { state: string }) {
    - - + + diff --git a/tools/review/round22.tsx b/tools/review/round22.tsx index 3f840069..f77f7a57 100644 --- a/tools/review/round22.tsx +++ b/tools/review/round22.tsx @@ -194,7 +194,7 @@ function TwoLineDemo() { /** The view's control: a pressed-toggle Button in the head band, with a fixed name and `aria-pressed`. */ function ViewToggle() { const { held, setHeld } = useLoops(); - return ; + return ; } function RunningToast() { @@ -314,7 +314,7 @@ function TextDemo({ state }: { state: string }) { Live: this table ticks until you hold, then shows the start times. - +
    ); } diff --git a/tools/review/round30.tsx b/tools/review/round30.tsx index 743507de..95d531f5 100644 --- a/tools/review/round30.tsx +++ b/tools/review/round30.tsx @@ -335,7 +335,7 @@ function FillsDemo({ state }: { state: string }) { {caption(state === "legacy" ? "The page's own stylesheet with the function name light-dark() made unknown. The four fills still paint." : "As shipped: the lit row's plate, the segment pill, the selected choice card and the pressed toggle.")} DayWeek -
    +
    ); diff --git a/tools/review/round32.tsx b/tools/review/round32.tsx index 3695f7e5..0bf11e12 100644 --- a/tools/review/round32.tsx +++ b/tools/review/round32.tsx @@ -121,7 +121,7 @@ function EntranceDemo({ state }: { state: string }) { {caption("One chart is this page's entrance: on a first visit its marks draw once, each over duration-figure (600ms) on ease-out, 22ms apart, every start within 200ms of the first. The words, the number, the frame, the legend and the controls are at rest in the first frame.")}
    - + Total min
    WeekTrendsSources DayWeekMonth
    - - + +
    diff --git a/tools/review/round67.tsx b/tools/review/round67.tsx new file mode 100644 index 00000000..f33ac273 --- /dev/null +++ b/tools/review/round67.tsx @@ -0,0 +1,620 @@ +// Round 67: stage animations (DECISIONS 302, 304, 307, 312 and 316). The owner confirmed a prototype; the council's heavy round reviewed it (Astra checked, +// Fable decided, revised after the final positions) and this is the build of that decision, by Opus. The build was reviewed by the council (Astra on the +// code, Fable on the pixels, twice) and fixed after each; no screen reader was heard. Synthetic, CIMIP-like content only. +// +// Each step is a run that plays when the walkthrough opens it (Replay plays it again; a run the reader starts plays whatever the hold, and a page's own run +// does not start under it). A shot (?shot=1) poses the run at a chosen moment: every step up to it is applied at once, with its times as they would be. + +import { ArrowClockwiseIcon } from "@phosphor-icons/react/dist/csr/ArrowClockwise"; +import { FlagIcon } from "@phosphor-icons/react/dist/csr/Flag"; +import * as React from "react"; + +import { + Button, + Card, + LoopsToggle, + Progress, + RunAnnouncer, + RunStage, + RunStep, + RunTimeline, + RunTimer, + StageBadge, + StageList, + StageMark, + StageRail, + Terminal, + useLoops, +} from "../../packages/react/src/index"; +import type { RunEvent, StageState, TerminalLine } from "../../packages/react/src/index"; +import type { Round } from "./rounds"; +import connectorDark from "./assets/round-67/connector-before-dark.png"; +import connectorLight from "./assets/round-67/connector-before-light.png"; +import connectorDark390 from "./assets/round-67/connector-before-dark-390.png"; +import connectorLight390 from "./assets/round-67/connector-before-light-390.png"; +import heldDark1440 from "./assets/round-67/held-before-dark-1440.png"; +import heldDark390 from "./assets/round-67/held-before-dark-390.png"; +import heldLight1440 from "./assets/round-67/held-before-light-1440.png"; +import heldLight390 from "./assets/round-67/held-before-light-390.png"; +import logDark from "./assets/round-67/log-before-dark.png"; +import logLight from "./assets/round-67/log-before-light.png"; +import logDark390 from "./assets/round-67/log-before-dark-390.png"; +import logLight390 from "./assets/round-67/log-before-light-390.png"; +import queuedDark1440Rest from "./assets/round-67/queued-before-dark-1440-rest.png"; +import queuedDark1440Low from "./assets/round-67/queued-before-dark-1440-low.png"; +import queuedDark390Rest from "./assets/round-67/queued-before-dark-390-rest.png"; +import queuedDark390Low from "./assets/round-67/queued-before-dark-390-low.png"; +import queuedLight1440Rest from "./assets/round-67/queued-before-light-1440-rest.png"; +import queuedLight1440Low from "./assets/round-67/queued-before-light-1440-low.png"; +import queuedLight390Rest from "./assets/round-67/queued-before-light-390-rest.png"; +import queuedLight390Low from "./assets/round-67/queued-before-light-390-low.png"; +import tailDark1440 from "./assets/round-67/tail-before-dark-1440.png"; +import tailDark390 from "./assets/round-67/tail-before-dark-390.png"; +import tailLight1440 from "./assets/round-67/tail-before-light-1440.png"; +import tailLight390 from "./assets/round-67/tail-before-light-390.png"; + +const isShot = () => typeof location !== "undefined" && new URLSearchParams(location.search).get("shot") === "1"; +const W = [1440, 390]; + +// ---- a run, as timed steps over a state + +interface Step { at: number; apply: (s: S, now: number) => S } + +/** + * Plays `steps` over `initial`. Live, each step lands at its time from the start, one timer at a time; posed (a shot, or a page held when the run + * would start), every step up to `pose` lands at once with the time it would have had. A page's own run asks the hold at the moment its first step + * would land, and does not start under it (it shows where the run ends); `replay` is the reader's own start and runs whatever the hold. `pace` plays it + * faster, for a shot of a run that played to its end. + */ +function useRun(initial: S, steps: Step[], pose: number, { played = false, fixed = false } = {}) { + const [state, setState] = React.useState(initial); + const timer = React.useRef(0); + const clear = () => window.clearTimeout(timer.current); + const posed = React.useCallback((upTo: number) => { + clear(); + const base = Date.now() - steps[upTo]!.at; + let s = initial; + for (let i = 0; i <= upTo; i += 1) s = steps[i]!.apply(s, base + steps[i]!.at); + setState(s); + // eslint-disable-next-line react-hooks/exhaustive-deps + }, []); + const run = React.useCallback((reader: boolean, pace = 1) => { + clear(); + setState(initial); + const t0 = Date.now(); + const next = (i: number) => { + const step = steps[i]; + if (!step) return; + const wait = Math.max(0, (step.at - (i ? steps[i - 1]!.at : 0)) * pace); + timer.current = window.setTimeout(() => { + if (i === 0 && !reader && document.documentElement.getAttribute("data-loops") === "held") { posed(steps.length - 1); return; } + setState((s) => step.apply(s, t0 + step.at * pace)); + next(i + 1); + }, wait); + }; + next(0); + // eslint-disable-next-line react-hooks/exhaustive-deps + }, []); + const play = React.useCallback(() => run(true), [run]); + React.useEffect(() => { + if (fixed) posed(pose); + else if (isShot() && played) run(false, 0.12); + else if (isShot()) posed(pose); + else run(false); + return clear; + // eslint-disable-next-line react-hooks/exhaustive-deps + }, [pose, played]); + return { state, play, setState }; +} + +/** The held state: the hold set before the step draws, and taken off when it goes. */ +function useHeldState(state: string) { + React.useLayoutEffect(() => { + if (!state.startsWith("held")) return undefined; + const root = document.documentElement; + root.setAttribute("data-loops", "held"); + return () => root.removeAttribute("data-loops"); + }, [state]); +} + +const title: React.CSSProperties = { margin: 0, font: "500 13px / 18px var(--basalt-font-family-sans)" }; +const pad: React.CSSProperties = { padding: 20, display: "flex", flexDirection: "column" }; + +// A run's head (sweep 67-4, DECISIONS 326). From 720: one row, the title and the badge, then the time and the controls at its end, as before. Under 720: the title +// and the badge first (the badge wraps under a long title), then one row with the time at its start, start-aligned in its seat, and the controls at its end; the +// hold there is the 44px icon form, its glyph on the card's content edge (half of 44 - 16 hangs into the padding). 8 between rows, 12 between items. The +// controls' row is size-control-sm tall, as the head is from 720: every control in it is ghost, so its 44px is hit area that hangs 8 above and below and +// takes no room (the re-check's gap ruling: the badge to the time 14, the head 58). With no time, the controls end the row at every width. +const HEAD_CSS = `.review-run-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 16px; } +.review-run-head > span { display: contents; } +.review-run-time { display: flex; margin-inline-start: auto; } +.review-run-head > span > .review-run-controls:first-child { margin-inline-start: auto; } +@media (width < 720px) { + .review-run-head { flex-direction: column; flex-wrap: nowrap; align-items: stretch; } + .review-run-head > span { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; } + .review-run-time { margin-inline-start: 0; } + .review-run-time .basalt-run-timer > .basalt-reserve { justify-items: start; } + .review-run-controls { margin-inline-start: auto; block-size: var(--basalt-size-control-sm); } + .review-run-controls > .basalt-button[data-icon-only] { margin-inline-end: -14px; } +}`; + +const subscribeNarrow = (notify: () => void) => { const query = window.matchMedia("(width < 720px)"); query.addEventListener("change", notify); return () => query.removeEventListener("change", notify); }; +const useNarrow = () => React.useSyncExternalStore(subscribeNarrow, () => window.matchMedia("(width < 720px)").matches, () => false); + +/** A run's head: the name (title and badge) and the meta (the time and the controls). */ +function RunHead({ name, time, controls }: { name: React.ReactNode; time?: React.ReactNode; controls?: React.ReactNode }) { + return ( +
    + + {name} + + {time ? {time} : null} + {controls} + +
    + ); +} + +/** Replay and the page's hold, side by side in each run's head (the hold is the walkthrough's: every run on the page follows it). Under 720 a head's hold is its icon form. */ +function Replay({ onClick, head = true }: { onClick: () => void; head?: boolean }) { + const narrow = useNarrow() && head; + return ( + + + {narrow ? : } + + ); +} + +// ---- 1. The stage list: Deploy 812, Test fails, Retry, the retry passes + +interface ListRun { run: StageState; attempt: number; start?: number; end?: number; carried?: number; since?: number; stages: { name: string; meta: string; state: StageState; word?: string; start?: number; end?: number }[]; detail: boolean; events: RunEvent[] } +const LIST_NAMES = [["Clone", "main@4f2a1c0"], ["Install", "412 packages"], ["Build", "142 routes"], ["Test", "unit and e2e"], ["Deploy", "production"], ["Promote", "basalt-sra.example"]] as const; +const setStage = (s: ListRun, i: number, patch: Partial): ListRun => ({ ...s, stages: s.stages.map((x, j) => (j === i ? { ...x, ...patch } : x)) }); +const say = (s: ListRun, id: string, text: string) => ({ ...s, events: [...s.events, { id, text }] }); +const LIST_START: ListRun = { run: "queued", attempt: 1, stages: LIST_NAMES.map(([name, meta]) => ({ name, meta, state: "queued" as StageState })), detail: false, events: [] }; +function stageSteps(): Step[] { + const steps: Step[] = [{ at: 400, apply: (s, now) => say({ ...s, run: "running", start: now, since: now }, "start", "Deploy 812 started") }]; + let at = 400; + for (const [i, ms] of [[0, 800], [1, 1600], [2, 2100]] as const) { + steps.push({ at, apply: (s, now) => setStage(s, i, { state: "running", start: now }) }); + at += ms; + steps.push({ at, apply: (s, now) => setStage(s, i, { state: "success", end: now }) }); + } + steps.push({ at, apply: (s, now) => setStage(s, 3, { state: "running", start: now }) }); + at += 1400; + steps.push({ at, apply: (s, now) => say({ ...setStage(setStage(setStage(s, 3, { state: "failed", end: now }), 4, { state: "skipped", word: "Blocked by Test" }), 5, { state: "skipped", word: "Blocked by Test" }), run: "failed", end: now, detail: true }, "fail", "Test failed: 3 tests failed in session.test.ts. Retry is available.") }); + at += 2600; + // The run retries by itself after a while (someone else pressed Retry), unless the reader already has. + steps.push({ at, apply: (s, now) => s.stages[3]!.state !== "failed" ? s : say({ ...setStage(setStage(setStage(s, 3, { state: "retrying", word: "Retrying, 2 of 2", start: now, end: undefined }), 4, { state: "queued", word: undefined }), 5, { state: "queued", word: undefined }), run: "retrying", attempt: 2, carried: (s.end ?? now) - (s.start ?? now), start: now, end: undefined, detail: false }, "retry", "Retrying Test, attempt 2 of 2") }); + at += 1900; + steps.push({ at, apply: (s, now) => ({ ...setStage(s, 3, { state: "success", word: undefined, end: now }), run: "running" }) }); + for (const [i, ms] of [[4, 1200], [5, 600]] as const) { + steps.push({ at, apply: (s, now) => setStage(s, i, { state: "running", start: now }) }); + at += ms; + steps.push({ at, apply: (s, now) => setStage(s, i, { state: "success", end: now }) }); + } + steps.push({ at, apply: (s, now) => say({ ...s, run: "success", end: now }, "end", `Deploy 812 passed in ${(((now - (s.start ?? now)) + (s.carried ?? 0)) / 1000).toFixed(1)} seconds`) }); + return steps; +} +const LIST_STEPS = stageSteps(); +const LIST_POSES: Record = { default: 8, failed: 8, passed: LIST_STEPS.length - 1, retrying: 9 }; + +/** `fixed`: a pair's "after" half, always at its pose and with no controls of its own (the hold the pair beside it sets is the page's). */ +function DeployList({ state, fixed = false }: { state: string; fixed?: boolean }) { + useHeldState(state); + const pose = LIST_POSES[state.replace(/-(reduced-motion|forced-colours|more-contrast)$/, "").replace(/^held-?/, "") || "default"] ?? 8; + const { state: run, play, setState } = useRun(LIST_START, LIST_STEPS, pose, { fixed }); + const retry = () => new Promise((resolve) => window.setTimeout(() => { setState((s) => LIST_STEPS[9]!.apply(s, Date.now())); resolve(); }, 300)); + return ( + +

    Deploy #812

    } + time={} + controls={fixed ? null : } + /> + + {run.stages.map((s, i) => ( +

    3 tests failed in session.test.ts

    Exit 1 · attempt 1 of 2 : undefined} + action={i === 3 && run.detail ? : undefined} /> + ))} +
    + +
    + ); +} + +// ---- 2. The rail: release v2.14.0, the link fills, the ring alone + +interface RailRun { run: StageState; start?: number; end?: number; nodes: { name: string; state: StageState; word?: string; start?: number; end?: number }[]; events: RunEvent[] } +const RAIL_START: RailRun = { run: "queued", nodes: ["Build", "Checks", "Deploy", "Promote"].map((name) => ({ name, state: "queued" as StageState })), events: [] }; +const setNode = (s: RailRun, i: number, patch: Partial): RailRun => ({ ...s, nodes: s.nodes.map((x, j) => (j === i ? { ...x, ...patch } : x)) }); +function railSteps(): Step[] { + const steps: Step[] = [{ at: 400, apply: (s, now) => ({ ...s, run: "running", start: now, events: [...s.events, { id: "start", text: "Release v2.14.0 started" }] }) }]; + let at = 400; + for (const [i, ms] of [[0, 2100], [1, 2600], [2, 1500], [3, 700]] as const) { + steps.push({ at, apply: (s, now) => setNode(s, i, { state: "running", start: now }) }); + at += ms; + steps.push({ at, apply: (s, now) => setNode(s, i, { state: "success", end: now }) }); + } + steps.push({ at, apply: (s, now) => ({ ...s, run: "success", end: now, events: [...s.events, { id: "end", text: `Release v2.14.0 passed in ${((now - (s.start ?? now)) / 1000).toFixed(1)} seconds` }] }) }); + return steps; +} +const RAIL_STEPS = railSteps(); + +function ReleaseRail({ state }: { state: string }) { + useHeldState(state); + const name = state.replace(/-(reduced-motion|forced-colours|more-contrast)$/, ""); + const played = useRun(RAIL_START, RAIL_STEPS, name === "passed" ? RAIL_STEPS.length - 1 : 3); + const { play } = played; + // "words": the status seat holding words (a failed, a retrying and a canceled node beside a passed one), the picture the pixel review asked for. + const [wordsAt] = React.useState(() => Date.now()); + const run: RailRun = name === "words" ? { run: "failed", start: wordsAt - 9000, end: wordsAt - 4500, events: [], nodes: [ + { name: "Build", state: "success", start: wordsAt - 9000, end: wordsAt - 6900 }, + { name: "Checks", state: "failed", start: wordsAt - 6900, end: wordsAt - 4500 }, + { name: "Deploy", state: "skipped" }, + { name: "Promote", state: "canceled" }, + ] } : played.state; + const done = run.nodes.filter((n) => n.state === "success").length; + const running = run.nodes.find((n) => n.state === "running")?.name; + return ( + +

    Release v2.14.0

    } + time={} + controls={} + /> + + {run.nodes.map((n) => )} + +
    + `${done} of 4 stages`} /> +
    + +
    + ); +} + +// ---- 3. The deploy log: a declared stage transcript, keep 3 + +interface LogRun { status: "idle" | "running" | "done"; start?: number; end?: number; lines: TerminalLine[]; events: RunEvent[] } +const LOG_START: LogRun = { status: "idle", lines: [], events: [] }; +function logSteps(): Step[] { + const steps: Step[] = [{ at: 400, apply: (s, now) => ({ ...s, status: "running", start: now, lines: [{ kind: "command", text: "basalt deploy --prod" }], events: [{ id: "start", text: "Deploy to production started" }] }) }]; + let at = 700; + const stage = (running: string, done: string, ms: number, out: string[] = []) => { + const index = { current: -1 }; + steps.push({ at, apply: (s, now) => { index.current = s.lines.length; return { ...s, lines: [...s.lines, { kind: "stage", state: "running", text: running, start: now }] }; } }); + out.forEach((o, k) => steps.push({ at: at + ((k + 1) * ms) / (out.length + 1), apply: (s) => ({ ...s, lines: [...s.lines, { kind: "output", text: o }] }) })); + at += ms; + steps.push({ at, apply: (s, now) => ({ ...s, lines: s.lines.map((l, i) => (i === index.current ? { ...l, state: "done", text: done, end: now } : l)) }) }); + }; + stage("Cloning main@4f2a1c0", "Cloned main@4f2a1c0", 700); + steps.push({ at, apply: (s) => ({ ...s, lines: [...s.lines, { kind: "stage", state: "skipped", text: "cache restore (no cache)" }] }) }); + stage("Installing packages", "Installed 412 packages", 1700); + stage("Running bun run build", "Built 142 routes", 2300, ["Compiled 142 routes", "Generated static pages 38/38"]); + stage("Uploading artifacts", "Uploaded 3 artifacts", 900); + stage("Promoting to production", "Promoted to production", 500); + at += 250; + steps.push({ at, apply: (s, now) => ({ ...s, status: "done", end: now, lines: [...s.lines, { kind: "done", text: "Ready https://basalt-sra.example" }], events: [...s.events, { id: "end", text: `Deployed to production in ${((now - (s.start ?? now)) / 1000).toFixed(1)} seconds` }] }) }); + return steps; +} +const LOG_STEPS = logSteps(); + +function DeployLog({ state, fixed = false }: { state: string; fixed?: boolean }) { + useHeldState(state); + const name = state.replace(/-(reduced-motion|forced-colours|more-contrast)$/, ""); + const { state: run, play } = useRun(LOG_START, LOG_STEPS, name === "passed" ? LOG_STEPS.length - 1 : LOG_STEPS.length - 3, { fixed }); + return ( +
    + {/* Sweep 67-9: the ghost Replay's glyph on the Terminal's start edge under it. */} + {fixed ? null :
    } + + +
    + ); +} + +// ---- 4. The CI job list: statuses that change in place + +interface Job { name: string; meta: string; state: StageState; start?: number; end?: number } +interface JobsRun { jobs: Job[]; events: RunEvent[] } +const JOBS_START: JobsRun = { jobs: [["Lint", "eslint, stylelint"], ["Typecheck", "tsc"], ["Unit tests", "node 22"], ["End-to-end", "chromium"], ["Build image", "linux/arm64"], ["Migrate database", "staging"]].map(([name, meta]) => ({ name: name!, meta: meta!, state: "queued" as StageState })), events: [] }; +const setJob = (s: JobsRun, i: number, p: Partial): JobsRun => ({ ...s, jobs: s.jobs.map((j, k) => (k === i ? { ...j, ...p } : j)) }); +const JOBS_STEPS: Step[] = [ + { at: 500, apply: (s, now) => ({ ...setJob(setJob(setJob(setJob(s, 0, { state: "running", start: now }), 1, { state: "running", start: now }), 2, { state: "running", start: now }), 5, { state: "skipped" }), events: [{ id: "start", text: "CI for pull request 128 started" }] }) }, + { at: 1600, apply: (s, now) => setJob(s, 0, { state: "success", end: now }) }, + { at: 2500, apply: (s, now) => ({ ...setJob(s, 2, { state: "failed", end: now }), events: [...s.events, { id: "unit", text: "Unit tests failed: 1 test failed" }] }) }, + { at: 3500, apply: (s, now) => ({ ...setJob(s, 2, { state: "retrying", start: now, end: undefined }), events: [...s.events, { id: "retry", text: "Retrying unit tests, attempt 2 of 3" }] }) }, + { at: 3900, apply: (s, now) => setJob(setJob(s, 1, { state: "success", end: now }), 3, { state: "running", start: now }) }, + { at: 5500, apply: (s, now) => setJob(s, 2, { state: "success", end: now }) }, + { at: 6400, apply: (s, now) => ({ ...setJob(setJob(s, 3, { state: "canceled", end: now }), 4, { state: "canceled" }), events: [...s.events, { id: "cancel", text: "End-to-end and Build image canceled by Priya Shah. Checks finished: 3 passed, 2 canceled, 1 skipped, in 5.9 seconds" }] }) }, +]; + +function CiJobs({ state }: { state: string }) { + useHeldState(state); + const name = state.replace(/-(reduced-motion|forced-colours|more-contrast)$/, ""); + const { state: run, play } = useRun(JOBS_START, JOBS_STEPS, name === "passed" ? JOBS_STEPS.length - 1 : 3); + return ( + + Checks · pull request #128} controls={} /> +
      + {run.jobs.map((j, i) => ( +
    • + {j.name}{j.meta} + + +
    • + ))} +
    + +
    + ); +} + +// ---- 5. The agent run: RunTimeline and the counter + +interface Item { id: string; state?: StageState; word?: string; text: React.ReactNode; meta?: string; start?: number; end?: number; detail?: string; approval?: boolean } +interface AgentRun { run: StageState; start?: number; end?: number; items: Item[]; line: string; events: RunEvent[] } +const AGENT_START: AgentRun = { run: "queued", items: [], line: "Waiting to start", events: [] }; +function agentSteps(): Step[] { + const steps: Step[] = [{ at: 400, apply: (s, now) => ({ ...s, run: "running", start: now, events: [{ id: "start", text: "Agent started on INC-0042, Payments API latency" }] }) }]; + let at = 400; + const tool = (id: string, doing: React.ReactNode, did: React.ReactNode, ms: number, result: string, end: StageState = "success", line = "") => { + steps.push({ at, apply: (s, now) => ({ ...s, line: line || s.line, items: [...s.items, { id, state: "running", text: doing, start: now }] }) }); + at += ms; + steps.push({ at, apply: (s, now) => ({ ...s, items: s.items.map((x) => (x.id === id ? { ...x, state: end, text: did, meta: result, end: now } : x)), events: end === "failed" ? [...s.events, { id, text: "Log search failed: timed out after 10 seconds. The run continues." }] : s.events }) }); + }; + tool("read", <>Reading deploy/payments-api.yaml, <>Read deploy/payments-api.yaml, 700, "84 lines", "success", "Reading the service config"); + tool("p99", <>Querying p99 latency · payments-api · 2 h, <>Queried p99 latency · payments-api · 2 h, 1400, "p99 1.8 s since 14:05", "success", "Querying metrics"); + tool("logs", <>Searching logs for "pool timeout", <>Searched logs for "pool timeout", 1500, "Timed out after 10 s", "failed", "Searching logs"); + tool("deploys", <>Listing deploys of payments-api, <>Listed deploys of payments-api, 800, "4f2a1c0 at 14:02", "success", "Listing recent deploys"); + steps.push({ at, apply: (s) => ({ ...s, items: [...s.items, { id: "finding", word: "Finding", text: "Connection pool exhausted after deploy 4f2a1c0", meta: "High confidence" }] }) }); + at += 700; + steps.push({ at, apply: (s, now) => ({ ...s, line: "Waiting for approval", items: [...s.items, { id: "approve", state: "queued", word: "Waiting for approval", text: "Roll back payments-api to 4f29e0b", meta: "Medium risk", start: now, detail: "kubectl rollout undo deployment/payments-api -n payments", approval: true }], events: [...s.events, { id: "approval", text: "Approval needed: roll back payments-api to 4f29e0b, medium risk" }] }) }); + at += 2600; + steps.push({ at, apply: (s, now) => s.items.find((x) => x.id === "approve")?.state !== "queued" ? s : ({ ...s, items: s.items.map((x) => (x.id === "approve" ? { ...x, state: "success", word: "Approved by Priya Shah", end: now, approval: false } : x)), events: [...s.events, { id: "approved", text: "Priya Shah approved the rollback" }] }) }); + tool("rollback", <>Running kubectl rollout undo deployment/payments-api, <>Ran kubectl rollout undo deployment/payments-api, 2200, "Rolled back to 4f29e0b", "success", "Rolling back"); + tool("check", <>Querying p99 latency · last 10 min, <>Queried p99 latency · last 10 min, 1100, "p99 240 ms", "success", "Checking the result"); + steps.push({ at, apply: (s, now) => ({ ...s, run: "success", end: now, line: "Rolled back; p99 is back to 240 ms.", events: [...s.events, { id: "end", text: `Agent run completed in ${((now - (s.start ?? now)) / 1000).toFixed(1)} seconds: rolled back, p99 back to 240 milliseconds` }] }) }); + return steps; +} +const AGENT_STEPS = agentSteps(); +const AGENT_POSES: Record = { default: 10, waiting: 10, end: AGENT_STEPS.length - 1, open: AGENT_STEPS.length - 1, hover: AGENT_STEPS.length - 1 }; + +function AgentRun({ state, fixed = false }: { state: string; fixed?: boolean }) { + useHeldState(state); + const name = state.replace(/-(reduced-motion|forced-colours|more-contrast)$/, "").replace(/^held-?/, "") || "default"; + const { state: run, play, setState } = useRun(AGENT_START, AGENT_STEPS, AGENT_POSES[name] ?? 10, { played: name === "played-end", fixed }); + const { held } = useLoops(); + const approve = () => new Promise((resolve) => window.setTimeout(() => { setState((s) => ({ ...s, items: s.items.map((x) => (x.id === "approve" ? { ...x, state: "success" as StageState, word: "Approved by you", end: Date.now(), approval: false } : x)) })); resolve(); }, 300)); + return ( + +

    INC-0042 · Payments API latency

    } + time={} + controls={fixed ? null : } + /> + {/* The app's step line hides under the hold (foundations: a streaming line hides while the status word stays). */} + + + {run.items.map((x) => ( + {x.detail} : undefined} action={x.approval ? : undefined}>{x.text} + ))} + + +
    + ); +} + +// ---- 6. The seven states + +const STATES: StageState[] = ["queued", "running", "success", "failed", "skipped", "canceled", "retrying"]; +function States({ state }: { state: string }) { + useHeldState(state); + // Rows that wrap, so the three seats of a state never run past a phone's card. + return ( + +
      + {STATES.map((s) => ( +
    • + + + +
    • + ))} +
    +
    + ); +} + +// ---- The five departures from the prototype the owner confirmed, each before (the prototype) and after (this build), for his eye (DECISIONS 316). +// Each pair is stacked, before above after, and each picture is drawn at its own size (a 2x capture at half its pixels), so the prototype's words are +// as large as the build's. Under 720 the pictures are the prototype at 390. + +const BEFORE = { + tail: { "dark-1440": tailDark1440, "dark-390": tailDark390, "light-1440": tailLight1440, "light-390": tailLight390 }, + log: { "dark-1440": logDark, "dark-390": logDark390, "light-1440": logLight, "light-390": logLight390 }, + queued: { "dark-1440": [queuedDark1440Rest, queuedDark1440Low], "dark-390": [queuedDark390Rest, queuedDark390Low], "light-1440": [queuedLight1440Rest, queuedLight1440Low], "light-390": [queuedLight390Rest, queuedLight390Low] }, + connector: { "dark-1440": connectorDark, "dark-390": connectorDark390, "light-1440": connectorLight, "light-390": connectorLight390 }, + held: { "dark-1440": heldDark1440, "dark-390": heldDark390, "light-1440": heldLight1440, "light-390": heldLight390 }, +}; +type Key = "dark-1440" | "dark-390" | "light-1440" | "light-390"; +const themeOf = (): "dark" | "light" => (typeof document !== "undefined" && document.documentElement.getAttribute("data-theme") === "light" ? "light" : "dark"); +const narrow = () => typeof window !== "undefined" && window.innerWidth < 720; + +/** A 2x capture drawn at its own size: half its pixels, never wider than the column. */ +function Capture({ src, alt }: { src: string; alt: string }) { + const [width, setWidth] = React.useState(undefined); + return {alt} setWidth(e.currentTarget.naturalWidth / 2)} style={{ display: "block", width, maxWidth: "100%", height: "auto", borderRadius: 8 }} />; +} + +const caption: React.CSSProperties = { font: "500 12px / 16px var(--basalt-font-family-sans)", color: "var(--basalt-text-secondary)" }; +function Pair({ title, text, before, children }: { title: string; text: string; before: React.ReactNode; children: React.ReactNode }) { + return ( +
    +

    {title}

    +

    {text}

    +
    Before: the prototype you confirmed
    {before}
    +
    After: this build
    {children}
    +
    + ); +} + +function Departures() { + const [theme, setTheme] = React.useState(themeOf); + React.useEffect(() => { const o = new MutationObserver(() => setTheme(themeOf())); o.observe(document.documentElement, { attributeFilter: ["data-theme"] }); return () => o.disconnect(); }, []); + const key: Key = `${theme}-${narrow() ? "390" : "1440"}`; + const [rest, low] = BEFORE.queued[key] as [string, string]; + return ( +
    + }> + + + }> + + +
    }> +
    + {[1, 0.65].map((o) =>
    Queued
    )} +
    + + }> + + + }> + + +
    + ); +} + +/** The rail mid-run under the hold, for departure 5's "after": the hold is set on this rail's own run only while it shows. */ +function HeldRail() { + const [t0] = React.useState(() => Date.now()); + useHeldState("held"); + return ( + +

    Release v2.14.0

    } time={} /> + + + + + + +
    + ); +} + +const COMMON = [ + "Decided by the council for the owner's handoff (DECISIONS 302, 304, 307, 312 and 316); built by Opus from the decision. Reviewed by the council: the code by Astra, the pixels by Fable (twice), and fixed after each. Not checked: no screen reader was heard, and WebKit was not opened by the pixel review. Waiting for the owner.", + "Every class begins basalt-run- (Stage and .stage are the art's). Each run has one voice, RunAnnouncer: every event once, in order; never a timer, a roll or a passed stage.", +]; + +export const ROUND_67: Round = { + id: "67", + title: "Stage animations (DECISIONS 316)", + reviewed: false, + summary: + "The owner's confirmed stage animations, built to the council's decision (DECISIONS 316): StageMark (seven states, the queued breath), StageBadge (a face that changes in place), RunTimer, RunAnnouncer, StageList and StageRail with RunStage, Terminal's declared stage transcript, and RunTimeline with the counter. Five departures from the confirmed prototype are for the owner's eye: the tail goes below 4.5:1 with the toggle as the way back; the deploy log steps back once; the queued mark breathes from 65% in secondary ink; the connector no longer fills or breaks; under the hold a stage's own time hides and the head shows when the run started. Reviewed by the council: the code by Astra, the pixels by Fable (twice), and fixed after each. Not checked: no screen reader was heard, and WebKit was not opened by the pixel review. Waiting for the owner.", + steps: [ + { + id: "departures", + name: "Five departures, before and after", + intro: "The five places this build differs from the prototype you confirmed, each because a finding showed the confirmed form could not ship as it was. Before is the prototype; after is this build, live.", + decisions: [...COMMON, "Each departure is in DECISIONS 316's list for your eye; none changes one of your picks."], + tryIt: ["Switch the theme: each before picture follows it.", "Hover the timeline's tail, or press its toggle: the whole record opens in full ink."], + widths: W, + scales: [2], + height: 3600, + demo: () => , + }, + { + id: "stage-list", + name: "Stage list: a deploy pipeline", + intro: "Deploy #812: Test fails, its reason and Retry open under it, Deploy and Promote are blocked, the retry passes.", + decisions: [ + ...COMMON, + "Every word but a passed stage's is drawn; a passed stage is its check and its time. The connector is one still 1px line between marks, beside the open reason too (departure 4).", + "Retry is a Button whose promise is the app's: busy until the retry starts, and focus goes to Test's name when the reason closes, whoever closed it.", + ], + tryIt: ["Press Retry while Test has failed, from the keyboard: focus lands on Test.", "Press \"Pause animations\" during the run: the ring stands still, the queued mark stops breathing, the head says when the run started and each stage's own time hides."], + states: ["failed", "passed", "held", "failed-reduced-motion@1440", "failed-forced-colours@1440", "failed-more-contrast@1440"], + widths: W, + scales: [2], + height: 620, + touch: true, + demo: ({ state }) => , + }, + { + id: "stage-rail", + name: "Stage rail: a release", + intro: "Release v2.14.0 on one line: each link fills from the inline start when its stage passes; the running ring is the rail's only moving mark.", + decisions: [...COMMON, "A node's status seat holds its time, or its word when it failed, was skipped or canceled, or is retrying. Five or six stages are drawn as the list under 480px of the rail's own width."], + tryIt: ["Watch a link fill as each stage passes; Replay empties them at once."], + states: ["default", "words", "passed", "held", "default-forced-colours@1440"], + widths: W, + scales: [2], + height: 420, + touch: true, + demo: ({ state }) => , + }, + { + id: "deploy-log", + name: "Deploy log: a stage transcript", + intro: "A Terminal declared `stages`: never a log, braille in the gutter while a stage runs, a duration column at the end of each line, and the lines older than the newest three stages stepped back once (departure 2).", + decisions: [...COMMON, "No scrollbar on a live window, on either axis, from its first frame. Skipped and canceled draw their word first; a failed line is the error line."], + tryIt: ["Scroll the log with the keys (Home, End, the arrows): no bar is drawn, with a mouse plugged in too."], + states: ["default", "passed", "held", "default@320", "held@320", "default-more-contrast@1440"], + widths: W, + scales: [2], + height: 440, + touch: true, + demo: ({ state }) => , + }, + { + id: "ci-jobs", + name: "Status changes: a CI job list", + intro: "Pull request #128's checks: each status is a StageBadge whose face changes in place, out and then in, in a seat as wide as its widest face.", + decisions: [...COMMON, "The seat is measured from the words in a hidden cell: no spinner runs to measure with."], + tryIt: ["Replay and watch Unit tests fail, retry and pass: nothing beside the badge moves."], + states: ["default", "passed", "default-reduced-motion@1440"], + widths: W, + scales: [2], + height: 460, + touch: true, + demo: ({ state }) => , + }, + { + id: "agent-run", + name: "Agent run: the timeline and the counter", + intro: "INC-0042: the newest three steps in full, the older ones rolled into a receding tail; the approval waits in full, and the toggle above opens the whole record.", + decisions: [ + ...COMMON, + "The tail's first row is tertiary (4.5:1 everywhere); rows 2 to 5 go below it on purpose, the named exception, and \"Show 5 earlier steps, 1 failed\" opens the whole record in full ink (departure 1).", + "The window starts at its end and keeps it; it follows only while the reader is at the end, and holds still while Approve is under the pointer or focused.", + ], + tryIt: ["Hover or focus the window: the tail lifts to its first step.", "Wheel up while the run plays: new steps land below and the window stays where you put it."], + states: ["waiting", "played-end", "end", "open", "held", "end-reduced-motion@1440", "end-forced-colours@1440", "end-more-contrast@1440"], + widths: W, + scales: [2], + height: 640, + touch: true, + demo: ({ state }) => , + }, + { + id: "states", + name: "The seven states", + intro: "Each state's mark (16px, the ring for running), its head badge and its plain badge (braille for running).", + decisions: [...COMMON, "The queued mark breathes from 65% in secondary ink, 3:1 at its lowest on every surface (departure 3). No filled disc anywhere."], + tryIt: ["Turn on reduced motion: the queued mark is still, the ring fades, braille holds its first frame."], + states: ["default", "held", "default-forced-colours@1440"], + widths: W, + scales: [2], + height: 420, + demo: ({ state }) => , + }, + ], +}; diff --git a/tools/review/rounds.tsx b/tools/review/rounds.tsx index 1585935c..92b487e9 100644 --- a/tools/review/rounds.tsx +++ b/tools/review/rounds.tsx @@ -131,6 +131,7 @@ import { ROUND_62 } from "./round62"; import { ROUND_63 } from "./round63"; import { ROUND_64 } from "./round64"; import { ROUND_65 } from "./round65"; +import { ROUND_67 } from "./round67"; export interface Step { id: string; @@ -701,3 +702,5 @@ ROUNDS.push(ROUND_62); ROUNDS.push(ROUND_63); ROUNDS.push(ROUND_64); ROUNDS.push(ROUND_65); +// Round 66 is left for diagram batch B (claude/diagrams-b), building beside this one. +ROUNDS.push(ROUND_67);