@hanzo/ui 5.3.35 → 5.3.36
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/bin/create-registry.js +0 -0
- package/bin/npx-registry-mcp.js +0 -0
- package/bin/registry-mcp-wrapper.sh +0 -0
- package/bin/registry-mcp.js +0 -0
- package/bin/start-mcp-server.sh +0 -0
- package/bin/test-mcp.sh +0 -0
- package/dist/3d/button.js +1 -297
- package/dist/3d/button.mjs +1 -272
- package/dist/3d/card.js +1 -233
- package/dist/3d/card.mjs +1 -206
- package/dist/3d/carousel.js +1 -370
- package/dist/3d/carousel.mjs +1 -343
- package/dist/3d/grid.js +1 -361
- package/dist/3d/grid.mjs +1 -336
- package/dist/3d/index.js +1 -1517
- package/dist/3d/index.mjs +1 -1471
- package/dist/3d/marquee.js +1 -351
- package/dist/3d/marquee.mjs +1 -326
- package/dist/3d/pin.js +1 -45
- package/dist/3d/pin.mjs +1 -23
- package/dist/accordion.js +1 -79
- package/dist/accordion.mjs +1 -54
- package/dist/alert-dialog.js +1 -224
- package/dist/alert-dialog.mjs +1 -191
- package/dist/alert.js +1 -97
- package/dist/alert.mjs +1 -91
- package/dist/animation/animated-background.js +1 -423
- package/dist/animation/animated-background.mjs +1 -417
- package/dist/animation/animated-beam.js +1 -118
- package/dist/animation/animated-beam.mjs +1 -96
- package/dist/animation/animated-cursor.js +1 -274
- package/dist/animation/animated-cursor.mjs +1 -269
- package/dist/animation/animated-icon.js +2 -356
- package/dist/animation/animated-icon.mjs +2 -350
- package/dist/animation/animated-list.js +1 -338
- package/dist/animation/animated-list.mjs +1 -332
- package/dist/animation/animated-number.js +1 -282
- package/dist/animation/animated-number.mjs +1 -276
- package/dist/animation/animated-testimonials.js +1 -96
- package/dist/animation/animated-testimonials.mjs +1 -74
- package/dist/animation/animated-tooltip.js +1 -66
- package/dist/animation/animated-tooltip.mjs +1 -44
- package/dist/animation/apple-cards-carousel.js +1 -307
- package/dist/animation/apple-cards-carousel.mjs +1 -284
- package/dist/animation/apple-hello-effect.js +1 -59
- package/dist/animation/apple-hello-effect.mjs +1 -37
- package/dist/animation/index.js +2 -1951
- package/dist/animation/index.mjs +2 -1920
- package/dist/avatar.js +1 -70
- package/dist/avatar.mjs +1 -46
- package/dist/badge.js +1 -60
- package/dist/badge.mjs +1 -54
- package/dist/blocks/index.js +2 -1684
- package/dist/blocks/index.mjs +2 -1645
- package/dist/breadcrumb.js +1 -106
- package/dist/breadcrumb.mjs +1 -98
- package/dist/calendar-ext/index.js +1 -207
- package/dist/calendar-ext/index.mjs +1 -169
- package/dist/calendar.js +1 -193
- package/dist/calendar.mjs +1 -168
- package/dist/carousel.js +1 -282
- package/dist/carousel.mjs +1 -253
- package/dist/charts/index.js +6 -5840
- package/dist/charts/index.mjs +6 -5749
- package/dist/checkbox.js +1 -59
- package/dist/checkbox.mjs +1 -34
- package/dist/code/block.js +2 -225
- package/dist/code/block.mjs +2 -202
- package/dist/code/compare.js +5 -444
- package/dist/code/compare.mjs +5 -421
- package/dist/code/diff.js +12 -429
- package/dist/code/diff.mjs +11 -405
- package/dist/code/editor.js +1 -242
- package/dist/code/editor.mjs +1 -217
- package/dist/code/explorer.js +1 -290
- package/dist/code/explorer.mjs +1 -267
- package/dist/code/index.js +26 -2514
- package/dist/code/index.mjs +24 -2471
- package/dist/code/preview.js +6 -363
- package/dist/code/preview.mjs +6 -340
- package/dist/code/snippet.js +2 -273
- package/dist/code/snippet.mjs +2 -249
- package/dist/code/tabs.js +1 -74
- package/dist/code/tabs.mjs +1 -52
- package/dist/code/terminal.js +3 -436
- package/dist/code/terminal.mjs +3 -413
- package/dist/collapsible.js +1 -32
- package/dist/collapsible.mjs +1 -8
- package/dist/command.js +1 -282
- package/dist/command.mjs +1 -251
- package/dist/context-menu.js +1 -206
- package/dist/context-menu.mjs +1 -170
- package/dist/desktop/hooks.js +1 -223
- package/dist/desktop/hooks.mjs +1 -198
- package/dist/desktop/index.js +1 -685
- package/dist/desktop/index.mjs +1 -657
- package/dist/desktop/spotlight.js +1 -260
- package/dist/desktop/spotlight.mjs +1 -235
- package/dist/desktop/window.js +1 -273
- package/dist/desktop/window.mjs +1 -247
- package/dist/device/index.js +1 -2
- package/dist/device/index.mjs +0 -1
- package/dist/dialog.js +1 -245
- package/dist/dialog.mjs +1 -213
- package/dist/dock/basic.js +1 -173
- package/dist/dock/basic.mjs +1 -150
- package/dist/dock/index.js +1 -647
- package/dist/dock/index.mjs +1 -620
- package/dist/dock/limelight-nav.js +1 -314
- package/dist/dock/limelight-nav.mjs +1 -293
- package/dist/dock/macos.js +1 -140
- package/dist/dock/macos.mjs +1 -117
- package/dist/dock/menu.js +1 -69
- package/dist/dock/menu.mjs +1 -47
- package/dist/dock/message.js +1 -148
- package/dist/dock/message.mjs +1 -126
- package/dist/drawer.js +1 -114
- package/dist/drawer.mjs +1 -102
- package/dist/dropdown-menu.js +1 -201
- package/dist/dropdown-menu.mjs +1 -165
- package/dist/finance/AdvancedChart.js +2 -47
- package/dist/finance/AdvancedChart.mjs +2 -45
- package/dist/finance/CompanyProfile.js +2 -47
- package/dist/finance/CompanyProfile.mjs +2 -45
- package/dist/finance/CryptoScreener.js +2 -44
- package/dist/finance/CryptoScreener.mjs +2 -42
- package/dist/finance/Financials.js +2 -51
- package/dist/finance/Financials.mjs +2 -49
- package/dist/finance/ForexScreener.js +2 -45
- package/dist/finance/ForexScreener.mjs +2 -43
- package/dist/finance/MarketOverview.js +2 -103
- package/dist/finance/MarketOverview.mjs +2 -101
- package/dist/finance/NewsTimeline.js +2 -43
- package/dist/finance/NewsTimeline.mjs +2 -41
- package/dist/finance/OrderEntry.js +1 -130
- package/dist/finance/OrderEntry.mjs +1 -128
- package/dist/finance/OrdersHistory.js +1 -63
- package/dist/finance/OrdersHistory.mjs +1 -61
- package/dist/finance/PositionsList.js +1 -79
- package/dist/finance/PositionsList.mjs +1 -77
- package/dist/finance/StockScreener.js +2 -45
- package/dist/finance/StockScreener.mjs +2 -43
- package/dist/finance/SymbolInfo.js +2 -45
- package/dist/finance/SymbolInfo.mjs +2 -43
- package/dist/finance/TechnicalAnalysis.js +2 -53
- package/dist/finance/TechnicalAnalysis.mjs +2 -51
- package/dist/finance/TickerTape.js +2 -55
- package/dist/finance/TickerTape.mjs +2 -53
- package/dist/finance/TradingPanel.js +1 -190
- package/dist/finance/TradingPanel.mjs +1 -188
- package/dist/finance/index.js +2 -929
- package/dist/finance/index.mjs +2 -913
- package/dist/form/index.js +1 -153
- package/dist/form/index.mjs +1 -123
- package/dist/form.js +1 -171
- package/dist/form.mjs +1 -141
- package/dist/hover-card.js +1 -57
- package/dist/hover-card.mjs +1 -33
- package/dist/index.js +192 -9618
- package/dist/index.mjs +192 -9202
- package/dist/input-otp.js +1 -78
- package/dist/input-otp.mjs +1 -53
- package/dist/kanban/index.js +1 -593
- package/dist/kanban/index.mjs +1 -571
- package/dist/lib/utils.js +1 -28
- package/dist/lib/utils.mjs +1 -24
- package/dist/mermaid/index.js +1 -280
- package/dist/mermaid/index.mjs +1 -253
- package/dist/navigation/index.js +1 -97
- package/dist/navigation/index.mjs +1 -78
- package/dist/navigation-menu.js +1 -148
- package/dist/navigation-menu.mjs +1 -115
- package/dist/pattern/grid-pattern.js +3 -325
- package/dist/pattern/grid-pattern.mjs +3 -302
- package/dist/pattern/index.js +3 -325
- package/dist/pattern/index.mjs +3 -302
- package/dist/popover.js +1 -62
- package/dist/popover.mjs +1 -36
- package/dist/progress.js +1 -61
- package/dist/progress.mjs +1 -36
- package/dist/project/gantt.js +1 -64
- package/dist/project/gantt.mjs +1 -42
- package/dist/project/index.js +1 -635
- package/dist/project/index.mjs +1 -610
- package/dist/project/kanban.js +1 -596
- package/dist/project/kanban.mjs +1 -571
- package/dist/project/list.js +1 -34
- package/dist/project/list.mjs +1 -11
- package/dist/radio-group.js +1 -67
- package/dist/radio-group.mjs +1 -44
- package/dist/resizable.js +1 -71
- package/dist/resizable.mjs +1 -47
- package/dist/scroll-area.js +1 -88
- package/dist/scroll-area.mjs +1 -65
- package/dist/select.js +1 -139
- package/dist/select.mjs +1 -110
- package/dist/separator.js +1 -58
- package/dist/separator.mjs +1 -33
- package/dist/sheet.js +1 -147
- package/dist/sheet.mjs +1 -116
- package/dist/skeleton.js +1 -31
- package/dist/skeleton.mjs +1 -26
- package/dist/slider.js +1 -98
- package/dist/slider.mjs +1 -72
- package/dist/sonner.js +1 -33
- package/dist/sonner.mjs +1 -28
- package/dist/spline/index.js +1 -210
- package/dist/spline/index.mjs +1 -201
- package/dist/spline/media-stack.js +1 -192
- package/dist/spline/media-stack.mjs +1 -184
- package/dist/spline/player.js +1 -36
- package/dist/spline/player.mjs +1 -30
- package/dist/switch.js +1 -61
- package/dist/switch.mjs +1 -36
- package/dist/table.js +1 -109
- package/dist/table.mjs +1 -100
- package/dist/tabs.js +1 -127
- package/dist/tabs.mjs +1 -101
- package/dist/tailwind/index.mjs +1 -2011
- package/dist/textarea.js +1 -77
- package/dist/textarea.mjs +1 -55
- package/dist/toggle-group.js +1 -117
- package/dist/toggle-group.mjs +1 -92
- package/dist/toggle.js +1 -70
- package/dist/toggle.mjs +1 -47
- package/dist/tooltip.js +1 -66
- package/dist/tooltip.mjs +1 -39
- package/dist/types/index.mjs +1 -51
- package/dist/ui/announcement.js +1 -133
- package/dist/ui/announcement.mjs +1 -111
- package/dist/ui/avatar-group.js +1 -87
- package/dist/ui/avatar-group.mjs +1 -64
- package/dist/ui/banner.js +1 -84
- package/dist/ui/banner.mjs +1 -61
- package/dist/ui/cursor.js +1 -77
- package/dist/ui/cursor.mjs +1 -55
- package/dist/ui/index.js +1 -494
- package/dist/ui/index.mjs +1 -461
- package/dist/ui/marquee.js +1 -73
- package/dist/ui/marquee.mjs +1 -51
- package/dist/ui/pill.js +1 -84
- package/dist/ui/pill.mjs +1 -61
- package/dist/ui/spinner.js +1 -27
- package/dist/ui/spinner.mjs +1 -25
- package/dist/ui/tags.js +1 -116
- package/dist/ui/tags.mjs +1 -94
- package/dist/ui/ticker.js +1 -72
- package/dist/ui/ticker.mjs +1 -50
- package/dist/util/index.mjs +1 -404
- package/package.json +28 -27
- package/dist/primitives/index.js +0 -9619
- package/dist/primitives/index.mjs +0 -9203
- package/dist/primitives-export.js +0 -9619
- package/dist/primitives-export.mjs +0 -9203
|
@@ -1,424 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
'use strict';
|
|
3
|
-
|
|
4
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
|
-
|
|
6
|
-
var react = require('react');
|
|
7
|
-
var react$1 = require('motion/react');
|
|
8
|
-
var utils = require('@/lib/utils');
|
|
9
|
-
var jsxRuntime = require('react/jsx-runtime');
|
|
10
|
-
|
|
11
|
-
var __defProp = Object.defineProperty;
|
|
12
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
13
|
-
function usePrefersReducedMotion() {
|
|
14
|
-
const [prefersReducedMotion, setPrefersReducedMotion] = react.useState(false);
|
|
15
|
-
react.useEffect(() => {
|
|
16
|
-
if (typeof window === "undefined") return;
|
|
17
|
-
const mediaQuery = window.matchMedia("(prefers-reduced-motion: reduce)");
|
|
18
|
-
setPrefersReducedMotion(mediaQuery.matches);
|
|
19
|
-
const handleChange = /* @__PURE__ */ __name((event) => {
|
|
20
|
-
setPrefersReducedMotion(event.matches);
|
|
21
|
-
}, "handleChange");
|
|
22
|
-
mediaQuery.addEventListener("change", handleChange);
|
|
23
|
-
return () => mediaQuery.removeEventListener("change", handleChange);
|
|
24
|
-
}, []);
|
|
25
|
-
return prefersReducedMotion;
|
|
26
|
-
}
|
|
27
|
-
__name(usePrefersReducedMotion, "usePrefersReducedMotion");
|
|
28
|
-
function GradientBackground({
|
|
29
|
-
colors,
|
|
30
|
-
speed,
|
|
31
|
-
intensity,
|
|
32
|
-
paused
|
|
33
|
-
}) {
|
|
34
|
-
const gradientColors = colors.length >= 2 ? colors : ["#ff6b6b", "#4ecdc4", "#45b7d1", "#96ceb4"];
|
|
35
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
36
|
-
react$1.motion.div,
|
|
37
|
-
{
|
|
38
|
-
className: "absolute inset-0",
|
|
39
|
-
style: {
|
|
40
|
-
background: `linear-gradient(-45deg, ${gradientColors.join(", ")})`,
|
|
41
|
-
backgroundSize: "400% 400%"
|
|
42
|
-
},
|
|
43
|
-
animate: paused ? {} : {
|
|
44
|
-
x: ["0%", "100%", "0%"]
|
|
45
|
-
},
|
|
46
|
-
transition: {
|
|
47
|
-
duration: 10 / speed,
|
|
48
|
-
repeat: Infinity,
|
|
49
|
-
ease: "linear"
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
);
|
|
53
|
-
}
|
|
54
|
-
__name(GradientBackground, "GradientBackground");
|
|
55
|
-
function BlobBackground({
|
|
56
|
-
colors,
|
|
57
|
-
speed,
|
|
58
|
-
elementCount,
|
|
59
|
-
intensity,
|
|
60
|
-
paused
|
|
61
|
-
}) {
|
|
62
|
-
const blobs = react.useMemo(
|
|
63
|
-
() => Array.from({ length: elementCount }, (_, i) => ({
|
|
64
|
-
id: i,
|
|
65
|
-
color: colors[i % colors.length],
|
|
66
|
-
size: Math.random() * 200 + 100,
|
|
67
|
-
x: Math.random() * 100,
|
|
68
|
-
y: Math.random() * 100,
|
|
69
|
-
duration: (Math.random() * 10 + 10) / speed
|
|
70
|
-
})),
|
|
71
|
-
[elementCount, colors, speed]
|
|
72
|
-
);
|
|
73
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-0 overflow-hidden", children: blobs.map((blob) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
74
|
-
react$1.motion.div,
|
|
75
|
-
{
|
|
76
|
-
className: "absolute rounded-full",
|
|
77
|
-
style: {
|
|
78
|
-
background: `radial-gradient(circle, ${blob.color}40, transparent)`,
|
|
79
|
-
width: blob.size * intensity,
|
|
80
|
-
height: blob.size * intensity,
|
|
81
|
-
filter: "blur(40px)"
|
|
82
|
-
},
|
|
83
|
-
initial: {
|
|
84
|
-
x: `${blob.x}%`,
|
|
85
|
-
y: `${blob.y}%`
|
|
86
|
-
},
|
|
87
|
-
animate: paused ? {} : {
|
|
88
|
-
x: [`${blob.x}%`, `${(blob.x + 50) % 100}%`, `${blob.x}%`],
|
|
89
|
-
y: [`${blob.y}%`, `${(blob.y + 30) % 100}%`, `${blob.y}%`],
|
|
90
|
-
scale: [1, 1.2, 1]
|
|
91
|
-
},
|
|
92
|
-
transition: {
|
|
93
|
-
duration: blob.duration,
|
|
94
|
-
repeat: Infinity,
|
|
95
|
-
ease: "easeInOut"
|
|
96
|
-
}
|
|
97
|
-
},
|
|
98
|
-
blob.id
|
|
99
|
-
)) });
|
|
100
|
-
}
|
|
101
|
-
__name(BlobBackground, "BlobBackground");
|
|
102
|
-
function WaveBackground({
|
|
103
|
-
colors,
|
|
104
|
-
speed,
|
|
105
|
-
intensity,
|
|
106
|
-
paused
|
|
107
|
-
}) {
|
|
108
|
-
const waveColor = colors[0] || "#4ecdc4";
|
|
109
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-0 overflow-hidden", children: [0, 1, 2].map((index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
110
|
-
react$1.motion.div,
|
|
111
|
-
{
|
|
112
|
-
className: "absolute inset-0",
|
|
113
|
-
style: {
|
|
114
|
-
background: `radial-gradient(ellipse 100% 50% at center ${50 + index * 20}%, ${waveColor}${Math.round(
|
|
115
|
-
30 * intensity
|
|
116
|
-
).toString(16).padStart(2, "0")}, transparent)`
|
|
117
|
-
},
|
|
118
|
-
animate: paused ? {} : {
|
|
119
|
-
y: [index * 10, index * 10 + 20 * intensity, index * 10]
|
|
120
|
-
},
|
|
121
|
-
transition: {
|
|
122
|
-
duration: (3 + index) / speed,
|
|
123
|
-
repeat: Infinity,
|
|
124
|
-
ease: "easeInOut"
|
|
125
|
-
}
|
|
126
|
-
},
|
|
127
|
-
index
|
|
128
|
-
)) });
|
|
129
|
-
}
|
|
130
|
-
__name(WaveBackground, "WaveBackground");
|
|
131
|
-
function MeshBackground({
|
|
132
|
-
colors,
|
|
133
|
-
speed,
|
|
134
|
-
intensity,
|
|
135
|
-
paused
|
|
136
|
-
}) {
|
|
137
|
-
const meshColors = colors.length >= 4 ? colors.slice(0, 4) : ["#ff6b6b", "#4ecdc4", "#45b7d1", "#96ceb4"];
|
|
138
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-0 overflow-hidden", children: meshColors.map((color, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
139
|
-
react$1.motion.div,
|
|
140
|
-
{
|
|
141
|
-
className: "absolute rounded-full",
|
|
142
|
-
style: {
|
|
143
|
-
background: `radial-gradient(circle, ${color}60, transparent)`,
|
|
144
|
-
width: `${60 + index * 20}%`,
|
|
145
|
-
height: `${60 + index * 20}%`,
|
|
146
|
-
filter: "blur(60px)",
|
|
147
|
-
mixBlendMode: "multiply"
|
|
148
|
-
},
|
|
149
|
-
initial: {
|
|
150
|
-
x: `${25 + index * 15}%`,
|
|
151
|
-
y: `${25 + index * 15}%`
|
|
152
|
-
},
|
|
153
|
-
animate: paused ? {} : {
|
|
154
|
-
x: [
|
|
155
|
-
`${25 + index * 15}%`,
|
|
156
|
-
`${35 + index * 15}%`,
|
|
157
|
-
`${25 + index * 15}%`
|
|
158
|
-
],
|
|
159
|
-
y: [
|
|
160
|
-
`${25 + index * 15}%`,
|
|
161
|
-
`${15 + index * 15}%`,
|
|
162
|
-
`${25 + index * 15}%`
|
|
163
|
-
],
|
|
164
|
-
rotate: [0, 180, 360]
|
|
165
|
-
},
|
|
166
|
-
transition: {
|
|
167
|
-
duration: (8 + index * 2) / speed,
|
|
168
|
-
repeat: Infinity,
|
|
169
|
-
ease: "easeInOut"
|
|
170
|
-
}
|
|
171
|
-
},
|
|
172
|
-
index
|
|
173
|
-
)) });
|
|
174
|
-
}
|
|
175
|
-
__name(MeshBackground, "MeshBackground");
|
|
176
|
-
function ParallaxBackground({
|
|
177
|
-
layers,
|
|
178
|
-
speed,
|
|
179
|
-
paused
|
|
180
|
-
}) {
|
|
181
|
-
const mouseX = react$1.useMotionValue(0);
|
|
182
|
-
const mouseY = react$1.useMotionValue(0);
|
|
183
|
-
react.useEffect(() => {
|
|
184
|
-
const handleMouseMove = /* @__PURE__ */ __name((e) => {
|
|
185
|
-
const { clientX, clientY } = e;
|
|
186
|
-
const { innerWidth, innerHeight } = window;
|
|
187
|
-
mouseX.set((clientX / innerWidth - 0.5) * 100);
|
|
188
|
-
mouseY.set((clientY / innerHeight - 0.5) * 100);
|
|
189
|
-
}, "handleMouseMove");
|
|
190
|
-
window.addEventListener("mousemove", handleMouseMove);
|
|
191
|
-
return () => window.removeEventListener("mousemove", handleMouseMove);
|
|
192
|
-
}, [mouseX, mouseY]);
|
|
193
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-0 overflow-hidden", children: layers.map((layer, index) => {
|
|
194
|
-
const x = react$1.useTransform(
|
|
195
|
-
mouseX,
|
|
196
|
-
[-50, 50],
|
|
197
|
-
[-layer.speed * 10, layer.speed * 10]
|
|
198
|
-
);
|
|
199
|
-
const y = react$1.useTransform(
|
|
200
|
-
mouseY,
|
|
201
|
-
[-50, 50],
|
|
202
|
-
[-layer.speed * 10, layer.speed * 10]
|
|
203
|
-
);
|
|
204
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
205
|
-
react$1.motion.div,
|
|
206
|
-
{
|
|
207
|
-
className: "absolute inset-0",
|
|
208
|
-
style: {
|
|
209
|
-
background: `radial-gradient(circle, ${layer.color}, transparent)`,
|
|
210
|
-
opacity: layer.opacity,
|
|
211
|
-
x: paused ? 0 : x,
|
|
212
|
-
y: paused ? 0 : y
|
|
213
|
-
}
|
|
214
|
-
},
|
|
215
|
-
index
|
|
216
|
-
);
|
|
217
|
-
}) });
|
|
218
|
-
}
|
|
219
|
-
__name(ParallaxBackground, "ParallaxBackground");
|
|
220
|
-
function ParticlesBackground({
|
|
221
|
-
colors,
|
|
222
|
-
speed,
|
|
223
|
-
elementCount,
|
|
224
|
-
intensity,
|
|
225
|
-
paused
|
|
226
|
-
}) {
|
|
227
|
-
const particles = react.useMemo(
|
|
228
|
-
() => Array.from({ length: elementCount }, (_, i) => ({
|
|
229
|
-
id: i,
|
|
230
|
-
color: colors[i % colors.length],
|
|
231
|
-
size: Math.random() * 4 + 2,
|
|
232
|
-
x: Math.random() * 100,
|
|
233
|
-
y: Math.random() * 100,
|
|
234
|
-
duration: (Math.random() * 20 + 20) / speed,
|
|
235
|
-
delay: Math.random() * 5
|
|
236
|
-
})),
|
|
237
|
-
[elementCount, colors, speed]
|
|
238
|
-
);
|
|
239
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-0 overflow-hidden", children: particles.map((particle) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
240
|
-
react$1.motion.div,
|
|
241
|
-
{
|
|
242
|
-
className: "absolute rounded-full",
|
|
243
|
-
style: {
|
|
244
|
-
backgroundColor: particle.color,
|
|
245
|
-
width: particle.size * intensity,
|
|
246
|
-
height: particle.size * intensity,
|
|
247
|
-
opacity: 0.6
|
|
248
|
-
},
|
|
249
|
-
initial: {
|
|
250
|
-
x: `${particle.x}%`,
|
|
251
|
-
y: `${particle.y}%`
|
|
252
|
-
},
|
|
253
|
-
animate: paused ? {} : {
|
|
254
|
-
y: [`${particle.y}%`, `${particle.y - 100}%`],
|
|
255
|
-
opacity: [0, 0.6, 0]
|
|
256
|
-
},
|
|
257
|
-
transition: {
|
|
258
|
-
duration: particle.duration,
|
|
259
|
-
repeat: Infinity,
|
|
260
|
-
delay: particle.delay,
|
|
261
|
-
ease: "linear"
|
|
262
|
-
}
|
|
263
|
-
},
|
|
264
|
-
particle.id
|
|
265
|
-
)) });
|
|
266
|
-
}
|
|
267
|
-
__name(ParticlesBackground, "ParticlesBackground");
|
|
268
|
-
function AnimatedBackground({
|
|
269
|
-
animation = "gradient",
|
|
270
|
-
speed = 1,
|
|
271
|
-
colors = ["#ff6b6b", "#4ecdc4", "#45b7d1", "#96ceb4", "#ffeaa7"],
|
|
272
|
-
paused = false,
|
|
273
|
-
className,
|
|
274
|
-
style,
|
|
275
|
-
children,
|
|
276
|
-
intensity = 1,
|
|
277
|
-
blur = false,
|
|
278
|
-
blurAmount = 20,
|
|
279
|
-
opacity = 1,
|
|
280
|
-
elementCount = 5,
|
|
281
|
-
width = "100%",
|
|
282
|
-
height = "100%",
|
|
283
|
-
fullscreen = false,
|
|
284
|
-
parallaxLayers = [
|
|
285
|
-
{ speed: 0.5, color: "#ff6b6b50", opacity: 0.3 },
|
|
286
|
-
{ speed: 1, color: "#4ecdc450", opacity: 0.4 },
|
|
287
|
-
{ speed: 1.5, color: "#45b7d150", opacity: 0.3 }
|
|
288
|
-
]
|
|
289
|
-
}) {
|
|
290
|
-
const prefersReducedMotion = usePrefersReducedMotion();
|
|
291
|
-
const isAnimationPaused = paused || prefersReducedMotion;
|
|
292
|
-
const containerStyle = react.useMemo(
|
|
293
|
-
() => ({
|
|
294
|
-
width: fullscreen ? "100vw" : width,
|
|
295
|
-
height: fullscreen ? "100vh" : height,
|
|
296
|
-
opacity,
|
|
297
|
-
filter: blur ? `blur(${blurAmount}px)` : void 0,
|
|
298
|
-
...style
|
|
299
|
-
}),
|
|
300
|
-
[fullscreen, width, height, opacity, blur, blurAmount, style]
|
|
301
|
-
);
|
|
302
|
-
const renderAnimation = /* @__PURE__ */ __name(() => {
|
|
303
|
-
const props = { colors, speed, intensity, paused: isAnimationPaused };
|
|
304
|
-
switch (animation) {
|
|
305
|
-
case "blob":
|
|
306
|
-
return /* @__PURE__ */ jsxRuntime.jsx(BlobBackground, { ...props, elementCount });
|
|
307
|
-
case "wave":
|
|
308
|
-
return /* @__PURE__ */ jsxRuntime.jsx(WaveBackground, { ...props });
|
|
309
|
-
case "mesh":
|
|
310
|
-
return /* @__PURE__ */ jsxRuntime.jsx(MeshBackground, { ...props });
|
|
311
|
-
case "parallax":
|
|
312
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
313
|
-
ParallaxBackground,
|
|
314
|
-
{
|
|
315
|
-
layers: parallaxLayers,
|
|
316
|
-
speed,
|
|
317
|
-
paused: isAnimationPaused
|
|
318
|
-
}
|
|
319
|
-
);
|
|
320
|
-
case "particles":
|
|
321
|
-
return /* @__PURE__ */ jsxRuntime.jsx(ParticlesBackground, { ...props, elementCount });
|
|
322
|
-
default:
|
|
323
|
-
return /* @__PURE__ */ jsxRuntime.jsx(GradientBackground, { ...props });
|
|
324
|
-
}
|
|
325
|
-
}, "renderAnimation");
|
|
326
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
327
|
-
"div",
|
|
328
|
-
{
|
|
329
|
-
className: utils.cn(
|
|
330
|
-
"relative overflow-hidden",
|
|
331
|
-
fullscreen && "fixed inset-0 z-0",
|
|
332
|
-
className
|
|
333
|
-
),
|
|
334
|
-
style: containerStyle,
|
|
335
|
-
children: [
|
|
336
|
-
renderAnimation(),
|
|
337
|
-
children && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative z-10 h-full w-full", children })
|
|
338
|
-
]
|
|
339
|
-
}
|
|
340
|
-
);
|
|
341
|
-
}
|
|
342
|
-
__name(AnimatedBackground, "AnimatedBackground");
|
|
343
|
-
var AnimatedBackgroundPresets = {
|
|
344
|
-
/**
|
|
345
|
-
* Calm gradient flow
|
|
346
|
-
*/
|
|
347
|
-
CalmGradient: /* @__PURE__ */ __name((props) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
348
|
-
AnimatedBackground,
|
|
349
|
-
{
|
|
350
|
-
animation: "gradient",
|
|
351
|
-
colors: ["#667eea", "#764ba2", "#f093fb", "#f5576c"],
|
|
352
|
-
speed: 0.5,
|
|
353
|
-
...props
|
|
354
|
-
}
|
|
355
|
-
), "CalmGradient"),
|
|
356
|
-
/**
|
|
357
|
-
* Ocean waves
|
|
358
|
-
*/
|
|
359
|
-
OceanWaves: /* @__PURE__ */ __name((props) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
360
|
-
AnimatedBackground,
|
|
361
|
-
{
|
|
362
|
-
animation: "wave",
|
|
363
|
-
colors: ["#0093E9", "#80D0C7"],
|
|
364
|
-
...props
|
|
365
|
-
}
|
|
366
|
-
), "OceanWaves"),
|
|
367
|
-
/**
|
|
368
|
-
* Floating bubbles
|
|
369
|
-
*/
|
|
370
|
-
FloatingBubbles: /* @__PURE__ */ __name((props) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
371
|
-
AnimatedBackground,
|
|
372
|
-
{
|
|
373
|
-
animation: "blob",
|
|
374
|
-
colors: ["#667eea", "#764ba2", "#f093fb"],
|
|
375
|
-
elementCount: 8,
|
|
376
|
-
...props
|
|
377
|
-
}
|
|
378
|
-
), "FloatingBubbles"),
|
|
379
|
-
/**
|
|
380
|
-
* Cosmic mesh
|
|
381
|
-
*/
|
|
382
|
-
CosmicMesh: /* @__PURE__ */ __name((props) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
383
|
-
AnimatedBackground,
|
|
384
|
-
{
|
|
385
|
-
animation: "mesh",
|
|
386
|
-
colors: ["#667eea", "#764ba2", "#f093fb", "#f5576c"],
|
|
387
|
-
...props
|
|
388
|
-
}
|
|
389
|
-
), "CosmicMesh"),
|
|
390
|
-
/**
|
|
391
|
-
* Starfield particles
|
|
392
|
-
*/
|
|
393
|
-
Starfield: /* @__PURE__ */ __name((props) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
394
|
-
AnimatedBackground,
|
|
395
|
-
{
|
|
396
|
-
animation: "particles",
|
|
397
|
-
colors: ["#ffffff", "#f0f0f0", "#e0e0e0"],
|
|
398
|
-
elementCount: 50,
|
|
399
|
-
intensity: 0.5,
|
|
400
|
-
...props
|
|
401
|
-
}
|
|
402
|
-
), "Starfield"),
|
|
403
|
-
/**
|
|
404
|
-
* Aurora parallax
|
|
405
|
-
*/
|
|
406
|
-
Aurora: /* @__PURE__ */ __name((props) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
407
|
-
AnimatedBackground,
|
|
408
|
-
{
|
|
409
|
-
animation: "parallax",
|
|
410
|
-
parallaxLayers: [
|
|
411
|
-
{ speed: 0.3, color: "#00ff8850", opacity: 0.4 },
|
|
412
|
-
{ speed: 0.6, color: "#0080ff50", opacity: 0.3 },
|
|
413
|
-
{ speed: 0.9, color: "#8000ff50", opacity: 0.3 },
|
|
414
|
-
{ speed: 1.2, color: "#ff008050", opacity: 0.2 }
|
|
415
|
-
],
|
|
416
|
-
...props
|
|
417
|
-
}
|
|
418
|
-
), "Aurora")
|
|
419
|
-
};
|
|
420
|
-
var background_default = AnimatedBackground;
|
|
421
|
-
|
|
422
|
-
exports.AnimatedBackground = AnimatedBackground;
|
|
423
|
-
exports.AnimatedBackgroundPresets = AnimatedBackgroundPresets;
|
|
424
|
-
exports.default = background_default;
|
|
2
|
+
'use strict';Object.defineProperty(exports,'__esModule',{value:true});var react=require('react'),react$1=require('motion/react'),utils=require('@/lib/utils'),jsxRuntime=require('react/jsx-runtime');var x=Object.defineProperty;var s=(n,o)=>x(n,"name",{value:o,configurable:true});function R(){let[n,o]=react.useState(false);return react.useEffect(()=>{if(typeof window>"u")return;let i=window.matchMedia("(prefers-reduced-motion: reduce)");o(i.matches);let r=s(d=>{o(d.matches);},"handleChange");return i.addEventListener("change",r),()=>i.removeEventListener("change",r)},[]),n}s(R,"usePrefersReducedMotion");function E({colors:n,speed:o,intensity:i,paused:r}){let d=n.length>=2?n:["#ff6b6b","#4ecdc4","#45b7d1","#96ceb4"];return jsxRuntime.jsx(react$1.motion.div,{className:"absolute inset-0",style:{background:`linear-gradient(-45deg, ${d.join(", ")})`,backgroundSize:"400% 400%"},animate:r?{}:{x:["0%","100%","0%"]},transition:{duration:10/o,repeat:1/0,ease:"linear"}})}s(E,"GradientBackground");function I({colors:n,speed:o,elementCount:i,intensity:r,paused:d}){let a=react.useMemo(()=>Array.from({length:i},(e,u)=>({id:u,color:n[u%n.length],size:Math.random()*200+100,x:Math.random()*100,y:Math.random()*100,duration:(Math.random()*10+10)/o})),[i,n,o]);return jsxRuntime.jsx("div",{className:"absolute inset-0 overflow-hidden",children:a.map(e=>jsxRuntime.jsx(react$1.motion.div,{className:"absolute rounded-full",style:{background:`radial-gradient(circle, ${e.color}40, transparent)`,width:e.size*r,height:e.size*r,filter:"blur(40px)"},initial:{x:`${e.x}%`,y:`${e.y}%`},animate:d?{}:{x:[`${e.x}%`,`${(e.x+50)%100}%`,`${e.x}%`],y:[`${e.y}%`,`${(e.y+30)%100}%`,`${e.y}%`],scale:[1,1.2,1]},transition:{duration:e.duration,repeat:1/0,ease:"easeInOut"}},e.id))})}s(I,"BlobBackground");function L({colors:n,speed:o,intensity:i,paused:r}){let d=n[0]||"#4ecdc4";return jsxRuntime.jsx("div",{className:"absolute inset-0 overflow-hidden",children:[0,1,2].map(a=>jsxRuntime.jsx(react$1.motion.div,{className:"absolute inset-0",style:{background:`radial-gradient(ellipse 100% 50% at center ${50+a*20}%, ${d}${Math.round(30*i).toString(16).padStart(2,"0")}, transparent)`},animate:r?{}:{y:[a*10,a*10+20*i,a*10]},transition:{duration:(3+a)/o,repeat:1/0,ease:"easeInOut"}},a))})}s(L,"WaveBackground");function S({colors:n,speed:o,intensity:i,paused:r}){let d=n.length>=4?n.slice(0,4):["#ff6b6b","#4ecdc4","#45b7d1","#96ceb4"];return jsxRuntime.jsx("div",{className:"absolute inset-0 overflow-hidden",children:d.map((a,e)=>jsxRuntime.jsx(react$1.motion.div,{className:"absolute rounded-full",style:{background:`radial-gradient(circle, ${a}60, transparent)`,width:`${60+e*20}%`,height:`${60+e*20}%`,filter:"blur(60px)",mixBlendMode:"multiply"},initial:{x:`${25+e*15}%`,y:`${25+e*15}%`},animate:r?{}:{x:[`${25+e*15}%`,`${35+e*15}%`,`${25+e*15}%`],y:[`${25+e*15}%`,`${15+e*15}%`,`${25+e*15}%`],rotate:[0,180,360]},transition:{duration:(8+e*2)/o,repeat:1/0,ease:"easeInOut"}},e))})}s(S,"MeshBackground");function W({layers:n,speed:o,paused:i}){let r=react$1.useMotionValue(0),d=react$1.useMotionValue(0);return react.useEffect(()=>{let a=s(e=>{let{clientX:u,clientY:l}=e,{innerWidth:p,innerHeight:y}=window;r.set((u/p-.5)*100),d.set((l/y-.5)*100);},"handleMouseMove");return window.addEventListener("mousemove",a),()=>window.removeEventListener("mousemove",a)},[r,d]),jsxRuntime.jsx("div",{className:"absolute inset-0 overflow-hidden",children:n.map((a,e)=>{let u=react$1.useTransform(r,[-50,50],[-a.speed*10,a.speed*10]),l=react$1.useTransform(d,[-50,50],[-a.speed*10,a.speed*10]);return jsxRuntime.jsx(react$1.motion.div,{className:"absolute inset-0",style:{background:`radial-gradient(circle, ${a.color}, transparent)`,opacity:a.opacity,x:i?0:u,y:i?0:l}},e)})})}s(W,"ParallaxBackground");function G({colors:n,speed:o,elementCount:i,intensity:r,paused:d}){let a=react.useMemo(()=>Array.from({length:i},(e,u)=>({id:u,color:n[u%n.length],size:Math.random()*4+2,x:Math.random()*100,y:Math.random()*100,duration:(Math.random()*20+20)/o,delay:Math.random()*5})),[i,n,o]);return jsxRuntime.jsx("div",{className:"absolute inset-0 overflow-hidden",children:a.map(e=>jsxRuntime.jsx(react$1.motion.div,{className:"absolute rounded-full",style:{backgroundColor:e.color,width:e.size*r,height:e.size*r,opacity:.6},initial:{x:`${e.x}%`,y:`${e.y}%`},animate:d?{}:{y:[`${e.y}%`,`${e.y-100}%`],opacity:[0,.6,0]},transition:{duration:e.duration,repeat:1/0,delay:e.delay,ease:"linear"}},e.id))})}s(G,"ParticlesBackground");function c({animation:n="gradient",speed:o=1,colors:i=["#ff6b6b","#4ecdc4","#45b7d1","#96ceb4","#ffeaa7"],paused:r=false,className:d,style:a,children:e,intensity:u=1,blur:l=false,blurAmount:p=20,opacity:y=1,elementCount:h=5,width:v="100%",height:$="100%",fullscreen:b=false,parallaxLayers:A=[{speed:.5,color:"#ff6b6b50",opacity:.3},{speed:1,color:"#4ecdc450",opacity:.4},{speed:1.5,color:"#45b7d150",opacity:.3}]}){let C=R(),k=r||C,N=react.useMemo(()=>({width:b?"100vw":v,height:b?"100vh":$,opacity:y,filter:l?`blur(${p}px)`:void 0,...a}),[b,v,$,y,l,p,a]),P=s(()=>{let f={colors:i,speed:o,intensity:u,paused:k};switch(n){case "blob":return jsxRuntime.jsx(I,{...f,elementCount:h});case "wave":return jsxRuntime.jsx(L,{...f});case "mesh":return jsxRuntime.jsx(S,{...f});case "parallax":return jsxRuntime.jsx(W,{layers:A,speed:o,paused:k});case "particles":return jsxRuntime.jsx(G,{...f,elementCount:h});default:return jsxRuntime.jsx(E,{...f})}},"renderAnimation");return jsxRuntime.jsxs("div",{className:utils.cn("relative overflow-hidden",b&&"fixed inset-0 z-0",d),style:N,children:[P(),e&&jsxRuntime.jsx("div",{className:"relative z-10 h-full w-full",children:e})]})}s(c,"AnimatedBackground");var V={CalmGradient:s(n=>jsxRuntime.jsx(c,{animation:"gradient",colors:["#667eea","#764ba2","#f093fb","#f5576c"],speed:.5,...n}),"CalmGradient"),OceanWaves:s(n=>jsxRuntime.jsx(c,{animation:"wave",colors:["#0093E9","#80D0C7"],...n}),"OceanWaves"),FloatingBubbles:s(n=>jsxRuntime.jsx(c,{animation:"blob",colors:["#667eea","#764ba2","#f093fb"],elementCount:8,...n}),"FloatingBubbles"),CosmicMesh:s(n=>jsxRuntime.jsx(c,{animation:"mesh",colors:["#667eea","#764ba2","#f093fb","#f5576c"],...n}),"CosmicMesh"),Starfield:s(n=>jsxRuntime.jsx(c,{animation:"particles",colors:["#ffffff","#f0f0f0","#e0e0e0"],elementCount:50,intensity:.5,...n}),"Starfield"),Aurora:s(n=>jsxRuntime.jsx(c,{animation:"parallax",parallaxLayers:[{speed:.3,color:"#00ff8850",opacity:.4},{speed:.6,color:"#0080ff50",opacity:.3},{speed:.9,color:"#8000ff50",opacity:.3},{speed:1.2,color:"#ff008050",opacity:.2}],...n}),"Aurora")},j=c;exports.AnimatedBackground=c;exports.AnimatedBackgroundPresets=V;exports.default=j;
|