sparkfx 1.2.0 → 1.2.2
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/README.md +75 -100
- package/dist/{chunk-H7FVY7R6.cjs → chunk-3AVUTKJ5.cjs} +27 -22
- package/dist/{chunk-H7FVY7R6.cjs.map → chunk-3AVUTKJ5.cjs.map} +1 -1
- package/dist/chunk-FPJZKZGF.js +3 -0
- package/dist/chunk-FPJZKZGF.js.map +1 -0
- package/dist/{chunk-FLYBCRQ3.cjs → chunk-GHLFOSXQ.cjs} +3 -3
- package/dist/{chunk-FLYBCRQ3.cjs.map → chunk-GHLFOSXQ.cjs.map} +1 -1
- package/dist/chunk-HB6NE443.cjs +3 -0
- package/dist/chunk-HB6NE443.cjs.map +1 -0
- package/dist/{chunk-N3KVAA7Q.js → chunk-LPB7JTCR.js} +3 -3
- package/dist/{chunk-N3KVAA7Q.js.map → chunk-LPB7JTCR.js.map} +1 -1
- package/dist/{chunk-RXGLQFPT.js → chunk-SJKJ2GZW.js} +27 -22
- package/dist/{chunk-RXGLQFPT.js.map → chunk-SJKJ2GZW.js.map} +1 -1
- package/dist/event-bus-C4Rbf5un.d.cts +148 -0
- package/dist/event-bus-C4Rbf5un.d.ts +148 -0
- package/dist/headless.cjs +1 -1
- package/dist/headless.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +10 -2
- package/dist/index.d.ts +10 -2
- package/dist/index.js +1 -1
- package/dist/next.cjs +2 -2
- package/dist/next.js +1 -1
- package/dist/react.cjs +1 -1
- package/dist/react.js +1 -1
- package/dist/shadcn.cjs +2 -2
- package/dist/shadcn.js +1 -1
- package/dist/svelte.cjs +2 -2
- package/dist/svelte.js +1 -1
- package/dist/tailwind.cjs +1 -1
- package/dist/tailwind.js +1 -1
- package/dist/testing.cjs +3 -0
- package/dist/testing.cjs.map +1 -0
- package/dist/testing.d.cts +197 -0
- package/dist/testing.d.ts +197 -0
- package/dist/testing.js +3 -0
- package/dist/testing.js.map +1 -0
- package/dist/vue.cjs +2 -2
- package/dist/vue.js +1 -1
- package/package.json +24 -4
- package/scripts/postinstall.js +94 -29
package/README.md
CHANGED
|
@@ -1,148 +1,123 @@
|
|
|
1
1
|
<p align="center">
|
|
2
|
-
<img src="https://raw.githubusercontent.com/mrLynchs/sparkfx/main/assets/logo.png" alt="sparkfx
|
|
2
|
+
<img src="https://raw.githubusercontent.com/mrLynchs/sparkfx/main/assets/logo.png" alt="sparkfx" width="100" />
|
|
3
3
|
</p>
|
|
4
4
|
|
|
5
|
-
<h1 align="center"
|
|
5
|
+
<h1 align="center">sparkfx</h1>
|
|
6
6
|
|
|
7
7
|
<p align="center">
|
|
8
|
-
|
|
8
|
+
micro-interactions for modern web apps
|
|
9
9
|
</p>
|
|
10
10
|
|
|
11
11
|
<p align="center">
|
|
12
|
-
<a href="https://
|
|
13
|
-
<a href="https://www.npmjs.com/package/sparkfx"><img src="https://img.shields.io/npm/
|
|
14
|
-
<img src="https://img.shields.io/
|
|
15
|
-
<img src="https://img.shields.io/bundlephobia/minzip/sparkfx?style=flat-square&color=a855f7"
|
|
16
|
-
<img src="https://img.shields.io/badge/license-MIT-green?style=flat-square"
|
|
12
|
+
<a href="https://sparkfx.vercel.app"><img src="https://img.shields.io/badge/docs-sparkfx.vercel.app-00ffa3?style=flat-square" /></a>
|
|
13
|
+
<a href="https://www.npmjs.com/package/sparkfx"><img src="https://img.shields.io/npm/v/sparkfx?color=00ffa3&style=flat-square" /></a>
|
|
14
|
+
<a href="https://www.npmjs.com/package/sparkfx"><img src="https://img.shields.io/npm/dm/sparkfx?color=00d4ff&style=flat-square" /></a>
|
|
15
|
+
<img src="https://img.shields.io/bundlephobia/minzip/sparkfx?style=flat-square&color=a855f7" />
|
|
16
|
+
<img src="https://img.shields.io/badge/license-MIT-green?style=flat-square" />
|
|
17
17
|
</p>
|
|
18
18
|
|
|
19
19
|
<p align="center">
|
|
20
|
-
<a href="
|
|
21
|
-
<a href="
|
|
22
|
-
<a href="
|
|
23
|
-
<a href="#effects">Effects</a> •
|
|
24
|
-
<a href="#integrations">Integrations</a>
|
|
20
|
+
<a href="https://sparkfx.vercel.app">📖 Documentation</a> •
|
|
21
|
+
<a href="https://sparkfx.vercel.app/effects">✨ Effects</a> •
|
|
22
|
+
<a href="https://sparkfx.vercel.app/playground">🎮 Playground</a>
|
|
25
23
|
</p>
|
|
26
24
|
|
|
27
25
|
---
|
|
28
26
|
|
|
29
|
-
|
|
27
|
+
I got tired of copy-pasting the same CSS animations between projects. So I built sparkfx - a collection of 45+ effects that just work.
|
|
28
|
+
|
|
29
|
+
## Install
|
|
30
30
|
|
|
31
31
|
```bash
|
|
32
32
|
npm install sparkfx
|
|
33
33
|
```
|
|
34
34
|
|
|
35
|
-
##
|
|
36
|
-
|
|
37
|
-
| | |
|
|
38
|
-
|---|---|
|
|
39
|
-
| 🎯 **45+ Effects** | Motion, scroll, visual, text animations |
|
|
40
|
-
| 🌊 **Motion** | parallax, float, flip3d, swing, orbit |
|
|
41
|
-
| 📜 **Scroll** | reveal, counter with IntersectionObserver |
|
|
42
|
-
| 🎨 **Visual** | aurora, matrix, rainbow, hologram, neon |
|
|
43
|
-
| ⚡ **API** | combine, sequence, stagger |
|
|
44
|
-
| 🎭 **Presets** | gaming, minimal, playful, corporate |
|
|
45
|
-
| ♿ **A11y** | prefers-reduced-motion support |
|
|
46
|
-
| 📦 **Frameworks** | React, Vue, Svelte, Next.js |
|
|
47
|
-
|
|
48
|
-
## Quick Start
|
|
35
|
+
## Usage
|
|
49
36
|
|
|
50
37
|
```js
|
|
51
38
|
import { spark } from 'sparkfx'
|
|
52
39
|
|
|
53
|
-
//
|
|
54
|
-
|
|
40
|
+
// basic stuff
|
|
41
|
+
spark.bounce()
|
|
42
|
+
spark.glow({ color: '#8b5cf6' })
|
|
43
|
+
spark.shake({ intensity: 0.8 })
|
|
55
44
|
|
|
56
|
-
//
|
|
45
|
+
// combine them
|
|
57
46
|
import { combine } from 'sparkfx'
|
|
58
|
-
|
|
47
|
+
combine([spark.glow(), spark.lift()])
|
|
59
48
|
```
|
|
60
49
|
|
|
61
|
-
##
|
|
50
|
+
## What's in the box
|
|
62
51
|
|
|
63
|
-
|
|
64
|
-
```js
|
|
65
|
-
spark.bounce() spark.pulse() spark.lift()
|
|
66
|
-
spark.scale() spark.shake() spark.fade()
|
|
67
|
-
spark.slide() spark.rotate()
|
|
68
|
-
```
|
|
52
|
+
**Basic** - bounce, pulse, lift, scale, shake, fade, slide, rotate
|
|
69
53
|
|
|
70
|
-
|
|
71
|
-
```js
|
|
72
|
-
spark.parallax({ depth: 0.5, trigger: 'scroll' })
|
|
73
|
-
spark.float({ distance: 10, rotate: true })
|
|
74
|
-
spark.flip3d({ direction: 'horizontal' })
|
|
75
|
-
spark.swing({ angle: 15, damping: true })
|
|
76
|
-
spark.orbit({ radius: 50, tilt: true })
|
|
77
|
-
```
|
|
54
|
+
**Premium** - glow, ripple, magnetic, tilt, elastic, jelly, rubber, morph
|
|
78
55
|
|
|
79
|
-
|
|
80
|
-
```js
|
|
81
|
-
spark.reveal({ animation: 'fade-up', threshold: 0.2 })
|
|
82
|
-
spark.counter({ from: 0, to: 1000, duration: 2000 })
|
|
83
|
-
```
|
|
56
|
+
**Visual** - glitch, blur, neon, glass, shimmer, gradient, spotlight, hologram, aurora, matrix, rainbow
|
|
84
57
|
|
|
85
|
-
|
|
86
|
-
```js
|
|
87
|
-
spark.aurora({ colors: ['#00ffa3', '#00d4ff'] })
|
|
88
|
-
spark.matrix({ color: '#00ff00', speed: 5 })
|
|
89
|
-
spark.rainbow({ type: 'text' })
|
|
90
|
-
spark.neon() spark.glass() spark.glitch()
|
|
91
|
-
```
|
|
58
|
+
**Motion** - parallax, float, flip3d, swing, orbit
|
|
92
59
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
60
|
+
**Scroll** - reveal, counter
|
|
61
|
+
|
|
62
|
+
**Celebration** - confetti, sparkle, firework, celebrate
|
|
63
|
+
|
|
64
|
+
**Text** - typewriter, scramble, wave, highlight
|
|
65
|
+
|
|
66
|
+
## v1.2.1 - New stuff
|
|
67
|
+
|
|
68
|
+
### Event Bus
|
|
69
|
+
|
|
70
|
+
Finally, animations can talk to each other:
|
|
98
71
|
|
|
99
|
-
### Text
|
|
100
72
|
```js
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
73
|
+
import { eventBus, when } from 'sparkfx'
|
|
74
|
+
|
|
75
|
+
// trigger one animation when another finishes
|
|
76
|
+
when('#modal', 'complete').trigger('#backdrop', 'fadeOut')
|
|
77
|
+
|
|
78
|
+
// listen to everything
|
|
79
|
+
eventBus.on('animation:start', ({ effect }) => {
|
|
80
|
+
console.log(`${effect} started`)
|
|
81
|
+
})
|
|
104
82
|
```
|
|
105
83
|
|
|
106
|
-
|
|
84
|
+
### Testing
|
|
107
85
|
|
|
108
|
-
|
|
109
|
-
import { combine, sequence, stagger } from 'sparkfx'
|
|
86
|
+
First animation library with actual test support:
|
|
110
87
|
|
|
111
|
-
|
|
112
|
-
|
|
88
|
+
```js
|
|
89
|
+
import { createTestContext, sparkMatchers } from 'sparkfx/testing'
|
|
113
90
|
|
|
114
|
-
|
|
115
|
-
sequence(element, [
|
|
116
|
-
{ effect: spark.fade(), delay: 0 },
|
|
117
|
-
{ effect: spark.bounce(), delay: 200 }
|
|
118
|
-
])
|
|
91
|
+
expect.extend(sparkMatchers)
|
|
119
92
|
|
|
120
|
-
|
|
121
|
-
|
|
93
|
+
test('animation timing', () => {
|
|
94
|
+
const ctx = createTestContext()
|
|
95
|
+
const anim = ctx.track(spark.fadeIn(el))
|
|
96
|
+
|
|
97
|
+
ctx.advanceTime(150)
|
|
98
|
+
expect(anim).toHaveProgress(0.5)
|
|
99
|
+
})
|
|
122
100
|
```
|
|
123
101
|
|
|
124
|
-
##
|
|
102
|
+
## Framework support
|
|
125
103
|
|
|
126
|
-
|
|
127
|
-
|-----------|--------|
|
|
128
|
-
| Tailwind CSS | `sparkfx/tailwind` |
|
|
129
|
-
| Shadcn/ui | `sparkfx/shadcn` |
|
|
130
|
-
| Headless UI | `sparkfx/headless` |
|
|
131
|
-
| React | `sparkfx/react` |
|
|
132
|
-
| Vue | `sparkfx/vue` |
|
|
133
|
-
| Svelte | `sparkfx/svelte` |
|
|
134
|
-
| Next.js | `sparkfx/next` |
|
|
104
|
+
Works everywhere:
|
|
135
105
|
|
|
136
|
-
### Tailwind Plugin
|
|
137
106
|
```js
|
|
138
|
-
//
|
|
107
|
+
// react
|
|
108
|
+
import { useSparkFx } from 'sparkfx/react'
|
|
109
|
+
|
|
110
|
+
// vue
|
|
111
|
+
import { useSparkFx } from 'sparkfx/vue'
|
|
112
|
+
|
|
113
|
+
// svelte
|
|
114
|
+
import { sparkfx } from 'sparkfx/svelte'
|
|
115
|
+
|
|
116
|
+
// tailwind plugin
|
|
139
117
|
plugins: [require('sparkfx/tailwind')]
|
|
140
118
|
```
|
|
141
|
-
```html
|
|
142
|
-
<button class="spark-bounce hover:spark-glow">Click</button>
|
|
143
|
-
```
|
|
144
119
|
|
|
145
|
-
##
|
|
120
|
+
## Config
|
|
146
121
|
|
|
147
122
|
```js
|
|
148
123
|
import { config } from 'sparkfx'
|
|
@@ -160,11 +135,11 @@ config({
|
|
|
160
135
|
```js
|
|
161
136
|
import { presets } from 'sparkfx'
|
|
162
137
|
|
|
163
|
-
presets.gaming
|
|
164
|
-
presets.minimal
|
|
165
|
-
presets.playful
|
|
138
|
+
presets.gaming // neon + glitch vibes
|
|
139
|
+
presets.minimal // subtle, clean
|
|
140
|
+
presets.playful // bouncy, elastic
|
|
166
141
|
```
|
|
167
142
|
|
|
168
143
|
---
|
|
169
144
|
|
|
170
|
-
|
|
145
|
+
MIT © [mrLynchs](https://github.com/mrLynchs)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
'use strict';var $t=require('clsx');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var $t__default=/*#__PURE__*/_interopDefault($t);/* sparkfx -
|
|
1
|
+
'use strict';var $t=require('clsx');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var $t__default=/*#__PURE__*/_interopDefault($t);/* sparkfx v1.2.2 - Premium micro-interactions with Event Bus & Testing Kit */
|
|
2
2
|
var Ie="sparkfx-styles",je=false,Fe=new Set,_e=`
|
|
3
3
|
/* @lynch/spark base styles */
|
|
4
4
|
.spark-effect {
|
|
@@ -200,7 +200,7 @@ var Ie="sparkfx-styles",je=false,Fe=new Set,_e=`
|
|
|
200
200
|
--${e}-easing-elastic: cubic-bezier(0.175, 0.885, 0.32, 1.275);
|
|
201
201
|
--${e}-easing-spring: cubic-bezier(0.5, 1.5, 0.5, 1);
|
|
202
202
|
}
|
|
203
|
-
`,document.head.appendChild(o);}},T=new X;function Ze(t){T.init(t);}function et(t){T.update(t);}function tt(){return T.get()}function rt(t){T.update({theme:t});}function nt(t){if(typeof window>"u")return ()=>{};let e=window.matchMedia("(prefers-color-scheme: dark)"),r=()=>t(T.getCurrentTheme());return e.addEventListener("change",r),()=>e.removeEventListener("change",r)}var qe={gaming:{name:"Gaming",description:"High-energy effects for gaming interfaces",effects:["neon","glitch","glow","shake"],defaultOptions:{neon:{color:"#00ff00"},glow:{color:"#ff00ff",spread:30}}},minimal:{name:"Minimal",description:"Subtle, professional effects",effects:["lift","fade","scale"],defaultOptions:{lift:{distance:4},scale:{factor:1.02}}},playful:{name:"Playful",description:"Fun and bouncy effects for engaging UIs",effects:["bounce","jelly","elastic","confetti"],defaultOptions:{bounce:{height:12},jelly:{intensity:.8}}},corporate:{name:"Corporate",description:"Professional and clean effects",effects:["lift","glass","fade"],defaultOptions:{lift:{distance:2,shadow:true},glass:{blur:10}}},retro:{name:"Retro",description:"Nostalgic 80s/90s style effects",effects:["glitch","neon","shimmer"],defaultOptions:{neon:{color:"#ff0080"},glitch:{intensity:.5}}},futuristic:{name:"Futuristic",description:"Sci-fi inspired holographic effects",effects:["hologram","aurora","glass","glow"],defaultOptions:{hologram:{opacity:.8},aurora:{colors:["#00ffa3","#00d4ff","#a855f7"]}}},elegant:{name:"Elegant",description:"Sophisticated and luxurious effects",effects:["shimmer","glow","lift","glass"],defaultOptions:{shimmer:{color:"rgba(255, 215, 0, 0.3)"},glow:{color:"#ffd700",spread:20}}},dark:{name:"Dark Mode",description:"Effects optimized for dark themes",effects:["glow","neon","glass","aurora"],defaultOptions:{glow:{color:"#00ffa3"},glass:{blur:20,opacity:.1}}}};function ot(t){let e=qe[t];return e?e.effects.map(r=>`spark-${r}`).join(" "):""}function at(){return Object.keys(qe)}var st={gaming:{name:"Gaming",classes:"spark-neon spark-glitch spark-glow"},minimal:{name:"Minimal",classes:"spark-lift spark-fade spark-scale"},playful:{name:"Playful",classes:"spark-bounce spark-jelly spark-elastic"},corporate:{name:"Corporate",classes:"spark-lift spark-glass spark-fade"},retro:{name:"Retro",classes:"spark-glitch spark-neon spark-shimmer"},futuristic:{name:"Futuristic",classes:"spark-hologram spark-aurora spark-glass spark-glow"},elegant:{name:"Elegant",classes:"spark-shimmer spark-glow spark-lift spark-glass"},dark:{name:"Dark",classes:"spark-glow spark-neon spark-glass spark-aurora"}};function x(){return typeof window<"u"&&typeof document<"u"}function ze(t,e=document){if(!x())return [];try{return Array.from(e.querySelectorAll(t))}catch{return []}}var it=0;function M(t="spark"){return `${t}-${Date.now().toString(36)}-${(it++).toString(36)}`}x()?window.requestAnimationFrame.bind(window):t=>setTimeout(t,16);x()?window.cancelAnimationFrame.bind(window):t=>clearTimeout(t);function Ve(t,e,r){return Math.min(Math.max(t,e),r)}function Y(t,e,r,n,o){return (t-e)*(o-n)/(r-e)+n}function G(t,e){return Math.random()*(e-t)+t}function W(t,e){return Math.floor(G(t,e+1))}var K={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>t*(2-t),easeInOutQuad:t=>t<.5?2*t*t:-1+(4-2*t)*t,easeInCubic:t=>t*t*t,easeOutCubic:t=>--t*t*t+1,easeInOutCubic:t=>t<.5?4*t*t*t:(t-1)*(2*t-2)*(2*t-2)+1,easeInQuart:t=>t*t*t*t,easeOutQuart:t=>1- --t*t*t*t,easeInOutQuart:t=>t<.5?8*t*t*t*t:1-8*--t*t*t*t,easeInElastic:t=>{let e=2*Math.PI/3;return t===0?0:t===1?1:-Math.pow(2,10*t-10)*Math.sin((t*10-10.75)*e)},easeOutElastic:t=>{let e=2*Math.PI/3;return t===0?0:t===1?1:Math.pow(2,-10*t)*Math.sin((t*10-.75)*e)+1},easeOutBounce:t=>t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375};function U(t,e){let r,n,o;return (...a)=>{r?(clearTimeout(n),n=setTimeout(()=>{Date.now()-o>=e&&(t(...a),o=Date.now());},e-(Date.now()-o))):(t(...a),o=Date.now(),r=true);}}var H=null;function Q(){return x()?H||(H={prefersReducedMotion:window.matchMedia("(prefers-reduced-motion: reduce)").matches,prefersHighContrast:window.matchMedia("(prefers-contrast: more)").matches,screenReaderActive:ct()},H):{prefersReducedMotion:false,prefersHighContrast:false,screenReaderActive:false}}function ct(){return x()?[document.querySelector("[data-nvda]"),window.hasOwnProperty("JAWS"),document.querySelector(".voiceover-detected"),document.documentElement.classList.contains("js-focus-visible")].some(Boolean):false}function lt(){H=null;}var z=new Set;function wn(t){return x()?(z.add(t),z.size===1&&pt(),()=>{z.delete(t);}):()=>{}}function pt(){if(!x())return;let t=window.matchMedia("(prefers-reduced-motion: reduce)"),e=window.matchMedia("(prefers-contrast: more)"),r=()=>{lt();let n=Q();z.forEach(o=>o(n));};t.addEventListener("change",r),e.addEventListener("change",r);}function w(){return T.get().respectMotionPreference?Q().prefersReducedMotion:false}function ut(t="fade"){switch(t){case "none":return "animation: none !important; transition: none !important;";case "fade":return "animation: none !important; transition: opacity 200ms ease !important;";case "simple":return "animation-duration: 0.01ms !important; animation-iteration-count: 1 !important;";default:return ""}}function ft(t,e="fade"){if(!w())return;let r=ut(e);t.style.cssText+=r,t.setAttribute("data-spark-reduced-motion","true");}var A=null;function mt(){if(!x())throw new Error("Cannot create announcer in non-browser environment");return A&&document.body.contains(A)||(A=document.createElement("div"),A.setAttribute("aria-live","polite"),A.setAttribute("aria-atomic","true"),A.setAttribute("role","status"),A.className="spark-a11y-announcer",Object.assign(A.style,{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",border:"0"}),document.body.appendChild(A)),A}function dt(t,e="polite"){if(!x()||!T.get().a11y)return;let n=mt();n.setAttribute("aria-live",e),n.textContent="",setTimeout(()=>{n.textContent=t;},100);}function gt(t){return {bounce:"Element bounced",glow:"Element is glowing",pulse:"Element is pulsing",shake:"Element shook",confetti:"Celebration animation played",sparkle:"Sparkle effect activated",firework:"Firework animation played",typewriter:"Text typing animation",reveal:"Content revealed"}[t]||`${t} effect activated`}function kt(t){t.hasAttribute("tabindex")||t.setAttribute("tabindex","0");}function On(t,e){let r=n=>{(n.key==="Enter"||n.key===" ")&&(n.preventDefault(),e(n));};return t.addEventListener("keydown",r),()=>{t.removeEventListener("keydown",r);}}function En(t){let e=null,r=["button","[href]","input","select","textarea",'[tabindex]:not([tabindex="-1"])'].join(", "),n=o=>{if(o.key!=="Tab")return;let a=t.querySelectorAll(r),s=a[0],i=a[a.length-1];o.shiftKey&&document.activeElement===s?(o.preventDefault(),i?.focus()):!o.shiftKey&&document.activeElement===i&&(o.preventDefault(),s?.focus());};return {activate(){e=document.activeElement,t.addEventListener("keydown",n),t.querySelector(r)?.focus();},deactivate(){t.removeEventListener("keydown",n),e?.focus();}}}function ht(t,e){e.role&&t.setAttribute("role",e.role),e.label&&t.setAttribute("aria-label",e.label),e.focusable&&kt(t),t.setAttribute("data-spark-a11y","true");}function $n(t,e,r,n={}){let o=T.get();w()&&ft(e,n.reducedMotionAlternative),o.a11y&&ht(e,n);let a=t();if(n.announce&&o.a11y){let s=n.announceMessage||gt(r);dt(s);}return a}function xt(){return Q().prefersHighContrast}function Mn(t,e){return xt()?{primary:"CanvasText",secondary:"LinkText",background:"Canvas",border:"CanvasText"}[t]||e:t}function yt(t){if(t.length===0)return {className:""};let e=t.map(d=>d.className).filter(Boolean).join(" "),r={};t.forEach(d=>{d.style&&Object.assign(r,d.style);});let n=d=>{t.forEach(b=>{b.onMouseEnter&&b.onMouseEnter(d);});},o=d=>{t.forEach(b=>{b.onMouseLeave&&b.onMouseLeave(d);});},a=d=>{t.forEach(b=>{b.onMouseMove&&b.onMouseMove(d);});},s=d=>{t.forEach(b=>{b.onClick&&b.onClick(d);});},i=()=>{t.forEach(d=>{d.cleanup&&d.cleanup();});},c=t.some(d=>d.onMouseEnter),p=t.some(d=>d.onMouseLeave),m=t.some(d=>d.onMouseMove),k=t.some(d=>d.onClick),h=t.some(d=>d.cleanup);return {className:e,style:Object.keys(r).length>0?r:void 0,onMouseEnter:c?n:void 0,onMouseLeave:p?o:void 0,onMouseMove:m?a:void 0,onClick:k?s:void 0,cleanup:h?i:void 0}}function bt(t,e,r={}){let n={loop:false,loopCount:1,loopDelay:0,...r},o=0,a=false,s=0,i=null,c=[],p=()=>{t&&c.length>0&&(c.forEach(y=>{y.split(" ").forEach(S=>S&&t.classList.remove(S));}),c=[]);},m=y=>{!t||!x()||(y.effect.className&&(y.effect.className.split(" ").forEach(S=>{S&&t.classList.add(S);}),c.push(y.effect.className)),y.effect.style&&Object.entries(y.effect.style).forEach(([S,O])=>{t.style.setProperty(S,String(O));}),y.onStart&&y.onStart());},k=y=>{if(!a||y>=e.length){n.loop&&(n.loopCount===-1||s<n.loopCount-1)?(s++,i=setTimeout(()=>{o=0,p(),k(0);},n.loopDelay)):(a=false,r.onComplete&&r.onComplete());return}let S=e[y];o=y,i=setTimeout(()=>{m(S),i=setTimeout(()=>{S.onEnd&&S.onEnd(),p(),k(y+1);},S.duration||300);},S.delay||0);},h=()=>{a||(a=true,k(o));},d=()=>{a=false,i&&(clearTimeout(i),i=null);};return {play:h,pause:d,stop:()=>{d(),o=0,s=0,p();},getCurrentStep:()=>o,isPlaying:()=>a}}function St(t,e,r={}){let n={delay:100,startDelay:0,direction:"normal",easing:"linear",...r},o=[],a=[],s=false,i=()=>x()?(Array.isArray(t)?o=t:o=ze(t),n.direction==="reverse"?o=[...o].reverse():n.direction==="random"&&(o=[...o].sort(()=>Math.random()-.5)),o):[],c=(h,d)=>{let b=n.startDelay+h*n.delay;switch(n.easing){case "ease-in":return n.startDelay+Math.pow(h/d,2)*n.delay*d;case "ease-out":return n.startDelay+(1-Math.pow(1-h/d,2))*n.delay*d;default:return b}},p=h=>{e.className&&e.className.split(" ").forEach(d=>{d&&h.classList.add(d);}),e.style&&Object.entries(e.style).forEach(([d,b])=>{h.style.setProperty(d,String(b));}),e.onMouseEnter&&h.addEventListener("mouseenter",e.onMouseEnter),e.onMouseLeave&&h.addEventListener("mouseleave",e.onMouseLeave),e.onMouseMove&&h.addEventListener("mousemove",e.onMouseMove),e.onClick&&h.addEventListener("click",e.onClick);};return {play:()=>{if(s)return;s=true;let h=i();if(h.length===0)return;n.onStart&&n.onStart();let d=0;h.forEach((b,$)=>{let C=c($,h.length),y=setTimeout(()=>{p(b),n.onElementStart&&n.onElementStart(b,$),d++,d===h.length&&n.onComplete&&n.onComplete();},C);a.push(y);});},cancel:()=>{a.forEach(h=>clearTimeout(h)),a=[],s=false;},getElements:()=>o}}var N=f;var vt=V,wt={duration:300,intensity:1,trigger:"hover",easing:"ease-out",delay:0,reduceMotion:true};function l(t,e){return {...wt,...e,...t}}function u(t){return !(t.reduceMotion!==false&&vt())}function v(t){return N(),{className:t.className||"",style:t.style,onMouseEnter:t.onMouseEnter,onMouseLeave:t.onMouseLeave,onMouseMove:t.onMouseMove,onClick:t.onClick,onFocus:t.onFocus,onBlur:t.onBlur,destroy:t.destroy,cleanup:t.cleanup}}function R(t,e){return t*e}var Ot=0;function De(){return `sparkfx-${++Ot}-${Date.now()}`}function Et(t,e,r){return Math.min(Math.max(t,e),r)}function Xe(t,e="#ffffff"){if(!t||typeof t!="string")return e;let r=t.replace(/[^a-zA-Z0-9#(),.\s%]/g,"");return /^#[0-9A-Fa-f]{3,8}$/.test(r)||/^rgba?\([^)]+\)$/.test(r)||["red","blue","green","yellow","white","black","orange","purple","pink","cyan","magenta","currentColor","transparent"].includes(r.toLowerCase())?r:e}function Ye(t,e,r,n){return t===void 0||typeof t!="number"||isNaN(t)?n:Et(t,e,r)}function P(t,e){return Math.random()*(e-t)+t}function Ge(t){return t[Math.floor(Math.random()*t.length)]}var Mt={duration:400,bounces:1,trigger:"hover",intensity:1};function _(t){let e=l(t,Mt);if(f(),!u(e))return {className:"sparkfx-effect sparkfx-reduced-motion"};let r=R(20,e.intensity),n=`sparkfx-bounce-${e.bounces}-${Math.round(r)}`,o="0%, 100% { transform: translateY(0); }",a=100/(e.bounces*2);for(let i=0;i<e.bounces;i++){let c=a*(i*2+1),p=r*Math.pow(.6,i);o+=` ${c}% { transform: translateY(-${p}px); }`;}E(n,o);let s=g({duration:e.duration,easing:e.easing});return {className:$t__default.default("sparkfx-effect","sparkfx-bounce"),style:{...s,"--sparkfx-animation-name":n},onMouseEnter:(void 0)}}var Rt={duration:1e3,count:-1,scale:1.05,trigger:"always",intensity:1};function J(t){let e=l(t,Rt);f();let r=1+(e.scale-1)*e.intensity,n=`sparkfx-pulse-${r.toString().replace(".","_")}`;if(E(n,`
|
|
203
|
+
`,document.head.appendChild(o);}},T=new X;function Ze(t){T.init(t);}function et(t){T.update(t);}function tt(){return T.get()}function rt(t){T.update({theme:t});}function nt(t){if(typeof window>"u")return ()=>{};let e=window.matchMedia("(prefers-color-scheme: dark)"),r=()=>t(T.getCurrentTheme());return e.addEventListener("change",r),()=>e.removeEventListener("change",r)}var qe={gaming:{name:"Gaming",description:"High-energy effects for gaming interfaces",effects:["neon","glitch","glow","shake"],defaultOptions:{neon:{color:"#00ff00"},glow:{color:"#ff00ff",spread:30}}},minimal:{name:"Minimal",description:"Subtle, professional effects",effects:["lift","fade","scale"],defaultOptions:{lift:{distance:4},scale:{factor:1.02}}},playful:{name:"Playful",description:"Fun and bouncy effects for engaging UIs",effects:["bounce","jelly","elastic","confetti"],defaultOptions:{bounce:{height:12},jelly:{intensity:.8}}},corporate:{name:"Corporate",description:"Professional and clean effects",effects:["lift","glass","fade"],defaultOptions:{lift:{distance:2,shadow:true},glass:{blur:10}}},retro:{name:"Retro",description:"Nostalgic 80s/90s style effects",effects:["glitch","neon","shimmer"],defaultOptions:{neon:{color:"#ff0080"},glitch:{intensity:.5}}},futuristic:{name:"Futuristic",description:"Sci-fi inspired holographic effects",effects:["hologram","aurora","glass","glow"],defaultOptions:{hologram:{opacity:.8},aurora:{colors:["#00ffa3","#00d4ff","#a855f7"]}}},elegant:{name:"Elegant",description:"Sophisticated and luxurious effects",effects:["shimmer","glow","lift","glass"],defaultOptions:{shimmer:{color:"rgba(255, 215, 0, 0.3)"},glow:{color:"#ffd700",spread:20}}},dark:{name:"Dark Mode",description:"Effects optimized for dark themes",effects:["glow","neon","glass","aurora"],defaultOptions:{glow:{color:"#00ffa3"},glass:{blur:20,opacity:.1}}}};function ot(t){let e=qe[t];return e?e.effects.map(r=>`spark-${r}`).join(" "):""}function at(){return Object.keys(qe)}var st={gaming:{name:"Gaming",classes:"spark-neon spark-glitch spark-glow"},minimal:{name:"Minimal",classes:"spark-lift spark-fade spark-scale"},playful:{name:"Playful",classes:"spark-bounce spark-jelly spark-elastic"},corporate:{name:"Corporate",classes:"spark-lift spark-glass spark-fade"},retro:{name:"Retro",classes:"spark-glitch spark-neon spark-shimmer"},futuristic:{name:"Futuristic",classes:"spark-hologram spark-aurora spark-glass spark-glow"},elegant:{name:"Elegant",classes:"spark-shimmer spark-glow spark-lift spark-glass"},dark:{name:"Dark",classes:"spark-glow spark-neon spark-glass spark-aurora"}};function y(){return typeof window<"u"&&typeof document<"u"}function ze(t,e=document){if(!y())return [];try{return Array.from(e.querySelectorAll(t))}catch{return []}}var it=0;function M(t="spark"){return `${t}-${Date.now().toString(36)}-${(it++).toString(36)}`}y()?window.requestAnimationFrame.bind(window):t=>setTimeout(t,16);y()?window.cancelAnimationFrame.bind(window):t=>clearTimeout(t);function Ve(t,e,r){return Math.min(Math.max(t,e),r)}function Y(t,e,r,n,o){return (t-e)*(o-n)/(r-e)+n}function G(t,e){return Math.random()*(e-t)+t}function W(t,e){return Math.floor(G(t,e+1))}var K={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>t*(2-t),easeInOutQuad:t=>t<.5?2*t*t:-1+(4-2*t)*t,easeInCubic:t=>t*t*t,easeOutCubic:t=>--t*t*t+1,easeInOutCubic:t=>t<.5?4*t*t*t:(t-1)*(2*t-2)*(2*t-2)+1,easeInQuart:t=>t*t*t*t,easeOutQuart:t=>1- --t*t*t*t,easeInOutQuart:t=>t<.5?8*t*t*t*t:1-8*--t*t*t*t,easeInElastic:t=>{let e=2*Math.PI/3;return t===0?0:t===1?1:-Math.pow(2,10*t-10)*Math.sin((t*10-10.75)*e)},easeOutElastic:t=>{let e=2*Math.PI/3;return t===0?0:t===1?1:Math.pow(2,-10*t)*Math.sin((t*10-.75)*e)+1},easeOutBounce:t=>t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375};function U(t,e){let r,n,o;return (...a)=>{r?(clearTimeout(n),n=setTimeout(()=>{Date.now()-o>=e&&(t(...a),o=Date.now());},e-(Date.now()-o))):(t(...a),o=Date.now(),r=true);}}var H=null;function Q(){return y()?H||(H={prefersReducedMotion:window.matchMedia("(prefers-reduced-motion: reduce)").matches,prefersHighContrast:window.matchMedia("(prefers-contrast: more)").matches,screenReaderActive:ct()},H):{prefersReducedMotion:false,prefersHighContrast:false,screenReaderActive:false}}function ct(){return y()?[document.querySelector("[data-nvda]"),window.hasOwnProperty("JAWS"),document.querySelector(".voiceover-detected"),document.documentElement.classList.contains("js-focus-visible")].some(Boolean):false}function lt(){H=null;}var z=new Set;function wn(t){return y()?(z.add(t),z.size===1&&pt(),()=>{z.delete(t);}):()=>{}}function pt(){if(!y())return;let t=window.matchMedia("(prefers-reduced-motion: reduce)"),e=window.matchMedia("(prefers-contrast: more)"),r=()=>{lt();let n=Q();z.forEach(o=>o(n));};t.addEventListener("change",r),e.addEventListener("change",r);}function w(){return T.get().respectMotionPreference?Q().prefersReducedMotion:false}function ut(t="fade"){switch(t){case "none":return "animation: none !important; transition: none !important;";case "fade":return "animation: none !important; transition: opacity 200ms ease !important;";case "simple":return "animation-duration: 0.01ms !important; animation-iteration-count: 1 !important;";default:return ""}}function ft(t,e="fade"){if(!w())return;let r=ut(e);t.style.cssText+=r,t.setAttribute("data-spark-reduced-motion","true");}var A=null;function mt(){if(!y())throw new Error("Cannot create announcer in non-browser environment");return A&&document.body.contains(A)||(A=document.createElement("div"),A.setAttribute("aria-live","polite"),A.setAttribute("aria-atomic","true"),A.setAttribute("role","status"),A.className="spark-a11y-announcer",Object.assign(A.style,{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",border:"0"}),document.body.appendChild(A)),A}function dt(t,e="polite"){if(!y()||!T.get().a11y)return;let n=mt();n.setAttribute("aria-live",e),n.textContent="",setTimeout(()=>{n.textContent=t;},100);}function gt(t){return {bounce:"Element bounced",glow:"Element is glowing",pulse:"Element is pulsing",shake:"Element shook",confetti:"Celebration animation played",sparkle:"Sparkle effect activated",firework:"Firework animation played",typewriter:"Text typing animation",reveal:"Content revealed"}[t]||`${t} effect activated`}function kt(t){t.hasAttribute("tabindex")||t.setAttribute("tabindex","0");}function On(t,e){let r=n=>{(n.key==="Enter"||n.key===" ")&&(n.preventDefault(),e(n));};return t.addEventListener("keydown",r),()=>{t.removeEventListener("keydown",r);}}function En(t){let e=null,r=["button","[href]","input","select","textarea",'[tabindex]:not([tabindex="-1"])'].join(", "),n=o=>{if(o.key!=="Tab")return;let a=t.querySelectorAll(r),s=a[0],i=a[a.length-1];o.shiftKey&&document.activeElement===s?(o.preventDefault(),i?.focus()):!o.shiftKey&&document.activeElement===i&&(o.preventDefault(),s?.focus());};return {activate(){e=document.activeElement,t.addEventListener("keydown",n),t.querySelector(r)?.focus();},deactivate(){t.removeEventListener("keydown",n),e?.focus();}}}function ht(t,e){e.role&&t.setAttribute("role",e.role),e.label&&t.setAttribute("aria-label",e.label),e.focusable&&kt(t),t.setAttribute("data-spark-a11y","true");}function $n(t,e,r,n={}){let o=T.get();w()&&ft(e,n.reducedMotionAlternative),o.a11y&&ht(e,n);let a=t();if(n.announce&&o.a11y){let s=n.announceMessage||gt(r);dt(s);}return a}function yt(){return Q().prefersHighContrast}function Mn(t,e){return yt()?{primary:"CanvasText",secondary:"LinkText",background:"Canvas",border:"CanvasText"}[t]||e:t}function xt(t){if(t.length===0)return {className:""};let e=t.map(d=>d.className).filter(Boolean).join(" "),r={};t.forEach(d=>{d.style&&Object.assign(r,d.style);});let n=d=>{t.forEach(b=>{b.onMouseEnter&&b.onMouseEnter(d);});},o=d=>{t.forEach(b=>{b.onMouseLeave&&b.onMouseLeave(d);});},a=d=>{t.forEach(b=>{b.onMouseMove&&b.onMouseMove(d);});},s=d=>{t.forEach(b=>{b.onClick&&b.onClick(d);});},i=()=>{t.forEach(d=>{d.cleanup&&d.cleanup();});},c=t.some(d=>d.onMouseEnter),p=t.some(d=>d.onMouseLeave),m=t.some(d=>d.onMouseMove),k=t.some(d=>d.onClick),h=t.some(d=>d.cleanup);return {className:e,style:Object.keys(r).length>0?r:void 0,onMouseEnter:c?n:void 0,onMouseLeave:p?o:void 0,onMouseMove:m?a:void 0,onClick:k?s:void 0,cleanup:h?i:void 0}}function bt(t,e,r={}){let n={loop:false,loopCount:1,loopDelay:0,...r},o=0,a=false,s=0,i=null,c=[],p=()=>{t&&c.length>0&&(c.forEach(x=>{x.split(" ").forEach(S=>S&&t.classList.remove(S));}),c=[]);},m=x=>{!t||!y()||(x.effect.className&&(x.effect.className.split(" ").forEach(S=>{S&&t.classList.add(S);}),c.push(x.effect.className)),x.effect.style&&Object.entries(x.effect.style).forEach(([S,O])=>{t.style.setProperty(S,String(O));}),x.onStart&&x.onStart());},k=x=>{if(!a||x>=e.length){n.loop&&(n.loopCount===-1||s<n.loopCount-1)?(s++,i=setTimeout(()=>{o=0,p(),k(0);},n.loopDelay)):(a=false,r.onComplete&&r.onComplete());return}let S=e[x];o=x,i=setTimeout(()=>{m(S),i=setTimeout(()=>{S.onEnd&&S.onEnd(),p(),k(x+1);},S.duration||300);},S.delay||0);},h=()=>{a||(a=true,k(o));},d=()=>{a=false,i&&(clearTimeout(i),i=null);};return {play:h,pause:d,stop:()=>{d(),o=0,s=0,p();},getCurrentStep:()=>o,isPlaying:()=>a}}function St(t,e,r={}){let n={delay:100,startDelay:0,direction:"normal",easing:"linear",...r},o=[],a=[],s=false,i=()=>y()?(Array.isArray(t)?o=t:o=ze(t),n.direction==="reverse"?o=[...o].reverse():n.direction==="random"&&(o=[...o].sort(()=>Math.random()-.5)),o):[],c=(h,d)=>{let b=n.startDelay+h*n.delay;switch(n.easing){case "ease-in":return n.startDelay+Math.pow(h/d,2)*n.delay*d;case "ease-out":return n.startDelay+(1-Math.pow(1-h/d,2))*n.delay*d;default:return b}},p=h=>{e.className&&e.className.split(" ").forEach(d=>{d&&h.classList.add(d);}),e.style&&Object.entries(e.style).forEach(([d,b])=>{h.style.setProperty(d,String(b));}),e.onMouseEnter&&h.addEventListener("mouseenter",e.onMouseEnter),e.onMouseLeave&&h.addEventListener("mouseleave",e.onMouseLeave),e.onMouseMove&&h.addEventListener("mousemove",e.onMouseMove),e.onClick&&h.addEventListener("click",e.onClick);};return {play:()=>{if(s)return;s=true;let h=i();if(h.length===0)return;n.onStart&&n.onStart();let d=0;h.forEach((b,$)=>{let C=c($,h.length),x=setTimeout(()=>{p(b),n.onElementStart&&n.onElementStart(b,$),d++,d===h.length&&n.onComplete&&n.onComplete();},C);a.push(x);});},cancel:()=>{a.forEach(h=>clearTimeout(h)),a=[],s=false;},getElements:()=>o}}var N=f;var vt=V,wt={duration:300,intensity:1,trigger:"hover",easing:"ease-out",delay:0,reduceMotion:true};function l(t,e){return {...wt,...e,...t}}function u(t){return !(t.reduceMotion!==false&&vt())}function v(t){return N(),{className:t.className||"",style:t.style,onMouseEnter:t.onMouseEnter,onMouseLeave:t.onMouseLeave,onMouseMove:t.onMouseMove,onClick:t.onClick,onFocus:t.onFocus,onBlur:t.onBlur,destroy:t.destroy,cleanup:t.cleanup}}function R(t,e){return t*e}var Ot=0;function De(){return `sparkfx-${++Ot}-${Date.now()}`}function Et(t,e,r){return Math.min(Math.max(t,e),r)}function Xe(t,e="#ffffff"){if(!t||typeof t!="string")return e;let r=t.replace(/[^a-zA-Z0-9#(),.\s%]/g,"");return /^#[0-9A-Fa-f]{3,8}$/.test(r)||/^rgba?\([^)]+\)$/.test(r)||["red","blue","green","yellow","white","black","orange","purple","pink","cyan","magenta","currentColor","transparent"].includes(r.toLowerCase())?r:e}function Ye(t,e,r,n){return t===void 0||typeof t!="number"||isNaN(t)?n:Et(t,e,r)}function P(t,e){return Math.random()*(e-t)+t}function Ge(t){return t[Math.floor(Math.random()*t.length)]}var Mt={duration:400,bounces:1,trigger:"hover",intensity:1};function _(t){let e=l(t,Mt);if(f(),!u(e))return {className:"sparkfx-effect sparkfx-reduced-motion"};let r=R(20,e.intensity),n=`sparkfx-bounce-${e.bounces}-${Math.round(r)}`,o="0%, 100% { transform: translateY(0); }",a=100/(e.bounces*2);for(let i=0;i<e.bounces;i++){let c=a*(i*2+1),p=r*Math.pow(.6,i);o+=` ${c}% { transform: translateY(-${p}px); }`;}E(n,o);let s=g({duration:e.duration,easing:e.easing});return {className:$t__default.default("sparkfx-effect","sparkfx-bounce"),style:{...s,"--sparkfx-animation-name":n},onMouseEnter:(void 0)}}var Rt={duration:1e3,count:-1,scale:1.05,trigger:"always",intensity:1};function J(t){let e=l(t,Rt);f();let r=1+(e.scale-1)*e.intensity,n=`sparkfx-pulse-${r.toString().replace(".","_")}`;if(E(n,`
|
|
204
204
|
0%, 100% { transform: scale(1); opacity: 1; }
|
|
205
205
|
50% { transform: scale(${r}); opacity: 0.8; }
|
|
206
206
|
`),!u(e))return {className:"sparkfx-effect sparkfx-reduced-motion"};let o=g({duration:e.duration,easing:e.easing}),a=e.count===-1?"infinite":e.count;return {className:$t__default.default("sparkfx-effect","sparkfx-pulse"),style:{...o,animation:`${n} ${e.duration}ms ${e.easing} ${a}`}}}var At={duration:200,distance:8,shadow:true,trigger:"hover",intensity:1};function Z(t){let e=l(t,At);if(f(),!u(e))return {className:"sparkfx-effect sparkfx-reduced-motion"};let r=R(e.distance,e.intensity),n=g({duration:e.duration,easing:e.easing}),o=e.shadow?`0 ${r*2}px ${r*3}px rgba(0, 0, 0, 0.15)`:"none";return {className:$t__default.default("sparkfx-effect","sparkfx-lift"),style:{...n,"--sparkfx-lift-distance":`-${r}px`,"--sparkfx-lift-shadow":o,transition:"transform var(--sparkfx-duration) var(--sparkfx-easing), box-shadow var(--sparkfx-duration) var(--sparkfx-easing)"},onMouseEnter:a=>{let s=a.currentTarget;e.trigger==="hover"&&(s.style.transform=`translateY(-${r}px)`,e.shadow&&(s.style.boxShadow=o));},onMouseLeave:a=>{let s=a.currentTarget;e.trigger==="hover"&&(s.style.transform="translateY(0)",s.style.boxShadow="none");}}}var Lt={duration:200,scale:1.1,trigger:"hover",intensity:1};function ee(t){let e=l(t,Lt);if(f(),!u(e))return {className:"sparkfx-effect sparkfx-reduced-motion"};let r=1+(e.scale-1)*e.intensity,n=g({duration:e.duration,easing:e.easing});return {className:$t__default.default("sparkfx-effect","sparkfx-scale"),style:{...n,transition:"transform var(--sparkfx-duration) var(--sparkfx-easing)"},onMouseEnter:o=>{if(e.trigger==="hover"){let a=o.currentTarget;a.style.transform=`scale(${r})`;}},onMouseLeave:o=>{if(e.trigger==="hover"){let a=o.currentTarget;a.style.transform="scale(1)";}}}}var Ht={duration:500,distance:5,count:3,trigger:"click",intensity:1};function te(t){let e=l(t,Ht);f();let r=R(e.distance,e.intensity),n=`sparkfx-shake-${r}`;if(E(n,`
|
|
@@ -263,7 +263,7 @@ var Ie="sparkfx-styles",je=false,Fe=new Set,_e=`
|
|
|
263
263
|
50% { background-position: 100% 50%; }
|
|
264
264
|
100% { background-position: 0% 50%; }
|
|
265
265
|
}
|
|
266
|
-
`,document.head.appendChild(t);}function
|
|
266
|
+
`,document.head.appendChild(t);}function ye(t){let e=l(t,dr);if(f(),gr(),!u(e))return {className:"sparkfx-effect sparkfx-reduced-motion"};let r=`linear-gradient(${e.angle}deg, ${e.colors.join(", ")})`;return {className:$t__default.default("sparkfx-effect","sparkfx-gradient"),style:{...g(e),background:r,"--gradient-speed":`${e.speed}s`,WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent",backgroundClip:"text"}}}function xe(t){let e=l(t,{trigger:"hover"});return f(),u(e)?{className:$t__default.default("sparkfx-effect","sparkfx-spotlight"),onMouseMove:r=>{let n=r.currentTarget,o=n.getBoundingClientRect(),a=r.clientX-o.left,s=r.clientY-o.top;n.style.setProperty("--sparkfx-spotlight-x",`${a}px`),n.style.setProperty("--sparkfx-spotlight-y",`${s}px`);}}:{className:"sparkfx-effect"}}var yr={trigger:"hover",duration:300,intensity:1,scanlineOpacity:.1};function xr(){if(document.getElementById("sparkfx-hologram-styles"))return;let t=document.createElement("style");t.id="sparkfx-hologram-styles",t.textContent=`
|
|
267
267
|
@keyframes sparkfx-hologram-flicker {
|
|
268
268
|
0%, 100% { opacity: 1; }
|
|
269
269
|
50% { opacity: 0.95; }
|
|
@@ -319,7 +319,7 @@ var Ie="sparkfx-styles",je=false,Fe=new Set,_e=`
|
|
|
319
319
|
z-index: 11;
|
|
320
320
|
animation: sparkfx-hologram-scanline 2s linear infinite;
|
|
321
321
|
}
|
|
322
|
-
`,document.head.appendChild(t);}function be(t){let e=l(t,
|
|
322
|
+
`,document.head.appendChild(t);}function be(t){let e=l(t,yr);if(f(),xr(),!u(e))return {className:"sparkfx-effect sparkfx-reduced-motion"};let r=null,n=a=>{let s=a.currentTarget;s.classList.add("sparkfx-hologram-active"),r||(r=document.createElement("span"),r.className="sparkfx-hologram-scanline",s.appendChild(r));},o=a=>{a.currentTarget.classList.remove("sparkfx-hologram-active"),r&&(r.remove(),r=null);};return {className:$t__default.default("sparkfx-effect","sparkfx-hologram"),style:g(e),onMouseEnter:e.trigger==="hover"?n:void 0,onMouseLeave:e.trigger==="hover"?o:void 0}}var br={colors:["#00ffa3","#00d4ff","#a855f7"],duration:8e3,type:"background",blur:40,opacity:.6,movement:"wave"};function Se(t){let e=l(t,br);if(!u(e)||w())return v({className:"spark-aurora-static"});let r=M("aurora"),n=Sr(e);E(r,n);let o=vr(r,e);return v({className:o})}function Sr(t){let{movement:e}=t;switch(e){case "wave":return `
|
|
323
323
|
0% { background-position: 0% 50%; }
|
|
324
324
|
25% { background-position: 50% 100%; }
|
|
325
325
|
50% { background-position: 100% 50%; }
|
|
@@ -334,7 +334,7 @@ var Ie="sparkfx-styles",je=false,Fe=new Set,_e=`
|
|
|
334
334
|
33% { background-position: 100% 50%; filter: hue-rotate(60deg); }
|
|
335
335
|
66% { background-position: 50% 100%; filter: hue-rotate(-60deg); }
|
|
336
336
|
100% { background-position: 0% 0%; filter: hue-rotate(0deg); }
|
|
337
|
-
`;default:return ""}}function vr(t,e){if(!
|
|
337
|
+
`;default:return ""}}function vr(t,e){if(!y())return `spark-aurora-${t}`;let r=`spark-aurora-${t}`,n=`spark-aurora-style-${t}`;if(document.getElementById(n))return r;let o=`linear-gradient(135deg, ${e.colors.join(", ")})`,a="";switch(e.type){case "background":a=`
|
|
338
338
|
background: ${o};
|
|
339
339
|
background-size: 400% 400%;
|
|
340
340
|
`;break;case "border":a=`
|
|
@@ -382,7 +382,7 @@ ${e.type==="background"?`
|
|
|
382
382
|
animation: none !important;
|
|
383
383
|
}
|
|
384
384
|
}
|
|
385
|
-
`,document.head.appendChild(s),r}var wr={color:"#00ff00",columns:"auto",speed:5,charset:"katakana",opacity:.8,fontSize:14,glow:true,autoStart:true},We={katakana:"\u30A2\u30A4\u30A6\u30A8\u30AA\u30AB\u30AD\u30AF\u30B1\u30B3\u30B5\u30B7\u30B9\u30BB\u30BD\u30BF\u30C1\u30C4\u30C6\u30C8\u30CA\u30CB\u30CC\u30CD\u30CE\u30CF\u30D2\u30D5\u30D8\u30DB\u30DE\u30DF\u30E0\u30E1\u30E2\u30E4\u30E6\u30E8\u30E9\u30EA\u30EB\u30EC\u30ED\u30EF\u30F2\u30F3",binary:"01",hex:"0123456789ABCDEF"};function ve(t){let e=l(t,wr);if(!u(e)||w())return v({className:"spark-matrix-static"});let n=`spark-matrix-${M("matrix")}`;Or(n);let o=null,a=null,s=null,i=[],c=false,p=()=>e.charset==="custom"&&e.customChars?e.customChars:We[e.charset]||We.katakana,m=
|
|
385
|
+
`,document.head.appendChild(s),r}var wr={color:"#00ff00",columns:"auto",speed:5,charset:"katakana",opacity:.8,fontSize:14,glow:true,autoStart:true},We={katakana:"\u30A2\u30A4\u30A6\u30A8\u30AA\u30AB\u30AD\u30AF\u30B1\u30B3\u30B5\u30B7\u30B9\u30BB\u30BD\u30BF\u30C1\u30C4\u30C6\u30C8\u30CA\u30CB\u30CC\u30CD\u30CE\u30CF\u30D2\u30D5\u30D8\u30DB\u30DE\u30DF\u30E0\u30E1\u30E2\u30E4\u30E6\u30E8\u30E9\u30EA\u30EB\u30EC\u30ED\u30EF\u30F2\u30F3",binary:"01",hex:"0123456789ABCDEF"};function ve(t){let e=l(t,wr);if(!u(e)||w())return v({className:"spark-matrix-static"});let n=`spark-matrix-${M("matrix")}`;Or(n);let o=null,a=null,s=null,i=[],c=false,p=()=>e.charset==="custom"&&e.customChars?e.customChars:We[e.charset]||We.katakana,m=x=>{c||(o=document.createElement("canvas"),o.className=`${n}-canvas`,o.style.cssText=`
|
|
386
386
|
position: absolute;
|
|
387
387
|
top: 0;
|
|
388
388
|
left: 0;
|
|
@@ -390,7 +390,7 @@ ${e.type==="background"?`
|
|
|
390
390
|
height: 100%;
|
|
391
391
|
pointer-events: none;
|
|
392
392
|
z-index: 0;
|
|
393
|
-
`,
|
|
393
|
+
`,x.style.position="relative",x.insertBefore(o,x.firstChild),a=o.getContext("2d"),k(x),c=true,e.autoStart&&d());},k=x=>{if(!o||!a)return;let S=x.getBoundingClientRect();o.width=S.width,o.height=S.height;let O=e.columns==="auto"?Math.floor(o.width/e.fontSize):e.columns;i=Array(O).fill(1).map(()=>W(0,o.height/e.fontSize));},h=()=>{if(!o||!a)return;let x=p();a.fillStyle="rgba(0, 0, 0, 0.05)",a.fillRect(0,0,o.width,o.height),a.fillStyle=e.color,a.font=`${e.fontSize}px monospace`,e.glow&&(a.shadowBlur=8,a.shadowColor=e.color),i.forEach((S,O)=>{let B=x[W(0,x.length-1)],L=O*e.fontSize;a.globalAlpha=G(.5,e.opacity),a.fillText(B,L,S*e.fontSize),S*e.fontSize>o.height&&Math.random()>.975&&(i[O]=0),i[O]++;}),a.globalAlpha=1;},d=()=>{let x=11-e.speed,S=0,O=B=>{B-S>x*10&&(h(),S=B),s=requestAnimationFrame(O);};s=requestAnimationFrame(O);},b=()=>{s&&(cancelAnimationFrame(s),s=null);};return v({className:n,onMouseEnter:x=>{let S=x.currentTarget;m(S);},cleanup:()=>{b(),o&&o.parentNode&&o.parentNode.removeChild(o),o=null,a=null,c=false;}})}function Or(t,e){if(!y())return;let r=`spark-matrix-style-${t}`;if(document.getElementById(r))return;let n=document.createElement("style");n.id=r,n.textContent=`
|
|
394
394
|
.${t} {
|
|
395
395
|
position: relative;
|
|
396
396
|
overflow: hidden;
|
|
@@ -414,7 +414,7 @@ ${e.type==="background"?`
|
|
|
414
414
|
`;}),s+=`100% { ${Ke(o,a[0])} }`,s}return `
|
|
415
415
|
0% { filter: hue-rotate(0deg); }
|
|
416
416
|
100% { filter: hue-rotate(360deg); }
|
|
417
|
-
`}function Ke(t,e){switch(t){case "background":return `background-color: ${e};`;case "border":return `border-color: ${e};`;case "text":return `color: ${e};`;case "shadow":return `box-shadow: 0 0 20px ${e}, 0 0 40px ${e};`;default:return ""}}function Mr(t,e){if(!
|
|
417
|
+
`}function Ke(t,e){switch(t){case "background":return `background-color: ${e};`;case "border":return `border-color: ${e};`;case "text":return `color: ${e};`;case "shadow":return `box-shadow: 0 0 20px ${e}, 0 0 40px ${e};`;default:return ""}}function Mr(t,e){if(!y())return `spark-rainbow-${t}`;let r=`spark-rainbow-${t}`,n=`spark-rainbow-style-${t}`;if(document.getElementById(n))return r;let{type:o,angle:a,saturation:s,lightness:i,style:c}=e,p=`linear-gradient(
|
|
418
418
|
${a}deg,
|
|
419
419
|
hsl(0, ${s}%, ${i}%),
|
|
420
420
|
hsl(60, ${s}%, ${i}%),
|
|
@@ -459,7 +459,7 @@ ${e.pauseOnHover?`
|
|
|
459
459
|
filter: none !important;
|
|
460
460
|
}
|
|
461
461
|
}
|
|
462
|
-
`,document.head.appendChild(k),r}var Cr={depth:.5,direction:"vertical",trigger:"scroll",reverse:false,smoothness:10,maxOffset:100,use3D:true};function Oe(t){let e=l(t,Cr),r=T.get();if(!u(e)||w())return v({className:"spark-parallax-static"});let n=new WeakMap,o=`spark-parallax-${Date.now().toString(36)}`;Rr(o);let a=U(()=>{if(!
|
|
462
|
+
`,document.head.appendChild(k),r}var Cr={depth:.5,direction:"vertical",trigger:"scroll",reverse:false,smoothness:10,maxOffset:100,use3D:true};function Oe(t){let e=l(t,Cr),r=T.get();if(!u(e)||w())return v({className:"spark-parallax-static"});let n=new WeakMap,o=`spark-parallax-${Date.now().toString(36)}`;Rr(o);let a=U(()=>{if(!y())return;let p=document.querySelectorAll(`.${o}`),k=window.innerHeight;p.forEach(h=>{let d=h,b=d.getBoundingClientRect(),$=b.top+b.height/2,C=k/2,x=($-C)/k,S=Ve(x,-1,1),O=e.reverse?-1:1,B=S*e.maxOffset*e.depth*O,L=n.get(d);L||(L={currentX:0,currentY:0,targetX:0,targetY:0,animationFrame:null},n.set(d,L)),(e.direction==="vertical"||e.direction==="both")&&(L.targetY=B),(e.direction==="horizontal"||e.direction==="both")&&(L.targetX=B*.5),i(d,L,e);});},16),s=U(p=>{if(!y())return;let m=document.querySelectorAll(`.${o}`),{clientX:k,clientY:h}=p,d=window.innerWidth,b=window.innerHeight,$=Y(k,0,d,-1,1),C=Y(h,0,b,-1,1);m.forEach(x=>{let S=x,O=n.get(S);O||(O={currentX:0,currentY:0,targetX:0,targetY:0,animationFrame:null},n.set(S,O));let B=e.reverse?-1:1,L=$*e.maxOffset*e.depth*B,Qe=C*e.maxOffset*e.depth*B;(e.direction==="horizontal"||e.direction==="both")&&(O.targetX=L),(e.direction==="vertical"||e.direction==="both")&&(O.targetY=Qe),i(S,O,e);});},16);function i(p,m,k){m.animationFrame&&cancelAnimationFrame(m.animationFrame);let h=()=>{let d=1/k.smoothness;m.currentX+=(m.targetX-m.currentX)*d,m.currentY+=(m.targetY-m.currentY)*d;let b=Math.round(m.currentX*100)/100,$=Math.round(m.currentY*100)/100;k.use3D?p.style.transform=`translate3d(${b}px, ${$}px, 0)`:p.style.transform=`translate(${b}px, ${$}px)`;let C=.01;(Math.abs(m.targetX-m.currentX)>C||Math.abs(m.targetY-m.currentY)>C)&&(m.animationFrame=requestAnimationFrame(h));};m.animationFrame=requestAnimationFrame(h);}y()&&(e.trigger==="scroll"?(window.addEventListener("scroll",a,{passive:true}),requestAnimationFrame(()=>a())):e.trigger==="mouse"&&window.addEventListener("mousemove",s,{passive:true}));let c=()=>{y()&&(window.removeEventListener("scroll",a),window.removeEventListener("mousemove",s)),document.querySelectorAll(`.${o}`).forEach(m=>{let k=n.get(m);k?.animationFrame&&cancelAnimationFrame(k.animationFrame);});};return v({className:o,style:{willChange:r.gpuAcceleration?"transform":"auto"},cleanup:c})}function Rr(t,e){if(!y())return;let r=`spark-parallax-${t}`;if(document.getElementById(r))return;let n=document.createElement("style");n.id=r,n.textContent=`
|
|
463
463
|
.${t} {
|
|
464
464
|
will-change: transform;
|
|
465
465
|
backface-visibility: hidden;
|
|
@@ -487,7 +487,7 @@ ${e.pauseOnHover?`
|
|
|
487
487
|
100% {
|
|
488
488
|
transform: ${p};
|
|
489
489
|
}
|
|
490
|
-
`}function Br(t,e){if(!
|
|
490
|
+
`}function Br(t,e){if(!y())return `spark-float-${t}`;let r=`spark-float-${t}`,n=`spark-float-style-${t}`;if(document.getElementById(n))return r;let o=document.createElement("style");return o.id=n,o.textContent=`
|
|
491
491
|
.${r} {
|
|
492
492
|
animation: ${t} ${e.duration}ms ${e.easing} infinite;
|
|
493
493
|
will-change: transform;
|
|
@@ -504,7 +504,7 @@ ${e.pauseOnHover?`
|
|
|
504
504
|
animation: none !important;
|
|
505
505
|
}
|
|
506
506
|
}
|
|
507
|
-
`,document.head.appendChild(o),r}var Lr={direction:"horizontal",duration:600,perspective:1e3,easing:"ease-in-out",trigger:"hover",angle:180,shadow:true,midScale:1.05};function $e(t){let e=l(t,Lr);if(!u(e)||w())return v({className:"spark-flip3d-static"});let n=`spark-flip3d-${M("flip3d")}`;Pr(n,e);let o=false,a=s=>{if(e.trigger!=="click")return;let i=s.currentTarget;o=!o,o?i.classList.add(`${n}-flipped`):i.classList.remove(`${n}-flipped`);};return v({className:n,onClick:e.trigger==="click"?a:void 0,style:{perspective:`${e.perspective}px`,transformStyle:"preserve-3d"}})}function Pr(t,e){if(!
|
|
507
|
+
`,document.head.appendChild(o),r}var Lr={direction:"horizontal",duration:600,perspective:1e3,easing:"ease-in-out",trigger:"hover",angle:180,shadow:true,midScale:1.05};function $e(t){let e=l(t,Lr);if(!u(e)||w())return v({className:"spark-flip3d-static"});let n=`spark-flip3d-${M("flip3d")}`;Pr(n,e);let o=false,a=s=>{if(e.trigger!=="click")return;let i=s.currentTarget;o=!o,o?i.classList.add(`${n}-flipped`):i.classList.remove(`${n}-flipped`);};return v({className:n,onClick:e.trigger==="click"?a:void 0,style:{perspective:`${e.perspective}px`,transformStyle:"preserve-3d"}})}function Pr(t,e){if(!y())return;let r=`spark-flip3d-style-${t}`;if(document.getElementById(r))return;let n=e.direction==="horizontal"?"Y":"X",o=e.shadow?"box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);":"",a=document.createElement("style");a.id=r,a.textContent=`
|
|
508
508
|
.${t} {
|
|
509
509
|
perspective: ${e.perspective}px;
|
|
510
510
|
transform-style: preserve-3d;
|
|
@@ -575,7 +575,7 @@ ${e.pauseOnHover?`
|
|
|
575
575
|
50% { transform: rotate(0deg); }
|
|
576
576
|
75% { transform: rotate(-${e}deg); }
|
|
577
577
|
100% { transform: rotate(0deg); }
|
|
578
|
-
`}function jr(t,e){if(!
|
|
578
|
+
`}function jr(t,e){if(!y())return `spark-swing-${t}`;let r=`spark-swing-${t}`,n=`spark-swing-style-${t}`;if(document.getElementById(n))return r;let o=e.count===-1?"infinite":e.count.toString(),a=e.trigger==="hover"?"paused":"running",s=document.createElement("style");return s.id=n,s.textContent=`
|
|
579
579
|
.${r} {
|
|
580
580
|
animation: ${t} ${e.duration}ms ${e.easing} ${o};
|
|
581
581
|
animation-play-state: ${a};
|
|
@@ -594,11 +594,11 @@ ${e.trigger==="hover"?`
|
|
|
594
594
|
animation: none !important;
|
|
595
595
|
}
|
|
596
596
|
}
|
|
597
|
-
`,document.head.appendChild(s),r}var Fr={radius:50,duration:4e3,direction:"clockwise",easing:"linear",startAngle:0,ellipse:1,tilt:false,tiltAngle:20,scaleVariation:false};function Ce(t){let e=l(t,Fr);if(!u(e)||w())return v({className:"spark-orbit-static"});let r=M("orbit"),n=Ir(e);E(r,n);let o=qr(r,e);return v({className:o,style:{willChange:"transform"}})}function Ir(t){let{radius:e,direction:r,startAngle:n,ellipse:o,tilt:a,tiltAngle:s,scaleVariation:i}=t,c=e*o,p=r==="counterclockwise"?-1:1,m=8,k="";for(let h=0;h<=m;h++){let d=h/m*100,b=(n+h/m*360*p)*(Math.PI/180),$=Math.cos(b)*e,C=Math.sin(b)*c,
|
|
597
|
+
`,document.head.appendChild(s),r}var Fr={radius:50,duration:4e3,direction:"clockwise",easing:"linear",startAngle:0,ellipse:1,tilt:false,tiltAngle:20,scaleVariation:false};function Ce(t){let e=l(t,Fr);if(!u(e)||w())return v({className:"spark-orbit-static"});let r=M("orbit"),n=Ir(e);E(r,n);let o=qr(r,e);return v({className:o,style:{willChange:"transform"}})}function Ir(t){let{radius:e,direction:r,startAngle:n,ellipse:o,tilt:a,tiltAngle:s,scaleVariation:i}=t,c=e*o,p=r==="counterclockwise"?-1:1,m=8,k="";for(let h=0;h<=m;h++){let d=h/m*100,b=(n+h/m*360*p)*(Math.PI/180),$=Math.cos(b)*e,C=Math.sin(b)*c,x=`translate(${$.toFixed(2)}px, ${C.toFixed(2)}px)`;if(a){let S=Math.sin(b)*s;x+=` rotateX(${S.toFixed(2)}deg)`;}if(i){let S=1+Math.sin(b)*.1;x+=` scale(${S.toFixed(3)})`;}k+=`
|
|
598
598
|
${d}% {
|
|
599
|
-
transform: ${
|
|
599
|
+
transform: ${x};
|
|
600
600
|
}
|
|
601
|
-
`;}return k}function qr(t,e){if(!
|
|
601
|
+
`;}return k}function qr(t,e){if(!y())return `spark-orbit-${t}`;let r=`spark-orbit-${t}`,n=`spark-orbit-style-${t}`;if(document.getElementById(n))return r;let o=document.createElement("style");return o.id=n,o.textContent=`
|
|
602
602
|
.${r} {
|
|
603
603
|
animation: ${t} ${e.duration}ms ${e.easing} infinite;
|
|
604
604
|
will-change: transform;
|
|
@@ -610,7 +610,7 @@ ${e.trigger==="hover"?`
|
|
|
610
610
|
animation: none !important;
|
|
611
611
|
}
|
|
612
612
|
}
|
|
613
|
-
`,document.head.appendChild(o),r}var zr={animation:"fade-up",duration:600,delay:0,threshold:.2,easing:"cubic-bezier(0.4, 0, 0.2, 1)",distance:40,once:true,reset:false,rootMargin:"0px"},j=new WeakMap;function Re(t){let e=l(t,zr);if(!u(e)||w())return v({className:"spark-reveal-static"});let n=`spark-reveal-${M("reveal")}`;Vr(n,e);let o=s=>{if(!
|
|
613
|
+
`,document.head.appendChild(o),r}var zr={animation:"fade-up",duration:600,delay:0,threshold:.2,easing:"cubic-bezier(0.4, 0, 0.2, 1)",distance:40,once:true,reset:false,rootMargin:"0px"},j=new WeakMap;function Re(t){let e=l(t,zr);if(!u(e)||w())return v({className:"spark-reveal-static"});let n=`spark-reveal-${M("reveal")}`;Vr(n,e);let o=s=>{if(!y()||j.has(s))return;s.classList.add(`${n}-hidden`);let i=new IntersectionObserver(c=>{c.forEach(p=>{let m=j.get(s);m&&(p.isIntersecting?setTimeout(()=>{s.classList.remove(`${n}-hidden`),s.classList.add(`${n}-visible`),m.revealed=true,e.once&&i.disconnect();},e.delay):!e.once&&m.revealed&&e.reset&&(s.classList.remove(`${n}-visible`),s.classList.add(`${n}-hidden`),m.revealed=false));});},{threshold:e.threshold,rootMargin:e.rootMargin});j.set(s,{observer:i,revealed:false}),i.observe(s);},a=s=>{if(s){let i=j.get(s);i&&(i.observer.disconnect(),j.delete(s));}};return y()&&requestAnimationFrame(()=>{document.querySelectorAll(`.${n}`).forEach(s=>{o(s);});}),v({className:n,cleanup:a})}function Vr(t,e){if(!y())return;let r=`spark-reveal-style-${t}`;if(document.getElementById(r))return;let{animation:n,duration:o,easing:a,distance:s}=e,i="",c="0";switch(n){case "fade":i="none";break;case "fade-up":i=`translateY(${s}px)`;break;case "fade-down":i=`translateY(-${s}px)`;break;case "fade-left":i=`translateX(${s}px)`;break;case "fade-right":i=`translateX(-${s}px)`;break;case "zoom":i="scale(0.8)";break;case "flip":i="perspective(1000px) rotateX(-90deg)";break}let p=document.createElement("style");p.id=r,p.textContent=`
|
|
614
614
|
.${t} {
|
|
615
615
|
will-change: transform, opacity;
|
|
616
616
|
}
|
|
@@ -640,7 +640,7 @@ ${e.trigger==="hover"?`
|
|
|
640
640
|
transform: none !important;
|
|
641
641
|
}
|
|
642
642
|
}
|
|
643
|
-
`,document.head.appendChild(p);}var Dr={from:0,to:100,duration:2e3,easing:"easeOutQuart",decimals:0,prefix:"",suffix:"",separator:",",threshold:.5,once:true},F=new WeakMap;function Te(t){let e=l(t,Dr),r=w(),n=c=>{let p=c.toFixed(e.decimals),[m,k]=p.split("."),h=m.replace(/\B(?=(\d{3})+(?!\d))/g,e.separator),d=k?`${h}.${k}`:h;return `${e.prefix}${d}${e.suffix}`},o=c=>{let p=F.get(c);if(!p||p.animated&&e.once)return;if(r||!u(e)){c.textContent=n(e.to),p&&(p.animated=true);return}let m=performance.now(),k=K[e.easing]||K.easeOutQuart,h=d=>{let b=d-m,$=Math.min(b/e.duration,1),C=k($),
|
|
643
|
+
`,document.head.appendChild(p);}var Dr={from:0,to:100,duration:2e3,easing:"easeOutQuart",decimals:0,prefix:"",suffix:"",separator:",",threshold:.5,once:true},F=new WeakMap;function Te(t){let e=l(t,Dr),r=w(),n=c=>{let p=c.toFixed(e.decimals),[m,k]=p.split("."),h=m.replace(/\B(?=(\d{3})+(?!\d))/g,e.separator),d=k?`${h}.${k}`:h;return `${e.prefix}${d}${e.suffix}`},o=c=>{let p=F.get(c);if(!p||p.animated&&e.once)return;if(r||!u(e)){c.textContent=n(e.to),p&&(p.animated=true);return}let m=performance.now(),k=K[e.easing]||K.easeOutQuart,h=d=>{let b=d-m,$=Math.min(b/e.duration,1),C=k($),x=e.from+(e.to-e.from)*C;c.textContent=n(x),$<1?p.animationFrame=requestAnimationFrame(h):(p.animated=true,p.animationFrame=null);};p.animationFrame=requestAnimationFrame(h);},a=c=>{if(!y()||F.has(c))return;c.textContent=n(e.from);let p=new IntersectionObserver(m=>{m.forEach(k=>{k.isIntersecting&&(o(c),e.once&&p.disconnect());});},{threshold:e.threshold});F.set(c,{observer:p,animated:false,animationFrame:null}),p.observe(c);},s=c=>{if(c){let p=F.get(c);p&&(p.observer.disconnect(),p.animationFrame&&cancelAnimationFrame(p.animationFrame),F.delete(c));}},i=`spark-counter-${Date.now().toString(36)}`;return y()&&requestAnimationFrame(()=>{document.querySelectorAll(`.${i}`).forEach(c=>{a(c);});}),v({className:i,cleanup:s})}var Yr={duration:2e3,count:30,colors:["#ff0055","#00d4ff","#00ffa3","#ffcc00","#ff00ff"],spread:60,trigger:"click",intensity:1};function I(t){let e=l(t,Yr);f();let r=n=>{let o=Math.floor(e.count*e.intensity);for(let a=0;a<o;a++){let s=document.createElement("div"),i=P(5,10),c=Ge(e.colors),p=De();s.className=`sparkfx-confetti-particle ${p}`,s.style.cssText=`
|
|
644
644
|
position: absolute;
|
|
645
645
|
width: ${i}px;
|
|
646
646
|
height: ${i}px;
|
|
@@ -768,11 +768,16 @@ ${e.trigger==="hover"?`
|
|
|
768
768
|
.sparkfx-highlight-active::after {
|
|
769
769
|
width: 100%;
|
|
770
770
|
}
|
|
771
|
-
`,document.head.appendChild(t);}function Ne(t){let e=l(t,fn);if(f(),mn(),!u(e))return {className:"sparkfx-effect sparkfx-reduced-motion"};let r=o=>{o.currentTarget.classList.add("sparkfx-highlight-active");},n=o=>{o.currentTarget.classList.remove("sparkfx-highlight-active");};return {className:$t__default.default("sparkfx-effect","sparkfx-highlight"),style:{...g(e),"--highlight-color":e.color,"--highlight-height":e.height},onMouseEnter:e.trigger==="hover"?r:void 0,onMouseLeave:e.trigger==="hover"?n:void 0}}var dn={bounce:_,pulse:J,lift:Z,scale:ee,shake:te,fade:re,slide:ne,rotate:oe,glow:ae,ripple:se,magnetic:ie,tilt:ce,elastic:le,jelly:pe,rubber:ue,morph:fe,glitch:me,blur:de,neon:ge,glass:ke,shimmer:he,gradient:
|
|
772
|
-
*
|
|
771
|
+
`,document.head.appendChild(t);}function Ne(t){let e=l(t,fn);if(f(),mn(),!u(e))return {className:"sparkfx-effect sparkfx-reduced-motion"};let r=o=>{o.currentTarget.classList.add("sparkfx-highlight-active");},n=o=>{o.currentTarget.classList.remove("sparkfx-highlight-active");};return {className:$t__default.default("sparkfx-effect","sparkfx-highlight"),style:{...g(e),"--highlight-color":e.color,"--highlight-height":e.height},onMouseEnter:e.trigger==="hover"?r:void 0,onMouseLeave:e.trigger==="hover"?n:void 0}}var dn={bounce:_,pulse:J,lift:Z,scale:ee,shake:te,fade:re,slide:ne,rotate:oe,glow:ae,ripple:se,magnetic:ie,tilt:ce,elastic:le,jelly:pe,rubber:ue,morph:fe,glitch:me,blur:de,neon:ge,glass:ke,shimmer:he,gradient:ye,spotlight:xe,hologram:be,aurora:Se,matrix:ve,rainbow:we,parallax:Oe,float:Ee,flip3d:$e,swing:Me,orbit:Ce,reveal:Re,counter:Te,confetti:I,sparkle:q,firework:Ae,celebrate:Be,typewriter:Le,scramble:Pe,wave:He,highlight:Ne},Gi=dn;/**
|
|
772
|
+
* SparkFX v1.2.2 - Micro-interactions for modern web applications
|
|
773
773
|
* All effects are free and open source
|
|
774
774
|
*
|
|
775
|
-
*
|
|
775
|
+
* Features:
|
|
776
|
+
* - 45+ Effects: Motion, scroll, visual, text animations
|
|
777
|
+
* - Event Bus: Animation communication system
|
|
778
|
+
* - Testing Kit: Jest/Vitest animation testing utilities
|
|
779
|
+
*
|
|
780
|
+
* @version 1.2.2
|
|
776
781
|
* @license MIT
|
|
777
|
-
*/exports.$=ve;exports.A=bt;exports.B=St;exports.C=_;exports.D=J;exports.E=Z;exports.F=ee;exports.G=te;exports.H=re;exports.I=ne;exports.J=oe;exports.K=ae;exports.L=se;exports.M=ie;exports.N=ce;exports.O=le;exports.P=pe;exports.Q=ue;exports.R=fe;exports.S=me;exports.T=de;exports.U=ge;exports.V=ke;exports.W=he;exports.X=
|
|
778
|
-
//# sourceMappingURL=chunk-
|
|
782
|
+
*/exports.$=ve;exports.A=bt;exports.B=St;exports.C=_;exports.D=J;exports.E=Z;exports.F=ee;exports.G=te;exports.H=re;exports.I=ne;exports.J=oe;exports.K=ae;exports.L=se;exports.M=ie;exports.N=ce;exports.O=le;exports.P=pe;exports.Q=ue;exports.R=fe;exports.S=me;exports.T=de;exports.U=ge;exports.V=ke;exports.W=he;exports.X=ye;exports.Y=xe;exports.Z=be;exports._=Se;exports.a=f;exports.aa=we;exports.b=V;exports.ba=Oe;exports.c=Ze;exports.ca=Ee;exports.d=et;exports.da=$e;exports.e=tt;exports.ea=Me;exports.f=rt;exports.fa=Ce;exports.g=nt;exports.ga=Re;exports.h=ot;exports.ha=Te;exports.i=at;exports.ia=I;exports.j=st;exports.ja=q;exports.k=Q;exports.ka=Ae;exports.l=lt;exports.la=Be;exports.m=wn;exports.ma=Le;exports.n=w;exports.na=Pe;exports.o=ut;exports.oa=He;exports.p=ft;exports.pa=Ne;exports.q=dt;exports.qa=dn;exports.r=gt;exports.ra=Gi;exports.s=kt;exports.t=On;exports.u=En;exports.v=ht;exports.w=$n;exports.x=yt;exports.y=Mn;exports.z=xt;//# sourceMappingURL=chunk-3AVUTKJ5.cjs.map
|
|
783
|
+
//# sourceMappingURL=chunk-3AVUTKJ5.cjs.map
|