partycles 1.1.0 → 1.1.3
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/dist/animations/animations/aurora.d.ts.map +1 -1
- package/dist/animations/animations/balloons.d.ts.map +1 -1
- package/dist/animations/animations/bubbles.d.ts.map +1 -1
- package/dist/animations/animations/coins.d.ts.map +1 -1
- package/dist/animations/animations/confetti.d.ts.map +1 -1
- package/dist/animations/animations/crystals.d.ts.map +1 -1
- package/dist/animations/animations/fireflies.d.ts.map +1 -1
- package/dist/animations/animations/fireworks.d.ts.map +1 -1
- package/dist/animations/animations/galaxy.d.ts.map +1 -1
- package/dist/animations/animations/glitch.d.ts.map +1 -1
- package/dist/animations/animations/index.d.ts.map +1 -1
- package/dist/animations/animations/leaves.d.ts.map +1 -1
- package/dist/animations/animations/magicdust.d.ts.map +1 -1
- package/dist/animations/animations/paint.d.ts.map +1 -1
- package/dist/animations/animations/petals.d.ts.map +1 -1
- package/dist/animations/animations/snow.d.ts.map +1 -1
- package/dist/animations/animations/sparkles.d.ts.map +1 -1
- package/dist/animations/animations/stars.d.ts.map +1 -1
- package/dist/animations/aurora.d.ts.map +1 -1
- package/dist/animations/balloons.d.ts.map +1 -1
- package/dist/animations/bubbles.d.ts.map +1 -1
- package/dist/animations/bubbles.esm.js +10 -3
- package/dist/animations/bubbles.esm.js.map +1 -1
- package/dist/animations/bubbles.js +10 -3
- package/dist/animations/bubbles.js.map +1 -1
- package/dist/animations/coins.d.ts.map +1 -1
- package/dist/animations/confetti.d.ts.map +1 -1
- package/dist/animations/confetti.esm.js +20 -3
- package/dist/animations/confetti.esm.js.map +1 -1
- package/dist/animations/confetti.js +20 -3
- package/dist/animations/confetti.js.map +1 -1
- package/dist/animations/crystals.d.ts.map +1 -1
- package/dist/animations/emoji.esm.js +3 -3
- package/dist/animations/emoji.esm.js.map +1 -1
- package/dist/animations/emoji.js +3 -3
- package/dist/animations/emoji.js.map +1 -1
- package/dist/animations/fireflies.d.ts.map +1 -1
- package/dist/animations/fireworks.d.ts.map +1 -1
- package/dist/animations/fireworks.esm.js +11 -3
- package/dist/animations/fireworks.esm.js.map +1 -1
- package/dist/animations/fireworks.js +11 -3
- package/dist/animations/fireworks.js.map +1 -1
- package/dist/animations/galaxy.d.ts.map +1 -1
- package/dist/animations/glitch.d.ts.map +1 -1
- package/dist/animations/hearts.esm.js +2 -2
- package/dist/animations/hearts.esm.js.map +1 -1
- package/dist/animations/hearts.js +2 -2
- package/dist/animations/hearts.js.map +1 -1
- package/dist/animations/leaves.d.ts.map +1 -1
- package/dist/animations/magicdust.d.ts.map +1 -1
- package/dist/animations/mobileOptimizations.d.ts.map +1 -1
- package/dist/animations/paint.d.ts.map +1 -1
- package/dist/animations/petals.d.ts.map +1 -1
- package/dist/animations/snow.d.ts.map +1 -1
- package/dist/animations/snow.esm.js +4 -2
- package/dist/animations/snow.esm.js.map +1 -1
- package/dist/animations/snow.js +4 -2
- package/dist/animations/snow.js.map +1 -1
- package/dist/animations/sparkles.d.ts.map +1 -1
- package/dist/animations/sparkles.esm.js +4 -2
- package/dist/animations/sparkles.esm.js.map +1 -1
- package/dist/animations/sparkles.js +4 -2
- package/dist/animations/sparkles.js.map +1 -1
- package/dist/animations/stars.d.ts.map +1 -1
- package/dist/animations/stars.esm.js +4 -2
- package/dist/animations/stars.esm.js.map +1 -1
- package/dist/animations/stars.js +4 -2
- package/dist/animations/stars.js.map +1 -1
- package/dist/animations/useReward.d.ts.map +1 -1
- package/dist/animations/utils.d.ts.map +1 -1
- package/dist/index.esm.js +174 -56
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +174 -56
- package/dist/index.js.map +1 -1
- package/dist/mobileOptimizations.d.ts.map +1 -1
- package/dist/useReward.d.ts.map +1 -1
- package/dist/utils.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/animations/animations/bees.d.ts +0 -8
- package/dist/animations/animations/bees.d.ts.map +0 -1
- package/dist/animations/animations/butterflies.d.ts +0 -8
- package/dist/animations/animations/butterflies.d.ts.map +0 -1
- package/dist/animations/animations/candy.d.ts +0 -8
- package/dist/animations/animations/candy.d.ts.map +0 -1
- package/dist/animations/animations/champagne.d.ts +0 -8
- package/dist/animations/animations/champagne.d.ts.map +0 -1
- package/dist/animations/animations/dandelion.d.ts +0 -8
- package/dist/animations/animations/dandelion.d.ts.map +0 -1
- package/dist/animations/animations/dice.d.ts +0 -8
- package/dist/animations/animations/dice.d.ts.map +0 -1
- package/dist/animations/animations/donuts.d.ts +0 -8
- package/dist/animations/animations/donuts.d.ts.map +0 -1
- package/dist/animations/animations/dragons.d.ts +0 -8
- package/dist/animations/animations/dragons.d.ts.map +0 -1
- package/dist/animations/animations/ghosts.d.ts +0 -8
- package/dist/animations/animations/ghosts.d.ts.map +0 -1
- package/dist/animations/animations/levelup.d.ts +0 -8
- package/dist/animations/animations/levelup.d.ts.map +0 -1
- package/dist/animations/animations/lightning.d.ts +0 -8
- package/dist/animations/animations/lightning.d.ts.map +0 -1
- package/dist/animations/animations/matrix.d.ts +0 -8
- package/dist/animations/animations/matrix.d.ts.map +0 -1
- package/dist/animations/animations/music.d.ts +0 -8
- package/dist/animations/animations/music.d.ts.map +0 -1
- package/dist/animations/animations/pixels.d.ts +0 -8
- package/dist/animations/animations/pixels.d.ts.map +0 -1
- package/dist/animations/animations/pizza.d.ts +0 -8
- package/dist/animations/animations/pizza.d.ts.map +0 -1
- package/dist/animations/animations/popcorn.d.ts +0 -8
- package/dist/animations/animations/popcorn.d.ts.map +0 -1
- package/dist/animations/animations/rain.d.ts +0 -8
- package/dist/animations/animations/rain.d.ts.map +0 -1
- package/dist/animations/animations/runes.d.ts +0 -8
- package/dist/animations/animations/runes.d.ts.map +0 -1
- package/dist/animations/bees.d.ts +0 -8
- package/dist/animations/bees.d.ts.map +0 -1
- package/dist/animations/butterflies.d.ts +0 -8
- package/dist/animations/butterflies.d.ts.map +0 -1
- package/dist/animations/candy.d.ts +0 -8
- package/dist/animations/candy.d.ts.map +0 -1
- package/dist/animations/champagne.d.ts +0 -8
- package/dist/animations/champagne.d.ts.map +0 -1
- package/dist/animations/dandelion.d.ts +0 -8
- package/dist/animations/dandelion.d.ts.map +0 -1
- package/dist/animations/dice.d.ts +0 -8
- package/dist/animations/dice.d.ts.map +0 -1
- package/dist/animations/donuts.d.ts +0 -8
- package/dist/animations/donuts.d.ts.map +0 -1
- package/dist/animations/dragons.d.ts +0 -8
- package/dist/animations/dragons.d.ts.map +0 -1
- package/dist/animations/ghosts.d.ts +0 -8
- package/dist/animations/ghosts.d.ts.map +0 -1
- package/dist/animations/levelup.d.ts +0 -8
- package/dist/animations/levelup.d.ts.map +0 -1
- package/dist/animations/lightning.d.ts +0 -8
- package/dist/animations/lightning.d.ts.map +0 -1
- package/dist/animations/matrix.d.ts +0 -8
- package/dist/animations/matrix.d.ts.map +0 -1
- package/dist/animations/music.d.ts +0 -8
- package/dist/animations/music.d.ts.map +0 -1
- package/dist/animations/pixels.d.ts +0 -8
- package/dist/animations/pixels.d.ts.map +0 -1
- package/dist/animations/pizza.d.ts +0 -8
- package/dist/animations/pizza.d.ts.map +0 -1
- package/dist/animations/popcorn.d.ts +0 -8
- package/dist/animations/popcorn.d.ts.map +0 -1
- package/dist/animations/rain.d.ts +0 -8
- package/dist/animations/rain.d.ts.map +0 -1
- package/dist/animations/runes.d.ts +0 -8
- package/dist/animations/runes.d.ts.map +0 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"aurora.d.ts","sourceRoot":"","sources":["../../src/animations/aurora.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;
|
1
|
+
{"version":3,"file":"aurora.d.ts","sourceRoot":"","sources":["../../src/animations/aurora.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAarD,eAAO,MAAM,qBAAqB,GAChC,QAAQ;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,EAChC,QAAQ,eAAe,KACtB,QAAQ,EAiCV,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAAI,UAAU,QAAQ,KAAG,KAAK,CAAC,SA8C/D,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"balloons.d.ts","sourceRoot":"","sources":["../../src/animations/balloons.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;
|
1
|
+
{"version":3,"file":"balloons.d.ts","sourceRoot":"","sources":["../../src/animations/balloons.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAarD,eAAO,MAAM,sBAAsB,GACjC,QAAQ;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,EAChC,QAAQ,eAAe,KACtB,QAAQ,EAiCV,CAAC;AAEF,eAAO,MAAM,qBAAqB,GAAI,UAAU,QAAQ,KAAG,KAAK,CAAC,SA0FhE,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"bubbles.d.ts","sourceRoot":"","sources":["../../src/animations/bubbles.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;
|
1
|
+
{"version":3,"file":"bubbles.d.ts","sourceRoot":"","sources":["../../src/animations/bubbles.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAUrD,eAAO,MAAM,qBAAqB,GAChC,QAAQ;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,EAChC,QAAQ,eAAe,KACtB,QAAQ,EA8BV,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAAI,UAAU,QAAQ,KAAG,KAAK,CAAC,SAmB/D,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"coins.d.ts","sourceRoot":"","sources":["../../src/animations/coins.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAKrD,eAAO,MAAM,mBAAmB,GAC9B,QAAQ;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,EAChC,QAAQ,eAAe,KACtB,QAAQ,
|
1
|
+
{"version":3,"file":"coins.d.ts","sourceRoot":"","sources":["../../src/animations/coins.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAKrD,eAAO,MAAM,mBAAmB,GAC9B,QAAQ;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,EAChC,QAAQ,eAAe,KACtB,QAAQ,EAiCV,CAAC;AAEF,eAAO,MAAM,kBAAkB,GAAI,UAAU,QAAQ,KAAG,KAAK,CAAC,SA0C7D,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"confetti.d.ts","sourceRoot":"","sources":["../../src/animations/confetti.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;
|
1
|
+
{"version":3,"file":"confetti.d.ts","sourceRoot":"","sources":["../../src/animations/confetti.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AA2BrD,eAAO,MAAM,uBAAuB,GAClC,QAAQ;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,EAChC,QAAQ,eAAe,KACtB,QAAQ,EA8BV,CAAC;AAEF,eAAO,MAAM,sBAAsB,GAAI,UAAU,QAAQ,KAAG,KAAK,CAAC,SAajE,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"crystals.d.ts","sourceRoot":"","sources":["../../src/animations/crystals.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;
|
1
|
+
{"version":3,"file":"crystals.d.ts","sourceRoot":"","sources":["../../src/animations/crystals.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAmBrD,eAAO,MAAM,sBAAsB,GACjC,QAAQ;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,EAChC,QAAQ,eAAe,KACtB,QAAQ,EA+BV,CAAC;AAEF,eAAO,MAAM,qBAAqB,GAAI,UAAU,QAAQ,KAAG,KAAK,CAAC,SAuEhE,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"fireflies.d.ts","sourceRoot":"","sources":["../../src/animations/fireflies.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAKrD,eAAO,MAAM,sBAAsB,GACjC,QAAQ;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,EAChC,QAAQ,eAAe,KACtB,QAAQ,
|
1
|
+
{"version":3,"file":"fireflies.d.ts","sourceRoot":"","sources":["../../src/animations/fireflies.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAKrD,eAAO,MAAM,sBAAsB,GACjC,QAAQ;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,EAChC,QAAQ,eAAe,KACtB,QAAQ,EAiCV,CAAC;AAEF,eAAO,MAAM,qBAAqB,GAAI,UAAU,QAAQ,KAAG,KAAK,CAAC,SA0DhE,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"fireworks.d.ts","sourceRoot":"","sources":["../../src/animations/fireworks.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;
|
1
|
+
{"version":3,"file":"fireworks.d.ts","sourceRoot":"","sources":["../../src/animations/fireworks.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAkBrD,eAAO,MAAM,uBAAuB,GAClC,QAAQ;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,EAChC,QAAQ,eAAe,KACtB,QAAQ,EA8BV,CAAC;AAEF,eAAO,MAAM,sBAAsB,GAAI,UAAU,QAAQ,KAAG,KAAK,CAAC,SAmBjE,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"galaxy.d.ts","sourceRoot":"","sources":["../../src/animations/galaxy.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;
|
1
|
+
{"version":3,"file":"galaxy.d.ts","sourceRoot":"","sources":["../../src/animations/galaxy.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAarD,eAAO,MAAM,qBAAqB,GAChC,QAAQ;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,EAChC,QAAQ,eAAe,KACtB,QAAQ,EAmDV,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAAI,UAAU,QAAQ,KAAG,KAAK,CAAC,SAqF/D,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"glitch.d.ts","sourceRoot":"","sources":["../../src/animations/glitch.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAGrD,eAAO,MAAM,qBAAqB,GAChC,QAAQ;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,EAChC,QAAQ,eAAe,KACtB,QAAQ,
|
1
|
+
{"version":3,"file":"glitch.d.ts","sourceRoot":"","sources":["../../src/animations/glitch.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAGrD,eAAO,MAAM,qBAAqB,GAChC,QAAQ;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,EAChC,QAAQ,eAAe,KACtB,QAAQ,EA4CV,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAAI,UAAU,QAAQ,KAAG,KAAK,CAAC,SAgC/D,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/animations/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAmCpE,MAAM,MAAM,eAAe,GAAG,
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/animations/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAmCpE,MAAM,MAAM,eAAe,GAAG,CAC5B,MAAM,EAAE;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,EAChC,MAAM,EAAE,eAAe,KACpB,QAAQ,EAAE,CAAC;AAChB,MAAM,MAAM,gBAAgB,GAAG,CAAC,QAAQ,EAAE,QAAQ,KAAK,KAAK,CAAC,SAAS,CAAC;AAEvE,UAAU,gBAAgB;IACxB,eAAe,EAAE,eAAe,CAAC;IACjC,cAAc,EAAE,gBAAgB,CAAC;CAClC;AAED,eAAO,MAAM,UAAU,EAAE,MAAM,CAAC,aAAa,EAAE,gBAAgB,CA6E9D,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"leaves.d.ts","sourceRoot":"","sources":["../../src/animations/leaves.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;
|
1
|
+
{"version":3,"file":"leaves.d.ts","sourceRoot":"","sources":["../../src/animations/leaves.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAYrD,eAAO,MAAM,mBAAmB,GAC9B,QAAQ;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,EAChC,QAAQ,eAAe,KACtB,QAAQ,EA8BV,CAAC;AAEF,eAAO,MAAM,kBAAkB,GAAI,UAAU,QAAQ,KAAG,KAAK,CAAC,SAgG7D,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"magicdust.d.ts","sourceRoot":"","sources":["../../src/animations/magicdust.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;
|
1
|
+
{"version":3,"file":"magicdust.d.ts","sourceRoot":"","sources":["../../src/animations/magicdust.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAmBrD,eAAO,MAAM,wBAAwB,GACnC,QAAQ;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,EAChC,QAAQ,eAAe,KACtB,QAAQ,EAmCV,CAAC;AAEF,eAAO,MAAM,uBAAuB,GAClC,UAAU,QAAQ,KACjB,KAAK,CAAC,SA8DR,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"paint.d.ts","sourceRoot":"","sources":["../../src/animations/paint.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;
|
1
|
+
{"version":3,"file":"paint.d.ts","sourceRoot":"","sources":["../../src/animations/paint.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAYrD,eAAO,MAAM,oBAAoB,GAC/B,QAAQ;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,EAChC,QAAQ,eAAe,KACtB,QAAQ,EAoCV,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAAI,UAAU,QAAQ,KAAG,KAAK,CAAC,SA+E9D,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"petals.d.ts","sourceRoot":"","sources":["../../src/animations/petals.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAKrD,eAAO,MAAM,oBAAoB,GAC/B,QAAQ;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,EAChC,QAAQ,eAAe,KACtB,QAAQ,
|
1
|
+
{"version":3,"file":"petals.d.ts","sourceRoot":"","sources":["../../src/animations/petals.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAKrD,eAAO,MAAM,oBAAoB,GAC/B,QAAQ;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,EAChC,QAAQ,eAAe,KACtB,QAAQ,EAiCV,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAAI,UAAU,QAAQ,KAAG,KAAK,CAAC,SA+C9D,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"snow.d.ts","sourceRoot":"","sources":["../../src/animations/snow.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAKrD,eAAO,MAAM,mBAAmB,GAC9B,QAAQ;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,EAChC,QAAQ,eAAe,KACtB,QAAQ,
|
1
|
+
{"version":3,"file":"snow.d.ts","sourceRoot":"","sources":["../../src/animations/snow.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAKrD,eAAO,MAAM,mBAAmB,GAC9B,QAAQ;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,EAChC,QAAQ,eAAe,KACtB,QAAQ,EAkCV,CAAC;AAEF,eAAO,MAAM,kBAAkB,GAAI,UAAU,QAAQ,KAAG,KAAK,CAAC,SAiB7D,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"sparkles.d.ts","sourceRoot":"","sources":["../../src/animations/sparkles.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAGrD,eAAO,MAAM,sBAAsB,GACjC,QAAQ;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,EAChC,QAAQ,eAAe,KACtB,QAAQ,
|
1
|
+
{"version":3,"file":"sparkles.d.ts","sourceRoot":"","sources":["../../src/animations/sparkles.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAGrD,eAAO,MAAM,sBAAsB,GACjC,QAAQ;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,EAChC,QAAQ,eAAe,KACtB,QAAQ,EA+BV,CAAC;AAEF,eAAO,MAAM,qBAAqB,GAAI,UAAU,QAAQ,KAAG,KAAK,CAAC,SAoBhE,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"stars.d.ts","sourceRoot":"","sources":["../../src/animations/stars.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAKrD,eAAO,MAAM,mBAAmB,GAC9B,QAAQ;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,EAChC,QAAQ,eAAe,KACtB,QAAQ,
|
1
|
+
{"version":3,"file":"stars.d.ts","sourceRoot":"","sources":["../../src/animations/stars.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAKrD,eAAO,MAAM,mBAAmB,GAC9B,QAAQ;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,EAChC,QAAQ,eAAe,KACtB,QAAQ,EAgCV,CAAC;AAEF,eAAO,MAAM,kBAAkB,GAAI,UAAU,QAAQ,KAAG,KAAK,CAAC,SAe7D,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"aurora.d.ts","sourceRoot":"","sources":["../../src/animations/aurora.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;
|
1
|
+
{"version":3,"file":"aurora.d.ts","sourceRoot":"","sources":["../../src/animations/aurora.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAarD,eAAO,MAAM,qBAAqB,GAChC,QAAQ;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,EAChC,QAAQ,eAAe,KACtB,QAAQ,EAiCV,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAAI,UAAU,QAAQ,KAAG,KAAK,CAAC,SA8C/D,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"balloons.d.ts","sourceRoot":"","sources":["../../src/animations/balloons.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;
|
1
|
+
{"version":3,"file":"balloons.d.ts","sourceRoot":"","sources":["../../src/animations/balloons.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAarD,eAAO,MAAM,sBAAsB,GACjC,QAAQ;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,EAChC,QAAQ,eAAe,KACtB,QAAQ,EAiCV,CAAC;AAEF,eAAO,MAAM,qBAAqB,GAAI,UAAU,QAAQ,KAAG,KAAK,CAAC,SA0FhE,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"bubbles.d.ts","sourceRoot":"","sources":["../../src/animations/bubbles.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;
|
1
|
+
{"version":3,"file":"bubbles.d.ts","sourceRoot":"","sources":["../../src/animations/bubbles.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAUrD,eAAO,MAAM,qBAAqB,GAChC,QAAQ;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,EAChC,QAAQ,eAAe,KACtB,QAAQ,EA8BV,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAAI,UAAU,QAAQ,KAAG,KAAK,CAAC,SAmB/D,CAAC"}
|
@@ -7,9 +7,14 @@ const generateId = () => {
|
|
7
7
|
return Math.random().toString(36).substring(2, 9);
|
8
8
|
};
|
9
9
|
|
10
|
-
const bubbleColors = [
|
10
|
+
const bubbleColors = [
|
11
|
+
'rgba(66, 165, 245, 0.4)',
|
12
|
+
'rgba(41, 182, 246, 0.4)',
|
13
|
+
'rgba(38, 198, 218, 0.4)',
|
14
|
+
'rgba(129, 212, 250, 0.4)',
|
15
|
+
];
|
11
16
|
const createBubbleParticles = (origin, config) => {
|
12
|
-
const { particleCount = 30, spread = 80, startVelocity = 8, colors = bubbleColors, elementSize = 40 } = config;
|
17
|
+
const { particleCount = 30, spread = 80, startVelocity = 8, colors = bubbleColors, elementSize = 40, } = config;
|
13
18
|
const particles = [];
|
14
19
|
for (let i = 0; i < particleCount; i++) {
|
15
20
|
particles.push({
|
@@ -22,7 +27,9 @@ const createBubbleParticles = (origin, config) => {
|
|
22
27
|
opacity: 0.7,
|
23
28
|
size: randomInRange(elementSize * 0.4, elementSize * 1.2),
|
24
29
|
rotation: 0,
|
25
|
-
color: colors[Math.floor(Math.random() * colors.length)] ||
|
30
|
+
color: colors[Math.floor(Math.random() * colors.length)] ||
|
31
|
+
colors[0] ||
|
32
|
+
'#ffffff',
|
26
33
|
});
|
27
34
|
}
|
28
35
|
return particles;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"bubbles.esm.js","sources":["../../src/utils.ts","../../src/animations/bubbles.tsx"],"sourcesContent":["import { Particle } from './types';\n\nexport const randomInRange = (min: number, max: number): number => {\n return Math.random() * (max - min) + min;\n};\n\nexport const degreesToRadians = (degrees: number): number => {\n return (degrees * Math.PI) / 180;\n};\n\nexport const generateId = (): string => {\n return Math.random().toString(36).substring(2, 9);\n};\n\nexport const getRandomColor = (colors: string[]): string => {\n return colors[Math.floor(Math.random() * colors.length)] || colors[0] || '#ffffff';\n};\n\nexport const createParticleStyle = (\n particle: Particle,\n containerRect: DOMRect\n): React.CSSProperties => {\n return {\n position: 'absolute',\n left: `${particle.x - containerRect.left}px`,\n top: `${particle.y - containerRect.top}px`,\n transform: `rotate(${particle.rotation}deg)`,\n opacity: particle.opacity,\n pointerEvents: 'none',\n transition: 'none',\n willChange: 'transform, opacity',\n };\n}
|
1
|
+
{"version":3,"file":"bubbles.esm.js","sources":["../../src/utils.ts","../../src/animations/bubbles.tsx"],"sourcesContent":["import { Particle } from './types';\n\nexport const randomInRange = (min: number, max: number): number => {\n return Math.random() * (max - min) + min;\n};\n\nexport const degreesToRadians = (degrees: number): number => {\n return (degrees * Math.PI) / 180;\n};\n\nexport const generateId = (): string => {\n return Math.random().toString(36).substring(2, 9);\n};\n\nexport const getRandomColor = (colors: string[]): string => {\n return (\n colors[Math.floor(Math.random() * colors.length)] || colors[0] || '#ffffff'\n );\n};\n\nexport const createParticleStyle = (\n particle: Particle,\n containerRect: DOMRect\n): React.CSSProperties => {\n return {\n position: 'absolute',\n left: `${particle.x - containerRect.left}px`,\n top: `${particle.y - containerRect.top}px`,\n transform: `rotate(${particle.rotation}deg)`,\n opacity: particle.opacity,\n pointerEvents: 'none',\n transition: 'none',\n willChange: 'transform, opacity',\n };\n};\n","import React from 'react';\nimport { AnimationConfig, Particle } from '../types';\nimport { randomInRange, generateId } from '../utils';\n\nconst bubbleColors = [\n 'rgba(66, 165, 245, 0.4)',\n 'rgba(41, 182, 246, 0.4)',\n 'rgba(38, 198, 218, 0.4)',\n 'rgba(129, 212, 250, 0.4)',\n];\n\nexport const createBubbleParticles = (\n origin: { x: number; y: number },\n config: AnimationConfig\n): Particle[] => {\n const {\n particleCount = 30,\n spread = 80,\n startVelocity = 8,\n colors = bubbleColors,\n elementSize = 40,\n } = config;\n\n const particles: Particle[] = [];\n\n for (let i = 0; i < particleCount; i++) {\n particles.push({\n id: generateId(),\n x: origin.x + randomInRange(-spread, spread),\n y: origin.y,\n vx: randomInRange(-3, 3),\n vy: -randomInRange(startVelocity * 0.7, startVelocity * 1.2),\n life: config.lifetime || 160,\n opacity: 0.7,\n size: randomInRange(elementSize * 0.4, elementSize * 1.2),\n rotation: 0,\n color:\n colors[Math.floor(Math.random() * colors.length)] ||\n colors[0] ||\n '#ffffff',\n });\n }\n\n return particles;\n};\n\nexport const renderBubbleParticle = (particle: Particle): React.ReactNode => {\n return (\n <div\n key={particle.id}\n style={{\n width: `${particle.size}px`,\n height: `${particle.size}px`,\n backgroundColor: particle.color,\n borderRadius: '50%',\n border: '2px solid rgba(255, 255, 255, 0.6)',\n backgroundImage:\n 'radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.8), transparent)',\n boxShadow: `\n inset 0 0 ${particle.size * 0.3}px rgba(255, 255, 255, 0.4),\n 0 0 ${particle.size * 0.5}px ${particle.color}\n `,\n }}\n />\n );\n};\n"],"names":[],"mappings":";;AAEO,MAAM,aAAa,GAAG,CAAC,GAAW,EAAE,GAAW,KAAY;AAChE,IAAA,OAAO,IAAI,CAAC,MAAM,EAAE,IAAI,GAAG,GAAG,GAAG,CAAC,GAAG,GAAG;AAC1C,CAAC;AAMM,MAAM,UAAU,GAAG,MAAa;AACrC,IAAA,OAAO,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC;AACnD,CAAC;;ACRD,MAAM,YAAY,GAAG;IACnB,yBAAyB;IACzB,yBAAyB;IACzB,yBAAyB;IACzB,0BAA0B;CAC3B;MAEY,qBAAqB,GAAG,CACnC,MAAgC,EAChC,MAAuB,KACT;IACd,MAAM,EACJ,aAAa,GAAG,EAAE,EAClB,MAAM,GAAG,EAAE,EACX,aAAa,GAAG,CAAC,EACjB,MAAM,GAAG,YAAY,EACrB,WAAW,GAAG,EAAE,GACjB,GAAG,MAAM;IAEV,MAAM,SAAS,GAAe,EAAE;AAEhC,IAAA,KAAK,IAAI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,CAAC,IAAI,GAAG,GAAG,CAAA;AACzB,cAAA,EAAA,QAAQ,CAAC,IAAI,GAAG,GAAG,CAAM,GAAA,EAAA,QAAQ,CAAC,KAAK;AAC9C,QAAA,CAAA;AACF,SAAA,EAAA,CACD;AAEN;;;;"}
|
@@ -9,9 +9,14 @@ const generateId = () => {
|
|
9
9
|
return Math.random().toString(36).substring(2, 9);
|
10
10
|
};
|
11
11
|
|
12
|
-
const bubbleColors = [
|
12
|
+
const bubbleColors = [
|
13
|
+
'rgba(66, 165, 245, 0.4)',
|
14
|
+
'rgba(41, 182, 246, 0.4)',
|
15
|
+
'rgba(38, 198, 218, 0.4)',
|
16
|
+
'rgba(129, 212, 250, 0.4)',
|
17
|
+
];
|
13
18
|
const createBubbleParticles = (origin, config) => {
|
14
|
-
const { particleCount = 30, spread = 80, startVelocity = 8, colors = bubbleColors, elementSize = 40 } = config;
|
19
|
+
const { particleCount = 30, spread = 80, startVelocity = 8, colors = bubbleColors, elementSize = 40, } = config;
|
15
20
|
const particles = [];
|
16
21
|
for (let i = 0; i < particleCount; i++) {
|
17
22
|
particles.push({
|
@@ -24,7 +29,9 @@ const createBubbleParticles = (origin, config) => {
|
|
24
29
|
opacity: 0.7,
|
25
30
|
size: randomInRange(elementSize * 0.4, elementSize * 1.2),
|
26
31
|
rotation: 0,
|
27
|
-
color: colors[Math.floor(Math.random() * colors.length)] ||
|
32
|
+
color: colors[Math.floor(Math.random() * colors.length)] ||
|
33
|
+
colors[0] ||
|
34
|
+
'#ffffff',
|
28
35
|
});
|
29
36
|
}
|
30
37
|
return particles;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"bubbles.js","sources":["../../src/utils.ts","../../src/animations/bubbles.tsx"],"sourcesContent":["import { Particle } from './types';\n\nexport const randomInRange = (min: number, max: number): number => {\n return Math.random() * (max - min) + min;\n};\n\nexport const degreesToRadians = (degrees: number): number => {\n return (degrees * Math.PI) / 180;\n};\n\nexport const generateId = (): string => {\n return Math.random().toString(36).substring(2, 9);\n};\n\nexport const getRandomColor = (colors: string[]): string => {\n return colors[Math.floor(Math.random() * colors.length)] || colors[0] || '#ffffff';\n};\n\nexport const createParticleStyle = (\n particle: Particle,\n containerRect: DOMRect\n): React.CSSProperties => {\n return {\n position: 'absolute',\n left: `${particle.x - containerRect.left}px`,\n top: `${particle.y - containerRect.top}px`,\n transform: `rotate(${particle.rotation}deg)`,\n opacity: particle.opacity,\n pointerEvents: 'none',\n transition: 'none',\n willChange: 'transform, opacity',\n };\n}
|
1
|
+
{"version":3,"file":"bubbles.js","sources":["../../src/utils.ts","../../src/animations/bubbles.tsx"],"sourcesContent":["import { Particle } from './types';\n\nexport const randomInRange = (min: number, max: number): number => {\n return Math.random() * (max - min) + min;\n};\n\nexport const degreesToRadians = (degrees: number): number => {\n return (degrees * Math.PI) / 180;\n};\n\nexport const generateId = (): string => {\n return Math.random().toString(36).substring(2, 9);\n};\n\nexport const getRandomColor = (colors: string[]): string => {\n return (\n colors[Math.floor(Math.random() * colors.length)] || colors[0] || '#ffffff'\n );\n};\n\nexport const createParticleStyle = (\n particle: Particle,\n containerRect: DOMRect\n): React.CSSProperties => {\n return {\n position: 'absolute',\n left: `${particle.x - containerRect.left}px`,\n top: `${particle.y - containerRect.top}px`,\n transform: `rotate(${particle.rotation}deg)`,\n opacity: particle.opacity,\n pointerEvents: 'none',\n transition: 'none',\n willChange: 'transform, opacity',\n };\n};\n","import React from 'react';\nimport { AnimationConfig, Particle } from '../types';\nimport { randomInRange, generateId } from '../utils';\n\nconst bubbleColors = [\n 'rgba(66, 165, 245, 0.4)',\n 'rgba(41, 182, 246, 0.4)',\n 'rgba(38, 198, 218, 0.4)',\n 'rgba(129, 212, 250, 0.4)',\n];\n\nexport const createBubbleParticles = (\n origin: { x: number; y: number },\n config: AnimationConfig\n): Particle[] => {\n const {\n particleCount = 30,\n spread = 80,\n startVelocity = 8,\n colors = bubbleColors,\n elementSize = 40,\n } = config;\n\n const particles: Particle[] = [];\n\n for (let i = 0; i < particleCount; i++) {\n particles.push({\n id: generateId(),\n x: origin.x + randomInRange(-spread, spread),\n y: origin.y,\n vx: randomInRange(-3, 3),\n vy: -randomInRange(startVelocity * 0.7, startVelocity * 1.2),\n life: config.lifetime || 160,\n opacity: 0.7,\n size: randomInRange(elementSize * 0.4, elementSize * 1.2),\n rotation: 0,\n color:\n colors[Math.floor(Math.random() * colors.length)] ||\n colors[0] ||\n '#ffffff',\n });\n }\n\n return particles;\n};\n\nexport const renderBubbleParticle = (particle: Particle): React.ReactNode => {\n return (\n <div\n key={particle.id}\n style={{\n width: `${particle.size}px`,\n height: `${particle.size}px`,\n backgroundColor: particle.color,\n borderRadius: '50%',\n border: '2px solid rgba(255, 255, 255, 0.6)',\n backgroundImage:\n 'radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.8), transparent)',\n boxShadow: `\n inset 0 0 ${particle.size * 0.3}px rgba(255, 255, 255, 0.4),\n 0 0 ${particle.size * 0.5}px ${particle.color}\n `,\n }}\n />\n );\n};\n"],"names":[],"mappings":";;;;AAEO,MAAM,aAAa,GAAG,CAAC,GAAW,EAAE,GAAW,KAAY;AAChE,IAAA,OAAO,IAAI,CAAC,MAAM,EAAE,IAAI,GAAG,GAAG,GAAG,CAAC,GAAG,GAAG;AAC1C,CAAC;AAMM,MAAM,UAAU,GAAG,MAAa;AACrC,IAAA,OAAO,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC;AACnD,CAAC;;ACRD,MAAM,YAAY,GAAG;IACnB,yBAAyB;IACzB,yBAAyB;IACzB,yBAAyB;IACzB,0BAA0B;CAC3B;MAEY,qBAAqB,GAAG,CACnC,MAAgC,EAChC,MAAuB,KACT;IACd,MAAM,EACJ,aAAa,GAAG,EAAE,EAClB,MAAM,GAAG,EAAE,EACX,aAAa,GAAG,CAAC,EACjB,MAAM,GAAG,YAAY,EACrB,WAAW,GAAG,EAAE,G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C;AAC5C,YAAA,eAAe,EACb,2EAA2E;AAC7E,YAAA,SAAS,EAAE;sBACG,QAAQ,CAAC,IAAI,GAAG,GAAG,CAAA;AACzB,cAAA,EAAA,QAAQ,CAAC,IAAI,GAAG,GAAG,CAAM,GAAA,EAAA,QAAQ,CAAC,KAAK;AAC9C,QAAA,CAAA;AACF,SAAA,EAAA,CACD;AAEN;;;;;"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"coins.d.ts","sourceRoot":"","sources":["../../src/animations/coins.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAKrD,eAAO,MAAM,mBAAmB,GAC9B,QAAQ;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,EAChC,QAAQ,eAAe,KACtB,QAAQ,
|
1
|
+
{"version":3,"file":"coins.d.ts","sourceRoot":"","sources":["../../src/animations/coins.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAKrD,eAAO,MAAM,mBAAmB,GAC9B,QAAQ;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,EAChC,QAAQ,eAAe,KACtB,QAAQ,EAiCV,CAAC;AAEF,eAAO,MAAM,kBAAkB,GAAI,UAAU,QAAQ,KAAG,KAAK,CAAC,SA0C7D,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"confetti.d.ts","sourceRoot":"","sources":["../../src/animations/confetti.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;
|
1
|
+
{"version":3,"file":"confetti.d.ts","sourceRoot":"","sources":["../../src/animations/confetti.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AA2BrD,eAAO,MAAM,uBAAuB,GAClC,QAAQ;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,EAChC,QAAQ,eAAe,KACtB,QAAQ,EA8BV,CAAC;AAEF,eAAO,MAAM,sBAAsB,GAAI,UAAU,QAAQ,KAAG,KAAK,CAAC,SAajE,CAAC"}
|
@@ -10,12 +10,29 @@ const generateId = () => {
|
|
10
10
|
return Math.random().toString(36).substring(2, 9);
|
11
11
|
};
|
12
12
|
const getRandomColor = (colors) => {
|
13
|
-
return colors[Math.floor(Math.random() * colors.length)] || colors[0] || '#ffffff';
|
13
|
+
return (colors[Math.floor(Math.random() * colors.length)] || colors[0] || '#ffffff');
|
14
14
|
};
|
15
15
|
|
16
|
-
const defaultColors = [
|
16
|
+
const defaultColors = [
|
17
|
+
'#f44336',
|
18
|
+
'#e91e63',
|
19
|
+
'#9c27b0',
|
20
|
+
'#673ab7',
|
21
|
+
'#3f51b5',
|
22
|
+
'#2196f3',
|
23
|
+
'#03a9f4',
|
24
|
+
'#00bcd4',
|
25
|
+
'#009688',
|
26
|
+
'#4caf50',
|
27
|
+
'#8bc34a',
|
28
|
+
'#cddc39',
|
29
|
+
'#ffeb3b',
|
30
|
+
'#ffc107',
|
31
|
+
'#ff9800',
|
32
|
+
'#ff5722',
|
33
|
+
];
|
17
34
|
const createConfettiParticles = (origin, config) => {
|
18
|
-
const { particleCount = 50, startVelocity = 20, colors = defaultColors, elementSize = 20 } = config;
|
35
|
+
const { particleCount = 50, startVelocity = 20, colors = defaultColors, elementSize = 20, } = config;
|
19
36
|
const particles = [];
|
20
37
|
for (let i = 0; i < particleCount; i++) {
|
21
38
|
const angle = randomInRange(0, 360);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"confetti.esm.js","sources":["../../src/utils.ts","../../src/animations/confetti.tsx"],"sourcesContent":["import { Particle } from './types';\n\nexport const randomInRange = (min: number, max: number): number => {\n return Math.random() * (max - min) + min;\n};\n\nexport const degreesToRadians = (degrees: number): number => {\n return (degrees * Math.PI) / 180;\n};\n\nexport const generateId = (): string => {\n return Math.random().toString(36).substring(2, 9);\n};\n\nexport const getRandomColor = (colors: string[]): string => {\n return colors[Math.floor(Math.random() * colors.length)] || colors[0] || '#ffffff';\n};\n\nexport const createParticleStyle = (\n particle: Particle,\n containerRect: DOMRect\n): React.CSSProperties => {\n return {\n position: 'absolute',\n left: `${particle.x - containerRect.left}px`,\n top: `${particle.y - containerRect.top}px`,\n transform: `rotate(${particle.rotation}deg)`,\n opacity: particle.opacity,\n pointerEvents: 'none',\n transition: 'none',\n willChange: 'transform, opacity',\n };\n}
|
1
|
+
{"version":3,"file":"confetti.esm.js","sources":["../../src/utils.ts","../../src/animations/confetti.tsx"],"sourcesContent":["import { Particle } from './types';\n\nexport const randomInRange = (min: number, max: number): number => {\n return Math.random() * (max - min) + min;\n};\n\nexport const degreesToRadians = (degrees: number): number => {\n return (degrees * Math.PI) / 180;\n};\n\nexport const generateId = (): string => {\n return Math.random().toString(36).substring(2, 9);\n};\n\nexport const getRandomColor = (colors: string[]): string => {\n return (\n colors[Math.floor(Math.random() * colors.length)] || colors[0] || '#ffffff'\n );\n};\n\nexport const createParticleStyle = (\n particle: Particle,\n containerRect: DOMRect\n): React.CSSProperties => {\n return {\n position: 'absolute',\n left: `${particle.x - containerRect.left}px`,\n top: `${particle.y - containerRect.top}px`,\n transform: `rotate(${particle.rotation}deg)`,\n opacity: particle.opacity,\n pointerEvents: 'none',\n transition: 'none',\n willChange: 'transform, opacity',\n };\n};\n","import React from 'react';\nimport { AnimationConfig, Particle } from '../types';\nimport {\n randomInRange,\n degreesToRadians,\n generateId,\n getRandomColor,\n} from '../utils';\n\nconst defaultColors = [\n '#f44336',\n '#e91e63',\n '#9c27b0',\n '#673ab7',\n '#3f51b5',\n '#2196f3',\n '#03a9f4',\n '#00bcd4',\n '#009688',\n '#4caf50',\n '#8bc34a',\n '#cddc39',\n '#ffeb3b',\n '#ffc107',\n '#ff9800',\n '#ff5722',\n];\n\nexport const createConfettiParticles = (\n origin: { x: number; y: number },\n config: AnimationConfig\n): Particle[] => {\n const {\n particleCount = 50,\n startVelocity = 20,\n colors = defaultColors,\n elementSize = 20,\n } = config;\n\n const particles: Particle[] = [];\n\n for (let i = 0; i < particleCount; i++) {\n const angle = randomInRange(0, 360);\n const velocity = randomInRange(startVelocity * 0.5, startVelocity);\n const color = getRandomColor(colors);\n\n particles.push({\n id: generateId(),\n x: origin.x,\n y: origin.y,\n vx: Math.cos(degreesToRadians(angle)) * velocity,\n vy: Math.sin(degreesToRadians(angle)) * velocity - 30,\n life: config.lifetime || 150,\n opacity: 1,\n size: randomInRange(elementSize * 0.7, elementSize * 1.5),\n rotation: randomInRange(0, 360),\n color,\n });\n }\n\n return particles;\n};\n\nexport const renderConfettiParticle = (particle: Particle): React.ReactNode => {\n return (\n <div\n key={particle.id}\n style={{\n width: `${particle.size}px`,\n height: `${particle.size * 0.6}px`,\n backgroundColor: particle.color,\n borderRadius: '3px',\n boxShadow: '0 2px 4px rgba(0,0,0,0.2)',\n }}\n />\n );\n};\n"],"names":[],"mappings":";;AAEO,MAAM,aAAa,GAAG,CAAC,GAAW,EAAE,GAAW,KAAY;AAChE,IAAA,OAAO,IAAI,CAAC,MAAM,EAAE,IAAI,GAAG,GAAG,GAAG,CAAC,GAAG,GAAG;AAC1C,CAAC;AAEM,MAAM,gBAAgB,GAAG,CAAC,OAAe,KAAY;IAC1D,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC,EAAE,IAAI,GAAG;AAClC,CAAC;AAEM,MAAM,UAAU,GAAG,MAAa;AACrC,IAAA,OAAO,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,SAA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,CAAC,CAAC,GAAG,QAAQ,GAAG,EAAE;AACrD,YAAA,IAAI,EAAE,MAAM,CAAC,QAAQ,IAAI,GAAG;AAC5B,YAAA,OAAO,EAAE,CAAC;YACV,IAAI,EAAE,aAAa,CAAC,WAAW,GAAG,GAAG,EAAE,WAAW,GAAG,GAAG,CAAC;AACzD,YAAA,QAAQ,EAAE,aAAa,CAAC,CAAC,EAAE,GAAG,CAAC;YAC/B,KAAK;AACN,SAAA,CAAC;;AAGJ,IAAA,OAAO,SAAS;AAClB;AAEa,MAAA,sBAAsB,GAAG,CAAC,QAAkB,KAAqB;IAC5E,QACE,6BACE,GAAG,EAAE,QAAQ,CAAC,EAAE,EAChB,KAAK,EAAE;AACL,YAAA,KAAK,EAAE,CAAA,EAAG,QAAQ,CAAC,IAAI,CAAI,EAAA,CAAA;AAC3B,YAAA,MAAM,EAAE,CAAG,EAAA,QAAQ,CAAC,IAAI,GAAG,GAAG,CAAI,EAAA,CAAA;YAClC,eAAe,EAAE,QAAQ,CAAC,KAAK;AAC/B,YAAA,YAAY,EAAE,KAAK;AACnB,YAAA,SAAS,EAAE,2BAA2B;AACvC,SAAA,EAAA,CACD;AAEN;;;;"}
|
@@ -12,12 +12,29 @@ const generateId = () => {
|
|
12
12
|
return Math.random().toString(36).substring(2, 9);
|
13
13
|
};
|
14
14
|
const getRandomColor = (colors) => {
|
15
|
-
return colors[Math.floor(Math.random() * colors.length)] || colors[0] || '#ffffff';
|
15
|
+
return (colors[Math.floor(Math.random() * colors.length)] || colors[0] || '#ffffff');
|
16
16
|
};
|
17
17
|
|
18
|
-
const defaultColors = [
|
18
|
+
const defaultColors = [
|
19
|
+
'#f44336',
|
20
|
+
'#e91e63',
|
21
|
+
'#9c27b0',
|
22
|
+
'#673ab7',
|
23
|
+
'#3f51b5',
|
24
|
+
'#2196f3',
|
25
|
+
'#03a9f4',
|
26
|
+
'#00bcd4',
|
27
|
+
'#009688',
|
28
|
+
'#4caf50',
|
29
|
+
'#8bc34a',
|
30
|
+
'#cddc39',
|
31
|
+
'#ffeb3b',
|
32
|
+
'#ffc107',
|
33
|
+
'#ff9800',
|
34
|
+
'#ff5722',
|
35
|
+
];
|
19
36
|
const createConfettiParticles = (origin, config) => {
|
20
|
-
const { particleCount = 50, startVelocity = 20, colors = defaultColors, elementSize = 20 } = config;
|
37
|
+
const { particleCount = 50, startVelocity = 20, colors = defaultColors, elementSize = 20, } = config;
|
21
38
|
const particles = [];
|
22
39
|
for (let i = 0; i < particleCount; i++) {
|
23
40
|
const angle = randomInRange(0, 360);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"confetti.js","sources":["../../src/utils.ts","../../src/animations/confetti.tsx"],"sourcesContent":["import { Particle } from './types';\n\nexport const randomInRange = (min: number, max: number): number => {\n return Math.random() * (max - min) + min;\n};\n\nexport const degreesToRadians = (degrees: number): number => {\n return (degrees * Math.PI) / 180;\n};\n\nexport const generateId = (): string => {\n return Math.random().toString(36).substring(2, 9);\n};\n\nexport const getRandomColor = (colors: string[]): string => {\n return colors[Math.floor(Math.random() * colors.length)] || colors[0] || '#ffffff';\n};\n\nexport const createParticleStyle = (\n particle: Particle,\n containerRect: DOMRect\n): React.CSSProperties => {\n return {\n position: 'absolute',\n left: `${particle.x - containerRect.left}px`,\n top: `${particle.y - containerRect.top}px`,\n transform: `rotate(${particle.rotation}deg)`,\n opacity: particle.opacity,\n pointerEvents: 'none',\n transition: 'none',\n willChange: 'transform, opacity',\n };\n}
|
1
|
+
{"version":3,"file":"confetti.js","sources":["../../src/utils.ts","../../src/animations/confetti.tsx"],"sourcesContent":["import { Particle } from './types';\n\nexport const randomInRange = (min: number, max: number): number => {\n return Math.random() * (max - min) + min;\n};\n\nexport const degreesToRadians = (degrees: number): number => {\n return (degrees * Math.PI) / 180;\n};\n\nexport const generateId = (): string => {\n return Math.random().toString(36).substring(2, 9);\n};\n\nexport const getRandomColor = (colors: string[]): string => {\n return (\n colors[Math.floor(Math.random() * colors.length)] || colors[0] || '#ffffff'\n );\n};\n\nexport const createParticleStyle = (\n particle: Particle,\n containerRect: DOMRect\n): React.CSSProperties => {\n return {\n position: 'absolute',\n left: `${particle.x - containerRect.left}px`,\n top: `${particle.y - containerRect.top}px`,\n transform: `rotate(${particle.rotation}deg)`,\n opacity: particle.opacity,\n pointerEvents: 'none',\n transition: 'none',\n willChange: 'transform, opacity',\n };\n};\n","import React from 'react';\nimport { AnimationConfig, Particle } from '../types';\nimport {\n randomInRange,\n degreesToRadians,\n generateId,\n getRandomColor,\n} from '../utils';\n\nconst defaultColors = [\n '#f44336',\n '#e91e63',\n '#9c27b0',\n '#673ab7',\n '#3f51b5',\n '#2196f3',\n '#03a9f4',\n '#00bcd4',\n '#009688',\n '#4caf50',\n '#8bc34a',\n '#cddc39',\n '#ffeb3b',\n '#ffc107',\n '#ff9800',\n '#ff5722',\n];\n\nexport const createConfettiParticles = (\n origin: { x: number; y: number },\n config: AnimationConfig\n): Particle[] => {\n const {\n particleCount = 50,\n startVelocity = 20,\n colors = defaultColors,\n elementSize = 20,\n } = config;\n\n const particles: Particle[] = [];\n\n for (let i = 0; i < particleCount; i++) {\n const angle = randomInRange(0, 360);\n const velocity = randomInRange(startVelocity * 0.5, startVelocity);\n const color = getRandomColor(colors);\n\n particles.push({\n id: generateId(),\n x: origin.x,\n y: origin.y,\n vx: Math.cos(degreesToRadians(angle)) * velocity,\n vy: Math.sin(degreesToRadians(angle)) * velocity - 30,\n life: config.lifetime || 150,\n opacity: 1,\n size: randomInRange(elementSize * 0.7, elementSize * 1.5),\n rotation: randomInRange(0, 360),\n color,\n });\n }\n\n return particles;\n};\n\nexport const renderConfettiParticle = (particle: Particle): React.ReactNode => {\n return (\n <div\n key={particle.id}\n style={{\n width: `${particle.size}px`,\n height: `${particle.size * 0.6}px`,\n backgroundColor: particle.color,\n borderRadius: '3px',\n boxShadow: '0 2px 4px rgba(0,0,0,0.2)',\n }}\n />\n );\n};\n"],"names":[],"mappings":";;;;AAEO,MAAM,aAAa,GAAG,C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AC1B,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;
|
1
|
+
{"version":3,"file":"crystals.d.ts","sourceRoot":"","sources":["../../src/animations/crystals.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAmBrD,eAAO,MAAM,sBAAsB,GACjC,QAAQ;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,EAChC,QAAQ,eAAe,KACtB,QAAQ,EA+BV,CAAC;AAEF,eAAO,MAAM,qBAAqB,GAAI,UAAU,QAAQ,KAAG,KAAK,CAAC,SAuEhE,CAAC"}
|
@@ -15,7 +15,7 @@ const happyEmojis = ['😊', '😄', '🥰', '😍', '🤗', '😘', '😁', '
|
|
15
15
|
const natureEmojis = ['🌸', '🌺', '🌻', '🌹', '🌷', '🌼', '🍀', '🌿'];
|
16
16
|
const foodEmojis = ['🍕', '🍔', '🍟', '🌮', '🍿', '🍩', '🍪', '🧁'];
|
17
17
|
const createEmojiParticles = (origin, config) => {
|
18
|
-
const { particleCount = 30, spread = 100, startVelocity = 15, elementSize = 35, emojis = defaultEmojis } = config;
|
18
|
+
const { particleCount = 30, spread = 100, startVelocity = 15, elementSize = 35, emojis = defaultEmojis, } = config;
|
19
19
|
const particles = [];
|
20
20
|
for (let i = 0; i < particleCount; i++) {
|
21
21
|
const angle = randomInRange(-45, -135);
|
@@ -31,7 +31,7 @@ const createEmojiParticles = (origin, config) => {
|
|
31
31
|
size: randomInRange(elementSize * 0.7, elementSize * 1.3),
|
32
32
|
rotation: randomInRange(-45, 45),
|
33
33
|
color: '', // Not used for emojis
|
34
|
-
element: emojis[Math.floor(Math.random() * emojis.length)]
|
34
|
+
element: emojis[Math.floor(Math.random() * emojis.length)],
|
35
35
|
});
|
36
36
|
}
|
37
37
|
return particles;
|
@@ -51,7 +51,7 @@ const emojiPresets = {
|
|
51
51
|
happy: happyEmojis,
|
52
52
|
nature: natureEmojis,
|
53
53
|
food: foodEmojis,
|
54
|
-
default: defaultEmojis
|
54
|
+
default: defaultEmojis,
|
55
55
|
};
|
56
56
|
|
57
57
|
export { createEmojiParticles, emojiPresets, renderEmojiParticle };
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"emoji.esm.js","sources":["../../src/utils.ts","../../src/animations/emoji.tsx"],"sourcesContent":["import { Particle } from './types';\n\nexport const randomInRange = (min: number, max: number): number => {\n return Math.random() * (max - min) + min;\n};\n\nexport const degreesToRadians = (degrees: number): number => {\n return (degrees * Math.PI) / 180;\n};\n\nexport const generateId = (): string => {\n return Math.random().toString(36).substring(2, 9);\n};\n\nexport const getRandomColor = (colors: string[]): string => {\n return colors[Math.floor(Math.random() * colors.length)] || colors[0] || '#ffffff';\n};\n\nexport const createParticleStyle = (\n particle: Particle,\n containerRect: DOMRect\n): React.CSSProperties => {\n return {\n position: 'absolute',\n left: `${particle.x - containerRect.left}px`,\n top: `${particle.y - containerRect.top}px`,\n transform: `rotate(${particle.rotation}deg)`,\n opacity: particle.opacity,\n pointerEvents: 'none',\n transition: 'none',\n willChange: 'transform, opacity',\n };\n}
|
1
|
+
{"version":3,"file":"emoji.esm.js","sources":["../../src/utils.ts","../../src/animations/emoji.tsx"],"sourcesContent":["import { Particle } from './types';\n\nexport const randomInRange = (min: number, max: number): number => {\n return Math.random() * (max - min) + min;\n};\n\nexport const degreesToRadians = (degrees: number): number => {\n return (degrees * Math.PI) / 180;\n};\n\nexport const generateId = (): string => {\n return Math.random().toString(36).substring(2, 9);\n};\n\nexport const getRandomColor = (colors: string[]): string => {\n return (\n colors[Math.floor(Math.random() * colors.length)] || colors[0] || '#ffffff'\n );\n};\n\nexport const createParticleStyle = (\n particle: Particle,\n containerRect: DOMRect\n): React.CSSProperties => {\n return {\n position: 'absolute',\n left: `${particle.x - containerRect.left}px`,\n top: `${particle.y - containerRect.top}px`,\n transform: `rotate(${particle.rotation}deg)`,\n opacity: particle.opacity,\n pointerEvents: 'none',\n transition: 'none',\n willChange: 'transform, opacity',\n };\n};\n","import React from 'react';\nimport { AnimationConfig, Particle } from '../types';\nimport { randomInRange, generateId } from '../utils';\n\n// Default emoji sets for different moods\nconst defaultEmojis = ['🎉', '🎊', '🎈', '🎁', '✨', '🌟', '💫', '🎯'];\nconst celebrationEmojis = ['🎉', '🎊', '🥳', '🎈', '🎁', '🍾', '🥂', '🎆'];\nconst loveEmojis = ['❤️', '💕', '💖', '💝', '💗', '💓', '💞', '💘'];\nconst happyEmojis = ['😊', '😄', '🥰', '😍', '🤗', '😘', '😁', '🤩'];\nconst natureEmojis = ['🌸', '🌺', '🌻', '🌹', '🌷', '🌼', '🍀', '🌿'];\nconst foodEmojis = ['🍕', '🍔', '🍟', '🌮', '🍿', '🍩', '🍪', '🧁'];\n\nexport interface EmojiAnimationConfig extends AnimationConfig {\n emojis?: string[];\n}\n\nexport const createEmojiParticles = (\n origin: { x: number; y: number },\n config: EmojiAnimationConfig\n): Particle[] => {\n const {\n particleCount = 30,\n spread = 100,\n startVelocity = 15,\n elementSize = 35,\n emojis = defaultEmojis,\n } = config;\n\n const particles: Particle[] = [];\n\n for (let i = 0; i < particleCount; i++) {\n const angle = randomInRange(-45, -135);\n const velocity = randomInRange(startVelocity * 0.5, startVelocity * 1.2);\n\n particles.push({\n id: generateId(),\n x: origin.x + randomInRange(-spread, spread),\n y: origin.y,\n vx: Math.cos((angle * Math.PI) / 180) * velocity,\n vy: Math.sin((angle * Math.PI) / 180) * velocity,\n life: config.lifetime || 180,\n opacity: 1,\n size: randomInRange(elementSize * 0.7, elementSize * 1.3),\n rotation: randomInRange(-45, 45),\n color: '', // Not used for emojis\n element: emojis[Math.floor(Math.random() * emojis.length)],\n });\n }\n\n return particles;\n};\n\nexport const renderEmojiParticle = (particle: Particle): React.ReactNode => {\n return (\n <div\n key={particle.id}\n style={{\n fontSize: `${particle.size}px`,\n lineHeight: 1,\n userSelect: 'none',\n filter: particle.opacity < 0.5 ? 'blur(1px)' : undefined,\n }}\n >\n {particle.element}\n </div>\n );\n};\n\n// Export preset emoji sets for easy use\nexport const emojiPresets = {\n celebration: celebrationEmojis,\n love: loveEmojis,\n happy: happyEmojis,\n nature: natureEmojis,\n food: foodEmojis,\n default: defaultEmojis,\n};\n"],"names":[],"mappings":";;AAEO,MAAM,aAAa,GAAG,CAAC,GAAW,EAAE,GAAW,KAAY;AAChE,IAAA,OAAO,IAAI,CAAC,MAAM,EAAE,IAAI,GAAG,GAAG,GAAG,CAAC,GAAG,GAAG;AAC1C,CAAC;AAMM,MAAM,UAAU,GAAG,MAAa;AACrC,IAAA,OAAO,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC;AACnD,CAAC;;ACRD;AACA,MAAM,aAAa,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC;AACrE,MAAM,iBAAiB,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC;AAC1E,MAAM,UAAU,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC;AACnE,MAAM,WAAW,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC;AACpE,MAAM,YAAY,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC;AACrE,MAAM,UAAU,GAAG,CAAC,IAAI,EAAE,IAAI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AAE,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC;AAC3D,SAAA,CAAC;;AAGJ,IAAA,OAAO,SAAS;AAClB;AAEa,MAAA,mBAAmB,GAAG,CAAC,QAAkB,KAAqB;IACzE,QACE,6BACE,GAAG,EAAE,QAAQ,CAAC,EAAE,EAChB,KAAK,EAAE;AACL,YAAA,QAAQ,EAAE,CAAA,EAAG,QAAQ,CAAC,IAAI,CAAI,EAAA,CAAA;AAC9B,YAAA,UAAU,EAAE,CAAC;AACb,YAAA,UAAU,EAAE,MAAM;AAClB,YAAA,MAAM,EAAE,QAAQ,CAAC,OAAO,GAAG,GAAG,GAAG,WAAW,GAAG,SAAS;AACzD,SAAA,EAAA,EAEA,QAAQ,CAAC,OAAO,CACb;AAEV;AAEA;AACa,MAAA,YAAY,GAAG;AAC1B,IAAA,WAAW,EAAE,iBAAiB;AAC9B,IAAA,IAAI,EAAE,UAAU;AAChB,IAAA,KAAK,EAAE,WAAW;AAClB,IAAA,MAAM,EAAE,YAAY;AACpB,IAAA,IAAI,EAAE,UAAU;AAChB,IAAA,OAAO,EAAE,aAAa;;;;;"}
|
package/dist/animations/emoji.js
CHANGED
@@ -17,7 +17,7 @@ const happyEmojis = ['😊', '😄', '🥰', '😍', '🤗', '😘', '😁', '
|
|
17
17
|
const natureEmojis = ['🌸', '🌺', '🌻', '🌹', '🌷', '🌼', '🍀', '🌿'];
|
18
18
|
const foodEmojis = ['🍕', '🍔', '🍟', '🌮', '🍿', '🍩', '🍪', '🧁'];
|
19
19
|
const createEmojiParticles = (origin, config) => {
|
20
|
-
const { particleCount = 30, spread = 100, startVelocity = 15, elementSize = 35, emojis = defaultEmojis } = config;
|
20
|
+
const { particleCount = 30, spread = 100, startVelocity = 15, elementSize = 35, emojis = defaultEmojis, } = config;
|
21
21
|
const particles = [];
|
22
22
|
for (let i = 0; i < particleCount; i++) {
|
23
23
|
const angle = randomInRange(-45, -135);
|
@@ -33,7 +33,7 @@ const createEmojiParticles = (origin, config) => {
|
|
33
33
|
size: randomInRange(elementSize * 0.7, elementSize * 1.3),
|
34
34
|
rotation: randomInRange(-45, 45),
|
35
35
|
color: '', // Not used for emojis
|
36
|
-
element: emojis[Math.floor(Math.random() * emojis.length)]
|
36
|
+
element: emojis[Math.floor(Math.random() * emojis.length)],
|
37
37
|
});
|
38
38
|
}
|
39
39
|
return particles;
|
@@ -53,7 +53,7 @@ const emojiPresets = {
|
|
53
53
|
happy: happyEmojis,
|
54
54
|
nature: natureEmojis,
|
55
55
|
food: foodEmojis,
|
56
|
-
default: defaultEmojis
|
56
|
+
default: defaultEmojis,
|
57
57
|
};
|
58
58
|
|
59
59
|
exports.createEmojiParticles = createEmojiParticles;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"emoji.js","sources":["../../src/utils.ts","../../src/animations/emoji.tsx"],"sourcesContent":["import { Particle } from './types';\n\nexport const randomInRange = (min: number, max: number): number => {\n return Math.random() * (max - min) + min;\n};\n\nexport const degreesToRadians = (degrees: number): number => {\n return (degrees * Math.PI) / 180;\n};\n\nexport const generateId = (): string => {\n return Math.random().toString(36).substring(2, 9);\n};\n\nexport const getRandomColor = (colors: string[]): string => {\n return colors[Math.floor(Math.random() * colors.length)] || colors[0] || '#ffffff';\n};\n\nexport const createParticleStyle = (\n particle: Particle,\n containerRect: DOMRect\n): React.CSSProperties => {\n return {\n position: 'absolute',\n left: `${particle.x - containerRect.left}px`,\n top: `${particle.y - containerRect.top}px`,\n transform: `rotate(${particle.rotation}deg)`,\n opacity: particle.opacity,\n pointerEvents: 'none',\n transition: 'none',\n willChange: 'transform, opacity',\n };\n}
|
1
|
+
{"version":3,"file":"emoji.js","sources":["../../src/utils.ts","../../src/animations/emoji.tsx"],"sourcesContent":["import { Particle } from './types';\n\nexport const randomInRange = (min: number, max: number): number => {\n return Math.random() * (max - min) + min;\n};\n\nexport const degreesToRadians = (degrees: number): number => {\n return (degrees * Math.PI) / 180;\n};\n\nexport const generateId = (): string => {\n return Math.random().toString(36).substring(2, 9);\n};\n\nexport const getRandomColor = (colors: string[]): string => {\n return (\n colors[Math.floor(Math.random() * colors.length)] || colors[0] || '#ffffff'\n );\n};\n\nexport const createParticleStyle = (\n particle: Particle,\n containerRect: DOMRect\n): React.CSSProperties => {\n return {\n position: 'absolute',\n left: `${particle.x - containerRect.left}px`,\n top: `${particle.y - containerRect.top}px`,\n transform: `rotate(${particle.rotation}deg)`,\n opacity: particle.opacity,\n pointerEvents: 'none',\n transition: 'none',\n willChange: 'transform, opacity',\n };\n};\n","import React from 'react';\nimport { AnimationConfig, Particle } from '../types';\nimport { randomInRange, generateId } from '../utils';\n\n// Default emoji sets for different moods\nconst defaultEmojis = ['🎉', '🎊', '🎈', '🎁', '✨', '🌟', '💫', '🎯'];\nconst celebrationEmojis = ['🎉', '🎊', '🥳', '🎈', '🎁', '🍾', '🥂', '🎆'];\nconst loveEmojis = ['❤️', '💕', '💖', '💝', '💗', '💓', '💞', '💘'];\nconst happyEmojis = ['😊', '😄', '🥰', '😍', '🤗', '😘', '😁', '🤩'];\nconst natureEmojis = ['🌸', '🌺', '🌻', '🌹', '🌷', '🌼', '🍀', '🌿'];\nconst foodEmojis = ['🍕', '🍔', '🍟', '🌮', '🍿', '🍩', '🍪', '🧁'];\n\nexport interface EmojiAnimationConfig extends AnimationConfig {\n emojis?: string[];\n}\n\nexport const createEmojiParticles = (\n origin: { x: number; y: number },\n config: EmojiAnimationConfig\n): Particle[] => {\n const {\n particleCount = 30,\n spread = 100,\n startVelocity = 15,\n elementSize = 35,\n emojis = defaultEmojis,\n } = config;\n\n const particles: Particle[] = [];\n\n for (let i = 0; i < particleCount; i++) {\n const angle = randomInRange(-45, -135);\n const velocity = randomInRange(startVelocity * 0.5, startVelocity * 1.2);\n\n particles.push({\n id: generateId(),\n x: origin.x + randomInRange(-spread, spread),\n y: origin.y,\n vx: Math.cos((angle * Math.PI) / 180) * velocity,\n vy: Math.sin((angle * Math.PI) / 180) * velocity,\n life: config.lifetime || 180,\n opacity: 1,\n size: randomInRange(elementSize * 0.7, elementSize * 1.3),\n rotation: randomInRange(-45, 45),\n color: '', // Not used for emojis\n element: emojis[Math.floor(Math.random() * emojis.length)],\n });\n }\n\n return particles;\n};\n\nexport const renderEmojiParticle = (particle: Particle): React.ReactNode => {\n return (\n <div\n key={particle.id}\n style={{\n fontSize: `${particle.size}px`,\n lineHeight: 1,\n userSelect: 'none',\n filter: particle.opacity < 0.5 ? 'blur(1px)' : undefined,\n }}\n >\n {particle.element}\n </div>\n );\n};\n\n// Export preset emoji sets for easy use\nexport const emojiPresets = {\n celebration: celebrationEmojis,\n love: loveEmojis,\n happy: happyEmojis,\n nature: natureEmojis,\n food: foodEmojis,\n default: defaultEmojis,\n};\n"],"names":[],"mappings":";;;;AAEO,MAAM,aAAa,GAAG,CAAC,GAAW,EAAE,GAAW,KAAY;AAChE,IAAA,OAAO,IAAI,CAAC,MAAM,EAAE,IAAI,GAAG,GAAG,GAAG,CAAC,GAAG,GAAG;AAC1C,CAAC;AAMM,MAAM,UAAU,GAAG,MAAa;AACrC,IAAA,OAAO,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC;AACnD,CAAC;;ACRD;AACA,MAAM,aAAa,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC;AACrE,MAAM,iBAAiB,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC;AAC1E,MAAM,UAAU,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC;AACnE,MAA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AAM,UAAU,CAAC;AAKrD,eAAO,MAAM,sBAAsB,GACjC,QAAQ;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,EAChC,QAAQ,eAAe,KACtB,QAAQ,
|
1
|
+
{"version":3,"file":"fireflies.d.ts","sourceRoot":"","sources":["../../src/animations/fireflies.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAKrD,eAAO,MAAM,sBAAsB,GACjC,QAAQ;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,EAChC,QAAQ,eAAe,KACtB,QAAQ,EAiCV,CAAC;AAEF,eAAO,MAAM,qBAAqB,GAAI,UAAU,QAAQ,KAAG,KAAK,CAAC,SA0DhE,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"fireworks.d.ts","sourceRoot":"","sources":["../../src/animations/fireworks.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;
|
1
|
+
{"version":3,"file":"fireworks.d.ts","sourceRoot":"","sources":["../../src/animations/fireworks.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAkBrD,eAAO,MAAM,uBAAuB,GAClC,QAAQ;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,EAChC,QAAQ,eAAe,KACtB,QAAQ,EA8BV,CAAC;AAEF,eAAO,MAAM,sBAAsB,GAAI,UAAU,QAAQ,KAAG,KAAK,CAAC,SAmBjE,CAAC"}
|
@@ -10,12 +10,20 @@ const generateId = () => {
|
|
10
10
|
return Math.random().toString(36).substring(2, 9);
|
11
11
|
};
|
12
12
|
const getRandomColor = (colors) => {
|
13
|
-
return colors[Math.floor(Math.random() * colors.length)] || colors[0] || '#ffffff';
|
13
|
+
return (colors[Math.floor(Math.random() * colors.length)] || colors[0] || '#ffffff');
|
14
14
|
};
|
15
15
|
|
16
|
-
const fireworkColors = [
|
16
|
+
const fireworkColors = [
|
17
|
+
'#ff0000',
|
18
|
+
'#00ff00',
|
19
|
+
'#0000ff',
|
20
|
+
'#ffff00',
|
21
|
+
'#ff00ff',
|
22
|
+
'#00ffff',
|
23
|
+
'#ffffff',
|
24
|
+
];
|
17
25
|
const createFireworkParticles = (origin, config) => {
|
18
|
-
const { particleCount = 60, startVelocity = 25, colors = fireworkColors, elementSize = 8 } = config;
|
26
|
+
const { particleCount = 60, startVelocity = 25, colors = fireworkColors, elementSize = 8, } = config;
|
19
27
|
const particles = [];
|
20
28
|
for (let i = 0; i < particleCount; i++) {
|
21
29
|
const angle = (360 / particleCount) * i + randomInRange(-5, 5);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"fireworks.esm.js","sources":["../../src/utils.ts","../../src/animations/fireworks.tsx"],"sourcesContent":["import { Particle } from './types';\n\nexport const randomInRange = (min: number, max: number): number => {\n return Math.random() * (max - min) + min;\n};\n\nexport const degreesToRadians = (degrees: number): number => {\n return (degrees * Math.PI) / 180;\n};\n\nexport const generateId = (): string => {\n return Math.random().toString(36).substring(2, 9);\n};\n\nexport const getRandomColor = (colors: string[]): string => {\n return colors[Math.floor(Math.random() * colors.length)] || colors[0] || '#ffffff';\n};\n\nexport const createParticleStyle = (\n particle: Particle,\n containerRect: DOMRect\n): React.CSSProperties => {\n return {\n position: 'absolute',\n left: `${particle.x - containerRect.left}px`,\n top: `${particle.y - containerRect.top}px`,\n transform: `rotate(${particle.rotation}deg)`,\n opacity: particle.opacity,\n pointerEvents: 'none',\n transition: 'none',\n willChange: 'transform, opacity',\n };\n}
|
1
|
+
{"version":3,"file":"fireworks.esm.js","sources":["../../src/utils.ts","../../src/animations/fireworks.tsx"],"sourcesContent":["import { Particle } from './types';\n\nexport const randomInRange = (min: number, max: number): number => {\n return Math.random() * (max - min) + min;\n};\n\nexport const degreesToRadians = (degrees: number): number => {\n return (degrees * Math.PI) / 180;\n};\n\nexport const generateId = (): string => {\n return Math.random().toString(36).substring(2, 9);\n};\n\nexport const getRandomColor = (colors: string[]): string => {\n return (\n colors[Math.floor(Math.random() * colors.length)] || colors[0] || '#ffffff'\n );\n};\n\nexport const createParticleStyle = (\n particle: Particle,\n containerRect: DOMRect\n): React.CSSProperties => {\n return {\n position: 'absolute',\n left: `${particle.x - containerRect.left}px`,\n top: `${particle.y - containerRect.top}px`,\n transform: `rotate(${particle.rotation}deg)`,\n opacity: particle.opacity,\n pointerEvents: 'none',\n transition: 'none',\n willChange: 'transform, opacity',\n };\n};\n","import React from 'react';\nimport { AnimationConfig, Particle } from '../types';\nimport {\n randomInRange,\n degreesToRadians,\n generateId,\n getRandomColor,\n} from '../utils';\n\nconst fireworkColors = [\n '#ff0000',\n '#00ff00',\n '#0000ff',\n '#ffff00',\n '#ff00ff',\n '#00ffff',\n '#ffffff',\n];\n\nexport const createFireworkParticles = (\n origin: { x: number; y: number },\n config: AnimationConfig\n): Particle[] => {\n const {\n particleCount = 60,\n startVelocity = 25,\n colors = fireworkColors,\n elementSize = 8,\n } = config;\n\n const particles: Particle[] = [];\n\n for (let i = 0; i < particleCount; i++) {\n const angle = (360 / particleCount) * i + randomInRange(-5, 5);\n const velocity = randomInRange(startVelocity * 0.5, startVelocity * 1.2);\n const color = getRandomColor(colors);\n\n particles.push({\n id: generateId(),\n x: origin.x,\n y: origin.y,\n vx: Math.cos(degreesToRadians(angle)) * velocity,\n vy: Math.sin(degreesToRadians(angle)) * velocity - 10,\n life: config.lifetime || 140,\n opacity: 1,\n size: randomInRange(elementSize * 0.6, elementSize * 1.4),\n rotation: 0,\n color,\n });\n }\n\n return particles;\n};\n\nexport const renderFireworkParticle = (particle: Particle): React.ReactNode => {\n return (\n <div\n key={particle.id}\n style={{\n width: `${particle.size}px`,\n height: `${particle.size}px`,\n backgroundColor: '#ffffff',\n borderRadius: '50%',\n boxShadow: `\n 0 0 ${particle.size}px ${particle.color},\n 0 0 ${particle.size * 2}px ${particle.color},\n 0 0 ${particle.size * 3}px ${particle.color},\n 0 0 ${particle.size * 4}px ${particle.color}\n `,\n background: `radial-gradient(circle, #ffffff 0%, ${particle.color} 40%, transparent 70%)`,\n }}\n />\n );\n};\n"],"names":[],"mappings":";;AAEO,MAAM,aAAa,GAAG,CAAC,GAAW,EAAE,GAAW,KAAY;AAChE,IAAA,OAAO,IAAI,CAAC,MAAM,EAAE,IAAI,GAAG,GAAG,GAAG,CAAC,GAAG,GAAG;AAC1C,CAAC;AAEM,MAAM,gBAAgB,GAAG,CAAC,OAAe,KAAY;IAC1D,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC,EAAE,IAAI,GAAG;AAClC,CAAC;AAEM,MAAM,UAAU,GAAG,MAAa;AACrC,IAAA,OAAO,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC;AACnD,CAAC;AAEM,MAAM,cAAc,GAAG,CAAC,MAAgB,KAAY;IACzD,QACE,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,IAAI,SAAS;AAE/E,CAAC;;ACTD,MAAM,cAAc,GAAG;IACrB,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;CACV;MAEY,uBAAuB,GAAG,CACrC,MAAgC,EAChC,MAAuB,KACT;AACd,IAAA,MAAM,EACJ,aAAa,GAAG,EAAE,EAClB,aAAa,GAAG,EAAE,EAClB,MAAM,GAAG,cAAc,EACvB,WAAW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