@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.
Files changed (254) hide show
  1. package/bin/create-registry.js +0 -0
  2. package/bin/npx-registry-mcp.js +0 -0
  3. package/bin/registry-mcp-wrapper.sh +0 -0
  4. package/bin/registry-mcp.js +0 -0
  5. package/bin/start-mcp-server.sh +0 -0
  6. package/bin/test-mcp.sh +0 -0
  7. package/dist/3d/button.js +1 -297
  8. package/dist/3d/button.mjs +1 -272
  9. package/dist/3d/card.js +1 -233
  10. package/dist/3d/card.mjs +1 -206
  11. package/dist/3d/carousel.js +1 -370
  12. package/dist/3d/carousel.mjs +1 -343
  13. package/dist/3d/grid.js +1 -361
  14. package/dist/3d/grid.mjs +1 -336
  15. package/dist/3d/index.js +1 -1517
  16. package/dist/3d/index.mjs +1 -1471
  17. package/dist/3d/marquee.js +1 -351
  18. package/dist/3d/marquee.mjs +1 -326
  19. package/dist/3d/pin.js +1 -45
  20. package/dist/3d/pin.mjs +1 -23
  21. package/dist/accordion.js +1 -79
  22. package/dist/accordion.mjs +1 -54
  23. package/dist/alert-dialog.js +1 -224
  24. package/dist/alert-dialog.mjs +1 -191
  25. package/dist/alert.js +1 -97
  26. package/dist/alert.mjs +1 -91
  27. package/dist/animation/animated-background.js +1 -423
  28. package/dist/animation/animated-background.mjs +1 -417
  29. package/dist/animation/animated-beam.js +1 -118
  30. package/dist/animation/animated-beam.mjs +1 -96
  31. package/dist/animation/animated-cursor.js +1 -274
  32. package/dist/animation/animated-cursor.mjs +1 -269
  33. package/dist/animation/animated-icon.js +2 -356
  34. package/dist/animation/animated-icon.mjs +2 -350
  35. package/dist/animation/animated-list.js +1 -338
  36. package/dist/animation/animated-list.mjs +1 -332
  37. package/dist/animation/animated-number.js +1 -282
  38. package/dist/animation/animated-number.mjs +1 -276
  39. package/dist/animation/animated-testimonials.js +1 -96
  40. package/dist/animation/animated-testimonials.mjs +1 -74
  41. package/dist/animation/animated-tooltip.js +1 -66
  42. package/dist/animation/animated-tooltip.mjs +1 -44
  43. package/dist/animation/apple-cards-carousel.js +1 -307
  44. package/dist/animation/apple-cards-carousel.mjs +1 -284
  45. package/dist/animation/apple-hello-effect.js +1 -59
  46. package/dist/animation/apple-hello-effect.mjs +1 -37
  47. package/dist/animation/index.js +2 -1951
  48. package/dist/animation/index.mjs +2 -1920
  49. package/dist/avatar.js +1 -70
  50. package/dist/avatar.mjs +1 -46
  51. package/dist/badge.js +1 -60
  52. package/dist/badge.mjs +1 -54
  53. package/dist/blocks/index.js +2 -1684
  54. package/dist/blocks/index.mjs +2 -1645
  55. package/dist/breadcrumb.js +1 -106
  56. package/dist/breadcrumb.mjs +1 -98
  57. package/dist/calendar-ext/index.js +1 -207
  58. package/dist/calendar-ext/index.mjs +1 -169
  59. package/dist/calendar.js +1 -193
  60. package/dist/calendar.mjs +1 -168
  61. package/dist/carousel.js +1 -282
  62. package/dist/carousel.mjs +1 -253
  63. package/dist/charts/index.js +6 -5840
  64. package/dist/charts/index.mjs +6 -5749
  65. package/dist/checkbox.js +1 -59
  66. package/dist/checkbox.mjs +1 -34
  67. package/dist/code/block.js +2 -225
  68. package/dist/code/block.mjs +2 -202
  69. package/dist/code/compare.js +5 -444
  70. package/dist/code/compare.mjs +5 -421
  71. package/dist/code/diff.js +12 -429
  72. package/dist/code/diff.mjs +11 -405
  73. package/dist/code/editor.js +1 -242
  74. package/dist/code/editor.mjs +1 -217
  75. package/dist/code/explorer.js +1 -290
  76. package/dist/code/explorer.mjs +1 -267
  77. package/dist/code/index.js +26 -2514
  78. package/dist/code/index.mjs +24 -2471
  79. package/dist/code/preview.js +6 -363
  80. package/dist/code/preview.mjs +6 -340
  81. package/dist/code/snippet.js +2 -273
  82. package/dist/code/snippet.mjs +2 -249
  83. package/dist/code/tabs.js +1 -74
  84. package/dist/code/tabs.mjs +1 -52
  85. package/dist/code/terminal.js +3 -436
  86. package/dist/code/terminal.mjs +3 -413
  87. package/dist/collapsible.js +1 -32
  88. package/dist/collapsible.mjs +1 -8
  89. package/dist/command.js +1 -282
  90. package/dist/command.mjs +1 -251
  91. package/dist/context-menu.js +1 -206
  92. package/dist/context-menu.mjs +1 -170
  93. package/dist/desktop/hooks.js +1 -223
  94. package/dist/desktop/hooks.mjs +1 -198
  95. package/dist/desktop/index.js +1 -685
  96. package/dist/desktop/index.mjs +1 -657
  97. package/dist/desktop/spotlight.js +1 -260
  98. package/dist/desktop/spotlight.mjs +1 -235
  99. package/dist/desktop/window.js +1 -273
  100. package/dist/desktop/window.mjs +1 -247
  101. package/dist/device/index.js +1 -2
  102. package/dist/device/index.mjs +0 -1
  103. package/dist/dialog.js +1 -245
  104. package/dist/dialog.mjs +1 -213
  105. package/dist/dock/basic.js +1 -173
  106. package/dist/dock/basic.mjs +1 -150
  107. package/dist/dock/index.js +1 -647
  108. package/dist/dock/index.mjs +1 -620
  109. package/dist/dock/limelight-nav.js +1 -314
  110. package/dist/dock/limelight-nav.mjs +1 -293
  111. package/dist/dock/macos.js +1 -140
  112. package/dist/dock/macos.mjs +1 -117
  113. package/dist/dock/menu.js +1 -69
  114. package/dist/dock/menu.mjs +1 -47
  115. package/dist/dock/message.js +1 -148
  116. package/dist/dock/message.mjs +1 -126
  117. package/dist/drawer.js +1 -114
  118. package/dist/drawer.mjs +1 -102
  119. package/dist/dropdown-menu.js +1 -201
  120. package/dist/dropdown-menu.mjs +1 -165
  121. package/dist/finance/AdvancedChart.js +2 -47
  122. package/dist/finance/AdvancedChart.mjs +2 -45
  123. package/dist/finance/CompanyProfile.js +2 -47
  124. package/dist/finance/CompanyProfile.mjs +2 -45
  125. package/dist/finance/CryptoScreener.js +2 -44
  126. package/dist/finance/CryptoScreener.mjs +2 -42
  127. package/dist/finance/Financials.js +2 -51
  128. package/dist/finance/Financials.mjs +2 -49
  129. package/dist/finance/ForexScreener.js +2 -45
  130. package/dist/finance/ForexScreener.mjs +2 -43
  131. package/dist/finance/MarketOverview.js +2 -103
  132. package/dist/finance/MarketOverview.mjs +2 -101
  133. package/dist/finance/NewsTimeline.js +2 -43
  134. package/dist/finance/NewsTimeline.mjs +2 -41
  135. package/dist/finance/OrderEntry.js +1 -130
  136. package/dist/finance/OrderEntry.mjs +1 -128
  137. package/dist/finance/OrdersHistory.js +1 -63
  138. package/dist/finance/OrdersHistory.mjs +1 -61
  139. package/dist/finance/PositionsList.js +1 -79
  140. package/dist/finance/PositionsList.mjs +1 -77
  141. package/dist/finance/StockScreener.js +2 -45
  142. package/dist/finance/StockScreener.mjs +2 -43
  143. package/dist/finance/SymbolInfo.js +2 -45
  144. package/dist/finance/SymbolInfo.mjs +2 -43
  145. package/dist/finance/TechnicalAnalysis.js +2 -53
  146. package/dist/finance/TechnicalAnalysis.mjs +2 -51
  147. package/dist/finance/TickerTape.js +2 -55
  148. package/dist/finance/TickerTape.mjs +2 -53
  149. package/dist/finance/TradingPanel.js +1 -190
  150. package/dist/finance/TradingPanel.mjs +1 -188
  151. package/dist/finance/index.js +2 -929
  152. package/dist/finance/index.mjs +2 -913
  153. package/dist/form/index.js +1 -153
  154. package/dist/form/index.mjs +1 -123
  155. package/dist/form.js +1 -171
  156. package/dist/form.mjs +1 -141
  157. package/dist/hover-card.js +1 -57
  158. package/dist/hover-card.mjs +1 -33
  159. package/dist/index.js +192 -9618
  160. package/dist/index.mjs +192 -9202
  161. package/dist/input-otp.js +1 -78
  162. package/dist/input-otp.mjs +1 -53
  163. package/dist/kanban/index.js +1 -593
  164. package/dist/kanban/index.mjs +1 -571
  165. package/dist/lib/utils.js +1 -28
  166. package/dist/lib/utils.mjs +1 -24
  167. package/dist/mermaid/index.js +1 -280
  168. package/dist/mermaid/index.mjs +1 -253
  169. package/dist/navigation/index.js +1 -97
  170. package/dist/navigation/index.mjs +1 -78
  171. package/dist/navigation-menu.js +1 -148
  172. package/dist/navigation-menu.mjs +1 -115
  173. package/dist/pattern/grid-pattern.js +3 -325
  174. package/dist/pattern/grid-pattern.mjs +3 -302
  175. package/dist/pattern/index.js +3 -325
  176. package/dist/pattern/index.mjs +3 -302
  177. package/dist/popover.js +1 -62
  178. package/dist/popover.mjs +1 -36
  179. package/dist/progress.js +1 -61
  180. package/dist/progress.mjs +1 -36
  181. package/dist/project/gantt.js +1 -64
  182. package/dist/project/gantt.mjs +1 -42
  183. package/dist/project/index.js +1 -635
  184. package/dist/project/index.mjs +1 -610
  185. package/dist/project/kanban.js +1 -596
  186. package/dist/project/kanban.mjs +1 -571
  187. package/dist/project/list.js +1 -34
  188. package/dist/project/list.mjs +1 -11
  189. package/dist/radio-group.js +1 -67
  190. package/dist/radio-group.mjs +1 -44
  191. package/dist/resizable.js +1 -71
  192. package/dist/resizable.mjs +1 -47
  193. package/dist/scroll-area.js +1 -88
  194. package/dist/scroll-area.mjs +1 -65
  195. package/dist/select.js +1 -139
  196. package/dist/select.mjs +1 -110
  197. package/dist/separator.js +1 -58
  198. package/dist/separator.mjs +1 -33
  199. package/dist/sheet.js +1 -147
  200. package/dist/sheet.mjs +1 -116
  201. package/dist/skeleton.js +1 -31
  202. package/dist/skeleton.mjs +1 -26
  203. package/dist/slider.js +1 -98
  204. package/dist/slider.mjs +1 -72
  205. package/dist/sonner.js +1 -33
  206. package/dist/sonner.mjs +1 -28
  207. package/dist/spline/index.js +1 -210
  208. package/dist/spline/index.mjs +1 -201
  209. package/dist/spline/media-stack.js +1 -192
  210. package/dist/spline/media-stack.mjs +1 -184
  211. package/dist/spline/player.js +1 -36
  212. package/dist/spline/player.mjs +1 -30
  213. package/dist/switch.js +1 -61
  214. package/dist/switch.mjs +1 -36
  215. package/dist/table.js +1 -109
  216. package/dist/table.mjs +1 -100
  217. package/dist/tabs.js +1 -127
  218. package/dist/tabs.mjs +1 -101
  219. package/dist/tailwind/index.mjs +1 -2011
  220. package/dist/textarea.js +1 -77
  221. package/dist/textarea.mjs +1 -55
  222. package/dist/toggle-group.js +1 -117
  223. package/dist/toggle-group.mjs +1 -92
  224. package/dist/toggle.js +1 -70
  225. package/dist/toggle.mjs +1 -47
  226. package/dist/tooltip.js +1 -66
  227. package/dist/tooltip.mjs +1 -39
  228. package/dist/types/index.mjs +1 -51
  229. package/dist/ui/announcement.js +1 -133
  230. package/dist/ui/announcement.mjs +1 -111
  231. package/dist/ui/avatar-group.js +1 -87
  232. package/dist/ui/avatar-group.mjs +1 -64
  233. package/dist/ui/banner.js +1 -84
  234. package/dist/ui/banner.mjs +1 -61
  235. package/dist/ui/cursor.js +1 -77
  236. package/dist/ui/cursor.mjs +1 -55
  237. package/dist/ui/index.js +1 -494
  238. package/dist/ui/index.mjs +1 -461
  239. package/dist/ui/marquee.js +1 -73
  240. package/dist/ui/marquee.mjs +1 -51
  241. package/dist/ui/pill.js +1 -84
  242. package/dist/ui/pill.mjs +1 -61
  243. package/dist/ui/spinner.js +1 -27
  244. package/dist/ui/spinner.mjs +1 -25
  245. package/dist/ui/tags.js +1 -116
  246. package/dist/ui/tags.mjs +1 -94
  247. package/dist/ui/ticker.js +1 -72
  248. package/dist/ui/ticker.mjs +1 -50
  249. package/dist/util/index.mjs +1 -404
  250. package/package.json +28 -27
  251. package/dist/primitives/index.js +0 -9619
  252. package/dist/primitives/index.mjs +0 -9203
  253. package/dist/primitives-export.js +0 -9619
  254. 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;