asciify-engine 4.26.0 → 4.26.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
Notable changes to `asciify-engine`, newest first. Releases are published to [npm](https://www.npmjs.com/package/asciify-engine) from version tags.
|
|
4
4
|
|
|
5
|
+
|
|
6
|
+
## 4.26.1
|
|
7
|
+
|
|
8
|
+
- Fixed: the pill's hover sparkle could read a character before the start of its set (progress slightly below zero) and throw.
|
|
5
9
|
## 4.26: Studio off the main thread, live while scrolling
|
|
6
10
|
|
|
7
11
|
- Kit fields mount while the page scrolls instead of waiting for it to rest: within two viewports ahead, scroll direction first, at most two mounts per frame inside a 4 ms budget, with glyph atlases prewarmed at idle. A poster swaps for its canvas in the same frame the first frame is drawn, so a host is never blank, and paused fields keep their last frame.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{styleKeeper as t,mountSurface as e,easeOut as n,srOnly as o,handle as r,isDark as a}from"./chunk-GF72XM4C.js";var i={tone:"neutral",live:!1,indicator:!0,sheen:!0},l={light:{green:[22,150,82],amber:[214,138,8],red:[214,52,52],neutral:[120,120,114],new:[255,255,255]},dark:{green:[120,240,170],amber:[255,206,110],red:[255,156,156],neutral:[200,200,192],new:[255,255,255]}},s={light:[[.03," "],[.08,"·"],[.13,"•"],[.18,"○"],[.5,"●"],[.56,"◐"],[.62,"◓"],[.68,"◑"],[.74,"◒"],[.8,"●"],[.88,"✧"],[2,"✦"]],dark:[[.02," "],[.06,"✦"],[.1,"✧"],[.2,"·"],[.3,"•"],[.38,"○"],[.64,"●"],[.68,"◐"],[.72,"◓"],[.76,"◑"],[.8,"◒"],[2,"●"]]},c=t=>Array.from({length:96},(e,n)=>t.find(([t])=>n/95<t)[1]).join(""),d={light:c(s.light),dark:c(s.dark)},h=["◐","◓","◑","◒"],u=["✧","·","✧","✦","✧","✦"],f=12;var p=(t,e)=>{return"green"===(n=t.dataset.tone)||"amber"===n||"red"===n||"neutral"===n||"new"===n?t.dataset.tone:e;var n};function m(t,e,n){return{x:t.x+2,y:Math.round((t.y+t.h/2)/n-.5)*n,w:Math.max(0,t.w-4)}}function x(t,e){const n=t=>t.toFixed(2),o=e/2,r=t.filter(t=>t.w>2*o).map(({x:t,y:r,w:a})=>`M${n(t+o)} ${n(r)}H${n(t+a-o)}A${n(o)} ${n(o)} 0 0 1 ${n(t+a-o)} ${n(r+e)}H${n(t+o)}A${n(o)} ${n(o)} 0 0 1 ${n(t+o)} ${n(r)}Z`).join("");return r?`path("${r}")`:"inset(50%)"}function M(c,M={}){const g={current:{...i,...M}},y=c instanceof HTMLElement?[c]:[...c],w=1===y.length,v=w?y[0]:y.length?function(t){let e=t[0].parentElement;for(;e&&!t.every(t=>e.contains(t));)e=e.parentElement;return e??document.body}(y):null,b=t(),k=new Map,$=new Map,E=new Map,C=new Map,S=[],A=t=>void 0!==t.dataset.count?"count":"new"===p(t,g.current.tone)?"new":"status",F=t=>void 0!==t.dataset.live?"false"!==t.dataset.live:g.current.live,z=(t=-1e6)=>{for(const e of y){const n=p(e,g.current.tone),o=k.get(e);o?o.to!==n&&k.set(e,{from:o.to,to:n,at:t}):k.set(e,{from:n,to:n,at:-1e6})}};z();const L=()=>P?.dark()??(!v||a(v))?"dark":"light",j=()=>({mark:"glyph",charset:d[L()],font:'"Geist Mono", ui-monospace, monospace',fontWeight:500,cellSize:f,cellAspect:1,glyphScale:1,color:"source",saturation:1,shade:0,...g.current.look}),H=()=>{const{cellSize:t=f,cellAspect:e=1}=j(),n=Math.min(2,globalThis.devicePixelRatio||1),o=Math.max(2,Math.round(t*n));return{ch:o/n,cw:Math.max(2,Math.round(o*e))/n}};let T=[0,0];const I=new Map;let P=null,q="";function B(){for(;S.length;)S.pop()();b.restore()}P=v?e({host:v,layer:w?"under":"over",look:j,ink:()=>g.current.ink,kit:g,reducedMotion:()=>g.current.reducedMotion,resolution:(t,e)=>{const{cw:n,ch:o}=H();return[Math.max(2,Math.round(2*t/n)),Math.max(2,Math.round(2*e/o))]},onFail:()=>{P=null,B()},onTheme:()=>P?.field.update({charset:d[L()]}),paint:({pen:t,now:e,still:o,dark:r,box:a,width:i,w:c})=>{const d=g.current,f=r?"dark":"light",p={...l[f],...d.tones?.[f]},M=(t,e)=>((t,e,n=.5)=>{const o=s[t],r=o.findIndex(([,t])=>t===e),a=r>0?o[r-1][0]:0;return a+(Math.min(o[r][0],1)-a)*n})(f,t,e),{cw:w,ch:S}=H(),z=i/c,L=(e,n,o,r)=>{r<=0||(t.fillStyle=function(t,e){const n=Math.max(1,...t),o=t.map(t=>t/n*255),r=(.2126*o[0]+.7152*o[1]+.0722*o[2])/255,a=Math.min(1,e/Math.max(r,.01));return`rgb(${o.map(t=>Math.round(Math.max(0,Math.min(255,t*a)))).join(" ")})`}(o,r),t.fillRect(Math.round((e+.5)*w*z)-1,Math.round((n+.5)*S*z)-1,2,2))};let j=!1;const B=y.map(t=>"count"!==A(t)&&d.indicator?t.querySelector("[data-dot]"):null),G=y.map((t,e)=>{const n=a(t),o=B[e]?a(B[e]):null,[r,i]=I.get(t)??[0,0],l=t=>({...t,x:t.x+T[0]-r,y:t.y+T[1]-i});return{b:l(n),dot:o&&l(o)}}),N=G.find((t,e)=>t.dot&&"status"===A(y[e]))??G.find(t=>t.dot)??G[0];if(N){const t=(t,e)=>{const n=((t-e/2)%e+e)%e;return n>.001?n-e:0},e=[N.dot?t(N.dot.x+N.dot.w/2,w):0,t(N.b.y+N.b.h/2,S)];(Math.abs(e[0]-T[0])>.01||Math.abs(e[1]-T[1])>.01)&&(T=e,P.canvas.style.translate=`${T[0].toFixed(2)}px ${T[1].toFixed(2)}px`)}const R=P.canvas.style,W=(t,e,n)=>Math.max(1,Math.floor((t-e)/n))*n+"px",O=W(v.clientWidth,T[0],w),X=W(v.clientHeight,T[1],S);R.width===O&&R.height===X||(R.width=O,R.height=X,P.field.resize(),j=!0);const Z=G.map((t,e)=>{const n=t=>({...t,x:t.x-T[0],y:t.y-T[1]});return((t,e,n,o,r)=>{const[a,i]=I.get(t)??[0,0],l=(t,e)=>Math.round((t-e/2)/e)*e+e/2-t,s=n?l(n.x+n.w/2,o):0,c=l(e.y+e.h/2,r);return(Math.abs(s-a)>.01||Math.abs(c-i)>.01)&&(I.set(t,[s,c]),b.set(t,"translate",`${s.toFixed(2)}px ${c.toFixed(2)}px`)),{b:{...e,x:e.x+s,y:e.y+c},dot:n&&{...n,x:n.x+s,y:n.y+c}}})(y[e],n(t.b),t.dot&&n(t.dot),w,S)}),D=Z.map(t=>t.b).map(t=>m(t,0,S)),J=x(D,S);return J!==q&&(q=J,P.canvas.style.clipPath=J),y.forEach((t,r)=>{const i=D[r],l=A(t),s=Math.round(i.y/S),c=Math.ceil(i.x/w),d=Math.floor((i.x+i.w)/w)-1;var m,x,g;if(!(d<c))if("status"===l){const a=Z[r].dot;if(!a)return;const i=k.get(t),l=e-i.at,u=o?1:n(l/240);u<1&&(j=!0);const y=(m=p[i.from],x=p[i.to],g=u,m.map((t,e)=>t+(x[e]-t)*g)),v=!o&&F(t),b=Math.floor((a.x+a.w/2)/w),$="light"===f?.55:.7,E="light"===f?.35:.25;let C="neutral"===i.to?M("○"):"amber"===i.to&&F(t)?M("◐"):M("●",$);"red"===i.to&&!o&&l<640?(j=!0,Math.floor(l/160)%2==0&&(C=M("○"))):v&&"amber"===i.to?(j=!0,C=M(h[Math.floor((e+90*r)/130)%4])):v&&(j=!0,C=M("●",$-E*Math.cos((e+500*r)/2200*Math.PI*2))),b>=c&&b<=d&&L(b,s,y,C)}else if("new"===l){const n=Z[r].dot;if(!n)return;const a=(e-($.get(t)??-1e6))/720,i=Math.floor((n.x+n.w/2)/w);a<1&&!o&&(j=!0),i>=c&&i<=d&&L(i,s,p.new,M(a<1&&!o?u[Math.floor(a*u.length)]:"✦"))}else{const r=E.get(t),i=C.get(t)?.digits.children;if(!i)return;if((r?(e-r.at)/600:1)>=1||o){for(const t of i)t.style.opacity="",t.style.translate="";return}j=!0,[...i].forEach((t,o)=>{if(!r.changed[o])return;const i=t,l=a(i),h=(e-r.at-70*o)/460,u=n((h-.72)/.28);if(i.style.opacity=String(u),i.style.translate=`0 ${3*(u-1)}px`,h<=0||h>=.78)return;const f=Math.min(d,Math.max(c,Math.floor((l.x+l.w/2)/w)));L(f,s,p.neutral,M(["·","•","○","●"][Math.floor(9*h)%4]))})}}),j}}):null;const G=t=>[...t].map(t=>Object.assign(document.createElement("span"),{textContent:" "===t?"":t}));if(P){w||(P.canvas.style.zIndex="1");for(const t of y){if("count"===A(t)){const e=(t.textContent??"").trim(),n=[...t.childNodes],r=o(e),a=document.createElement("span");a.setAttribute("aria-hidden","true"),b.set(a,"display","inline-flex"),a.replaceChildren(...G(e)),t.replaceChildren(r,a),C.set(t,{text:e,live:r,digits:a}),S.push(()=>{const o=C.get(t)?.text??e;o===e?t.replaceChildren(...n):t.textContent=o})}else if(g.current.indicator&&!t.querySelector("[data-dot]")){const e=document.createElement("span");e.dataset.dot="",e.setAttribute("aria-hidden","true"),e.setAttribute("style",`display:inline-block;flex:none;width:${f}px;height:${f}px;margin-inline-end:4px;vertical-align:middle`),t.prepend(e),S.push(()=>e.remove())}if(!w)for(const e of[...t.childNodes])if(3===e.nodeType&&e.textContent?.trim()){const t=document.createElement("span");e.parentElement.insertBefore(t,e),t.appendChild(e),S.push(()=>{t.parentElement?.insertBefore(e,t),t.remove()}),N(t)}else e instanceof HTMLElement&&void 0===e.dataset.dot&&N(e)}C.size&&document.fonts?.ready.then(()=>P?.kick()),v.addEventListener("pointermove",O),v.addEventListener("pointerleave",X)}function N(t){"static"===getComputedStyle(t).position&&b.set(t,"position","relative"),b.set(t,"z-index","2")}function R(t){const e=performance.now();for(const n of t?[t]:y.filter(t=>"new"===A(t)))$.set(n,e);P?.kick()}let W=null;function O(t){const e=t.target,n=y.find(t=>e&&t.contains(e))??null;n!==W&&(W=n,n&&"new"===A(n)&&g.current.sheen&&R(n))}function X(){W=null}return r(()=>P,g,()=>{z(performance.now()),P?.refresh()},{sheen:R,count:(t,e)=>{const n=e??y.find(t=>"count"===A(t));if(!n)return;const o=String(t),r=C.get(n);if(!r)return void(n.textContent=o);if(o===r.text)return;const a=Math.max(o.length,r.text.length),i=r.text.padStart(a," "),l=o.padStart(a," "),s=P?.still()??!0;r.text=o,r.live.textContent=o,r.digits.replaceChildren(...G(l)),E.set(n,{at:s?-1e6:performance.now(),changed:[...l].map((t,e)=>t!==i[e])}),P?.kick()},refresh:()=>{z(performance.now()),P?.kick()}},()=>{v?.removeEventListener("pointermove",O),v?.removeEventListener("pointerleave",X),B()})}var g=i;export{g as PILL_DEFAULTS,l as PILL_TONES,x as laneClip,M as pill,m as pillLane,p as pillTone};//# sourceMappingURL=chunk-
|
|
1
|
+
import{styleKeeper as t,mountSurface as e,easeOut as n,srOnly as o,handle as r,isDark as a}from"./chunk-GF72XM4C.js";var i={tone:"neutral",live:!1,indicator:!0,sheen:!0},l={light:{green:[22,150,82],amber:[214,138,8],red:[214,52,52],neutral:[120,120,114],new:[255,255,255]},dark:{green:[120,240,170],amber:[255,206,110],red:[255,156,156],neutral:[200,200,192],new:[255,255,255]}},s={light:[[.03," "],[.08,"·"],[.13,"•"],[.18,"○"],[.5,"●"],[.56,"◐"],[.62,"◓"],[.68,"◑"],[.74,"◒"],[.8,"●"],[.88,"✧"],[2,"✦"]],dark:[[.02," "],[.06,"✦"],[.1,"✧"],[.2,"·"],[.3,"•"],[.38,"○"],[.64,"●"],[.68,"◐"],[.72,"◓"],[.76,"◑"],[.8,"◒"],[2,"●"]]},c=t=>Array.from({length:96},(e,n)=>t.find(([t])=>n/95<t)[1]).join(""),d={light:c(s.light),dark:c(s.dark)},h=["◐","◓","◑","◒"],u=["✧","·","✧","✦","✧","✦"],f=12;var p=(t,e)=>{return"green"===(n=t.dataset.tone)||"amber"===n||"red"===n||"neutral"===n||"new"===n?t.dataset.tone:e;var n};function m(t,e,n){return{x:t.x+2,y:Math.round((t.y+t.h/2)/n-.5)*n,w:Math.max(0,t.w-4)}}function x(t,e){const n=t=>t.toFixed(2),o=e/2,r=t.filter(t=>t.w>2*o).map(({x:t,y:r,w:a})=>`M${n(t+o)} ${n(r)}H${n(t+a-o)}A${n(o)} ${n(o)} 0 0 1 ${n(t+a-o)} ${n(r+e)}H${n(t+o)}A${n(o)} ${n(o)} 0 0 1 ${n(t+o)} ${n(r)}Z`).join("");return r?`path("${r}")`:"inset(50%)"}function M(c,M={}){const g={current:{...i,...M}},y=c instanceof HTMLElement?[c]:[...c],w=1===y.length,v=w?y[0]:y.length?function(t){let e=t[0].parentElement;for(;e&&!t.every(t=>e.contains(t));)e=e.parentElement;return e??document.body}(y):null,b=t(),k=new Map,$=new Map,E=new Map,C=new Map,S=[],A=t=>void 0!==t.dataset.count?"count":"new"===p(t,g.current.tone)?"new":"status",F=t=>void 0!==t.dataset.live?"false"!==t.dataset.live:g.current.live,z=(t=-1e6)=>{for(const e of y){const n=p(e,g.current.tone),o=k.get(e);o?o.to!==n&&k.set(e,{from:o.to,to:n,at:t}):k.set(e,{from:n,to:n,at:-1e6})}};z();const L=()=>P?.dark()??(!v||a(v))?"dark":"light",j=()=>({mark:"glyph",charset:d[L()],font:'"Geist Mono", ui-monospace, monospace',fontWeight:500,cellSize:f,cellAspect:1,glyphScale:1,color:"source",saturation:1,shade:0,...g.current.look}),H=()=>{const{cellSize:t=f,cellAspect:e=1}=j(),n=Math.min(2,globalThis.devicePixelRatio||1),o=Math.max(2,Math.round(t*n));return{ch:o/n,cw:Math.max(2,Math.round(o*e))/n}};let T=[0,0];const I=new Map;let P=null,q="";function B(){for(;S.length;)S.pop()();b.restore()}P=v?e({host:v,layer:w?"under":"over",look:j,ink:()=>g.current.ink,kit:g,reducedMotion:()=>g.current.reducedMotion,resolution:(t,e)=>{const{cw:n,ch:o}=H();return[Math.max(2,Math.round(2*t/n)),Math.max(2,Math.round(2*e/o))]},onFail:()=>{P=null,B()},onTheme:()=>P?.field.update({charset:d[L()]}),paint:({pen:t,now:e,still:o,dark:r,box:a,width:i,w:c})=>{const d=g.current,f=r?"dark":"light",p={...l[f],...d.tones?.[f]},M=(t,e)=>((t,e,n=.5)=>{const o=s[t],r=o.findIndex(([,t])=>t===e),a=r>0?o[r-1][0]:0;return a+(Math.min(o[r][0],1)-a)*n})(f,t,e),{cw:w,ch:S}=H(),z=i/c,L=(e,n,o,r)=>{r<=0||(t.fillStyle=function(t,e){const n=Math.max(1,...t),o=t.map(t=>t/n*255),r=(.2126*o[0]+.7152*o[1]+.0722*o[2])/255,a=Math.min(1,e/Math.max(r,.01));return`rgb(${o.map(t=>Math.round(Math.max(0,Math.min(255,t*a)))).join(" ")})`}(o,r),t.fillRect(Math.round((e+.5)*w*z)-1,Math.round((n+.5)*S*z)-1,2,2))};let j=!1;const B=y.map(t=>"count"!==A(t)&&d.indicator?t.querySelector("[data-dot]"):null),G=y.map((t,e)=>{const n=a(t),o=B[e]?a(B[e]):null,[r,i]=I.get(t)??[0,0],l=t=>({...t,x:t.x+T[0]-r,y:t.y+T[1]-i});return{b:l(n),dot:o&&l(o)}}),N=G.find((t,e)=>t.dot&&"status"===A(y[e]))??G.find(t=>t.dot)??G[0];if(N){const t=(t,e)=>{const n=((t-e/2)%e+e)%e;return n>.001?n-e:0},e=[N.dot?t(N.dot.x+N.dot.w/2,w):0,t(N.b.y+N.b.h/2,S)];(Math.abs(e[0]-T[0])>.01||Math.abs(e[1]-T[1])>.01)&&(T=e,P.canvas.style.translate=`${T[0].toFixed(2)}px ${T[1].toFixed(2)}px`)}const R=P.canvas.style,W=(t,e,n)=>Math.max(1,Math.floor((t-e)/n))*n+"px",O=W(v.clientWidth,T[0],w),X=W(v.clientHeight,T[1],S);R.width===O&&R.height===X||(R.width=O,R.height=X,P.field.resize(),j=!0);const Z=G.map((t,e)=>{const n=t=>({...t,x:t.x-T[0],y:t.y-T[1]});return((t,e,n,o,r)=>{const[a,i]=I.get(t)??[0,0],l=(t,e)=>Math.round((t-e/2)/e)*e+e/2-t,s=n?l(n.x+n.w/2,o):0,c=l(e.y+e.h/2,r);return(Math.abs(s-a)>.01||Math.abs(c-i)>.01)&&(I.set(t,[s,c]),b.set(t,"translate",`${s.toFixed(2)}px ${c.toFixed(2)}px`)),{b:{...e,x:e.x+s,y:e.y+c},dot:n&&{...n,x:n.x+s,y:n.y+c}}})(y[e],n(t.b),t.dot&&n(t.dot),w,S)}),D=Z.map(t=>t.b).map(t=>m(t,0,S)),J=x(D,S);return J!==q&&(q=J,P.canvas.style.clipPath=J),y.forEach((t,r)=>{const i=D[r],l=A(t),s=Math.round(i.y/S),c=Math.ceil(i.x/w),d=Math.floor((i.x+i.w)/w)-1;var m,x,g;if(!(d<c))if("status"===l){const a=Z[r].dot;if(!a)return;const i=k.get(t),l=e-i.at,u=o?1:n(l/240);u<1&&(j=!0);const y=(m=p[i.from],x=p[i.to],g=u,m.map((t,e)=>t+(x[e]-t)*g)),v=!o&&F(t),b=Math.floor((a.x+a.w/2)/w),$="light"===f?.55:.7,E="light"===f?.35:.25;let C="neutral"===i.to?M("○"):"amber"===i.to&&F(t)?M("◐"):M("●",$);"red"===i.to&&!o&&l<640?(j=!0,Math.floor(l/160)%2==0&&(C=M("○"))):v&&"amber"===i.to?(j=!0,C=M(h[Math.floor((e+90*r)/130)%4])):v&&(j=!0,C=M("●",$-E*Math.cos((e+500*r)/2200*Math.PI*2))),b>=c&&b<=d&&L(b,s,y,C)}else if("new"===l){const n=Z[r].dot;if(!n)return;const a=Math.max(0,(e-($.get(t)??-1e6))/720),i=Math.floor((n.x+n.w/2)/w);a<1&&!o&&(j=!0),i>=c&&i<=d&&L(i,s,p.new,M(a<1&&!o?u[Math.floor(a*u.length)]:"✦"))}else{const r=E.get(t),i=C.get(t)?.digits.children;if(!i)return;if((r?(e-r.at)/600:1)>=1||o){for(const t of i)t.style.opacity="",t.style.translate="";return}j=!0,[...i].forEach((t,o)=>{if(!r.changed[o])return;const i=t,l=a(i),h=(e-r.at-70*o)/460,u=n((h-.72)/.28);if(i.style.opacity=String(u),i.style.translate=`0 ${3*(u-1)}px`,h<=0||h>=.78)return;const f=Math.min(d,Math.max(c,Math.floor((l.x+l.w/2)/w)));L(f,s,p.neutral,M(["·","•","○","●"][Math.floor(9*h)%4]))})}}),j}}):null;const G=t=>[...t].map(t=>Object.assign(document.createElement("span"),{textContent:" "===t?"":t}));if(P){w||(P.canvas.style.zIndex="1");for(const t of y){if("count"===A(t)){const e=(t.textContent??"").trim(),n=[...t.childNodes],r=o(e),a=document.createElement("span");a.setAttribute("aria-hidden","true"),b.set(a,"display","inline-flex"),a.replaceChildren(...G(e)),t.replaceChildren(r,a),C.set(t,{text:e,live:r,digits:a}),S.push(()=>{const o=C.get(t)?.text??e;o===e?t.replaceChildren(...n):t.textContent=o})}else if(g.current.indicator&&!t.querySelector("[data-dot]")){const e=document.createElement("span");e.dataset.dot="",e.setAttribute("aria-hidden","true"),e.setAttribute("style",`display:inline-block;flex:none;width:${f}px;height:${f}px;margin-inline-end:4px;vertical-align:middle`),t.prepend(e),S.push(()=>e.remove())}if(!w)for(const e of[...t.childNodes])if(3===e.nodeType&&e.textContent?.trim()){const t=document.createElement("span");e.parentElement.insertBefore(t,e),t.appendChild(e),S.push(()=>{t.parentElement?.insertBefore(e,t),t.remove()}),N(t)}else e instanceof HTMLElement&&void 0===e.dataset.dot&&N(e)}C.size&&document.fonts?.ready.then(()=>P?.kick()),v.addEventListener("pointermove",O),v.addEventListener("pointerleave",X)}function N(t){"static"===getComputedStyle(t).position&&b.set(t,"position","relative"),b.set(t,"z-index","2")}function R(t){const e=performance.now();for(const n of t?[t]:y.filter(t=>"new"===A(t)))$.set(n,e);P?.kick()}let W=null;function O(t){const e=t.target,n=y.find(t=>e&&t.contains(e))??null;n!==W&&(W=n,n&&"new"===A(n)&&g.current.sheen&&R(n))}function X(){W=null}return r(()=>P,g,()=>{z(performance.now()),P?.refresh()},{sheen:R,count:(t,e)=>{const n=e??y.find(t=>"count"===A(t));if(!n)return;const o=String(t),r=C.get(n);if(!r)return void(n.textContent=o);if(o===r.text)return;const a=Math.max(o.length,r.text.length),i=r.text.padStart(a," "),l=o.padStart(a," "),s=P?.still()??!0;r.text=o,r.live.textContent=o,r.digits.replaceChildren(...G(l)),E.set(n,{at:s?-1e6:performance.now(),changed:[...l].map((t,e)=>t!==i[e])}),P?.kick()},refresh:()=>{z(performance.now()),P?.kick()}},()=>{v?.removeEventListener("pointermove",O),v?.removeEventListener("pointerleave",X),B()})}var g=i;export{g as PILL_DEFAULTS,l as PILL_TONES,x as laneClip,M as pill,m as pillLane,p as pillTone};//# sourceMappingURL=chunk-WDS7VM2E.js.map
|