@everymatrix/mini-games-hub 0.1.12 → 0.1.14

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.
Files changed (38) hide show
  1. package/components/{GameCard-gg1cVpsy.cjs → GameCard-BIn8BJ4U.cjs} +1 -1
  2. package/components/{GameCard-CXYqCpVb.js → GameCard-D3knomma.js} +1 -1
  3. package/components/{GameCard-ohf1jOQF.js → GameCard-Ds0FcnPp.js} +1 -1
  4. package/components/{MiniGamesHub-CSZ3An74.js → MiniGamesHub-BYJ7lK90.js} +3 -3
  5. package/components/{MiniGamesHub-4Wuwyw8q.js → MiniGamesHub-D3n-AyD7.js} +3 -3
  6. package/components/{MiniGamesHub-DeVy4J4_.cjs → MiniGamesHub-zNncMSFn.cjs} +1 -1
  7. package/components/{WheelOfFortune-DgJ0luD8.cjs → WheelOfFortune--4nTtnMR.cjs} +7 -20
  8. package/components/{WheelOfFortune-p9qTycTU.js → WheelOfFortune-BjNsD2ND.js} +70 -82
  9. package/components/{WheelOfFortune-Dr-yB2xY.js → WheelOfFortune-DkVQIxzg.js} +63 -75
  10. package/components/{WheelOfFortuneDrawResults-Ban46vUc.cjs → WheelOfFortuneDrawResults-1lzyxrks.cjs} +1 -1
  11. package/components/{WheelOfFortuneDrawResults-B7udZBEV.js → WheelOfFortuneDrawResults-DQweghnp.js} +1 -1
  12. package/components/{WheelOfFortuneDrawResults-CYRN0Phi.js → WheelOfFortuneDrawResults-dOeQDVub.js} +1 -1
  13. package/components/{WheelOfFortuneHistory-COB7C1nL.js → WheelOfFortuneHistory-CQZ9QtVt.js} +1 -1
  14. package/components/{WheelOfFortuneHistory-Cda9YIPp.cjs → WheelOfFortuneHistory-DZNPM57t.cjs} +1 -1
  15. package/components/{WheelOfFortuneHistory-T7NjHsHw.js → WheelOfFortuneHistory-DygZEtcR.js} +1 -1
  16. package/components/{WheelOfFortuneRules-Dyq7AefM.js → WheelOfFortuneRules-D3N1c8PX.js} +1 -1
  17. package/components/{WheelOfFortuneRules-DodXc6sB.js → WheelOfFortuneRules-DuiCet95.js} +1 -1
  18. package/components/{WheelOfFortuneRules-CeD2_BcF.cjs → WheelOfFortuneRules-VAMAiK0m.cjs} +1 -1
  19. package/components/{WheelOfFortuneWheel-B7DOhfW5.js → WheelOfFortuneWheel-BAR98ByP.js} +1 -1
  20. package/components/{WheelOfFortuneWheel-D2fKZ64n.js → WheelOfFortuneWheel-DxFn6jjg.js} +1 -1
  21. package/components/{WheelOfFortuneWheel-CqMnfWH6.cjs → WheelOfFortuneWheel-hSjxThyU.cjs} +1 -1
  22. package/components/{spin-controller-WAwdTCCW.js → spin-controller-BuBkKrNR.js} +31 -20
  23. package/components/spin-controller-CIshWmlA.cjs +1 -0
  24. package/components/{spin-controller-cbMEvhN0.js → spin-controller-REPdRwaB.js} +31 -20
  25. package/es2015/mini-games-hub.cjs +1 -1
  26. package/es2015/mini-games-hub.js +1 -1
  27. package/esnext/mini-games-hub.js +1 -1
  28. package/package.json +1 -1
  29. package/components/MiniGamesHub-C2510DM7.cjs +0 -94
  30. package/components/MiniGamesHub-C3xyZRdn.js +0 -1374
  31. package/components/MiniGamesHub-CQIi4Jso.js +0 -1399
  32. package/components/MiniGamesHub-CuvJDQTm.js +0 -1379
  33. package/components/MiniGamesHub-DFNKphI6.js +0 -1394
  34. package/components/MiniGamesHub-Du6B-YVK.cjs +0 -94
  35. package/components/WheelOfFortune-BV0VEpvD.js +0 -951
  36. package/components/WheelOfFortune-BWKtsKH4.cjs +0 -630
  37. package/components/WheelOfFortune-B_ZNJW34.js +0 -992
  38. package/components/spin-controller-DorW7-xf.cjs +0 -1
@@ -1 +0,0 @@
1
- "use strict";const st=require("./sparkles-BnriHiyw.cjs"),u=require("./constants-DM6Vdc6Z.cjs");function ot(I){const{stage:a,disc:o,sparkleLayer:B,sliceCount:y,onSpinStart:T,onDragStart:E,onSettled:D,onPrizeClear:N,onSpinAbort:R,liteMode:P}=I;let d=0,c=0,m=0,h="idle",f=0,i=null;v(d);function v(t){d=t,o.style.setProperty("--wheel-rotation",`${t}deg`)}function O(t){return(t+540)%360-180}function F(t){const e=o.getBoundingClientRect(),n=e.left+e.width/2,s=e.top+e.height/2;return Math.atan2(t.clientY-s,t.clientX-n)*180/Math.PI}function M(){c&&cancelAnimationFrame(c),c=0,a.classList.remove("is-spin-active")}function k(){const t=y();if(t===0)return 0;const e=360/t,n=(-d%360+360)%360;return Math.floor(n/e)%t}function S(t){const e=t!==void 0?t:k();a.classList.add("is-prize-hit"),m&&clearTimeout(m),m=window.setTimeout(()=>{a.classList.remove("is-prize-hit"),m=0,N==null||N()},u.PRIZE_HIT_MS),D==null||D(e)}function U(t,e=!0){M(),a.classList.add("is-spin-active");let n=performance.now(),s=Math.max(-u.SPIN_MAX_VELOCITY,Math.min(u.SPIN_MAX_VELOCITY,t));function r(l){const p=Math.min(32,l-n);n=l,v(d+s*p),s*=Math.pow(u.SPIN_DECAY,p/16.67),Math.abs(s)>u.SPIN_SETTLE_THRESHOLD?c=requestAnimationFrame(r):(c=0,a.classList.remove("is-spin-active"),e&&S())}c=requestAnimationFrame(r)}function G(){const t=o.getBoundingClientRect(),e=t.left+t.width/2,n=t.top+t.height/2;a.classList.add("is-spinning");const s=a;if(clearTimeout(s._spinGlowTimer),s._spinGlowTimer=setTimeout(()=>a.classList.remove("is-spinning"),960),!P){const r=window.matchMedia("(pointer: coarse), (max-width: 640px)").matches;st.burstSparkles(B,e,n,r?8:18)}}function V(t){o.style.animation="none",M(),a.classList.remove("is-prize-hit"),m&&(clearTimeout(m),m=0),h="free",t!==void 0?f=t:f=-(u.SPIN_BUTTON_VELOCITY_MIN+Math.random()*u.SPIN_BUTTON_VELOCITY_RANGE);const e=t!==void 0?Math.min(u.FREE_SPIN_VELOCITY_FLOOR,Math.abs(t)):u.FREE_SPIN_VELOCITY_FLOOR;G(),T==null||T(),a.classList.add("is-spin-active");let n=performance.now();function s(r){if(h!=="free")return;const l=Math.min(32,r-n);n=r,v(d+f*l),f*=Math.pow(u.FREE_SPIN_DECAY,l/16.67),Math.abs(f)<e&&(f=f<0?-e:e),c=requestAnimationFrame(s)}c=requestAnimationFrame(s)}function z(t){h==="free"&&(h="targeted",M(),W(t))}function X(){if(h!=="free")return;h="aborting",M();let t=performance.now(),e=f;a.classList.add("is-spin-active");function n(s){const r=Math.min(32,s-t);t=s,v(d+e*r),e*=Math.pow(u.ABORT_SPIN_DECAY,r/16.67),Math.abs(e)>u.SPIN_SETTLE_THRESHOLD?c=requestAnimationFrame(n):(c=0,a.classList.remove("is-spin-active"),h="idle",R==null||R())}c=requestAnimationFrame(n)}function C(t){M();const e=d,n=t-e;if(Math.abs(n)<.5){v(t);return}const s=Math.min(600,Math.max(300,Math.abs(n)*5)),r=performance.now();function l(p){const g=Math.min(1,(p-r)/s),L=1-Math.pow(1-g,3);v(e+n*L),g<1?c=requestAnimationFrame(l):(c=0,v(t))}c=requestAnimationFrame(l)}function W(t){const e=y();if(e===0)return;const n=360/e,s=(t+.5)*n,r=(-d%360+360)%360,l=((s-r)%360+360)%360,p=f<=0,g=p?l:(360-l)%360,L=Math.abs(f),K=P?2:Math.max(2,Math.round(L*3)),w=g+K*360,A=d,q=p?A-w:A+w,Q=Math.max(u.LANDING_MIN_VELOCITY,L),tt=Math.max(u.LANDING_MIN_DURATION_MS,Math.min(u.LANDING_MAX_DURATION_MS,2*w/Q)),et=performance.now();a.classList.add("is-spin-active");function x(nt){const Y=Math.min(1,(nt-et)/tt),it=1-Math.pow(1-Y,2);v(A+(q-A)*it),Y<1?c=requestAnimationFrame(x):(c=0,a.classList.remove("is-spin-active"),h="idle",v(q),S(t))}c=requestAnimationFrame(x)}function Z(t){t.classList.remove("is-pressing"),t.offsetWidth,t.classList.add("is-pressing");const e=t;clearTimeout(e._pressTimer),e._pressTimer=setTimeout(()=>t.classList.remove("is-pressing"),620)}function b(t){var n;if(I.centerButtonEl&&I.centerButtonEl.contains(t.target))return;if(i!==null){o.releasePointerCapture(i.pointerId),a.classList.remove("is-dragging"),C(i.startRotation),i=null;return}if(!t.isPrimary)return;t.preventDefault(),E==null||E(),M(),a.classList.add("is-dragging"),(n=o.setPointerCapture)==null||n.call(o,t.pointerId);const e=F(t);i={pointerId:t.pointerId,startAngle:e,previousAngle:e,startRotation:d,previousTime:performance.now(),velocity:0,didDrag:!1,cumulativeDelta:0,velocityHistory:[{cumulative:0,t:performance.now()}]}}function H(t){if(!i||t.pointerId!==i.pointerId)return;t.preventDefault();const e=performance.now(),n=F(t),s=O(n-i.startAngle),r=O(n-i.previousAngle),l=Math.max(8,e-i.previousTime);Math.abs(s)>2&&(i.didDrag=!0),v(i.startRotation+s),i.velocity=r/l,i.previousAngle=n,i.previousTime=e,i.cumulativeDelta+=r,i.velocityHistory.push({cumulative:i.cumulativeDelta,t:e});const p=e-150;for(;i.velocityHistory.length>2&&i.velocityHistory[0].t<p;)i.velocityHistory.shift()}function _(t){var l;if(!i||t.pointerId!==i.pointerId)return;const e=i.velocityHistory;let n;if(e.length>=2){const p=e[0],g=e[e.length-1],L=g.t-p.t;n=L>0?(g.cumulative-p.cumulative)/L:i.velocity}else n=i.velocity;const s=i.didDrag,r=i.startRotation;i=null,a.classList.remove("is-dragging"),(l=o.releasePointerCapture)==null||l.call(o,t.pointerId),s&&Math.abs(n)>u.DRAG_MIN_VELOCITY?I.onDragRelease?I.onDragRelease(n):(T==null||T(),U(n,!0)):s&&C(r)}function $(){o.addEventListener("pointerdown",b),o.addEventListener("pointermove",H),o.addEventListener("pointerup",_),o.addEventListener("pointercancel",_)}function j(){M(),m&&(clearTimeout(m),m=0,a.classList.remove("is-prize-hit")),h="idle",i=null}function J(){M(),m&&clearTimeout(m),o.removeEventListener("pointerdown",b),o.removeEventListener("pointermove",H),o.removeEventListener("pointerup",_),o.removeEventListener("pointercancel",_)}return{startFreeSpin:V,landOnIndex:z,abortSpin:X,reset:j,enableDrag:$,destroy:J,centerButtonPress:Z}}exports.createSpinController=ot;