-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathchunk-BOJXoRYZ.js
More file actions
2 lines (2 loc) · 6.28 KB
/
Copy pathchunk-BOJXoRYZ.js
File metadata and controls
2 lines (2 loc) · 6.28 KB
1
2
import{u as g,r as n,j as e,L as f,b as j,aP as w,_ as v,a2 as y,G as N,o as k,U as A}from"../entries/pages.BZkyDMuN.js";import{S as B}from"./chunk-D8YfSULr.js";import{B as C}from"./chunk-CxCYcf40.js";import"./chunk-BXl3LOEh.js";/* empty css */const r=100,_=()=>{const{unlockAchievement:c}=g(),[o,d]=n.useState(Array(r).fill(!1)),[l,x]=n.useState(0),[i,p]=n.useState(null);n.useEffect(()=>{p(new(window.AudioContext||window.webkitAudioContext))},[]),n.useEffect(()=>{l===r&&c("entropy_increaser")},[l,c]);const u=()=>{if(!i)return;const s=i.createOscillator(),t=i.createGain();s.connect(t),t.connect(i.destination),s.type="square",s.frequency.value=100+Math.random()*200;const a=i.currentTime;t.gain.setValueAtTime(.5,a),t.gain.exponentialRampToValueAtTime(.001,a+.08),s.start(a),s.stop(a+.08)},h=s=>{if(o[s])return;const t=[...o];t[s]=!0,d(t),x(a=>a+1),u()},b=()=>{d(Array(r).fill(!1)),x(0)},m=Math.round(l/r*100);return e.jsxs("div",{className:"min-h-screen bg-[#050505] text-white selection:bg-emerald-500/30 font-sans",children:[e.jsx(B,{title:"Bubble Wrap | Fezcodex",description:"Pop some virtual bubble wrap to relieve stress.",keywords:["Fezcodex","bubble wrap","stress relief","pop","game"]}),e.jsxs("div",{className:"mx-auto max-w-7xl px-6 py-24 md:px-12",children:[e.jsxs("header",{className:"mb-24",children:[e.jsxs(f,{to:"/apps",className:"group mb-12 inline-flex items-center gap-2 text-xs font-mono text-gray-500 hover:text-white transition-colors uppercase tracking-[0.3em]",children:[e.jsx(j,{weight:"bold",className:"transition-transform group-hover:-translate-x-1"}),e.jsx("span",{children:"Applications"})]}),e.jsx("div",{className:"flex flex-col md:flex-row md:items-end justify-between gap-12",children:e.jsxs("div",{className:"space-y-4",children:[e.jsx(C,{title:"Bubble Wrap",slug:"pop",variant:"brutalist"}),e.jsx("p",{className:"text-xl text-gray-400 max-w-2xl font-light leading-relaxed",children:"Digital stress relief. Pop virtual cells to satisfy your tactile cravings."})]})})]}),e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-12 gap-12",children:[e.jsxs("div",{className:"lg:col-span-4 space-y-8",children:[e.jsxs("div",{className:"border border-white/10 bg-white/[0.02] p-8 rounded-sm space-y-10",children:[e.jsxs("h3",{className:"font-mono text-[10px] font-bold text-emerald-500 uppercase tracking-widest flex items-center gap-2",children:[e.jsx(w,{weight:"fill"}),"Status"]}),e.jsxs("div",{className:"space-y-8",children:[e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex justify-between items-end",children:[e.jsx("label",{className:"font-mono text-[10px] text-gray-500 uppercase tracking-widest",children:"Completion"}),e.jsxs("span",{className:"text-xl font-black text-emerald-500",children:[m,"%"]})]}),e.jsx("div",{className:"w-full bg-gray-800 h-1 rounded-sm overflow-hidden",children:e.jsx("div",{className:"bg-emerald-500 h-full transition-all duration-300",style:{width:`${m}%`}})})]}),e.jsx("div",{className:"space-y-4 pt-4 border-t border-white/5",children:e.jsxs("div",{className:"flex justify-between items-end",children:[e.jsx("label",{className:"font-mono text-[10px] text-gray-500 uppercase",children:"Popped Cells"}),e.jsxs("span",{className:"text-xl font-black text-white",children:[l," ",e.jsxs("span",{className:"text-gray-600 text-sm",children:["/ ",r]})]})]})}),e.jsxs("button",{onClick:b,className:"w-full py-3 border border-white/10 hover:border-white text-gray-400 hover:text-white transition-all text-xs font-black uppercase tracking-widest flex items-center justify-center gap-2",children:[e.jsx(v,{size:16,weight:"bold"}),"Reset Sheet"]})]})]}),e.jsxs("div",{className:"p-8 border border-white/10 bg-white/[0.01] rounded-sm flex items-start gap-4",children:[e.jsx(y,{size:24,className:"text-gray-700 shrink-0"}),e.jsx("p",{className:"text-[10px] font-mono uppercase tracking-[0.2em] leading-relaxed text-gray-500",children:"Popping all cells triggers a completion event. Use this tool to reduce anxiety or procrastinate effectively."})]})]}),e.jsxs("div",{className:"lg:col-span-8 space-y-12",children:[e.jsxs("div",{className:"relative border border-white/10 bg-white/[0.02] p-8 md:p-12 rounded-sm overflow-hidden group min-h-[600px] flex items-center justify-center",children:[e.jsx("div",{className:"absolute inset-0 opacity-[0.03] pointer-events-none grayscale",children:e.jsx(N,{seed:"bubblewrap",className:"w-full h-full"})}),e.jsx("div",{className:"relative z-10 w-full max-w-2xl",children:e.jsx("div",{className:"grid grid-cols-10 gap-2 sm:gap-3 md:gap-4 justify-items-center",children:o.map((s,t)=>e.jsxs("button",{onClick:()=>h(t),className:`w-8 h-8 sm:w-10 sm:h-10 rounded-full border-2 transition-all duration-200 relative overflow-hidden focus:outline-none group/bubble
${s?"bg-transparent border-gray-800 scale-90":"bg-emerald-500/10 border-emerald-500/30 hover:bg-emerald-500/20 hover:border-emerald-500 hover:scale-105 cursor-pointer"}`,children:[!s&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"absolute inset-0 opacity-0 group-hover/bubble:opacity-100 transition-opacity bg-emerald-400/10"}),e.jsx("div",{className:"absolute top-1.5 left-1.5 w-2 h-2 sm:w-2.5 sm:h-2.5 bg-white rounded-full opacity-20 blur-[0.5px] pointer-events-none"})]}),s&&e.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:e.jsx("div",{className:"w-1 h-1 bg-gray-800 rounded-full"})})]},t))})})]}),e.jsxs("div",{className:"p-8 border border-white/10 bg-white/[0.01] rounded-sm flex items-center justify-between gap-6",children:[e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx(k,{size:32,className:"text-emerald-500/50"}),e.jsx("span",{className:"text-[10px] font-mono text-gray-500 uppercase tracking-widest",children:"Audio Engine: Active"})]}),l===r&&e.jsxs("div",{className:"flex items-center gap-2 text-emerald-500 animate-pulse",children:[e.jsx(A,{weight:"fill"}),e.jsx("span",{className:"text-[10px] font-mono uppercase tracking-widest font-bold",children:"Sheet Cleared"})]})]})]})]}),e.jsxs("footer",{className:"mt-32 pt-12 border-t border-white/10 flex flex-col md:flex-row justify-between items-center gap-6 text-gray-600 font-mono text-[10px] uppercase tracking-[0.3em]",children:[e.jsx("span",{children:"Fezcodex_Bubble_Wrap_v1.0.0"}),e.jsx("span",{className:"text-gray-800",children:"SIMULATION // ACTIVE"})]})]})]})};export{_ as default};