asciify-engine 4.24.0 → 4.25.0
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 +315 -0
- package/README.md +71 -718
- package/dist/core.cjs +1 -1
- package/dist/core.js +1 -1
- package/dist/field.cjs +1 -1
- package/dist/field.d.cts +4 -1
- package/dist/field.d.ts +4 -1
- package/dist/field.js +1 -1
- package/dist/hover.cjs +1 -1
- package/dist/hover.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/kit/{chunk-3473NPIN.js → chunk-2D2SG6FW.js} +1 -1
- package/dist/kit/chunk-2JQ4MRIP.js +1 -0
- package/dist/kit/{chunk-RFLIFKZ4.js → chunk-2KFBIOVS.js} +1 -1
- package/dist/kit/{chunk-FR3ZJNOY.js → chunk-2TQW2PIG.js} +1 -1
- package/dist/kit/{chunk-C4KZYCPF.js → chunk-3F6FTBMN.js} +1 -1
- package/dist/kit/chunk-4SHQA3CO.js +1 -0
- package/dist/kit/chunk-4XT5IKM3.js +1 -0
- package/dist/kit/{chunk-YBRP6BFW.js → chunk-6L2GAV5C.js} +1 -1
- package/dist/kit/{chunk-3A5LID2G.js → chunk-6XNIZ52V.js} +1 -1
- package/dist/kit/{chunk-I4QVLLRQ.js → chunk-6YVZZ3DO.js} +1 -1
- package/dist/kit/{chunk-FUI5AVIF.js → chunk-A6EDU3UT.js} +1 -1
- package/dist/kit/{chunk-J2YZBT3N.js → chunk-A73S2BCE.js} +1 -1
- package/dist/kit/{chunk-ENTDGT2V.js → chunk-ANLBW5RI.js} +1 -1
- package/dist/kit/{chunk-K563CCOL.js → chunk-B6GZ645M.js} +1 -1
- package/dist/kit/{chunk-ZRJVOUWH.js → chunk-BBOSHBZK.js} +1 -1
- package/dist/kit/{chunk-5Z2EJAUV.js → chunk-BJRPY7UB.js} +1 -1
- package/dist/kit/{chunk-QALCXKU6.js → chunk-CA5J25SV.js} +1 -1
- package/dist/kit/{chunk-XANKANGR.js → chunk-CR7QS3B3.js} +1 -1
- package/dist/kit/{chunk-ROR6MG3K.js → chunk-D4KCZSIP.js} +1 -1
- package/dist/kit/{chunk-YCWMOTYH.js → chunk-EHXSXMBE.js} +1 -1
- package/dist/kit/{chunk-TTGMK4EA.js → chunk-EHYFSX5K.js} +1 -1
- package/dist/kit/{chunk-PCIAA2LL.js → chunk-EJ3W4FN6.js} +1 -1
- package/dist/kit/{chunk-BN7HL52Z.js → chunk-EK4GIXIO.js} +1 -1
- package/dist/kit/{chunk-VVW7LZT2.js → chunk-EPVZIGEZ.js} +1 -1
- package/dist/kit/chunk-EWPT56TR.js +1 -0
- package/dist/kit/{chunk-QRCXXS5Z.js → chunk-FIWIUXNV.js} +1 -1
- package/dist/kit/{chunk-5I4IZTL5.js → chunk-G4BQYQJ6.js} +1 -1
- package/dist/kit/chunk-GCIZKMJL.js +1 -0
- package/dist/kit/{chunk-PFKYKAIP.js → chunk-H4DBJULW.js} +1 -1
- package/dist/kit/{chunk-MGVPLQ3Z.js → chunk-HMW5NRUV.js} +1 -1
- package/dist/kit/{chunk-IPVN22ZM.js → chunk-IUX46UDR.js} +1 -1
- package/dist/kit/{chunk-MQJQIDO5.js → chunk-JAM46FF6.js} +1 -1
- package/dist/kit/{chunk-PIU2BMFU.js → chunk-JRSCTMFM.js} +1 -1
- package/dist/kit/{chunk-T3GWGPST.js → chunk-KBXVIAWS.js} +1 -1
- package/dist/kit/{chunk-7ABNWOW4.js → chunk-KJJJORN6.js} +1 -1
- package/dist/kit/chunk-KS3TL3S2.js +1 -0
- package/dist/kit/{chunk-BR6ZNJZW.js → chunk-KTYCGGRO.js} +1 -1
- package/dist/kit/{chunk-H2UZBVKE.js → chunk-L3P7ZDSK.js} +1 -1
- package/dist/kit/{chunk-VC2ZQG63.js → chunk-LUOIH2EM.js} +1 -1
- package/dist/kit/{chunk-WJLZM3DR.js → chunk-MIA6TUQC.js} +1 -1
- package/dist/kit/{chunk-SARCZMLN.js → chunk-MRDEO5HZ.js} +1 -1
- package/dist/kit/{chunk-BQZCLGCY.js → chunk-NPJ77LDC.js} +1 -1
- package/dist/kit/{chunk-5QE6UMXN.js → chunk-ODMQERGZ.js} +1 -1
- package/dist/kit/{chunk-E3TUOX2A.js → chunk-ONVONNUH.js} +1 -1
- package/dist/kit/{chunk-C3C7AYKL.js → chunk-OVCIHOOS.js} +1 -1
- package/dist/kit/{chunk-G57QACJG.js → chunk-P6S6HSN3.js} +1 -1
- package/dist/kit/{chunk-4OT66HSZ.js → chunk-PCGRRX5P.js} +1 -1
- package/dist/kit/{chunk-4ZQFDFEH.js → chunk-PDNKLLBI.js} +1 -1
- package/dist/kit/{chunk-IUKSHYED.js → chunk-PFNFW4ZI.js} +1 -1
- package/dist/kit/chunk-PFQBEWCF.js +1 -0
- package/dist/kit/{chunk-2CF4PX6U.js → chunk-PND73YEV.js} +1 -1
- package/dist/kit/{chunk-AIM3J2US.js → chunk-PZAQLUAS.js} +1 -1
- package/dist/kit/{chunk-IQTGJRDX.js → chunk-QKZYCROD.js} +1 -1
- package/dist/kit/{chunk-W2STAN6V.js → chunk-QTVMD62E.js} +1 -1
- package/dist/kit/{chunk-S62H7ZIU.js → chunk-QZHZWO7N.js} +1 -1
- package/dist/kit/{chunk-XDKKCIIL.js → chunk-SAQJAH2I.js} +1 -1
- package/dist/kit/{chunk-HTUGMGVA.js → chunk-SE6MQQLB.js} +1 -1
- package/dist/kit/{chunk-NURPDP3Y.js → chunk-SQGJ263V.js} +1 -1
- package/dist/kit/{chunk-XB4DKPGL.js → chunk-SVXRMHUJ.js} +1 -1
- package/dist/kit/chunk-UO4U32P7.js +1 -0
- package/dist/kit/{chunk-BNVRKD3V.js → chunk-V6GEQ5Y5.js} +1 -1
- package/dist/kit/{chunk-KWTF6Q5W.js → chunk-VFV7HZ3G.js} +1 -1
- package/dist/kit/{chunk-DZ5XGHTJ.js → chunk-WT3XOWAI.js} +1 -1
- package/dist/kit/{chunk-2NVKPXPL.js → chunk-XDNCXCR7.js} +1 -1
- package/dist/kit/chunk-XVB3B3FV.js +1 -0
- package/dist/kit/{chunk-O7SGY4YJ.js → chunk-XXPDXJMQ.js} +1 -1
- package/dist/kit/{chunk-5BEBNKYM.js → chunk-XYLLL2PQ.js} +1 -1
- package/dist/kit/{chunk-MIZ2DUHU.js → chunk-YBBYCUFP.js} +1 -1
- package/dist/kit/{chunk-DFOWXOZR.js → chunk-YDP6566E.js} +1 -1
- package/dist/kit/chunk-YL2AXWRA.js +1 -0
- package/dist/kit/{chunk-4QHFEMFS.js → chunk-ZYYLWSPY.js} +1 -1
- package/dist/kit.cjs +1 -1
- package/dist/kit.d.cts +3 -1
- package/dist/kit.d.ts +3 -1
- package/dist/kit.js +1 -1
- package/package.json +2 -1
- package/skills/asciify-engine/SKILL.md +2 -2
- package/skills/asciify-engine/references/applying-asciify.md +1 -1
- package/skills/asciify-engine/references/kit.md +2 -2
- package/skills/asciify-engine/references/performance.md +5 -2
- package/dist/kit/chunk-3PCKMO6I.js +0 -1
- package/dist/kit/chunk-4HWMQCAM.js +0 -1
- package/dist/kit/chunk-73M2OESE.js +0 -1
- package/dist/kit/chunk-BTD6EFAW.js +0 -1
- package/dist/kit/chunk-OWEZV7TQ.js +0 -1
- package/dist/kit/chunk-S7RZP2MT.js +0 -1
- package/dist/kit/chunk-SNCXU7KF.js +0 -1
- package/dist/kit/chunk-UML6XQAR.js +0 -1
- package/dist/kit/chunk-UO7RB7RC.js +0 -1
- package/dist/kit/chunk-XM56OTYT.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{styleKeeper as t,clamp as e,mountSurface as o,handle as r,house as n}from"./chunk-
|
|
1
|
+
import{styleKeeper as t,clamp as e,mountSurface as o,handle as r,house as n}from"./chunk-PFQBEWCF.js";var a={aurora:["#2ee6c8","#9d7bff","#ff6fb5"],brand:["#ffb000","#ffd84d"]},i={palette:"aurora",swell:!0},l=t=>"mono"===t?[]:"string"==typeof t?[...a[t]??a.aurora]:[...t];function s(t,o){if(1===t.length)return t[0];const r=e(o)*(t.length-1),n=Math.min(t.length-2,Math.floor(r)),a=r-n,[i,l]=[t[n],t[n+1]].map(t=>[1,3,5].map(e=>parseInt(t.slice(e,e+2),16)||0));return`rgb(${i.map((t,e)=>Math.round(t+(l[e]-t)*a)).join(" ")})`}function c(t,o,r,n,a,i){const l=t=>{const o=Math.round(255*e(t)/2.2);return`rgb(${o} ${o} ${o})`},c=o/2,d=r/2,h=.36/(.92-.16*a)*Math.min(o,r),u=.86+.46*a,f=n*(.25+.6*a),p=t.createRadialGradient(c,d,.92*h,c,d,1.3*h);p.addColorStop(0,l(.36*u)),p.addColorStop(1,"#000"),t.fillStyle=p,t.fillRect(0,0,o,r),t.save(),t.beginPath(),t.arc(c,d,h,0,2*Math.PI),t.clip();const g=c+.8*Math.cos(f)*h*.62,m=d-.55*h*.62,M=t.createRadialGradient(g,m,0,g,m,1.7*h);M.addColorStop(0,l(.95*u)),M.addColorStop(.55,l(.5*u)),M.addColorStop(1,l(.18)),t.fillStyle=M,t.fillRect(c-h,d-h,2*h,2*h),t.globalCompositeOperation="lighter",t.lineWidth=Math.max(1.5,.05*h);for(let e=0;e<6;e++){const o=e/6*Math.PI+.35*n,r=Math.sin(o);r<0||(t.strokeStyle=l(.16*r),t.beginPath(),t.ellipse(c,d,h*Math.abs(Math.cos(o)),h,0,0,2*Math.PI),t.stroke())}const S=t.createRadialGradient(c,d,.7*h,c,d,h);if(S.addColorStop(0,"#000"),S.addColorStop(1,l(.3)),t.fillStyle=S,t.fillRect(c-h,d-h,2*h,2*h),t.restore(),t.globalCompositeOperation="source-over",!i.length)return;t.globalCompositeOperation="color";const k=.4*n,v=.5*a,y=t.createLinearGradient(c-Math.cos(k)*h,d-Math.sin(k)*h,c+Math.cos(k)*h,d+Math.sin(k)*h);y.addColorStop(0,s(i,v)),y.addColorStop(.5,s(i,v+.25)),y.addColorStop(1,s(i,v+.5)),t.fillStyle=y,t.fillRect(0,0,o,r),t.globalCompositeOperation="source-over"}function d(a,s={}){const d={current:{...i,...s}},h=t();let u="idle",f=0,p=e(d.current.level??0),g=p,m=0,M=0,S=l(d.current.palette),k=null,v=null,y=0;const b=t=>{t.canvas.style.filter=!t.dark()&&S.length?"brightness(.68) saturate(1.35)":""},C=t=>{a.style.setProperty("--ascii-level",t.toFixed(3)),d.current.swell&&h.set(a,"scale",String(1+.1*t))};k=o({host:a,outset:Math.round(.08*(a.offsetWidth||0)),look:()=>({mark:"glyph",charset:" .:-=+*#%@",font:'"Geist Mono", ui-monospace, monospace',fontWeight:500,cellSize:6,cellAspect:.62,glyphScale:.92,fit:"cover",color:S.length?"source":"ink",contrast:2.2,brightness:1.1-.5,saturation:1.4,...d.current.look}),ink:()=>d.current.ink??"--ascii-ink-strong",kit:d,reducedMotion:()=>d.current.reducedMotion,onTheme:()=>k&&b(k),onFail:()=>{k=null},paint:({pen:t,w:o,h:r,now:a,still:i})=>{const l=M?Math.min(64,a-M):16;M=a;const s=e((t=>"listening"===u?v?v.read():p:"thinking"===u?.2+.1*Math.sin((t-f)/120):"done"===u?m*(1-n(e((t-f)/420))):p)(a));return i||"done"===u?g=s:g+=(s-g)*(1-(1-(s>g?.45:.12))**(l/16.7)),i||C(g),c(t,o,r,i?0:a/1e3,g,S),!0}}),k&&b(k);const w=()=>{y++,v&&(v.stream.getTracks().forEach(t=>t.stop()),v.context.close().catch(()=>{}),v=null)},P=t=>{"listening"!==t&&w(),"done"===t&&(m=g),u=t,f=performance.now(),a.dataset.state=t,k||C("listening"===t?p:0),k?.kick()};return r(()=>k,d,t=>{S=l(t.palette),void 0!==t.level&&(p=e(t.level)),k?.refresh(),k&&b(k)},{level(t){p=e(Number.isFinite(t)?t:0),k||"listening"!==u||C(p),k?.kick()},listen:()=>P("listening"),think:()=>P("thinking"),done:()=>P("done"),idle:()=>{p=0,P("idle")},async mic(){w();const t=y,e="undefined"!=typeof navigator?navigator.mediaDevices:void 0,o=globalThis.AudioContext;if(!e?.getUserMedia||!o)return!1;let r;try{r=await e.getUserMedia({audio:!0})}catch{return!1}if(t!==y)return r.getTracks().forEach(t=>t.stop()),!1;const n=new o,a=n.createAnalyser();a.fftSize=1024,n.createMediaStreamSource(r).connect(a);const i=new Uint8Array(a.fftSize);return v={stream:r,context:n,read(){a.getByteTimeDomainData(i);let t=0;for(const e of i)t+=((e-128)/128)**2;return 5*Math.sqrt(t/i.length)}},P("listening"),!0},get state(){return u},get current(){return g}},()=>{w(),h.restore(),a.style.removeProperty("--ascii-level"),delete a.dataset.state})}var h=i;export{h as VOICE_ORB_DEFAULTS,a as VOICE_PALETTES,c as paintOrb,d as voiceOrb};//# sourceMappingURL=chunk-ANLBW5RI.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{hash as e,styleKeeper as t,srOnly as n,mountSurface as r,handle as i}from"./chunk-
|
|
1
|
+
import{hash as e,styleKeeper as t,srOnly as n,mountSurface as r,handle as i}from"./chunk-PFQBEWCF.js";import{isGlyphFieldSupported as l}from"../field.js";var o={check:!0,shake:!0};function a(e,t){const n=Math.max(3,3*Math.round(e*t/3));return{cw:n/3*2/t,ch:n/t,cellSize:n/t}}function s(t,n,r,i,l,o=0){const a=24*r+170;if(n<a){const r=(n-24*t)/170;return r<1?1+Math.floor(e(t+o,Math.floor(n/46))*(r<0?3:9)):0}if(!i||l)return 0;const s=(((n-a)/1250-.07*t)%1+1)%1;return s<.3?1+Math.round(8*Math.sin(Math.PI*(s/.3))):0}var c="cubic-bezier(.16, 1, .3, 1)";function d(e,d={}){const u={current:{...o,...d}},h=t(),p=u.current.label??e,m=u.current.text??(p.textContent??"").trim(),f=[...p.childNodes],g=void 0!==u.current.icon?u.current.icon:m?null:e.querySelector("svg"),y=e.getAttribute("aria-label");let v="idle",b=m,x=-1e9,M=0,C=null,w={cw:9,ch:15,cellSize:15};const $=n(m),k=document.createElement("span"),A=document.createElement("span");A.setAttribute("aria-hidden","true"),A.dataset.asciiCheck="",A.innerHTML='<svg viewBox="0 0 24 24" width="1.1em" height="1.1em" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M20 6 9 17l-5-5"/></svg>';const S=()=>{const e=Math.min(globalThis.devicePixelRatio||1,2);w=a(parseFloat(getComputedStyle(p).fontSize)||15,e)},z=()=>{if(g)return k.replaceChildren(),C&&k.appendChild(C.canvas),k.style.width=`${w.cw}px`,void(k.style.height=`${w.ch}px`);const t=[...b];for(const e of[...k.children])"SPAN"===e.tagName&&e.remove();const n=C&&C.canvas.parentElement===k?C.canvas:null;for(const[e,r]of t.entries()){const t=document.createElement("span");t.textContent=r,t.setAttribute("style",`position:absolute;top:0;left:${e*w.cw}px;width:${w.cw}px;height:${w.ch}px;line-height:${w.ch}px;text-align:center`),n?k.insertBefore(t,n):k.appendChild(t)}C&&!n&&k.appendChild(C.canvas),k.style.width=t.length*w.cw+"px",k.style.height=`${w.ch}px`,$.textContent=b,M=Math.max(M,e.offsetWidth),M&&h.set(e,"min-width",`${M}px`)},P="undefined"!=typeof document&&l();if(P){S(),k.setAttribute("aria-hidden","true");const t="position:absolute;left:50%;top:50%;translate:-50% -50%;pointer-events:none";g?("static"===getComputedStyle(e).position&&h.set(e,"position","relative"),k.setAttribute("style",t),A.setAttribute("style",`${t};display:grid;place-items:center;opacity:0;scale:.5`),e.appendChild(k),e.appendChild(A)):(k.setAttribute("style","display:inline-block;vertical-align:middle;position:relative;white-space:pre"),A.setAttribute("style","display:inline-grid;place-items:center;vertical-align:middle;overflow:hidden;width:0;opacity:0;scale:.5"),p.replaceChildren($,A,k)),z()}C=P?r({host:k,look:()=>({mark:"glyph",charset:" .:-=+*#%@",font:'"Geist Mono", ui-monospace, monospace',fontWeight:500,cellSize:w.cellSize,cellAspect:2/3,glyphScale:.94,...u.current.look}),ink:()=>u.current.ink??getComputedStyle(p).color,kit:u,reducedMotion:()=>u.current.reducedMotion,resolution:(e,t)=>[Math.max(2,2*Math.round(e/w.cw)),Math.max(3,3*Math.round(t/w.ch))],onFail:()=>{C=null,k.remove(),A.remove(),h.restore(),g||(p.replaceChildren(...f),p.textContent=b)},paint:({pen:e,now:t,still:n})=>{const r=t-x;if(g){if("loading"!==v||n)return!1;const t=1+Math.round(8*(.5-.5*Math.cos(2*Math.PI*r/720))),i=Math.round(t/9*255);return e.fillStyle=`rgb(${i} ${i} ${i})`,e.fillRect(0,0,2,3),!0}const i=[...k.children].filter(e=>"SPAN"===e.tagName);let l="loading"===v&&!n;for(let t=0;t<i.length;t++){const o=n?0:s(t,r,i.length,"loading"===v,n,b.length);r<24*i.length+170&&(l=!0);const a=" "===b[t];if(i[t].style.visibility=o&&!a?"hidden":"",!o||a)continue;const c=Math.round(o/9*255);e.fillStyle=`rgb(${c} ${c} ${c})`,e.fillRect(2*t,0,2,3)}return l}}):null,P&&!C&&(k.remove(),A.remove(),g||p.replaceChildren(...f),h.restore());const E=(t,n)=>{v=t,b=g?"":n,e.dataset.state=t,"loading"===t?e.setAttribute("aria-busy","true"):e.removeAttribute("aria-busy"),g&&null!==y&&e.setAttribute("aria-label","idle"===t?y:n),u.current.announce&&(u.current.announce.textContent="idle"===t?"":n),C?(x=performance.now(),((e,t)=>{const n=t?"none":`opacity 160ms ${c} ${e?120:0}ms, scale 240ms ${c} ${e?120:0}ms`;if(A.style.transition=n,A.style.opacity=e?"1":"0",A.style.scale=e?"1":".5",g||(A.style.width=e?"1.1em":"0",A.style.marginRight=e?".45em":"0"),g&&"style"in g){const e="idle"!==v&&"error"!==v;h.set(g,"transition",n.replace(/ 120ms/g,"")),h.set(g,"opacity",e?t&&"loading"===v?".4":"0":"1"),h.set(g,"scale",e&&!t?".6":"1")}})(!("success"!==t||!g&&!u.current.check),C.still()),z(),C.kick(),"error"===t&&u.current.shake&&!C.still()&&"function"==typeof e.animate&&e.animate([{translate:"0"},{translate:"-4px 0"},{translate:"4px 0"},{translate:"-2px 0"},{translate:"0"}],{duration:280,easing:c})):g||(p.textContent=n)};return i(()=>C,u,()=>{C&&(S(),z(),C.refresh())},{start(e=(g?y??"":`${m}…`)){E("loading",e)},succeed(e="Done"){E("success",e)},fail(e="Retry"){E("error",e)},reset(e=(g?y??"":m)){E("idle",e)},get state(){return v}},()=>{C&&(k.remove(),A.remove(),g||p.replaceChildren(...f)),g&&null!==y&&e.setAttribute("aria-label",y),delete e.dataset.state,e.removeAttribute("aria-busy"),h.restore()})}var u=o;export{u as BUTTON_LOADING_DEFAULTS,d as buttonLoading,a as letterCells,s as letterGlyph};//# sourceMappingURL=chunk-B6GZ645M.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{styleKeeper as t,mountSurface as e,handle as n,hash as r,house as o}from"./chunk-
|
|
1
|
+
import{styleKeeper as t,mountSurface as e,handle as n,hash as r,house as o}from"./chunk-PFQBEWCF.js";var a={duration:800,trigger:"visible",replayOnHover:!0,settle:"glyphs"};function i(t,e,n=.82){const o=t.getContext("2d");if(!o)return;const a=t.width,i=t.height,l=o.createImageData(a,i),c=t=>t*t*(3-2*t),s=(t,e)=>{const n=Math.floor(t),o=Math.floor(e),a=c(t-n),i=c(e-o),l=r(n,o),s=r(n+1,o),f=r(n,o+1);return l+(s-l)*a+(f-l)*i+(l-s-f+r(n+1,o+1))*a*i};for(let t=0;t<i;t++)for(let r=0;r<a;r++){const o=.6*s(r/6+2.4*e,t/3.5-.8*e)+.4*s(r/2.5-3*e,t/2),c=Math.min(1,2.4*(1-Math.hypot(2*(r/a-.5),2*(t/i-.5))*n)),f=.72*Math.max(0,o-.42)*Math.max(0,c)*255,g=4*(t*a+r);l.data[g]=l.data[g+1]=l.data[g+2]=f,l.data[g+3]=255}o.putImageData(l,0,0)}function l(l,c={}){const s={current:{...a,...c}},f=t(),g=document.createElement("canvas"),d=document.createElement("canvas");let h=-1,p="",u=!1,m=!1,x=null;const v=(t,e)=>{const n=`${t}x${e}:${s.current.text??""}:${l.textContent}`;if(n===p)return;p=n,g.width=t,g.height=e;const r=g.getContext("2d");r.fillStyle="#000",r.fillRect(0,0,t,e),void 0!==s.current.text?function(t,e,n,r,o){const a=getComputedStyle(e),i=n.split("\n");t.fillStyle="#fff",t.textAlign="center",t.textBaseline="middle";const l=(parseFloat(a.letterSpacing)||0)/(parseFloat(a.fontSize)||16),c=e=>{"letterSpacing"in t&&(t.letterSpacing=l*e+"px")};t.font=`${a.fontWeight} 100px ${a.fontFamily}`,c(0);const s=Math.max(1,...i.map(e=>t.measureText(e).width)),f=Math.min(.94*r/s*100,.9*o/i.length);t.font=`${a.fontWeight} ${f}px ${a.fontFamily}`,c(f),i.forEach((e,n)=>t.fillText(e,r/2,o/2+(n-(i.length-1)/2)*f*1.04))}(r,l,s.current.text,t,e):function(t,e,n,r){const o=document.createTreeWalker(e,NodeFilter.SHOW_TEXT),a=document.createRange();t.fillStyle="#fff",t.textAlign="left",t.textBaseline="alphabetic";for(let e=o.nextNode();e;e=o.nextNode()){const o=e.parentElement;if(!o)continue;const i=getComputedStyle(o);t.font=`${i.fontStyle} ${i.fontWeight} ${parseFloat(i.fontSize)*r}px ${i.fontFamily}`,"letterSpacing"in t&&(t.letterSpacing=(parseFloat(i.letterSpacing)||0)*r+"px");const l=t.measureText("Hg"),c=l.fontBoundingBoxAscent||parseFloat(i.fontSize)*r*.8,s=l.fontBoundingBoxDescent||parseFloat(i.fontSize)*r*.2,f="uppercase"===i.textTransform?t=>t.toUpperCase():"lowercase"===i.textTransform?t=>t.toLowerCase():t=>t;for(const o of e.data.matchAll(/\S+/g)){a.setStart(e,o.index),a.setEnd(e,o.index+o[0].length);const i=a.getClientRects()[0];if(!i)continue;const l=(i.top-n.top)*r,g=i.height*r;t.fillText(f(o[0]),(i.left-n.left)*r,l+(g-c-s)/2+c)}}a.detach?.()}(r,l,l.getBoundingClientRect(),t/(l.getBoundingClientRect().width||1))};x=e({host:l,look:()=>({mark:"glyph",charset:" .:-=+*#%@",font:'"Geist Mono", ui-monospace, monospace',fontWeight:500,cellSize:4.5,cellAspect:.62,glyphScale:.92,contrast:1.35,hover:"trail",trail:{strength:.6,radius:.2},...s.current.look}),ink:()=>s.current.ink??getComputedStyle(l).color,kit:s,reducedMotion:()=>s.current.reducedMotion,resolution:2,onFail:()=>{x=null,f.restore()},paint:({pen:t,width:e,height:n,now:a,still:l})=>{v(e,n);const c=s.current,f="text"===c.settle;if(h<0||l)return!(!m&&"visible"===c.trigger&&!l)&&(f&&h>=0||t.drawImage(g,0,0),h>=0&&S(),!1);const p=a-h,x=.3*c.duration,w=.7*c.duration,y=Math.max(2,Math.ceil(e/20)),M=Math.max(2,Math.ceil(n/20));if(d.width===y&&d.height===M||(d.width=y,d.height=M),i(d,p/1e3),t.imageSmoothingEnabled=!0,p<x)return t.drawImage(d,0,0,e,n),u&&(t.globalAlpha=1-o(p/x),t.drawImage(g,0,0),t.globalAlpha=1),!0;const E=Math.min(1,(p-x)/w),b=(1.18*E-.02)*e,k=.14*e,F=5.58,I=Math.floor(a/16);if(E>=1)return f||t.drawImage(g,0,0),S(),!1;t.drawImage(d,0,0,e,n),b>0&&t.drawImage(g,0,0,b,n,0,0,b,n);for(let e=Math.max(0,Math.floor(b/F)*F);e<b+k;e+=F){const o=(e-b)/k;for(let a=0;a<n;a+=9)r(e+13*I,a)<o||(t.globalAlpha=.35+.65*r(a+7*I,e),t.fillStyle="#000",t.fillRect(e,a,F,9),t.drawImage(g,e,a,F,9,e,a,F,9))}return t.globalAlpha=1,!0}});const S=()=>{h=-1,u="text"!==s.current.settle,u||f.restore()},w=()=>{x&&(f.set(l,"-webkit-text-fill-color","transparent"),m=!0,h=performance.now(),x.kick())};let y=!1;const M=x&&"visible"===s.current.trigger&&"function"==typeof IntersectionObserver?new IntersectionObserver(([t])=>{t.isIntersecting&&!y&&w(),y=t.isIntersecting},{threshold:.5}):null;x&&("text"!==s.current.settle&&f.set(l,"-webkit-text-fill-color","transparent"),u="text"!==s.current.settle&&"manual"===s.current.trigger,M?M.observe(l):"visible"===s.current.trigger&&w());let E=!1;const b=()=>{E||(E=!0,s.current.replayOnHover&&h<0&&w())},k=()=>{E=!1},F=t=>{!E||t.target instanceof Node&&l.contains(t.target)||(E=!1)};return x&&(l.addEventListener("pointerenter",b),l.addEventListener("pointermove",b),l.addEventListener("pointerleave",k),document.addEventListener("pointermove",F,!0)),x&&document.fonts?.ready.then(()=>{p="",x?.kick()}),n(()=>x,s,()=>{p="",x?.refresh()},{replay:w},()=>{M?.disconnect(),l.removeEventListener("pointerenter",b),l.removeEventListener("pointermove",b),l.removeEventListener("pointerleave",k),document.removeEventListener("pointermove",F,!0),f.restore()})}var c=a;export{c as DECODE_DEFAULTS,l as decode,i as driftNoise};//# sourceMappingURL=chunk-BBOSHBZK.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{parseColor as t,hash2 as e}from"./chunk-ZCHGV2CV.js";import{mountCanvas as o}from"./chunk-
|
|
1
|
+
import{parseColor as t,hash2 as e}from"./chunk-ZCHGV2CV.js";import{mountCanvas as o}from"./chunk-KTYCGGRO.js";function n(o,n,c,r,s={x:.5,y:.5},l={}){const{fontSize:a=14,chars:i=" . · * + ° ★",accentColor:h,color:f,speed:d=1,count:g=180,lightMode:m=!1}=l,p=h??(m?"#6b8700":"#d4ff00");o.clearRect(0,0,n,c),o.textBaseline="middle",o.textAlign="center";const M=n*(.2+.6*s.x),x=c*(.2+.6*s.y),$=.65*Math.sqrt(n*n+c*c);let u=255,S=255,b=255;if(m&&(u=55,S=55,b=55),f){const e=t(f);e&&(u=e.r,S=e.g,b=e.b)}let C=212,k=255,z=0;const y=t(p);y&&(C=y.r,k=y.g,z=y.b);const A=i.replace(/ /g,"").split("");if(0!==A.length){for(let t=0;t<g;t++){const s=e(17*t,3)*Math.PI*2,l=(r*(.15+.85*e(31*t,7))*d*.22+e(13*t,11))%1,i=M+Math.cos(s)*l*$,h=x+Math.sin(s)*l*$;if(i<-20||i>n+20||h<-20||h>c+20)continue;const f=Math.max(6,a*(.4+.9*l));o.font=`${f}px monospace`;const g=A[Math.min(A.length-1,Math.floor(l*A.length))],p=l>.72,y=m?.85*l:.2*l;o.fillStyle=p?`rgba(${C},${k},${z},${Math.min(m?.92:.32,2.2*y)})`:`rgba(${u},${S},${b},${y})`,o.fillText(g,i,h)}o.textAlign="left"}}var c={id:"stars",name:"Stars",description:"A sparse starfield that twinkles, drifts and leans toward the cursor.",cellSize:14,speed:1,cursor:!0,mount:t=>o(t,(t,e,o,c,r,s)=>n(t,e,o,c,r,{fontSize:s.fontSize,chars:s.chars,lightMode:s.lightMode,color:s.ink,accentColor:s.accent}))};export{n as renderStarsBackground,c as stars};//# sourceMappingURL=chunk-BJRPY7UB.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{renderMaterial as t}from"./chunk-XPXMCXYI.js";import{mountCanvas as e}from"./chunk-
|
|
1
|
+
import{renderMaterial as t}from"./chunk-XPXMCXYI.js";import{mountCanvas as e}from"./chunk-KTYCGGRO.js";var o=(t,e,o,r)=>{const h=2.8*t+1.8*e+.018*r,a=1.2*t-3.2*e,i=Math.abs(2*(h-Math.floor(h))-1),n=Math.abs(2*(a-Math.floor(a))-1);return.85*Math.pow(Math.min(i,n),1.8)},r={id:"facet",name:"Facet",description:"Quiet folded planes catch light along their edges.",cellSize:12,speed:1,cursor:!1,mount:r=>e(r,(e,r,h,a,i,n)=>t(o,e,r,h,a,{ditherStrength:n.ditherStrength,fontSize:n.fontSize,chars:n.chars,lightMode:n.lightMode,color:n.ink}))};export{r as facet};//# sourceMappingURL=chunk-CA5J25SV.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{parseColor as t,hash2 as o}from"./chunk-ZCHGV2CV.js";import{mountCanvas as e}from"./chunk-
|
|
1
|
+
import{parseColor as t,hash2 as o}from"./chunk-ZCHGV2CV.js";import{mountCanvas as e}from"./chunk-KTYCGGRO.js";import{mixHex as l}from"./chunk-PFQBEWCF.js";var r=1,i=2,n=4,f=8,c={3:"─",12:"│",9:"┌",10:"┐",5:"└",6:"┘",11:"┬",7:"┴",13:"├",14:"┤",15:"┼",[r]:"╶",[i]:"╴",[n]:"╵",[f]:"╷"};function a(e,l,r,i,n={}){const{fontSize:f=13,pulseColor:a="#ffffff",color:s="#00ff88",density:h=.38,speed:g=1,lightMode:p=!1}=n,u=.62*f,b=1.4*f,m=Math.ceil(l/u),d=Math.ceil(r/b),C=t(s)??{r:0,g:255,b:136},M=t(a)??{r:255,g:255,b:255},$=(t,e)=>{if(o(17*t+1,7*e+2)>h)return 0;let l=0;return t+1<m&&o(17*t+1,7*e+2)>.15&&(l|=1),t-1>=0&&o(17*(t-1)+1,7*e+2)>.15&&(l|=2),e+1<d&&o(17*t+1,7*(e+1)+2)>.15&&(l|=8),e-1>=0&&o(17*t+1,7*(e-1)+2)>.15&&(l|=4),l};e.clearRect(0,0,l,r),e.font=`${f}px "JetBrains Mono", monospace`,e.textBaseline="top";const S=i*g;for(let t=0;t<d;t++)for(let l=0;l<m;l++){const r=$(l,t);if(0===r)continue;const i=c[r]??"·",n=(8*S+40*o(l,23*t))%m,f=(6*S+40*o(17*t,11*l))%d,a=(1&r||2&r)&&Math.abs(l-n)<1.5,s=(4&r||8&r)&&Math.abs(t-f)<1.5,h=a||s,g=.25+.35*o(3*l,5*t);h?(e.globalAlpha=.95,e.fillStyle=`rgb(${M.r},${M.g},${M.b})`):(e.globalAlpha=g,e.fillStyle=`rgb(${C.r},${C.g},${C.b})`),e.fillText(i,l*u,t*b)}e.globalAlpha=1}var s={id:"circuit",name:"Circuit",description:"Circuit traces with signals running along them.",cellSize:13,speed:1,cursor:!1,mount:t=>e(t,(t,o,e,r,i,n)=>a(t,o,e,r,{fontSize:n.fontSize,chars:n.chars,lightMode:n.lightMode,color:n.ink,pulseColor:n.accent??l(n.ink,"#ffffff",.7)}))};export{s as circuit,a as renderCircuitBackground};//# sourceMappingURL=chunk-CR7QS3B3.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{styleKeeper as t,mountSurface as e,easeOut as o,handle as n}from"./chunk-
|
|
1
|
+
import{styleKeeper as t,mountSurface as e,easeOut as o,handle as n}from"./chunk-PFQBEWCF.js";var a={blocks:"[data-block]",shimmer:1400,resolve:420,stagger:60,develop:640},r=t=>`rgb(${255*t} ${255*t} ${255*t})`,l=(t,e,n)=>t<0?0:o((t-e)/n,3),i=t=>parseFloat(t)||0;function s(t,e,o=1){const n=getComputedStyle(t),a=t.getBoundingClientRect(),r=n.borderTopLeftRadius,l=r.endsWith("%")?i(r)/100*Math.min(a.width,a.height):i(r);if("text"!==e)return{radius:l/o,lines:[]};const s=i(n.fontSize)||14,c="normal"===n.lineHeight?1.2*s:i(n.lineHeight),u=Math.min(c,.62*s),h=new Map,m="undefined"!=typeof document&&"function"==typeof document.createRange?document.createRange():null;m?.selectNodeContents(t);for(const t of m?[...m.getClientRects()]:[]){if(!t.width)continue;const e=Math.round((t.top+t.bottom)/2/Math.max(1,c/2)),o=h.get(e);h.set(e,o?{left:Math.min(o.left,t.left),right:Math.max(o.right,t.right),top:Math.min(o.top,t.top),bottom:Math.max(o.bottom,t.bottom)}:{left:t.left,right:t.right,top:t.top,bottom:t.bottom})}const d=[...h.values()].map(t=>{const e=Math.max(t.left,a.left),n=Math.min(t.right,a.right),r=(t.top+t.bottom)/2;return{x:(e-a.left)/o,y:(r-u/2-a.top)/o,w:Math.max(0,n-e)/o,h:u/o}}).filter(t=>t.w>0);return d.length||d.push({x:0,y:(a.height-u)/2/o,w:a.width/o,h:u/o}),{radius:(l||u/2)/o,lines:d}}function c(t){const e=t.dataset.block;return"text"===e||"photo"===e||"avatar"===e?e:"IMG"===t.tagName||"PICTURE"===t.tagName||"VIDEO"===t.tagName?/^50%|^9999px/.test(getComputedStyle(t).borderTopLeftRadius)?"avatar":"photo":"text"}function u(i,u={}){const h={current:{...a,...u}},m=t();let d=0,f=null,g=null,p=null,b=null;const M=()=>[...i.querySelectorAll(h.current.blocks)].map((t,e)=>({el:t,kind:c(t),delay:void 0!==t.dataset.delay?Number(t.dataset.delay):80+e*h.current.stagger})),y=["mask-image","-webkit-mask-image"],k=()=>{m.restore(),i.removeAttribute("aria-busy"),g?.(),g=null};b=e({host:i,look:()=>({mark:"glyph",charset:" .:-=+*#%@",cellSize:5,cellAspect:.62,glyphScale:.92,font:'"Geist Mono", ui-monospace, monospace',fontWeight:500,contrast:1.15,shade:.35,...h.current.look}),ink:()=>h.current.ink??"--ascii-ink-strong",kit:h,reducedMotion:()=>h.current.reducedMotion,onFail:()=>{b=null,k()},paint:({pen:t,now:e,still:n,box:a,w:i})=>{if(null!==f&&n)return k(),!1;const c=h.current,u=null===f?-1:e-f;if(null!==f&&u>Math.max(h.current.develop,...M().map(t=>t.delay+h.current.resolve))+16)return k(),!1;null!==f&&(t=>{for(const{el:e,kind:o,delay:n}of M()){const a=l(t,n,h.current.resolve);if(m.set(e,"opacity",String("text"===o?Math.min(1,1.6*a):a)),"text"===o){const t=128*a-14;for(const o of y)m.set(e,o,a>=1?"none":`linear-gradient(90deg, #000 ${t-14}%, transparent ${t+14}%)`)}}})(u);const g=Math.max(140,.42*i),p=i+g,b=-g+(n?.4:(e-d)/c.shimmer%1)*p,x=n?1:o((e-d)/280,3),v=t.createLinearGradient(b-p,0,b+p,.08*p);for(let t=0;t<=32;t++){const e=Math.abs(t/16-1)*p,o=Math.min(e,Math.abs(p-e)),n=o<g?.5+.5*Math.cos(o/g*Math.PI):0;v.addColorStop(t/32,r(.24+(.54-.24)*n))}const w=(e,o,n,a,r)=>{t.beginPath(),t.roundRect(e,o,Math.max(0,n),a,Math.min(r,a/2,Math.max(0,n)/2))};for(const{el:e,kind:n,delay:r}of M()){const{x:i,y:h,w:m,h:d}=a(e),f=e.getBoundingClientRect().width,g=s(e,n,f&&m?f/m:1),p=l(u,r,c.resolve);if(t.fillStyle=v,"photo"===n){const n=u<0?0:o(u/c.develop,4);t.globalAlpha=(1-p)*x,w(i,h,m,d,g.radius),t.fill();const a=e instanceof HTMLImageElement?e:e.querySelector("img");if(n>0&&a?.complete&&a.naturalWidth){const e=Math.max(m/a.naturalWidth,d/a.naturalHeight),o=a.naturalWidth*e,r=a.naturalHeight*e;t.save(),w(i,h,m,d,g.radius),t.clip(),t.globalAlpha=n*(1-p),t.drawImage(a,i+(m-o)/2,h+(d-r)/2,o,r),t.restore()}}else if("avatar"===n)t.globalAlpha=(1-p)*x,t.beginPath(),t.arc(i+m/2,h+d/2,Math.min(m,d)/2,0,2*Math.PI),t.fill();else{t.globalAlpha=x*(1-p);for(const e of g.lines){const o=i+e.x,n=o+e.w*p;w(n,h+e.y,o+e.w-n,e.h,g.radius),t.fill()}}t.globalAlpha=1}return!0}});const x=()=>{const t=null!==f;if(d=performance.now(),f=null,i.setAttribute("aria-busy","true"),b){if(t&&!b.still())for(const{el:t}of M())t.animate?.([{opacity:1},{opacity:0}],{duration:240,easing:"cubic-bezier(.16, 1, .3, 1)"});(()=>{for(const{el:t}of M()){m.set(t,"opacity","0");for(const e of y)t.style.removeProperty(e)}})(),b.kick()}};return x(),n(()=>b,h,()=>b?.refresh(),{resolve:()=>b?(null!==f&&p||(f=performance.now(),p=new Promise(t=>{g=t}),b.kick()),p):(i.removeAttribute("aria-busy"),Promise.resolve()),reset(){g?.(),g=null,p=null,x()},get loading(){return null===f}},()=>{k()})}var h=a;export{h as SKELETON_DEFAULTS,c as blockKind,s as blockShape,u as skeleton};//# sourceMappingURL=chunk-D4KCZSIP.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{mountSurface as t,house as e,styleKeeper as n,handle as r,clamp as o}from"./chunk-
|
|
1
|
+
import{mountSurface as t,house as e,styleKeeper as n,handle as r,clamp as o}from"./chunk-PFQBEWCF.js";var l={values:[],duration:560},a=.46,i=(t,e)=>e?Math.min(e-1,Math.max(0,Math.floor(t*e))):-1;function c(t,e){if(!e)return{bar:0,gap:0,left:0};const n=e<=7?.5:.6;let r=Math.max(1,Math.floor(t/e));for(;r>1&&e*r+(e-1)*Math.max(1,Math.round(r*n))>t;)r--;const o=e>1?Math.max(0,Math.min(Math.ceil(r*n*1.6),Math.floor((t-e*r)/(e-1)))):0;return{bar:r,gap:o,left:Math.max(0,Math.floor((t-e*r-(e-1)*o)/2))}}function s(s,h={}){const u={current:{...l,...h}};let d=u.current.values,m=null,f=[],p=0,M=!1,x=null,g=!1===u.current.intro?-1e9:performance.now(),v=[],b=[],w=[],E={cols:0,rows:0};const k=()=>u.current.values??[],y=()=>({mark:"glyph",charset:" .:-=+*#%@",font:'"Geist Mono", ui-monospace, monospace',fontWeight:500,cellSize:7,cellAspect:1,glyphScale:1.1,shade:.5,blend:"off",...u.current.look}),A=(t,e)=>{const{cellSize:n=7,maxPixelRatio:r=2}=y(),o=Math.min("number"==typeof devicePixelRatio&&devicePixelRatio>0?devicePixelRatio:1,r),l=Math.max(2,Math.round(n*o)),a=l/o,i=t=>{const e=Math.max(1,Math.floor(t*o/l));for(let t=e;t>1&&t>e-8;t--)if(Math.abs(t*a-Math.round(t*a))<.01)return t;return e},c=i(t),s=Math.max(2,i(e));return{cols:c,rows:s,cell:a,gw:Math.round(c*a),gh:Math.round(s*a)}};let L={left:0,cell:0};const C=(t,e)=>null===m?t===e-1?.8:a:t===m?.8:.3,$=(t,n)=>e((n-g-(b[t]??0))/u.current.duration),S=(t,e,n,r)=>{const l=((t,e,n,r)=>{const{bar:l,gap:a,left:i}=c(n,e.length),s=u.current.max??1.04*Math.max(...e,0),h=s>0?o(Math.max(0,e[t])/s)*(r-1):0,d=i+t*(l+a);return{x0:d,x1:d+l,h:h>0?Math.max(1,Math.round(h)):0}})(t,e,E.cols,E.rows);if(r)return l;const a=v[t]??{...l,h:0},i=$(t,n);return{x0:a.x0+(l.x0-a.x0)*i,x1:a.x1+(l.x1-a.x1)*i,h:a.h+(l.h-a.h)*i}};x=t({host:s,look:y,ink:()=>u.current.ink??"--ascii-ink-strong",kit:u,reducedMotion:()=>u.current.reducedMotion,resolution:(t,e)=>{const{cell:n}=A(t,e);return[Math.max(2,2*Math.round(t/n)),Math.max(4,2*Math.round(e/n))]},onFail:()=>{x=null},paint:({pen:t,width:n,height:r,now:l,still:i})=>{const c=(()=>{const t=x?.canvas;if(!t||!s.offsetWidth)return!1;const{gw:e,gh:n,cell:r}=A(s.offsetWidth,s.offsetHeight),o=Math.round((s.offsetWidth-e)/2),l=[`${o}px`,s.offsetHeight-n+"px",`${e}px`,`${n}px`];L={left:o,cell:r};let a=!1;return["left","top","width","height"].forEach((e,n)=>{t.style[e]!==l[n]&&(t.style[e]=l[n],a=!0)}),a&&x?.field.resize(),a})(),h=n/2,d=r/2;E={cols:h,rows:d};const m=k(),M=m.length,v=p?Math.min(64,l-p):16;p=l;const b=new Float32Array(h*d),y=(t,e,n)=>{const r=(d-1-e)*h+t;n>b[r]&&(b[r]=n)};for(let t=0;t<h;t++)y(t,0,.16);const R=({x0:t,x1:e,h:n},r)=>{if(n<=.01)return;const l=Math.ceil(n)-1;for(let a=Math.max(0,Math.floor(t));a<Math.min(h,Math.ceil(e));a++){const i=o(Math.min(a+1,e)-Math.max(a,t));for(let t=0;t<=l&&t<d-1;t++)y(a,t+1,(t===l?Math.min(1,r+.2):r)*i*o(n-t))}};let F=!1;const P=i?1:e((l-g)/u.current.duration);P<1&&(F=!0);for(const t of w)R({...t,h:t.h*(1-P)},a);P>=1&&(w=[]);for(let t=0;t<M;t++){!i&&$(t,l)<1&&(F=!0);const e=C(t,M),n=f[t]??e;f[t]=i?e:n+(e-n)*(1-Math.exp(-v/70)),Math.abs(f[t]-e)>.004&&(F=!0),R(S(t,m,l,i),f[t])}for(let e=0;e<b.length;e++){if(b[e]<=0)continue;const n=Math.round(255*b[e]);t.fillStyle=`rgb(${n} ${n} ${n})`,t.fillRect(e%h*2,2*Math.floor(e/h),2,2)}return c&&i&&x?.kick(),F||c}});const R=n(),F=x?null:document.createElement("div"),P=()=>{if(!F)return;const t=k(),e=t.length,n=u.current.max??1.04*Math.max(...t,0);F.replaceChildren(...t.map((t,r)=>{const l=document.createElement("div");return l.setAttribute("style",`flex:1 1 0;height:${n>0?(100*o(t/n)).toFixed(2):0}%;margin:0 ${e<=7?22:18}%;background:currentColor;opacity:${.9*(.16+.84*C(r,e))}`),l}))};F&&("static"===getComputedStyle(s).position&&R.set(s,"position","relative"),F.setAttribute("aria-hidden","true"),F.setAttribute("style","position:absolute;inset:0;display:flex;align-items:flex-end;pointer-events:none"),s.appendChild(F));const W=document.createElement("table");W.setAttribute("style","position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0");const H=()=>{const t=u.current.format??(t=>t.toLocaleString()),e=u.current.labels??[],n=document.createElement("tbody");k().forEach((r,o)=>{const l=document.createElement("tr"),a=document.createElement("th"),i=document.createElement("td");a.setAttribute("scope","row"),a.setAttribute("style","font-weight:inherit"),a.textContent=e[o]??String(o+1),i.textContent=t(r),l.appendChild(a),l.appendChild(i),n.appendChild(l)}),W.replaceChildren(n)};H(),s.appendChild(W);const I=!s.hasAttribute("tabindex"),z=!s.hasAttribute("role");I&&(s.tabIndex=0),z&&s.setAttribute("role","group");const B=t=>{const e=k().length,n=null!==t&&e?Math.min(e-1,Math.max(0,Math.round(t))):null;n!==m&&(m=n,x?.kick(),P(),u.current.onHover?.(m,null===m?null:k()[m],null===m?null:u.current.labels?.[m]??null))},O=t=>u.current.stagger??(t<=7?45:12),X=(t,n)=>{const r=k(),o=u.current.labels,l=performance.now(),i=!!x?.still(),c=E.cols&&!i?t.map((e,n)=>S(n,t,l,!1)):[],s=i?[]:w.map(t=>({...t,h:t.h*(1-e((l-g)/u.current.duration))})),h=new Map,m=(t,e,r)=>o&&n?r?.[t]??`#${t}`:"#"+(e-1-t);t.forEach((e,r)=>h.set(m(r,t.length,n),r));const p=new Set,M=f;let y=0;const A=r.length;v=r.map((t,e)=>{const n=h.get(m(e,A,o));return void 0!==n&&c[n]?(p.add(n),c[n]):null}),f=r.map((t,e)=>{const n=h.get(m(e,A,o));return void 0!==n?M[n]??a:a}),b=v.map(t=>t?0:y++*O(A)*.6),w=[...s,...c.filter((t,e)=>!p.has(e))].filter(t=>t.h>.01),d=r,g=l,x?.kick(),P()};P();const j=t=>{const e=s.getBoundingClientRect(),n=k().length;if(!e.width)return;const r=(t.clientX-e.left)/e.width,o=t.clientY-e.top;if(r<0||r>1||o<0||o>e.height)return void B(null);if(!E.cols)return void B(i(r,n));const{bar:l,gap:a,left:h}=c(E.cols,n);B(Math.round(((t.clientX-e.left-L.left)/L.cell-h-l/2)/Math.max(1,l+a)))},D=()=>B(null),G=t=>{const e=k().length,n="ArrowRight"===t.key?null===m?0:Math.min(e-1,m+1):"ArrowLeft"===t.key?null===m?e-1:Math.max(0,m-1):"Home"===t.key?0:"End"===t.key?e-1:"Escape"===t.key?null:void 0;void 0!==n&&e&&(t.preventDefault(),B(n))};s.addEventListener("pointermove",j),s.addEventListener("pointerdown",j),s.addEventListener("pointerleave",D),s.addEventListener("pointercancel",D),s.addEventListener("keydown",G),s.addEventListener("blur",D);const Q="function"==typeof IntersectionObserver?new IntersectionObserver(([t])=>{t?.isIntersecting&&!M&&(M=!0,!1!==u.current.intro&&(()=>{const t=k().length;d=k(),g=performance.now(),v=[],w=[],b=Array.from({length:t},(e,n)=>n*O(t)),f=k().map((t,e,n)=>C(e,n.length)),x?.kick(),P()})())},{threshold:.4}):null;Q?.observe(s);let Y=u.current.labels;return r(()=>x,u,t=>{H(),t.values!==d&&(X(d,Y),Y=t.labels),x?.refresh()},{set(t,e){const n=d,r=Y;u.current={...u.current,values:[...t],...e?{labels:[...e]}:{}},Y=u.current.labels,null!==m&&m>=t.length&&B(null),H(),X(n,r)},highlight:B,get active(){return m},get values(){return k()}},()=>{Q?.disconnect(),W.remove(),F?.remove(),R.restore(),s.removeEventListener("pointermove",j),s.removeEventListener("pointerdown",j),s.removeEventListener("pointerleave",D),s.removeEventListener("pointercancel",D),s.removeEventListener("keydown",G),s.removeEventListener("blur",D),I&&s.removeAttribute("tabindex"),z&&s.removeAttribute("role")})}var h=l;export{h as BLOCK_CHART_DEFAULTS,i as barAt,c as barLayout,s as blockChart};//# sourceMappingURL=chunk-EHXSXMBE.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{velocity as t,stepSpring as e}from"./chunk-
|
|
1
|
+
import{velocity as t,stepSpring as e}from"./chunk-XDNCXCR7.js";import{clamp as r,styleKeeper as n,mountSurface as o,handle as a,prefersReduced as i}from"./chunk-PFQBEWCF.js";var l={cards:"[data-card]",loop:!0,threshold:.4,outset:56},h=(t,e,r)=>t+(e-t)*r,s=(t,e,r)=>({x:t,v:0,to:t,k:e,z:r}),c=Array.from({length:96},(t,e)=>{const r=43758.5453*Math.sin(127.1*e+311.7);return r-Math.floor(r)});function d(t,e,n=.04){if(!t.complete||!t.naturalWidth)return null;const o=Math.min(1,420/Math.max(t.naturalWidth,t.naturalHeight)),a=document.createElement("canvas");a.width=Math.max(1,Math.round(t.naturalWidth*o)),a.height=Math.max(1,Math.round(t.naturalHeight*o));const i=a.getContext("2d",{willReadFrequently:!0});if(!i)return null;try{i.drawImage(t,0,0,a.width,a.height);const o=i.getImageData(0,0,a.width,a.height),l=o.data,h=new Uint32Array(256),s=l.length/4,c=t=>.2126*l[t]+.7152*l[t+1]+.0722*l[t+2];for(let t=0;t<l.length;t+=4)h[Math.round(c(t))]++;let d=0,u=255,g=0;for(let t=0;t<256;t++)if(g+=h[t],g>=.02*s){d=t;break}g=0;for(let t=255;t>=0;t--)if(g+=h[t],g>=.02*s){u=t;break}const m=Math.max(1,u-d);for(let t=0;t<l.length;t+=4){let o=r((c(t)-d)/m);e&&(o=1-o),l[t]=l[t+1]=l[t+2]=Math.round(255*(n+(1-n)*o)),l[t+3]=255}return i.putImageData(o,0,0),a}catch{return null}}function u(u,g={}){const m={current:{...l,...g}},p=n(),f=()=>!!(m.current.reducedMotion??i()),v=()=>[...u.querySelectorAll(m.current.cards)];let x=0,M=s(0,380,.72),w=s(0,380,.8),b=s(0,260,.9),y=!1,k=0,A=0,E=null,L=[],I=0,C=0,S=-1,R=new Map,$=null,F=null;const W=t=>v()[D(t)]??null,q=()=>u.clientWidth||160,D=t=>{const e=v().length;return e?(t%e+e)%e:0},P=(t,e,r,n)=>{const o=W(t);if(!o||!m.current.loop&&t>=v().length)return null;const a="IMG"===o.tagName?o:o.querySelector("img"),i=`${a?.currentSrc||a?.src||""}|${a?.complete}|${Math.round(e)}x${Math.round(r)}|${n}`,l=R.get(o);if(l?.key===i)return l.canvas;const h=document.createElement("canvas");h.width=Math.max(1,Math.round(e)),h.height=Math.max(1,Math.round(r));const s=h.getContext("2d");if(!s)return null;const c=m.current.radius??(parseFloat(getComputedStyle(u).borderTopLeftRadius)||16);s.beginPath(),s.roundRect(0,0,h.width,h.height,Math.min(c,h.width/2,h.height/2)),s.clip();const g=a?d(a,n):null;if(g){const t=Math.max(h.width/g.width,h.height/g.height),e=h.width/t,r=h.height/t;s.drawImage(g,(g.width-e)/2,(g.height-r)/2,e,r,0,0,h.width,h.height)}else s.fillStyle="rgb(60 60 60)",s.fillRect(0,0,h.width,h.height);return s.strokeStyle="rgb(150 150 150)",s.lineWidth=6,s.stroke(),R.set(o,{key:i,canvas:h}),h};function T(){const t=v(),e=x+(E?1:0),r=!m.current.loop&&e>=t.length?null:W(e);t.forEach(t=>{F?(p.set(t,"opacity","0"),t!==r?t.setAttribute("aria-hidden","true"):t.removeAttribute("aria-hidden")):t.hidden=t!==r}),u.setAttribute("aria-label",r?`${r.getAttribute("aria-label")||r.querySelector("img")?.alt||r.textContent?.trim()||"Card"}. Left arrow to pass, right arrow to keep.`:"No more cards")}F=o({host:u,outset:m.current.outset,look:()=>({blend:"coarse",mark:"glyph",charset:" .:-=+*#%@",font:'"Geist Mono", ui-monospace, monospace',fontWeight:500,cellSize:4,cellAspect:.62,glyphScale:.94,contrast:1.3,...m.current.look}),ink:()=>m.current.ink??"--ascii-ink-strong",kit:m,reducedMotion:()=>m.current.reducedMotion,onFail:()=>{F=null,p.restore(),T()},onTheme:()=>{R=new Map},paint:({pen:t,w:e,now:n,dark:o,box:a})=>{const i=a(u),l=i.w,s=i.h,d=i.x+l/2,g=i.y+s/2,m=r(b.x),p=(e,r,n,a,i=0)=>{const h=P(e,l,s,!o);!h||a<=0||(t.save(),t.translate(d,g+n),t.scale(r,r),t.globalAlpha=a,t.drawImage(h,-l/2,-s/2),i>0&&(t.globalCompositeOperation="destination-out",t.globalAlpha=i,t.drawImage(((t,e)=>{let r=$;if(!r||r.width!==Math.round(t)||r.height!==Math.round(e)){r=$=document.createElement("canvas"),r.width=Math.max(1,Math.round(t)),r.height=Math.max(1,Math.round(e));const n=r.getContext("2d");if(n)for(let t=0;t<r.height;t+=6)for(let e=0;e<r.width;e+=4){const r=43758.5453*Math.sin(12.9898*e+78.233*t);r-Math.floor(r)<.55&&(n.fillStyle="#000",n.fillRect(e,t,4,6))}}return r})(l,s),-l/2,-s/2)),t.restore())};p(x+2,h(.86,.93,m),h(24,12,m),h(.3,.55,m),.3),p(x+1,h(.93,1,m),h(12,0,m),h(.55,1,m),.4*(1-m));const f=P(x,l,s,!o);if(!f)return!1;const v=E?r((n-E.start)/620):0,y=E?.dir??1,k=E?E.x0+y*l*.9*(1-(1-v)**3):M.x,A=E?E.y0:w.x;if(t.save(),t.translate(d+k,g+A),t.rotate(.22*r(k/l,-1.6,1.6)),!E)return t.drawImage(f,-l/2,-s/2),t.restore(),!1;const L=Math.ceil(s/6);for(let n=0;n<L;n++){const o=c[n%c.length],a=r(1.55*v-.55*o);if(a>=1)continue;const i=y*a*a*l*(.5+.9*o),h=6*n,u=Math.min(6,s-h),g=y>0?d+k+i+.62*l:d+k+i-.62*l,m=y>0?e-4-g:g-4;t.globalAlpha=(1-a*a)*r(m/56),t.drawImage(f,0,h,l,u,-l/2+i,-s/2+h,l,u)}return t.restore(),!1}});const X=t=>{I=0;const n=Math.min(1/30,Math.max(0,(t-C)/1e3));C=t;let o=!1;y||E||(o=e(M,n,.3),o=e(w,n,.3)||o),o=e(b,n,.002)||o,E&&t-E.start>=620&&(E=null,x+=1,j()),(()=>{(m.current.leanTarget??u).style.setProperty("--ascii-lean",String(E?0:r(M.x/(.4*q()),-1,1)));const t=W(x);!F&&t&&p.set(t,"transform",`translate(${M.x}px, ${w.x}px) rotate(${.22*r(M.x/q(),-1.6,1.6)}rad)`)})(),F?.kick(),(o||y||E)&&(I=requestAnimationFrame(X))},N=()=>{I||(C=performance.now(),I=requestAnimationFrame(X))},j=()=>{M=s(0,380,.72),w=s(0,380,.8),b=s(0,260,.9)},z=(t=1)=>{const e=v();if(E||!e.length||!m.current.loop&&x>=e.length)return!1;const r=W(x),n=D(x);return y=!1,f()||!F?(x+=1,j(),F||p.set(r,"transform","")):(E={dir:t,start:performance.now(),x0:M.x,y0:w.x},b.to=1),T(),N(),m.current.onSwipe?.(t,n,r),!0},B=e=>{if(!y||void 0!==e&&void 0!==e.pointerId&&e.pointerId!==S)return;y=!1;const n=t(L,performance.now()),o=q();Math.abs(M.x)>o*m.current.threshold||Math.abs(n)>650&&Math.sign(n)===Math.sign(M.x)&&Math.abs(M.x)>16?z(M.x<0?-1:1):(M.to=0,w.to=0,b.to=0,M.v=.2*r(n,-1600,1600),f()&&(M.x=w.x=b.x=0,M.v=w.v=b.v=0),N())},G=()=>u.getBoundingClientRect().width/(u.clientWidth||1)||1,H=t=>{if(0!==t.button||E)return;try{u.setPointerCapture?.(t.pointerId)}catch{}S=t.pointerId;const e=G();y=!0,k=t.clientX-M.x*e,A=t.clientY-w.x/.3*e,L=[],N()},Y=t=>{if(!y||t.pointerId!==S)return;const e=G();M.x=M.to=(t.clientX-k)/e,w.x=w.to=(t.clientY-A)/e*.3,M.v=w.v=0,b.to=.5*r(Math.abs(M.x)/q()),L.push([M.x,performance.now()]),L.length>8&&L.shift(),N()},O=t=>{"ArrowLeft"!==t.key&&"ArrowRight"!==t.key||(t.preventDefault(),z("ArrowRight"===t.key?1:-1))},Q=()=>F?.kick(),U=t=>t.preventDefault();return u.hasAttribute("tabindex")||(u.tabIndex=0),u.setAttribute("role",u.getAttribute("role")??"group"),u.setAttribute("aria-roledescription","card"),p.set(u,"touch-action","none"),T(),u.addEventListener("pointerdown",H),u.addEventListener("pointermove",Y),u.addEventListener("pointerup",B),u.addEventListener("pointercancel",B),u.addEventListener("lostpointercapture",B),u.addEventListener("keydown",O),u.addEventListener("load",Q,!0),u.addEventListener("dragstart",U),a(()=>F,m,()=>{R=new Map,T(),F?.refresh()},{next:z,get index(){return D(x+(E?1:0))}},()=>{I&&cancelAnimationFrame(I),I=0,p.restore(),v().forEach(t=>{t.hidden=!1,t.removeAttribute("aria-hidden")}),(m.current.leanTarget??u).style.removeProperty("--ascii-lean"),u.removeAttribute("aria-roledescription"),u.removeEventListener("pointerdown",H),u.removeEventListener("pointermove",Y),u.removeEventListener("pointerup",B),u.removeEventListener("pointercancel",B),u.removeEventListener("lostpointercapture",B),u.removeEventListener("keydown",O),u.removeEventListener("load",Q,!0),u.removeEventListener("dragstart",U)})}var g=l;export{g as SWIPE_DECK_DEFAULTS,u as swipeDeck,d as toneImage};//# sourceMappingURL=chunk-EHYFSX5K.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{blank as t,mountPageField as e,pageHandle as n}from"./chunk-
|
|
1
|
+
import{blank as t,mountPageField as e,pageHandle as n}from"./chunk-4SHQA3CO.js";import{styleKeeper as r}from"./chunk-PFQBEWCF.js";var o={font:'Georgia, "Times New Roman", serif',fontWeight:600};function i(e,n=o.font,r=o.fontWeight,i=520){const{canvas:c,pen:l}=t(1800,Math.max(1,Math.round(i))),s=Math.min(400,1700/Math.max(3,.56*[...e].length));return l.fillStyle="#fff",l.textAlign="center",l.textBaseline="middle",l.font=`${r} ${s}px ${n}`,l.fillText(e||" ",c.width/2,c.height/2+.05*s),c}function c(t,c={}){const l=(t.textContent??"").trim(),s={current:{...o,...c}};let a=s.current.text??l;const u=r(),f=()=>i(a,s.current.font,s.current.fontWeight,s.current.artHeight),d=!l;let h=null;h=e({host:t,layer:"over",look:()=>({mark:"glyph",scene:"none",charset:" .:-=+*#%@",font:'"Geist", Arial, sans-serif',fontWeight:500,cellSize:7,cellAspect:.8,glyphScale:.8,color:"ink",shade:0,contrast:1.3,levels:"auto",fit:"contain",focus:{x:.5,y:.5},hover:"trail",trail:{strength:.62,radius:.22},...s.current.look}),ink:()=>s.current.ink??"--ascii-ink-strong",source:f(),label:d?s.current.label??a:void 0,kit:s,reducedMotion:()=>s.current.reducedMotion,onFail:()=>{h=null,u.restore()}}),h&&l&&u.set(t,"color","transparent"),h&&document.fonts?.load?.(`${s.current.fontWeight} 100px ${s.current.font}`).then(()=>{h&&h.field.setSource(f())},()=>{});const x=e=>{if(e!==a)if(a=e,void 0!==s.current.text&&(s.current={...s.current,text:a}),h)if(h.field.setSource(f()),d)h.field.update({label:s.current.label??(a||" ")});else{for(const e of[...t.childNodes])e!==h.canvas&&e.remove();t.prepend(document.createTextNode(a))}else l&&(t.textContent=a)};return n(()=>h,s,t=>{void 0!==t.text&&t.text!==a?x(t.text):h&&h.field.setSource(f())},{setText:x,get text(){return a}},()=>u.restore())}export{i as wordArt,c as wordmark};//# sourceMappingURL=chunk-EJ3W4FN6.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{MONO as t,GRAPHITE_LIGHT as o,GRAPHITE_DARK as e,pixelSnap as n,parseColor as r,hash2 as c,band as h,ditherIndex as i,toneAlpha as l}from"./chunk-ZCHGV2CV.js";import{mountCanvas as a}from"./chunk-
|
|
1
|
+
import{MONO as t,GRAPHITE_LIGHT as o,GRAPHITE_DARK as e,pixelSnap as n,parseColor as r,hash2 as c,band as h,ditherIndex as i,toneAlpha as l}from"./chunk-ZCHGV2CV.js";import{mountCanvas as a}from"./chunk-KTYCGGRO.js";function s(a,s,f,M,g={}){const{fontSize:d=13,color:u,accentColor:S,speed:$=.4,layers:I=4,turbulence:P=.8,lightMode:b=!1}=g,p=.62*d,m=1.3*d,k=Math.ceil(s/p),C=Math.ceil(f/m);a.clearRect(0,0,s,f),a.font=`${d}px ${t}`,a.textBaseline="top";const x=b?o:e;let z=x.r,w=x.g,y=x.b;const G=n(a);if(u){const t=r(u);t&&(z=t.r,w=t.g,y=t.b)}let j=z,v=w,R=y;const T=S?r(S):null;T&&(j=T.r,v=T.g,R=T.b);const V=M*$,A=g.chars?Array.from(g.chars):void 0,B=["-","\\","|","/"];for(let t=0;t<C;t++){const o=t/C;for(let e=0;e<k;e++){const n=e/k;let r=0,s=0;for(let t=0;t<I;t++){const e=c(13*t,7*t+3),h=1.1+2.4*e,i=.9+2*c(29*t,11*t+1),l=e*Math.PI*6,a=(.2+.5*c(41*t,17*t))*(t%2==0?1:-1.3),f=Math.sin(n*h*Math.PI*2+V*a+l),M=Math.cos(o*i*Math.PI*2+V*a*.6+1.7*l),g=Math.sin(n*i*Math.PI*P+o*h*Math.PI*P+V*a*.4);r+=Math.atan2(M+.3*g,f),s+=.5*(f*M+1)}const f=r/I,M=h(s/I,.54,.74);if(M<=0)continue;const d=(f%Math.PI+Math.PI)%Math.PI,u=Math.round(d/(Math.PI/4))%B.length;if(!A&&g.ditherStrength&&0===i(M,2,e,t,g.ditherStrength))continue;const S=A?A[i(M,A.length,e,t,g.ditherStrength)]:B[u];if(" "===S)continue;const $=!!T&&M>.85,b=l(M);a.fillStyle=$?`rgba(${j},${v},${R},${b})`:`rgba(${z},${w},${y},${b})`,a.fillText(S,G(e*p),G(t*m))}}}var f={id:"silk",name:"Silk",description:"Long ribbons that follow a slow flow field.",cellSize:13,speed:1,cursor:!1,mount:t=>a(t,(t,o,e,n,r,c)=>s(t,o,e,n,{ditherStrength:c.ditherStrength,fontSize:c.fontSize,chars:c.chars,lightMode:c.lightMode,color:c.ink,accentColor:c.accent}))};export{s as renderSilkBackground,f as silk};//# sourceMappingURL=chunk-EK4GIXIO.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{imageFor as e,injectStyle as t,imageReady as r,drawCover as i}from"./chunk-
|
|
1
|
+
import{imageFor as e,injectStyle as t,imageReady as r,drawCover as i}from"./chunk-PCGRRX5P.js";import{styleKeeper as n,clamp as o,mountSurface as a,handle as s,house as l}from"./chunk-PFQBEWCF.js";function c(c,d){const u={current:{position:50,...d}},p=n();let h=o(u.current.position,0,100),m=null,g=null,v={from:h,to:h,at:-1e9},b=0,f=!1;const w=[];let A=u.current.position;g=a({host:c,layer:"under",look:()=>({blend:"coarse",mark:"glyph",charset:" .:-=+*#%@",font:'"Geist", Arial, sans-serif',fontWeight:600,cellSize:6,cellAspect:.8,glyphScale:.96,color:"source",levels:"auto",saturation:1.3,contrast:1.45,gamma:.85,brightness:.14,hover:"trail",trail:{strength:.7,radius:.3},...u.current.look}),ink:()=>u.current.ink??"--ascii-ink-strong",kit:u,reducedMotion:()=>u.current.reducedMotion,resolution:(e,t)=>{const r=Math.min(1600,Math.max(2,Math.round(2*e)));return[r,Math.max(2,Math.round(r*t/Math.max(1,e)))]},onFail:()=>{g=null},paint:({pen:e,width:t,height:r})=>(e.imageSmoothingQuality="high",m&&i(e,m,0,0,t,r),!1)});const k="string"==typeof u.current.image?e(u.current.image):u.current.image,x=c.querySelector('[role="slider"]'),y=c.querySelector("[data-compare-line]"),E=x??document.createElement("div"),M=y??document.createElement("span"),C=e=>{void 0===e&&E.hasAttribute("aria-label")||E.setAttribute("aria-label",e??"Photo and ASCII split")},L=()=>{const e=Math.round(h);p.set(c,"--ascii-pos",`${h}%`),E.setAttribute("aria-valuenow",String(e)),E.setAttribute("aria-valuetext",`${e}% photo, ${100-e}% ASCII`)},S=(e,t=!1)=>{if(e=o(e,0,100),!g)return void(h=e);if(b&&(cancelAnimationFrame(b),b=0),!t||g.still()||Math.abs(e-h)<.5)return h=e,L(),void u.current.onChange?.(h);v={from:h,to:e,at:performance.now()};const r=e=>{const t=o((e-v.at)/280);h=v.from+(v.to-v.from)*l(t),L(),u.current.onChange?.(h),b=t<1?requestAnimationFrame(r):0};b=requestAnimationFrame(r)},N=e=>{const t=c.getBoundingClientRect();return t.width?(e-t.left)/t.width*100:h},F=e=>{if(0!==e.button)return;c.setPointerCapture?.(e.pointerId),f=!0,c.dataset.dragging="";const t=N(e.clientX);S(t,Math.abs(t-h)>3),E.focus({preventScroll:!0})},P=e=>{f&&S(N(e.clientX))},I=()=>{f=!1,delete c.dataset.dragging},j=e=>{const t={ArrowLeft:-5,ArrowDown:-5,ArrowRight:5,ArrowUp:5,PageDown:-20,PageUp:20}[e.key],r="Home"===e.key?0:"End"===e.key?100:void 0!==t?5*Math.round(h/5)+t:null;null!==r&&(e.preventDefault(),S(r,!0))};let q=()=>{};if(g){t("ascii-kit-compare","\n:where(.ascii-compare-photo){position:absolute;inset:0;width:100%;height:100%;object-fit:cover;pointer-events:none;clip-path:inset(0 calc(100% - var(--ascii-pos, 50%)) 0 0)}\n:where(.ascii-compare-line){position:absolute;top:0;bottom:0;left:var(--ascii-pos, 50%);width:2px;translate:-50% 0;background:#fff;box-shadow:0 0 0 .5px rgb(0 0 0 / .25),0 0 12px rgb(0 0 0 / .45);pointer-events:none}\n:where(.ascii-compare-handle){position:absolute;top:50%;left:var(--ascii-pos, 50%);display:grid;place-items:center;width:40px;height:40px;translate:-50% -50%;border-radius:50%;background:#fff;color:#111;box-shadow:0 0 0 1px rgb(0 0 0 / .08),0 4px 14px rgb(0 0 0 / .4);cursor:grab;touch-action:none}\n:where(.ascii-compare-handle:focus-visible){outline:2px solid #fff;outline-offset:3px}\n"),p.set(c,"overflow","hidden"),p.set(c,"touch-action","pan-y"),p.set(c,"user-select","none"),p.set(c,"cursor","ew-resize");const e={className:k.className,hidden:k.getAttribute("aria-hidden")};q=()=>{k.className=e.className,null===e.hidden?k.removeAttribute("aria-hidden"):k.setAttribute("aria-hidden",e.hidden)},k.className=(e.className?`${e.className} `:"")+"ascii-compare-photo",k.setAttribute("aria-hidden","true"),k.draggable=!1,y||(M.className="ascii-compare-line",M.setAttribute("aria-hidden","true")),x||(E.className="ascii-compare-handle",E.innerHTML='<svg viewBox="0 0 24 24" width="18" height="18" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m9 7-5 5 5 5M15 7l5 5-5 5"/></svg>',E.setAttribute("role","slider"),E.tabIndex=0),C(u.current.label),E.setAttribute("aria-valuemin","0"),E.setAttribute("aria-valuemax","100"),E.setAttribute("aria-orientation","horizontal");for(const e of[k,M,E])c.contains(e)||(c.appendChild(e),w.push(e));L(),c.addEventListener("pointerdown",F),c.addEventListener("pointermove",P),c.addEventListener("pointerup",I),c.addEventListener("pointercancel",I),E.addEventListener("keydown",j),r(k).then(e=>{m=e,g?.kick()},()=>{})}else c.contains(k)||("static"===getComputedStyle(c).position&&p.set(c,"position","relative"),k.setAttribute("style","position:absolute;inset:0;width:100%;height:100%;object-fit:cover;border-radius:inherit"),c.appendChild(k),w.push(k));return s(()=>g,u,e=>{C(e.label),e.position!==A&&(A=e.position,S(e.position,!0)),g?.refresh()},{set:S,get position(){return h}},()=>{b&&cancelAnimationFrame(b),c.removeEventListener("pointerdown",F),c.removeEventListener("pointermove",P),c.removeEventListener("pointerup",I),c.removeEventListener("pointercancel",I),E.removeEventListener("keydown",j),delete c.dataset.dragging,w.forEach(e=>e.remove()),q(),p.restore()})}export{c as compare};//# sourceMappingURL=chunk-EPVZIGEZ.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{parseColor as t}from"./chunk-ZCHGV2CV.js";import{mountCanvas as o}from"./chunk-KTYCGGRO.js";import{mixHex as e}from"./chunk-PFQBEWCF.js";function n(o,e,n,a,r={}){const{fontSize:i=13,chars:l=" .,:;i+xX#&@",color:h="#ff4500",hotColor:f="#ffe066",intensity:c=.85,wind:s=0,speed:m=1,lightMode:M=!1}=r,p=.62*i,d=1.4*i,g=Math.ceil(e/p),u=Math.ceil(n/d),b=g*u,x="__fire_heat__",C=o.canvas;let k=C[x];k&&k.length===b||(k=new Float32Array(b),C[x]=k);const A=.18*(.016*m),F=s*m*.8,S=u-1,_=a*m;for(let t=0;t<g;t++){const o=(.6*(.5*Math.sin(.31*t+4.1*_)+.5)+.4*(.5*Math.sin(.73*t-2.7*_)+.5))*c;k[S*g+t]=Math.min(1,o+.15*Math.random()*c),S>0&&(k[(S-1)*g+t]=Math.min(1,.85*o+.1*Math.random()*c))}const y=new Float32Array(b);for(let t=0;t<u-2;t++)for(let o=0;o<g;o++){const e=.4*k[(t+1)*g+o]+.25*k[(t+2)*g+Math.max(0,Math.min(g-1,o+Math.round(F)))]+.175*k[(t+1)*g+Math.max(0,o-1)]+.175*k[(t+1)*g+Math.min(g-1,o+1)];y[t*g+o]=Math.max(0,e-A-.02*Math.random()*m)}for(let t=0;t<g;t++)y[(u-1)*g+t]=k[(u-1)*g+t],u>1&&(y[(u-2)*g+t]=k[(u-2)*g+t]);C[x]=y;const z=t(h)??{r:255,g:69,b:0},$=t(f)??{r:255,g:224,b:102};o.clearRect(0,0,e,n),o.font=`${i}px "JetBrains Mono", monospace`,o.textBaseline="top";for(let t=0;t<u;t++)for(let e=0;e<g;e++){const n=y[t*g+e];if(n<.03)continue;const a=l[Math.min(l.length-1,Math.floor(n*l.length))];if(" "===a)continue;const r=Math.min(1,1.2*n),i=z.r+($.r-z.r)*r|0,h=z.g+($.g-z.g)*r|0,f=z.b+($.b-z.b)*r|0,c=M?1-.3*n:Math.min(1,n+.15);o.globalAlpha=c,o.fillStyle=`rgb(${i},${h},${f})`,o.fillText(a,e*p,t*d)}o.globalAlpha=1}var a={id:"fire",name:"Fire",description:"A cellular flame rising from the bottom edge.",cellSize:13,speed:1,cursor:!1,mount:t=>o(t,(t,o,a,r,i,l)=>n(t,o,a,l.elapsed,{fontSize:l.fontSize,chars:l.chars,color:l.ink,hotColor:l.accent??e(l.ink,"#ffffff",.6),speed:l.speed}),48)};export{a as fire,n as renderFireBackground};//# sourceMappingURL=chunk-EWPT56TR.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{scenePreset as e}from"./chunk-
|
|
1
|
+
import{scenePreset as e}from"./chunk-OVCIHOOS.js";var r=e({id:"contour",name:"Contour",description:"Survey lines over a slowly shifting terrain, every fifth an index line.",cellSize:11,scene:"contour",charset:" .·-~=",hover:"lantern"});export{r as contour};//# sourceMappingURL=chunk-FIWIUXNV.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{clamp as e,hash as t,styleKeeper as r,mountSurface as o,handle as n,prefersReduced as i}from"./chunk-
|
|
1
|
+
import{clamp as e,hash as t,styleKeeper as r,mountSurface as o,handle as n,prefersReduced as i}from"./chunk-PFQBEWCF.js";var a={kind:"heart",icon:"svg",manage:!0,outset:40,layer:"under"},l=t=>1-(1-e(t))**3,s=e=>e>=1?1:1-Math.exp(-5*e)*Math.cos(9*e);function c(e,t,r,o,n){if(e.beginPath(),"heart"===t){const t=n/29;for(let n=0;n<=56;n++){const i=n/56*Math.PI*2,a=16*Math.sin(i)**3,l=-(13*Math.cos(i)-5*Math.cos(2*i)-2*Math.cos(3*i)-Math.cos(4*i));0===n?e.moveTo(r+a*t,o+(l-2.5)*t):e.lineTo(r+a*t,o+(l-2.5)*t)}}else{const t=.7*n,i=o-n/2,a=r-t/2,l=.12*n;e.moveTo(a,i+l),e.arcTo(a,i,a+l,i,l),e.lineTo(a+t-l,i),e.arcTo(a+t,i,a+t,i+l,l),e.lineTo(a+t,o+n/2),e.lineTo(r,o+n/2-.27*n),e.lineTo(a,o+n/2)}e.closePath()}function u(e,t,r,o,n,i){const a=e.createRadialGradient(r,o-.1*n,0,r,o,.62*n);a.addColorStop(0,"#fff"),a.addColorStop(.7,"#e6e6e6"),a.addColorStop(1,"#8c8c8c"),e.globalAlpha=i,e.fillStyle=a,e.shadowColor="#bbb",e.shadowBlur=Math.max(2,.08*n),c(e,t,r,o,n),e.fill(),e.shadowBlur=0,e.globalAlpha=1}function d(r,o,n,i,a){const d=n.x+n.w/2,h=n.y+n.h/2,f=n.h,p=1.45*f,k=s(i/.3),g=(e=>e<.5?4*e**3:1-(-2*e+2)**3/2)(e((i-.42)/.3)),b=g>0?p+(f-p)*g:.7*f+(p-.7*f)*k,M=e((i-.04)/.46);M>0&&M<1&&(r.strokeStyle=(t=>{const r=Math.round(255*e(t));return`rgb(${r} ${r} ${r})`})(.8*(1-M)**1.4),r.lineWidth=2.4-1.2*M,r.lineJoin="round",c(r,o,d,h,f*(1.2+.5*l(M))),r.stroke());r.fillStyle="#fff";for(let e=0;e<7;e++){const o=(i-.1-.05*t(e,a))/.5;if(o<=0||o>=1)continue;const n=-Math.PI/2+(e-3)/7*Math.PI*1.7+.3*(t(a+1,e)-.5),s=f*(.75+(.55+.35*t(e,a+2))*l(o)),c=1.8*(1-.6*o);r.globalAlpha=1-o*o,r.beginPath(),r.arc(d+Math.cos(n)*s*1.15,h+Math.sin(n)*s*.85,c,0,2*Math.PI),r.fill()}r.globalAlpha=1,u(r,o,d,h,b,1-e((i-.72)/.28))}function h(e,s={}){const c={current:{...a,...s}},h=r(),f=()=>e.querySelector(c.current.icon)??e,p=()=>!!(c.current.reducedMotion??i());let k="true"===e.getAttribute("aria-pressed"),g=[],b=[],M=null;M=o({host:e,outset:c.current.outset,layer:c.current.layer,look:()=>({mark:"glyph",charset:" .:-=+*#%@",font:'"Geist Mono", ui-monospace, monospace',fontWeight:500,cellSize:4,cellAspect:.62,glyphScale:.92,...c.current.look}),ink:e=>c.current.ink??("heart"===c.current.kind?`var(--ascii-like, ${e?"#ff6b70":"#e5484d"})`:"--ascii-ink-strong"),kit:c,reducedMotion:()=>c.current.reducedMotion,onFail:()=>{M=null},paint:({pen:e,w:r,now:o,box:n})=>{const i=n(f()),a=c.current.kind;g=g.filter(r=>{const n=(o-r.start)/("burst"===r.kind?560:300);if(n>=1)return!1;if(n<0)return!0;if(e.save(),"burst"===r.kind)d(e,a,i,n,r.seed);else{const r=i.x+i.w/2,o=i.y+i.h/2+3*l(n),s=i.h*(1+.12*l(n));u(e,a,r,o,s,(1-n)**1.4),e.fillStyle="#000";for(let i=o-s/2;i<o+s/2;i+=3)for(let o=r-s/2;o<r+s/2;o+=2)t(o,i)<1.15*n&&e.fillRect(o,i,2,3)}return e.restore(),!0});const s=c.current.limit;if(s&&g.length){const t=n(s),o=t.y+t.h,i=e.createLinearGradient(0,o-2,0,o+8);i.addColorStop(0,"#000"),i.addColorStop(1,"rgb(0 0 0 / 0)"),e.fillStyle="#000",e.fillRect(0,0,r,o-2),e.fillStyle=i,e.fillRect(0,o-2,r,10)}return g.length>0}});const m=()=>{b.forEach(clearTimeout),b=[]},y=()=>{if(m(),h.restore(),!M||p())return;const t=performance.now(),r=f();g=g.filter(e=>"undo"!==e.kind),g.push({kind:"burst",start:t,seed:Math.floor(t)%97}),r!==e&&h.set(r,"opacity","0"),b.push(setTimeout(()=>{h.restore(),r!==e&&"function"==typeof r.animate&&r.animate({opacity:["0","1"],scale:[".7","1"]},{duration:220,easing:"cubic-bezier(.34, 1.42, .64, 1)"})},347.2)),M.kick()},S=()=>{m(),h.restore(),M&&!p()&&(g=g.filter(e=>"burst"!==e.kind),g.push({kind:"undo",start:performance.now(),seed:0}),M.kick())},T=(t=!k)=>{k=t,e.setAttribute("aria-pressed",String(k)),k?y():S()},v=()=>{c.current.manage&&(T(),c.current.onChange?.(k))};return!e.hasAttribute("aria-pressed")&&c.current.manage&&e.setAttribute("aria-pressed","false"),e.addEventListener("click",v),n(()=>M,c,()=>M?.refresh(),{burst:y,undo:S,toggle:T,get pressed(){return k}},()=>{m(),h.restore(),e.removeEventListener("click",v)})}var f=a;export{f as LIKE_BURST_DEFAULTS,d as burstFrame,h as likeBurst,s as springOut};//# sourceMappingURL=chunk-G4BQYQJ6.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{parseColor as o,fbm as t,hash2 as e}from"./chunk-ZCHGV2CV.js";import{mountCanvas as r}from"./chunk-KTYCGGRO.js";import{mixHex as l}from"./chunk-PFQBEWCF.js";function n(r,l,n,a,i={}){const{fontSize:c=13,chars:s=" .,:;+*#@",color:f="#4caf50",skyColor:h="#1a237e",peakColor:g="#e0e0e0",speed:p=1,roughness:b=.55,heightScale:M=.55,stars:d=!0,lightMode:m=!1}=i,k=.62*c,u=1.4*c,C=Math.ceil(l/k),x=Math.ceil(n/u),S=o(f)??{r:76,g:175,b:80},$=o(h)??{r:26,g:35,b:126},y=o(g)??{r:224,g:224,b:224};r.clearRect(0,0,l,n),r.font=`${c}px "JetBrains Mono", monospace`,r.textBaseline="top";const A=a*p*.4,z=new Array(C);for(let o=0;o<C;o++){const e=(.5*t((o/C+A)*b*3,.5)+.5)*M;z[o]=Math.floor(e*x)}for(let o=0;o<x;o++)for(let t=0;t<C;t++){const l=x-1-z[t],n=o===l;if(!(o>=l)){if(d){const l=e(7*t+Math.floor(.3*A),13*o);if(l>.97){const e=.3*Math.sin(2*a+100*l)+.7;r.globalAlpha=.5*e,r.fillStyle=`rgb(${$.r+60},${$.g+60},${$.b+80})`,r.fillText("·",t*k,o*u)}}continue}const i=(o-l)/Math.max(1,z[t]),c=s[Math.min(s.length-1,Math.floor(i*s.length))];if(" "===c&&!n)continue;const f=n?1:Math.max(0,1-4*i),h=S.r+(y.r-S.r)*f|0,g=S.g+(y.g-S.g)*f|0,p=S.b+(y.b-S.b)*f|0;r.globalAlpha=.5+.5*i,r.fillStyle=`rgb(${h},${g},${p})`,r.fillText(n?s[s.length-1]:c,t*k,o*u)}r.globalAlpha=1}var a={id:"terrain",name:"Terrain",description:"A side-scrolling landscape drawn in density characters.",cellSize:13,speed:1,cursor:!1,mount:o=>r(o,(o,t,e,r,a,i)=>n(o,t,e,r,{fontSize:i.fontSize,chars:i.chars,lightMode:i.lightMode,color:i.ink,peakColor:i.accent??l(i.ink,"#ffffff",.65),skyColor:l(i.ink,"#0c0d0b",.55)}))};export{n as renderTerrainBackground,a as terrain};//# sourceMappingURL=chunk-GCIZKMJL.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{blank as t,mountPageField as e,pageHandle as o,sleep as n,pulseAt as r}from"./chunk-
|
|
1
|
+
import{blank as t,mountPageField as e,pageHandle as o,sleep as n,pulseAt as r}from"./chunk-4SHQA3CO.js";var i={saving:null,font:'"Geist", Arial, sans-serif'};function a(t,e){const o=t.getBoundingClientRect(),n=o.height?t.offsetHeight/o.height:1,r=e?.getBoundingClientRect().top??o.top+o.height;let i=e;for(;i&&i.parentElement!==t;)i=i.parentElement;let a=o.top;for(const e of Array.from(t.children)){if(e===i)break;if(void 0!==e.dataset?.asciiKit)continue;const t=e.getBoundingClientRect();t.height&&(a=Math.max(a,t.top+t.height))}return{middle:((a+r)/2-o.top)*n,height:(r-a)*n}}function l(e,o,n,r=i.font){const l=Math.max(2,Math.round(2*e.offsetWidth)),s=Math.max(2,Math.round(2*e.offsetHeight)),{canvas:c,pen:f}=t(l,s),d=f.createRadialGradient(l,0,0,l,0,.52*Math.hypot(l,s));d.addColorStop(0,"rgb(150 150 150)"),d.addColorStop(.4,"rgb(64 64 64)"),d.addColorStop(1,"rgb(0 0 0)"),f.fillStyle=d,f.fillRect(0,0,l,s);const h=o?a(e,n):null;if(o&&h&&h.height>=30){const t=Math.min(2*h.height*.9,.34*l),e=l-.07*l,n=2*h.middle+.04*t;f.font=`600 ${t}px ${r}`,f.letterSpacing=.04*-t+"px",f.textAlign="right",f.textBaseline="middle",f.lineJoin="round",f.lineWidth=.28*t,f.strokeStyle="rgb(0 0 0 / .85)",f.strokeText(o,e,n),f.fillStyle="#fff",f.fillText(o,e,n)}return c}function s(a,s={}){const c={current:{...i,...s}},f=(t=c.current.saving)=>l(a,t,(()=>{const t=c.current.price;return"string"==typeof t?a.querySelector(t):t??a.querySelector("[data-price]")})(),c.current.font);let d=null,h=0,u=0,g=0,p=null;p=e({host:a,look:()=>({mark:"dot",scene:"drift",scale:"number"==typeof innerWidth&&innerWidth<760?1.7:1,cellSize:4,cellAspect:1,dotScale:.92,color:"ink",shade:0,fit:"cover",focus:{x:.5,y:.5},levels:"none",contrast:1.1,brightness:-.04,drift:.5,hover:"lantern",lantern:{radius:.26,strength:.4,trail:.7,follow:8},trail:{strength:.9,radius:.4},fluid:{radius:.09,refraction:.03,glow:.6},...c.current.look}),ink:t=>c.current.ink??(t?"#aeaca5":"#5c5a55"),source:d=f(),kit:c,reducedMotion:()=>c.current.reducedMotion,onFail:()=>{p=null,m?.disconnect()}}),u=a.offsetWidth,g=a.offsetHeight;const m=p&&"function"==typeof ResizeObserver?new ResizeObserver(()=>{!p||Math.abs(a.offsetWidth-u)<2&&Math.abs(a.offsetHeight-g)<2||(u=a.offsetWidth,g=a.offsetHeight,h++,p.field.setSource(d=f()))}):null;m?.observe(a);const S=async e=>{const o=p?.field,r=d;if(d=e,!o)return;const i=++h;if(!r||p.still())return void await o.setSource(e);const a=t(e.width,e.height),l=a.pen,s=e.width,c=e.height,f=.34*s;for(let t=1;t<=9&&i===h;t++){const i=performance.now(),d=t/9*(s+2*f)-f,h=Math.max(0,Math.min(s,d));l.globalCompositeOperation="source-over",l.drawImage(r,0,0,s,c),h>0&&l.drawImage(e,0,0,h,c,0,0,h,c);const u=l.createLinearGradient(d-f,0,d+.4*f,0);u.addColorStop(0,"rgb(0 0 0 / 0)"),u.addColorStop(.72,"rgb(255 255 255 / .5)"),u.addColorStop(1,"rgb(0 0 0 / 0)"),l.globalCompositeOperation="lighter",l.fillStyle=u,l.fillRect(0,0,s,c),await o.setSource(a.canvas),await n(Math.max(0,48-(performance.now()-i)))}i===h&&p?.field===o&&await o.setSource(e)};return o(()=>p,c,()=>{S(f())},{sweep:()=>S(f()),saving:t=>(c.current={...c.current,saving:t},S(f(t))),pulse:(t,e=1.6)=>{p&&!p.still()&&r(p.field,t,e)}},()=>{h++,m?.disconnect()})}export{l as planArt,s as pricingGlow,a as savingRoom};//# sourceMappingURL=chunk-H4DBJULW.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{mountPageField as e,pageHandle as t,sleep as r,pulseAt as o}from"./chunk-
|
|
1
|
+
import{mountPageField as e,pageHandle as t,sleep as r,pulseAt as o}from"./chunk-4SHQA3CO.js";import{styleKeeper as a}from"./chunk-PFQBEWCF.js";function n(n,l={}){const i={current:{...l}},c=a(),s=n.querySelector("img"),u=i.current.image??s??null;let d=null;d=u?e({host:n,look:()=>{const e=i.current;return{mark:"glyph",scene:"none",charset:" .:-=+*#%@",font:'"Geist", Arial, sans-serif',fontWeight:500,cellSize:6,cellAspect:.8,glyphScale:.8,color:"ink",shade:0,contrast:1.3,levels:"auto",fit:"cover",focus:e.focus??{x:.5,y:.4},hover:"trail",trail:{strength:.95,radius:.42},clear:!!e.clear&&{element:e.clear,padding:8,feather:.12,shape:"rect"},...e.look}},ink:()=>i.current.ink??"--ascii-ink-strong",source:u,label:i.current.label??(u instanceof HTMLImageElement&&u.alt||void 0),kit:i,reducedMotion:()=>i.current.reducedMotion,onFail:()=>{d=null,c.restore()}}):null,d&&s&&u===s&&c.set(s,"opacity","0");let h=0,m=!1;return t(()=>d,i,()=>{},{pulse:(e,t=1)=>{d&&!d.still()&&o(d.field,e,t)},shimmer:e=>{const t=d?.field;if(!t||e===m||e&&d.still())return;const o=++h;m=e,e?(async()=>{let e;try{e=await(async()=>{if(u instanceof HTMLImageElement)return u.complete||await u.decode(),u;const e=new Image;return e.crossOrigin="anonymous",e.src=u,await e.decode(),e})()}catch{return}const a=Math.min(1,1400/Math.max(e.naturalWidth,e.naturalHeight,1)),n=Object.assign(document.createElement("canvas"),{width:Math.max(1,Math.round(e.naturalWidth*a)),height:Math.max(1,Math.round(e.naturalHeight*a))}),l=n.getContext("2d"),i=n.width,c=n.height,s=performance.now();for(;o===h&&d?.field===t;){const o=performance.now(),a=-.4*i+1.8*((o-s)/1100%1)*i;l.globalCompositeOperation="source-over",l.drawImage(e,0,0,i,c);const u=l.createLinearGradient(a-.22*i,.3*a,a+.22*i,.3*a+.3*c);u.addColorStop(0,"rgb(0 0 0 / 0)"),u.addColorStop(.5,"rgb(255 255 255 / .42)"),u.addColorStop(1,"rgb(0 0 0 / 0)"),l.globalCompositeOperation="lighter",l.fillStyle=u,l.fillRect(0,0,i,c),await t.setSource(n),await r(Math.max(0,48-(performance.now()-o)))}})():t.setSource(u)}},()=>{h++,c.restore()})}export{n as artPanel};//# sourceMappingURL=chunk-HMW5NRUV.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{styleKeeper as t,srOnly as e,mountSurface as n,clamp as o,smoothstep as r,hash as a,house as l,handle as i,prefersReduced as s}from"./chunk-
|
|
1
|
+
import{styleKeeper as t,srOnly as e,mountSurface as n,clamp as o,smoothstep as r,hash as a,house as l,handle as i,prefersReduced as s}from"./chunk-PFQBEWCF.js";var c={start:!0,stagger:38,roll:520,wave:55,glyphs:"#%*+=-:"},h=t=>`Thought for ${t}s`;function u(u,p={}){const f={current:{...c,...p}},m=t(),g=[...u.childNodes],d=f.current.label??null,y=d?[...d.childNodes]:[];let x="done",k=0,C=0,b=-1e9,w=0,S="",A=null;const M=d?e("",!0):null,v=document.createElement("span");let F="",$="";const E=()=>f.current.reducedMotion??s(),B=(t,e)=>{$=F,F=t,d&&(M&&(M.textContent=t),A?(v.replaceChildren(...[...t].map(t=>Object.assign(document.createElement("span"),{textContent:t}))),b=e?performance.now():-1e9,A.kick()):d.textContent=t)};d&&(A=n({host:d,look:()=>({mark:"glyph",charset:" .:-=+*#%@",font:'"Geist Mono", ui-monospace, monospace',fontWeight:500,cellSize:2,cellAspect:.66,glyphScale:1,shade:.2,contrast:1.1,...f.current.look}),ink:()=>f.current.ink??getComputedStyle(d).color,kit:f,reducedMotion:()=>f.current.reducedMotion,resolution:2,onFail:()=>{A=null,d.textContent=F,m.restore()},paint:({pen:t,now:e,still:n,box:i,scale:s})=>{const c=getComputedStyle(v),h=parseFloat(c.fontSize)||14,u=`${c.fontStyle} ${c.fontWeight} ${c.fontSize} ${c.fontFamily}`;t.setTransform(s,0,0,s,0,0),t.textAlign="center",t.textBaseline="alphabetic",t.font=u;const p=t.measureText("x"),m=p.fontBoundingBoxAscent||.8*h,g=p.fontBoundingBoxDescent||.2*h,d=f.current,y=[...v.children],k=e-b<d.roll+y.length*d.wave,w=y.length*d.wave+d.roll+420;let S=!1;return y.forEach((s,c)=>{let p=1;if(!n&&k)p=o((e-b-c*d.wave)/d.roll);else if(!n&&"thinking"===x){const t=(e-C)%w-c*d.wave;p=t<0||t>d.roll?1:t/d.roll}const f=p<1?r(.7,1,p).toFixed(3):"";if(s.style.opacity!==f&&(s.style.opacity=f),p>=1||!s.textContent?.trim())return;S=!0;const y=i(s),A=y.y+(y.h-m-g)/2+m,M=y.x+y.w/2,v=k?$[c]??" ":s.textContent,F=s.textContent,E=[v,...Array.from({length:3},(t,e)=>d.glyphs[Math.floor(a(e+7*c,Math.floor(C))*d.glyphs.length)]??""),F],B=l(p)*(E.length-1)*y.h;t.save(),t.beginPath(),t.rect(y.x-2,y.y,y.w+4,y.h),t.clip(),t.globalAlpha=1-r(.7,1,p),E.forEach((e,n)=>{const o=A+n*y.h-B;if(o<y.y-y.h||o>y.y+2*y.h)return;const r=0===n||n===E.length-1;t.font=r?u:`600 ${.86*h}px "Geist Mono", ui-monospace, monospace`,t.fillStyle=r?"#fff":"#d0d0d0",t.fillText(e,M,o)}),t.restore()}),t.globalAlpha=1,S||!n&&("thinking"===x||k)}}),A&&M&&(m.set(v,"display","inline-flex"),m.set(v,"white-space","pre"),v.setAttribute("aria-hidden","true"),d.replaceChildren(M,v,A.canvas)));const T=document.createElement("span"),z=()=>{w++,x="thinking",C=performance.now(),S="",T.replaceChildren(),u.replaceChildren(T),u.setAttribute("aria-busy","true"),B(f.current.labels?.thinking??"Thinking…",!1),f.current.onState?.("thinking",0),A?.kick()};let P=0,W=0;return f.current.start&&z(),i(()=>A,f,()=>A?.refresh(),{think:z,stream:async t=>{"thinking"!==x&&z();const e=w;P=0;let n="";const o=()=>{"thinking"===x&&(x="streaming",W=performance.now(),k=Math.max(1,Math.round((W-C)/1e3)),B((f.current.labels?.done??h)(k),!0),f.current.onState?.("streaming",k))},r=(t,e)=>{n+=t;const r=e?n.length:n.search(/\s\S*$/)+1;r<=0||(o(),S+=n.slice(0,r),(t=>{const e=!E()&&!A?.still();for(const n of t.match(/\s+|\S+/g)??[]){if(/^\s/.test(n)){T.append(n);continue}const t=document.createElement("span");if(t.textContent=n,e){m.set(t,"opacity","0");const e=Math.max(0,P*f.current.stagger-(performance.now()-W));m.set(t,"transition",`opacity 260ms cubic-bezier(.16, 1, .3, 1) ${Math.round(e)}ms`),requestAnimationFrame(()=>requestAnimationFrame(()=>t.style.setProperty("opacity","1")))}P++,T.appendChild(t)}})(n.slice(0,r)),n=n.slice(r))};if("string"==typeof t)r(t,!0);else{for await(const n of t){if(e!==w)return;r(n,!1)}if(e!==w)return;r("",!0)}o();const a=E()?0:Math.max(0,P*f.current.stagger-(performance.now()-W))+260;await new Promise(t=>setTimeout(t,a)),e===w&&(x="done",u.setAttribute("aria-busy","false"),f.current.onState?.("done",k),A?.kick())},get state(){return x}},()=>{w++,m.restore(),u.removeAttribute("aria-busy"),S?u.textContent=S:u.replaceChildren(...g),d&&(F?d.textContent=F:d.replaceChildren(...y))})}var p=c;export{p as THINKING_DEFAULTS,u as thinking};//# sourceMappingURL=chunk-IUX46UDR.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{mountField as e,hoverOf as t,narrow as r}from"./chunk-
|
|
1
|
+
import{mountField as e,hoverOf as t,narrow as r}from"./chunk-OVCIHOOS.js";var a={id:"field",name:"Field",description:"A word becomes the background, drawn by the GPU with a soft wake.",cellSize:13,speed:1,cursor:!0,mount:a=>e(a,(e,a)=>({scene:"flow",levels:"auto",charset:e.charset??" .,:-+"+e.text.replace(/\s+/g,"").toUpperCase(),font:'"Geist", Arial, sans-serif',fontWeight:500,cellSize:e.cellSize,cellAspect:.8,glyphScale:.76,color:"ink",shade:a?r()?.1:.4:0,background:"transparent",contrast:1.1,scale:r()?1.6:1,brightness:r()&&a?.08:0,vignette:0,speed:e.speed,maxPixelRatio:2,hover:t(e,"trail"),fluid:{radius:.09,refraction:.04,glow:.7,dissipation:1.3},lantern:{radius:.13,strength:.6,trail:.5,follow:11},trail:{strength:.9,radius:.4}}),{light:"#9a9891",dark:"#7d7b75"})};export{a as wordField};//# sourceMappingURL=chunk-JAM46FF6.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{mergeOptions as e,prefersReduced as t}from"./chunk-
|
|
1
|
+
import{mergeOptions as e,prefersReduced as t}from"./chunk-PFQBEWCF.js";import{disposeKit as r,setPosterSource as o}from"./chunk-XVB3B3FV.js";var s={standard:{label:"Classic ASCII",chars:" .:-=+*#%@"},asciify:{label:"Asciify",chars:" .:-=+YCIFSA#@"},minimal:{label:"Minimal",chars:" .:+"},detailed:{label:"Detailed",chars:" .,:;-~=+*xX#%@"},letters:{label:"Letters",chars:" .liLTYCFSAWM"},technical:{label:"Technical",chars:" ._:;+/>=][{}*$#@"},blocks:{label:"Tonal blocks",chars:" ░▒▓█"},braille:{label:"Braille",chars:" ⠁⠃⠇⡇⣇⣧⣷⣿"}},n=(e,t,r,o)=>"number"==typeof e&&Number.isFinite(e)?Math.min(o,Math.max(r,e)):t;function i(e){if(!e)return;if("dots"===e)return" ·∙•●";const t=s[e];return t&&Object.prototype.hasOwnProperty.call(s,e)?t.chars:e.startsWith(" ")?e:" "+e}function c(s,c){if(!c||!c.preset||"function"!=typeof c.preset.mount)throw new TypeError("background() needs a preset, such as `aurora` imported from asciify-engine/kit.");const l=c.preset;let a=c.poster;const u=e=>({...e,poster:e.preset===l?a:void 0}),p={current:u({...c})};let y=null,d=!1,f=!1;const m=new Set,h=()=>{const e=p.current,t=e.preset;return{speed:n(e.speed,t.speed,0,5),cellSize:n(e.cellSize,t.cellSize,3,96),charset:i(e.charset),cursor:"none"!==e.look?.hover&&(e.cursor??t.cursor),mark:"glyph"===e.mark||"dot"===e.mark?e.mark:void 0,clear:e.clear??!1,dither:n(e.dither,0,0,1),accent:e.accent,text:e.text?.trim()||"ASCIIFY",look:e.look}},b=e=>{const t=p.current,r=t.palette;return("string"==typeof r?r:r?.[e?"dark":"light"])??t.color??t.ink},k=()=>String(n(p.current.opacity,p.current.preset.opacity??1,0,1)),g=()=>!!(p.current.reducedMotion??t()),v=e=>{let t=null;if(t=p.current.preset.mount({host:s,kit:p,settings:h,ink:b,reducedMotion:()=>p.current.reducedMotion,onFail:()=>{y===t&&(y=null)}}),!t)return null;const r=t.canvas.style;return e&&(r.opacity="0",r.transition="opacity 320ms cubic-bezier(.16, 1, .3, 1)",t.canvas.offsetWidth),r.opacity=k(),d&&t.pause(),t},S={position:s.style.getPropertyValue("position"),isolation:s.style.getPropertyValue("isolation")},P=(e,t)=>{t?s.style.setProperty(e,t):s.style.removeProperty(e)};let C=!1;const F=e=>{C=!0,e.destroy(),y&&!f&&("function"==typeof getComputedStyle&&"static"===getComputedStyle(s).position&&s.style.setProperty("position","relative"),s.style.setProperty("isolation","isolate"))},M=e=>{if(f||!e||"function"!=typeof e.mount||e===p.current.preset)return;p.current=u({...p.current,preset:e});const t=y;y=v(!!t&&!g()),t&&(e=>{if(g())return void F(e);e.canvas.style.transition="opacity 320ms cubic-bezier(.16, 1, .3, 1)",e.canvas.style.opacity="0";const t={run:e,timer:setTimeout(()=>{m.delete(t),F(e)},340)};m.add(t)})(t)};y=v(!1);return{get supported(){return!!y&&!f},get field(){return f?null:y?.field??null},get preset(){return p.current.preset},update(t){if(f||!t)return;const{preset:r,...s}=t;"poster"in s&&(a=s.poster),p.current=u(e(p.current,s)),s.poster&&p.current.poster&&o(p,s.poster),r&&r!==p.current.preset?M(r):y&&(y.canvas.style.opacity=k(),y.refresh())},play(){!f&&d&&(d=!1,y?.play())},pause(){f||(d=!0,y?.pause())},setPreset:M,destroy(){if(!f){f=!0;for(const e of m)clearTimeout(e.timer),e.run.destroy(),C=!0;m.clear(),y?.destroy(),y=null,C&&(P("position",S.position),P("isolation",S.isolation)),r(p)}}}}export{c as background,i as backgroundCharset};//# sourceMappingURL=chunk-JRSCTMFM.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{renderMaterial as t}from"./chunk-XPXMCXYI.js";import{mountCanvas as i}from"./chunk-
|
|
1
|
+
import{renderMaterial as t}from"./chunk-XPXMCXYI.js";import{mountCanvas as i}from"./chunk-KTYCGGRO.js";var o=(t,i,o,r)=>{const e=5.5*(t-.5*o)+.65*Math.sin(3.2*i+.2*r)+.12*r;return Math.pow(.5+.5*Math.cos(e),7)*(.45+.55*Math.sin(2.4*i+.2))},r={id:"veil",name:"Veil",description:"Tall folds of light drifting across a quiet ground.",cellSize:12,speed:1,cursor:!1,mount:r=>i(r,(i,r,e,n,h,s)=>t(o,i,r,e,n,{ditherStrength:s.ditherStrength,fontSize:s.fontSize,chars:s.chars,lightMode:s.lightMode,color:s.ink}))};export{r as veil};//# sourceMappingURL=chunk-KBXVIAWS.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{snapshot as e,drawCover as t,toneOf as n}from"./chunk-
|
|
1
|
+
import{snapshot as e,drawCover as t,toneOf as n}from"./chunk-PCGRRX5P.js";import{styleKeeper as r,srOnly as o,mountSurface as i,clamp as a,smoothstep as s,easeOut as l,handle as h}from"./chunk-PFQBEWCF.js";var c={threshold:64},u=.3;function d(e,t,n=300,r=.86,o=.2){const i=2*Math.sqrt(n)*r,a=Math.max(1,Math.ceil(240*t)),s=t/a;for(let t=0;t<a;t++)e.v+=(-n*(e.x-e.to)-i*e.v)*s,e.x+=e.v*s;return!(Math.abs(e.x-e.to)<o&&Math.abs(e.v)<12*o)||(e.x=e.to,e.v=0,!1)}function p(p,f){const m={current:{...c,...f}},v=r(),g=()=>m.current.content??p.children[0]??null,y=o("",!0),w={x:0,v:0,to:0};let M="idle",x=!1,b=!1,k=0,E=-1,L=0,P=0,C=0,A=!0,S=0,F=null,I=[];const R=new WeakSet,T=e=>{y.textContent=e};F=i({host:p,look:()=>({mark:"glyph",charset:" .:-=+*#%@",font:'"Geist Mono", ui-monospace, monospace',fontWeight:500,cellSize:5,cellAspect:.62,glyphScale:.94,...m.current.look}),ink:()=>m.current.ink??"--ascii-ink-strong",kit:m,reducedMotion:()=>m.current.reducedMotion,resolution:2,onFail:()=>{F=null},paint:({pen:r,w:o,now:i,still:h,scale:c,box:p})=>{const f=C?Math.min(1/30,(i-C)/1e3):1/60;C=i;let y=x;h?(w.x=w.to,w.v=0):x||(y=d(w,f)||y),"refreshing"===M&&(L+=6.5*f,y=!0),"done"===M&&i-P<320&&(y=!0);const b=g();b&&v.set(b,"translate",`0 ${Math.max(0,w.x).toFixed(2)}px`),r.setTransform(c,0,0,c,0,0);const k=m.current,E=Math.max(0,w.x),R=a(E/k.threshold),T=Math.min(k.threshold,48),W="idle"===M||"pulling"===M?s(.1,.55,R):a(E/T),Y=o/2,D=Math.min(E,T)/2+.25*Math.max(0,E-T);"pulling"===M&&R>=1&&!S&&(S=i),R<1&&(S=0);const H=S&&!h&&i-S<260?.14*Math.sin(Math.PI*((i-S)/260)):0;if(H&&(y=!0),E>.5&&W>.01){if(r.save(),r.beginPath(),r.rect(0,0,o,E),r.clip(),r.translate(Y,D),r.scale(W*(1+H),W*(1+H)),r.lineWidth=4,r.lineCap="round","idle"===M||"pulling"===M){const e=-Math.PI/2+.03*Math.max(0,E-k.threshold);r.strokeStyle=`rgba(255,255,255,${.55+.45*R})`,r.beginPath(),r.arc(0,0,11,e,e+2*Math.PI*Math.max(.02,R)),r.stroke()}else{const e="done"===M&&A?h?1:l((i-P)/300):0,t="refreshing"!==M||h?1:l((i-P)/240),n=24,o=2*Math.PI*(1-.22*t);for(let i=0;i<n;i++){const a=L-Math.PI/2+i/n*o,s=1-.85*t*(1-i/(n-1));r.strokeStyle=`rgba(255,255,255,${s*(1-e)*("done"!==M||A?1:.4)})`,r.beginPath(),r.arc(0,0,11,a,a+o/n+.02),r.stroke()}e>0&&function(e,t,n,r,o){if(o<=0)return;const i=[[-.82,.02],[-.26,.56],[.86,-.6]].map(([e,o])=>[t+e*r,n+o*r]),a=Math.hypot(i[1][0]-i[0][0],i[1][1]-i[0][1])+Math.hypot(i[2][0]-i[1][0],i[2][1]-i[1][1]);e.save(),e.strokeStyle="#fff",e.lineWidth=4.5,e.lineCap="round",e.lineJoin="round",e.setLineDash([a*o,a]),e.beginPath(),e.moveTo(i[0][0],i[0][1]),e.lineTo(i[1][0],i[1][1]),e.lineTo(i[2][0],i[2][1]),e.stroke(),e.restore()}(r,0,0,11,e)}r.restore()}return I=I.filter(o=>{if(!o.row.isConnected)return q(o,!0),!1;const a=h?1:(i-o.start)/760;if(a<0||!Number.isFinite(a))return y=y||Number.isFinite(a),!0;if(a>=u&&q(o),a>=1)return q(o,!0),!1;const s=p(o.row);(!o.snap||Math.abs(o.snap.width/2-s.w)>.5||Math.abs(o.snap.height/2-s.h)>.5)&&(o.snap=e(o.row,s.w,s.h,e=>{const t=p(e);return{x:t.x-s.x,y:t.y-s.y,w:t.w,h:t.h}}).canvas,o.photos=[...o.row.querySelectorAll("img")]);const c=o.snap;return o.photos.length&&function(e,r,o){const i=r.getContext("2d"),a=o(e.row);e.photos=e.photos.filter(e=>{if(!e.complete)return!0;if(!i||!e.naturalWidth)return!1;const r=o(e),s=r.x-a.x,l=r.y-a.y,h=Math.min(parseFloat(getComputedStyle(e).borderTopLeftRadius)||0,r.w/2,r.h/2);return i.save(),i.setTransform(2,0,0,2,0,0),i.beginPath(),i.roundRect(s,l,r.w,r.h,h),i.clip(),i.fillStyle="#000",i.fillRect(s,l,r.w,r.h),t(i,n({image:e,width:e.naturalWidth,height:e.naturalHeight},!F?.dark()),s,l,r.w,r.h),i.restore(),!1})}(o,c,p),r.globalAlpha=a<u?l(a/u,3):1-l((a-u)/.7,3),r.drawImage(c,s.x,s.y,s.w,s.h),r.globalAlpha=1,y=!0,!0}),y||(C=0),y}});const W=()=>F?.kick();function q(e,t=!1){const n=e.row.style;e.shown||(e.shown=!0,n.transition="opacity 280ms cubic-bezier(.16, 1, .3, 1)",n.opacity=e.opacity),t&&(n.transition=e.transition)}const Y=(e,t)=>{if(F&&!F.still()){for(const n of e)n instanceof HTMLElement&&!R.has(n)&&(R.add(n),I.push({row:n,snap:null,start:t,opacity:n.style.opacity,transition:n.style.transition,shown:!1,photos:[...n.querySelectorAll("img")]}),n.style.transition="none",n.style.opacity="0");W()}},D=()=>{const e=performance.now();I.forEach(t=>{t.start===1/0&&(t.start=e)}),W()},H=e=>new Promise(t=>setTimeout(t,e)),$=async()=>{if("refreshing"===M||"done"===M)return;const e=m.current,t=!F||F.still();M="refreshing",x=b=!1,w.to=Math.min(e.threshold,48),P=performance.now(),p.setAttribute("aria-busy","true"),T(e.messages?.refreshing??"Refreshing."),W(),A=!0;try{await Promise.all([e.onRefresh(),H(t?0:600)])}catch{A=!1}if("refreshing"===M){if(A&&e.reveal&&!t){await new Promise(e=>"function"==typeof requestAnimationFrame?requestAnimationFrame(()=>e()):e());const t=g();t&&Y(t.querySelectorAll(e.reveal),1/0)}M="done",P=performance.now(),T(A?e.messages?.done??"Updated.":e.messages?.failed??"Couldn’t refresh."),W(),await H(t?0:620),"done"===M?(M="idle",w.to=0,D(),p.removeAttribute("aria-busy"),W()):D()}},j=e=>{0!==e.button||"idle"!==M||p.scrollTop>0||(x=!0,b=!1,k=e.clientY,E=e.pointerId)},z=e=>{if(!x||e.pointerId!==E)return;e.clientY<k&&(k=e.clientY);const t=(e.clientY-k)/(p.getBoundingClientRect().height/(p.clientHeight||1)||1);if(!b){if(t<6)return;b=!0,M="pulling";try{p.setPointerCapture?.(e.pointerId)}catch{}}w.x=w.to=(e=>128*(1-Math.exp(-Math.max(0,e)/128)))(t-6),w.v=0,W()},B=()=>{if(x&&(x=!1,b)){if(b=!1,w.x>=m.current.threshold)return M="idle",void $();M="idle",w.to=0,W()}},G=e=>{b&&e.preventDefault()},N=e=>{x&&e.preventDefault()};return F?(v.set(p,"overscroll-behavior-y","contain"),p.appendChild(y),p.addEventListener("pointerdown",j),p.addEventListener("pointermove",z),p.addEventListener("pointerup",B),p.addEventListener("pointercancel",B),p.addEventListener("touchmove",G,{passive:!1}),p.addEventListener("dragstart",N),p.addEventListener("selectstart",N)):p.appendChild(y),h(()=>F,m,()=>F?.refresh(),{refresh:$,revealRows:e=>Y(e,performance.now()),get state(){return M}},()=>{M="idle",I.forEach(e=>{e.row.style.opacity=e.opacity,e.row.style.transition=e.transition}),I=[],p.removeEventListener("pointerdown",j),p.removeEventListener("pointermove",z),p.removeEventListener("pointerup",B),p.removeEventListener("pointercancel",B),p.removeEventListener("touchmove",G),p.removeEventListener("dragstart",N),p.removeEventListener("selectstart",N),p.removeAttribute("aria-busy"),y.remove(),v.restore()})}var f=c;export{f as PULL_REFRESH_DEFAULTS,p as pullRefresh,d as stepSpring};//# sourceMappingURL=chunk-KJJJORN6.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{styleKeeper as t,srOnly as e,mountSurface as n,house as o,handle as r,clamp as l,smoothstep as a,hash as i}from"./chunk-PFQBEWCF.js";var c={value:0,duration:360,stagger:60,glyphs:"#%*+=-:",format:t=>t.toLocaleString(),face:"text"};function s(t,e){const n=(t,e)=>t[t.length-1-e]??"";for(let o=e.length-1;o>=0;o--)if(/\d/.test(n(e,o))&&n(t,o)!==n(e,o))return o;return-1}function f(f,u={}){const p=parseFloat((f.textContent??"").replace(/[^\d.-]/g,"")),h={current:{...c,...u,value:u.value??(Number.isFinite(p)?p:0)}},g=t();let d=h.current.value,m=h.current.format(d),y={from:m,to:m,t0:-1e9,up:!0,first:-1},x=null;const v=e(m,!0),k=document.createElement("span"),C=()=>{k.replaceChildren(...[...m].map(t=>Object.assign(document.createElement("span"),{textContent:t}))),v.textContent=m};x=n({host:f,look:()=>({mark:"glyph",charset:" .:-=+*#%@",font:'"Geist Mono", ui-monospace, monospace',fontWeight:500,cellSize:3,cellAspect:.66,glyphScale:1,shade:.2,contrast:1.1,...h.current.look}),ink:()=>h.current.ink??getComputedStyle(f).color,kit:h,reducedMotion:()=>h.current.reducedMotion,resolution:2,onFail:()=>{x=null,f.textContent=m,g.restore()},paint:({pen:t,now:e,still:n,box:r,scale:c})=>{const s=getComputedStyle(k),f=parseFloat(s.fontSize),u=parseFloat(s.letterSpacing)||0,p=`${s.fontStyle} ${s.fontWeight} ${s.fontSize} ${s.fontFamily}`;t.setTransform(c,0,0,c,0,0),t.font=p,t.textAlign="center",t.textBaseline="alphabetic";const g=t.measureText("0"),d=g.fontBoundingBoxAscent||.8*f,m=g.fontBoundingBoxDescent||.2*f,{from:x,to:v,t0:C,up:S,first:b}=y,F=[...k.children],A=h.current,B="glyph"===A.face,M=(t,e)=>t[t.length-1-e]??"";let w=!1;return F.forEach((c,s)=>{const h=F.length-1-s,g=r(c),y=g.x+(g.w-u)/2,k=g.y,E=g.h,$=k+(E-d-m)/2+d,T=M(v,h),z=b-h,G=!n&&b>=0&&z>=0&&/\d/.test(T)?l((e-C)/(A.duration+z*A.stagger)):1,N=o(G),P=G<1&&!B?a(.72,1,G).toFixed(3):"";if(c.style.opacity!==P&&(c.style.opacity=P),G>=1)return void(B&&(t.globalAlpha=1,t.font=p,t.fillStyle="#fff",t.fillText(T,y,$)));w=!0,t.globalAlpha=B?1:1-a(.72,1,G);const W=5+2*z,j=[M(x,h),...Array.from({length:W},(t,e)=>A.glyphs[Math.floor(i(e+7*h,C)*A.glyphs.length)]??""),T];S||j.reverse();const D=(j.length-1)*E,I=S?N*D:D-N*D;t.save(),t.beginPath(),t.rect(y-g.w,k,2*g.w,E),t.clip(),j.forEach((e,n)=>{const o=$+n*E-I;if(o<k-E||o>k+2*E)return;const r=n>0&&n<j.length-1;t.font=r?`600 ${.84*f}px "Geist Mono", ui-monospace, monospace`:p,t.fillStyle=r?"#d0d0d0":"#fff",t.fillText(e,y,o)}),t.restore()}),t.globalAlpha=1,w}});const S=()=>{x&&g.set(k,"color","glyph"===h.current.face?"transparent":"inherit")};x&&(g.set(k,"display","inline-flex"),S(),k.setAttribute("aria-hidden","true"),f.replaceChildren(v,k,...(t=>[...t.children].filter(t=>"IMG"===t.tagName&&void 0!==t.dataset?.asciiPoster))(f),x.canvas),C(),document.fonts?.ready.then(()=>x?.kick()));const b=t=>{if(!Number.isFinite(t))return;const e=d,n=m;d=h.current.value=t,m=h.current.format(t),x?n!==m&&(y={from:n,to:m,up:t>=e,first:s(n,m),t0:performance.now()},C(),x.kick()):f.textContent=m};return r(()=>x,h,t=>{S(),t.value!==d?b(t.value):(m=t.format(d),C(),x?.refresh())},{set:b,get value(){return d}},()=>{x&&(f.textContent=m),g.restore()})}var u=c;export{u as ODOMETER_DEFAULTS,s as firstChanged,f as odometer};//# sourceMappingURL=chunk-KS3TL3S2.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{styleKeeper as e,isDark as t,resolveColor as n,prefersReduced as i,boxIn as o}from"./chunk-
|
|
1
|
+
import{styleKeeper as e,isDark as t,resolveColor as n,prefersReduced as i,boxIn as o}from"./chunk-PFQBEWCF.js";var r="#6f6d67",s="#8f8d86",a={x:-1,y:-1,users:0},c=e=>{a.x=e.clientX,a.y=e.clientY};function d(d,l,u=0){if("undefined"==typeof document)return null;const{host:m}=d,h=document.createElement("canvas");let f=null;try{f=h.getContext("2d")}catch{f=null}if(!f)return null;const v=f,p=e();"static"===getComputedStyle(m).position&&p.set(m,"position","relative"),p.set(m,"isolation","isolate"),h.dataset.asciiKit="",h.setAttribute("aria-hidden","true"),h.setAttribute("style","position:absolute;inset:0;width:100%;height:100%;pointer-events:none;border-radius:inherit;z-index:-1"),m.appendChild(h);let g,y=t(m),b="";const x=()=>{b=n(d.ink(y),m,y?s:r)??s;const e=d.settings().accent;g=e?n(e,m)??void 0:void 0};x();let E=0,M=!0,w=!1,L=!1,A=0,C=0,F=0,O=!1,S=9,R=9,z=1,k=1,q=u;const I={x:.5,y:.5},P=()=>!!(d.reducedMotion()??i()),W=()=>{const e=d.settings(),t=performance.now(),n={fontSize:e.cellSize,chars:e.charset,ditherStrength:e.dither,lightMode:!y,ink:b,accent:g,elapsed:R,speed:e.speed};for(v.globalAlpha=1,v.globalCompositeOperation="source-over";q>0;q--)l(v,z,k,S,I,n);l(v,z,k,S,I,n),(e=>{if(!e||!e.isConnected)return;const t=o(h,e);if(!t.w||!t.h)return;const n=.71*t.w+32,i=.71*t.h+32,r=h.width/z||1;v.save(),v.setTransform(r*n,0,0,r*i,r*(t.x+t.w/2),r*(t.y+t.h/2));const s=v.createRadialGradient(0,0,0,0,0,1);s.addColorStop(0,"rgba(0,0,0,1)"),s.addColorStop(.72,"rgba(0,0,0,1)"),s.addColorStop(1,"rgba(0,0,0,0)"),v.globalCompositeOperation="destination-out",v.fillStyle=s,v.fillRect(-1,-1,2,2),v.restore()})(e.clear),F=.9*F+.1*(performance.now()-t),h.dataset.painted=""},j=e=>{if(E=0,L||w||!M||"undefined"!=typeof document&&document.hidden)return void(A=C=0);const t=P(),n=d.settings(),i=C?e-C:17;if(C=e,!t&&F>4.5&&i<12&&(O=!O))return void(E=requestAnimationFrame(j));const o=A?Math.min(.05,(e-A)/1e3):0;if(A=e,t||(S+=o*n.speed,R+=o),n.cursor&&a.x>=0){const e=h.getBoundingClientRect();e.width&&e.height&&(I.x+=.07*((a.x-e.left)/e.width-I.x),I.y+=.07*((a.y-e.top)/e.height-I.y))}else n.cursor||(I.x+=.07*(.5-I.x),I.y+=.07*(.5-I.y));W(),t||(E=requestAnimationFrame(j))},B=()=>{E||L||w||!M||(E=requestAnimationFrame(j))},H=()=>{if(L)return;const e=Math.min(2,"number"==typeof devicePixelRatio&&devicePixelRatio||1);z=Math.max(1,h.clientWidth||m.clientWidth||1),k=Math.max(1,h.clientHeight||m.clientHeight||1),h.width=Math.round(z*e),h.height=Math.round(k*e),v.setTransform(e,0,0,e,0,0),q=u,M&&!w&&W(),B()};H();const T="function"==typeof ResizeObserver?new ResizeObserver(H):null;T?.observe(m);const G="function"==typeof IntersectionObserver?new IntersectionObserver(([e])=>{M=e.isIntersecting,A=0,M?B():E&&(cancelAnimationFrame(E),E=0)},{rootMargin:"64px"}):null;G?.observe(m);const K=()=>{A=0,B()};document.addEventListener("visibilitychange",K);const Q="function"==typeof matchMedia?matchMedia("(prefers-reduced-motion: reduce)"):null;Q?.addEventListener?.("change",K),0===a.users++&&"function"==typeof addEventListener&&addEventListener("pointermove",c,{passive:!0});const X="object"==typeof document.fonts?document.fonts:null,Y=()=>{L||!M||w||(W(),B())};X?.addEventListener?.("loadingdone",Y),X?.ready?.then(Y,()=>{});let D=0;const J=()=>{D||L||(D=requestAnimationFrame(()=>{D=0,L||(y=t(m),x(),P()&&W(),B())}))},N="function"==typeof matchMedia?matchMedia("(prefers-color-scheme: dark)"):null;N?.addEventListener?.("change",J);const U="function"==typeof MutationObserver?new MutationObserver(J):null;for(const e of[document.documentElement,document.body])e&&U?.observe(e,{attributes:!0,attributeFilter:["class","data-theme","data-mode","style"]});return{field:null,canvas:h,refresh(){L||(y=t(m),x(),P()&&M&&!w&&W(),B())},play(){w&&(w=!1,A=0,B())},pause(){w=!0,E&&cancelAnimationFrame(E),E=0},destroy(){L||(L=!0,E&&cancelAnimationFrame(E),D&&cancelAnimationFrame(D),E=D=0,T?.disconnect(),G?.disconnect(),U?.disconnect(),document.removeEventListener("visibilitychange",K),Q?.removeEventListener?.("change",K),N?.removeEventListener?.("change",J),X?.removeEventListener?.("loadingdone",Y),0===--a.users&&"function"==typeof removeEventListener&&removeEventListener("pointermove",c),h.remove(),h.width=h.height=0,p.restore())}}}export{d as mountCanvas};//# sourceMappingURL=chunk-KTYCGGRO.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{parseColor as t,hash2 as o}from"./chunk-ZCHGV2CV.js";import{mountCanvas as e}from"./chunk-
|
|
1
|
+
import{parseColor as t,hash2 as o}from"./chunk-ZCHGV2CV.js";import{mountCanvas as e}from"./chunk-KTYCGGRO.js";function n(e,n,c,i,a={x:.5,y:.5},r={}){const{fontSize:l=13,chars:s=" ·:;=+*#%@",color:h,accentColor:f,speed:M=1,radius:$=.38,swirl:d=3,lightMode:g=!1}=r,m=f??(g?"#6b8700":"#d4ff00"),p=.62*l,u=1.4*l,x=Math.ceil(n/p),b=Math.ceil(c/u),S=n/c;e.clearRect(0,0,n,c),e.font=`${l}px monospace`,e.textBaseline="top";let y=255,C=255,z=255;if(g&&(y=55,C=55,z=55),h){const o=t(h);o&&(y=o.r,C=o.g,z=o.b)}let k=212,v=255,w=0;const G=t(m);G&&(k=G.r,v=G.g,w=G.b);const T=i*M;for(let t=0;t<b;t++){const n=t/b;for(let c=0;c<x;c++){const i=(c/x-a.x)*S,r=n-a.y,l=Math.sqrt(i*i+r*r)/$;if(l>1){const n=o(3*c,7*t)*Math.max(0,1-3*(l-1));if(n<.62)continue;const i=n*(g?.28:.04);e.fillStyle=`rgba(${y},${C},${z},${i})`,e.fillText(s[1],c*p,t*u);continue}const h=Math.max(0,1-Math.abs(l-(.15+.12*Math.sin(1.1*T)))/.07),f=Math.pow(1-l,2.2),M=Math.min(1,f+.6*h);if(M<.06)continue;const d=Math.floor(M*(s.length-1)),m=s[Math.min(s.length-1,d)],b=h>.35||l<.08,G=g?.85*M:.18*M;e.fillStyle=b?`rgba(${k},${v},${w},${g?.95:.38})`:`rgba(${y},${C},${z},${G})`,e.fillText(m,c*p,t*u)}}}var c={id:"void",name:"Void",description:"A gravity well that spirals characters around the cursor.",cellSize:13,speed:1,cursor:!0,mount:t=>e(t,(t,o,e,c,i,a)=>n(t,o,e,c,i,{fontSize:a.fontSize,chars:a.chars,lightMode:a.lightMode,color:a.ink,accentColor:a.accent}))};export{n as renderVoidBackground,c as voidWell};//# sourceMappingURL=chunk-L3P7ZDSK.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{scenePreset as e}from"./chunk-
|
|
1
|
+
import{scenePreset as e}from"./chunk-OVCIHOOS.js";var r=e({id:"interference",name:"Interference",description:"Two fine ring grids from slowly orbiting centres; where they cross, moiré bands open and close.",cellSize:11,scene:"interference",charset:" .:-=+*#",hover:"lantern"});export{r as interference};//# sourceMappingURL=chunk-LUOIH2EM.js.map
|