@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,352 +1,2 @@
1
1
  "use client";
2
- 'use strict';
3
-
4
- var React = require('react');
5
- var classVarianceAuthority = require('class-variance-authority');
6
- var framerMotion = require('framer-motion');
7
- var utils = require('@hanzo/ui/lib/utils');
8
- var jsxRuntime = require('react/jsx-runtime');
9
-
10
- function _interopNamespace(e) {
11
- if (e && e.__esModule) return e;
12
- var n = Object.create(null);
13
- if (e) {
14
- Object.keys(e).forEach(function (k) {
15
- if (k !== 'default') {
16
- var d = Object.getOwnPropertyDescriptor(e, k);
17
- Object.defineProperty(n, k, d.get ? d : {
18
- enumerable: true,
19
- get: function () { return e[k]; }
20
- });
21
- }
22
- });
23
- }
24
- n.default = e;
25
- return Object.freeze(n);
26
- }
27
-
28
- var React__namespace = /*#__PURE__*/_interopNamespace(React);
29
-
30
- var __defProp = Object.defineProperty;
31
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
32
- var marquee3DVariants = classVarianceAuthority.cva(
33
- [
34
- "relative overflow-hidden whitespace-nowrap",
35
- "transform-gpu will-change-transform",
36
- "[perspective:1000px]"
37
- ],
38
- {
39
- variants: {
40
- variant: {
41
- default: [
42
- "bg-background text-foreground",
43
- "[&_.marquee-content]:text-current"
44
- ],
45
- neon: [
46
- "bg-black text-cyan-400",
47
- "[&_.marquee-content]:text-cyan-400",
48
- "[&_.marquee-content]:drop-shadow-[0_0_10px_currentColor]",
49
- "[&_.marquee-content]:animate-pulse"
50
- ],
51
- rainbow: [
52
- "bg-black",
53
- "[&_.marquee-content]:bg-gradient-to-r [&_.marquee-content]:from-red-500 [&_.marquee-content]:via-yellow-500 [&_.marquee-content]:via-green-500 [&_.marquee-content]:via-blue-500 [&_.marquee-content]:to-purple-500",
54
- "[&_.marquee-content]:bg-clip-text [&_.marquee-content]:text-transparent"
55
- ],
56
- metallic: [
57
- "bg-slate-900",
58
- "[&_.marquee-content]:bg-gradient-to-b [&_.marquee-content]:from-gray-200 [&_.marquee-content]:via-gray-400 [&_.marquee-content]:to-gray-600",
59
- "[&_.marquee-content]:bg-clip-text [&_.marquee-content]:text-transparent"
60
- ],
61
- fire: [
62
- "bg-black",
63
- "[&_.marquee-content]:bg-gradient-to-t [&_.marquee-content]:from-red-600 [&_.marquee-content]:via-orange-500 [&_.marquee-content]:to-yellow-400",
64
- "[&_.marquee-content]:bg-clip-text [&_.marquee-content]:text-transparent",
65
- "[&_.marquee-content]:drop-shadow-[0_0_20px_#ff6600]"
66
- ],
67
- glass: [
68
- "bg-white/10 backdrop-blur-sm",
69
- "[&_.marquee-content]:text-white/90",
70
- "[&_.marquee-content]:drop-shadow-[0_0_10px_rgba(255,255,255,0.3)]"
71
- ]
72
- },
73
- size: {
74
- sm: "h-8 text-sm [&_.marquee-content]:py-1",
75
- default: "h-12 text-base [&_.marquee-content]:py-2",
76
- lg: "h-16 text-lg [&_.marquee-content]:py-3",
77
- xl: "h-20 text-xl [&_.marquee-content]:py-4",
78
- "2xl": "h-24 text-2xl [&_.marquee-content]:py-5",
79
- "3xl": "h-32 text-3xl [&_.marquee-content]:py-6"
80
- },
81
- direction: {
82
- left: "",
83
- right: "",
84
- up: "flex-col",
85
- down: "flex-col"
86
- },
87
- perspective: {
88
- none: "[perspective:none]",
89
- sm: "[perspective:500px]",
90
- default: "[perspective:1000px]",
91
- lg: "[perspective:1500px]",
92
- xl: "[perspective:2000px]"
93
- }
94
- },
95
- defaultVariants: {
96
- variant: "default",
97
- size: "default",
98
- direction: "left",
99
- perspective: "default"
100
- }
101
- }
102
- );
103
- var Marquee3D = React__namespace.forwardRef(
104
- ({
105
- className,
106
- variant,
107
- size,
108
- direction = "left",
109
- perspective,
110
- children,
111
- speed = 50,
112
- pauseOnHover = false,
113
- reverse = false,
114
- repeat = 5,
115
- gap = 0,
116
- rotateX = 0,
117
- rotateY = 0,
118
- rotateZ = 0,
119
- autoFill = false,
120
- gradient = false,
121
- gradientColor = "#ffffff",
122
- gradientWidth = 200,
123
- style,
124
- ...props
125
- }, ref) => {
126
- const [containerWidth, setContainerWidth] = React__namespace.useState(0);
127
- const [contentWidth, setContentWidth] = React__namespace.useState(0);
128
- const containerRef = React__namespace.useRef(null);
129
- const contentRef = React__namespace.useRef(null);
130
- React__namespace.useEffect(() => {
131
- const measureDimensions = /* @__PURE__ */ __name(() => {
132
- if (containerRef.current && contentRef.current) {
133
- const containerRect = containerRef.current.getBoundingClientRect();
134
- const contentRect = contentRef.current.getBoundingClientRect();
135
- if (direction === "left" || direction === "right") {
136
- setContainerWidth(containerRect.width);
137
- setContentWidth(contentRect.width);
138
- } else {
139
- setContainerWidth(containerRect.height);
140
- setContentWidth(contentRect.height);
141
- }
142
- }
143
- }, "measureDimensions");
144
- measureDimensions();
145
- window.addEventListener("resize", measureDimensions);
146
- return () => window.removeEventListener("resize", measureDimensions);
147
- }, [direction, children]);
148
- const duration = React__namespace.useMemo(() => {
149
- if (contentWidth === 0) return 20;
150
- return contentWidth / speed;
151
- }, [contentWidth, speed]);
152
- const actualRepeat = React__namespace.useMemo(() => {
153
- if (autoFill && containerWidth > 0 && contentWidth > 0) {
154
- return Math.ceil(containerWidth / contentWidth) + 2;
155
- }
156
- return repeat;
157
- }, [autoFill, containerWidth, contentWidth, repeat]);
158
- const getAnimationProps = /* @__PURE__ */ __name(() => {
159
- const distance = contentWidth + gap;
160
- let animateProps = {};
161
- if (direction === "left") {
162
- animateProps = {
163
- x: reverse ? [distance, -distance] : [-distance, distance]
164
- };
165
- } else if (direction === "right") {
166
- animateProps = {
167
- x: reverse ? [-distance, distance] : [distance, -distance]
168
- };
169
- } else if (direction === "up") {
170
- animateProps = {
171
- y: reverse ? [distance, -distance] : [-distance, distance]
172
- };
173
- } else if (direction === "down") {
174
- animateProps = {
175
- y: reverse ? [-distance, distance] : [distance, -distance]
176
- };
177
- }
178
- return {
179
- animate: animateProps,
180
- transition: {
181
- duration,
182
- ease: "linear",
183
- repeat: Infinity
184
- }
185
- };
186
- }, "getAnimationProps");
187
- const transform3D = `perspective(1000px) rotateX(${rotateX}deg) rotateY(${rotateY}deg) rotateZ(${rotateZ}deg)`;
188
- const gradientMask = gradient ? {
189
- maskImage: `linear-gradient(to right, transparent, ${gradientColor} ${gradientWidth}px, ${gradientColor} calc(100% - ${gradientWidth}px), transparent)`,
190
- WebkitMaskImage: `linear-gradient(to right, transparent, ${gradientColor} ${gradientWidth}px, ${gradientColor} calc(100% - ${gradientWidth}px), transparent)`
191
- } : {};
192
- return /* @__PURE__ */ jsxRuntime.jsx(
193
- "div",
194
- {
195
- ref: containerRef,
196
- className: utils.cn(
197
- marquee3DVariants({ variant, size, direction, perspective }),
198
- "flex items-center",
199
- direction === "up" || direction === "down" ? "flex-col" : "flex-row",
200
- className
201
- ),
202
- style: {
203
- ...style,
204
- transform: transform3D,
205
- ...gradientMask
206
- },
207
- ...props,
208
- children: /* @__PURE__ */ jsxRuntime.jsx(
209
- framerMotion.motion.div,
210
- {
211
- ref: contentRef,
212
- className: utils.cn(
213
- "marquee-content flex shrink-0 font-bold",
214
- direction === "up" || direction === "down" ? "flex-col" : "flex-row",
215
- pauseOnHover && "hover:[animation-play-state:paused]"
216
- ),
217
- style: {
218
- gap: `${gap}px`
219
- },
220
- ...getAnimationProps(),
221
- children: Array.from({ length: actualRepeat }).map((_, index) => /* @__PURE__ */ jsxRuntime.jsxs(React__namespace.Fragment, { children: [
222
- /* @__PURE__ */ jsxRuntime.jsx(
223
- "div",
224
- {
225
- className: utils.cn(
226
- "flex shrink-0 items-center justify-center",
227
- direction === "up" || direction === "down" ? "flex-col" : "flex-row"
228
- ),
229
- style: {
230
- transform: `rotateX(${rotateX}deg) rotateY(${rotateY}deg) rotateZ(${rotateZ}deg)`,
231
- transformStyle: "preserve-3d"
232
- },
233
- children
234
- }
235
- ),
236
- index < actualRepeat - 1 && gap > 0 && /* @__PURE__ */ jsxRuntime.jsx(
237
- "div",
238
- {
239
- style: {
240
- width: direction === "up" || direction === "down" ? "100%" : `${gap}px`,
241
- height: direction === "up" || direction === "down" ? `${gap}px` : "100%"
242
- }
243
- }
244
- )
245
- ] }, index))
246
- }
247
- )
248
- }
249
- );
250
- }
251
- );
252
- Marquee3D.displayName = "Marquee3D";
253
- var Marquee3DPreset = {
254
- Hero: React__namespace.forwardRef((props, ref) => /* @__PURE__ */ jsxRuntime.jsx(
255
- Marquee3D,
256
- {
257
- ref,
258
- variant: "rainbow",
259
- size: "3xl",
260
- speed: 30,
261
- rotateX: -10,
262
- gradient: true,
263
- ...props
264
- }
265
- )),
266
- Neon: React__namespace.forwardRef((props, ref) => /* @__PURE__ */ jsxRuntime.jsx(
267
- Marquee3D,
268
- {
269
- ref,
270
- variant: "neon",
271
- size: "xl",
272
- speed: 40,
273
- rotateY: 5,
274
- pauseOnHover: true,
275
- ...props
276
- }
277
- )),
278
- Metallic: React__namespace.forwardRef((props, ref) => /* @__PURE__ */ jsxRuntime.jsx(
279
- Marquee3D,
280
- {
281
- ref,
282
- variant: "metallic",
283
- size: "lg",
284
- speed: 35,
285
- rotateX: -5,
286
- rotateY: 2,
287
- gradient: true,
288
- gradientColor: "#c4c4c4",
289
- ...props
290
- }
291
- )),
292
- Fire: React__namespace.forwardRef((props, ref) => /* @__PURE__ */ jsxRuntime.jsx(
293
- Marquee3D,
294
- {
295
- ref,
296
- variant: "fire",
297
- size: "2xl",
298
- speed: 60,
299
- rotateZ: 1,
300
- gradient: true,
301
- gradientColor: "#ff6600",
302
- ...props
303
- }
304
- )),
305
- Glass: React__namespace.forwardRef((props, ref) => /* @__PURE__ */ jsxRuntime.jsx(
306
- Marquee3D,
307
- {
308
- ref,
309
- variant: "glass",
310
- size: "lg",
311
- speed: 25,
312
- rotateX: -8,
313
- pauseOnHover: true,
314
- gradient: true,
315
- gradientColor: "rgba(255,255,255,0.9)",
316
- ...props
317
- }
318
- ))
319
- };
320
- Marquee3DPreset.Hero.displayName = "Marquee3DPreset.Hero";
321
- Marquee3DPreset.Neon.displayName = "Marquee3DPreset.Neon";
322
- Marquee3DPreset.Metallic.displayName = "Marquee3DPreset.Metallic";
323
- Marquee3DPreset.Fire.displayName = "Marquee3DPreset.Fire";
324
- Marquee3DPreset.Glass.displayName = "Marquee3DPreset.Glass";
325
- var Marquee3DFloating = React__namespace.forwardRef(({ children, floatIntensity = 10, floatSpeed = 3, ...props }, ref) => {
326
- const text = typeof children === "string" ? children : "";
327
- return /* @__PURE__ */ jsxRuntime.jsx(Marquee3D, { ref, ...props, children: text ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex space-x-1", children: text.split("").map((char, index) => /* @__PURE__ */ jsxRuntime.jsx(
328
- framerMotion.motion.span,
329
- {
330
- className: "inline-block",
331
- animate: {
332
- y: [0, -floatIntensity, 0],
333
- rotateX: [0, 5, 0],
334
- rotateY: [0, 2, 0]
335
- },
336
- transition: {
337
- duration: floatSpeed,
338
- ease: "easeInOut",
339
- repeat: Infinity,
340
- delay: index * 0.1
341
- },
342
- children: char === " " ? "\xA0" : char
343
- },
344
- index
345
- )) }) : children });
346
- });
347
- Marquee3DFloating.displayName = "Marquee3DFloating";
348
-
349
- exports.Marquee3D = Marquee3D;
350
- exports.Marquee3DFloating = Marquee3DFloating;
351
- exports.Marquee3DPreset = Marquee3DPreset;
352
- exports.marquee3DVariants = marquee3DVariants;
2
+ 'use strict';var a=require('react'),classVarianceAuthority=require('class-variance-authority'),framerMotion=require('framer-motion'),utils=require('@hanzo/ui/lib/utils'),jsxRuntime=require('react/jsx-runtime');function _interopNamespace(e){if(e&&e.__esModule)return e;var n=Object.create(null);if(e){Object.keys(e).forEach(function(k){if(k!=='default'){var d=Object.getOwnPropertyDescriptor(e,k);Object.defineProperty(n,k,d.get?d:{enumerable:true,get:function(){return e[k]}});}})}n.default=e;return Object.freeze(n)}var a__namespace=/*#__PURE__*/_interopNamespace(a);var X=Object.defineProperty;var w=(r,n)=>X(r,"name",{value:n,configurable:true});var A=classVarianceAuthority.cva(["relative overflow-hidden whitespace-nowrap","transform-gpu will-change-transform","[perspective:1000px]"],{variants:{variant:{default:["bg-background text-foreground","[&_.marquee-content]:text-current"],neon:["bg-black text-cyan-400","[&_.marquee-content]:text-cyan-400","[&_.marquee-content]:drop-shadow-[0_0_10px_currentColor]","[&_.marquee-content]:animate-pulse"],rainbow:["bg-black","[&_.marquee-content]:bg-gradient-to-r [&_.marquee-content]:from-red-500 [&_.marquee-content]:via-yellow-500 [&_.marquee-content]:via-green-500 [&_.marquee-content]:via-blue-500 [&_.marquee-content]:to-purple-500","[&_.marquee-content]:bg-clip-text [&_.marquee-content]:text-transparent"],metallic:["bg-slate-900","[&_.marquee-content]:bg-gradient-to-b [&_.marquee-content]:from-gray-200 [&_.marquee-content]:via-gray-400 [&_.marquee-content]:to-gray-600","[&_.marquee-content]:bg-clip-text [&_.marquee-content]:text-transparent"],fire:["bg-black","[&_.marquee-content]:bg-gradient-to-t [&_.marquee-content]:from-red-600 [&_.marquee-content]:via-orange-500 [&_.marquee-content]:to-yellow-400","[&_.marquee-content]:bg-clip-text [&_.marquee-content]:text-transparent","[&_.marquee-content]:drop-shadow-[0_0_20px_#ff6600]"],glass:["bg-white/10 backdrop-blur-sm","[&_.marquee-content]:text-white/90","[&_.marquee-content]:drop-shadow-[0_0_10px_rgba(255,255,255,0.3)]"]},size:{sm:"h-8 text-sm [&_.marquee-content]:py-1",default:"h-12 text-base [&_.marquee-content]:py-2",lg:"h-16 text-lg [&_.marquee-content]:py-3",xl:"h-20 text-xl [&_.marquee-content]:py-4","2xl":"h-24 text-2xl [&_.marquee-content]:py-5","3xl":"h-32 text-3xl [&_.marquee-content]:py-6"},direction:{left:"",right:"",up:"flex-col",down:"flex-col"},perspective:{none:"[perspective:none]",sm:"[perspective:500px]",default:"[perspective:1000px]",lg:"[perspective:1500px]",xl:"[perspective:2000px]"}},defaultVariants:{variant:"default",size:"default",direction:"left",perspective:"default"}}),l=a__namespace.forwardRef(({className:r,variant:n,size:v,direction:e="left",perspective:b,children:c,speed:u=50,pauseOnHover:d=false,reverse:g=false,repeat:D=5,gap:m=0,rotateX:h=0,rotateY:P=0,rotateZ:H=0,autoFill:$=false,gradient:L=false,gradientColor:x="#ffffff",gradientWidth:q=200,style:T,...O},W)=>{let[_,N]=a__namespace.useState(0),[i,k]=a__namespace.useState(0),y=a__namespace.useRef(null),M=a__namespace.useRef(null);a__namespace.useEffect(()=>{let p=w(()=>{if(y.current&&M.current){let t=y.current.getBoundingClientRect(),s=M.current.getBoundingClientRect();e==="left"||e==="right"?(N(t.width),k(s.width)):(N(t.height),k(s.height));}},"measureDimensions");return p(),window.addEventListener("resize",p),()=>window.removeEventListener("resize",p)},[e,c]);let F=a__namespace.useMemo(()=>i===0?20:i/u,[i,u]),z=a__namespace.useMemo(()=>$&&_>0&&i>0?Math.ceil(_/i)+2:D,[$,_,i,D]),C=w(()=>{let t=i+m,s={};return e==="left"?s={x:g?[t,-t]:[-t,t]}:e==="right"?s={x:g?[-t,t]:[t,-t]}:e==="up"?s={y:g?[t,-t]:[-t,t]}:e==="down"&&(s={y:g?[-t,t]:[t,-t]}),{animate:s,transition:{duration:F,ease:"linear",repeat:1/0}}},"getAnimationProps"),I=`perspective(1000px) rotateX(${h}deg) rotateY(${P}deg) rotateZ(${H}deg)`,V=L?{maskImage:`linear-gradient(to right, transparent, ${x} ${q}px, ${x} calc(100% - ${q}px), transparent)`,WebkitMaskImage:`linear-gradient(to right, transparent, ${x} ${q}px, ${x} calc(100% - ${q}px), transparent)`}:{};return jsxRuntime.jsx("div",{ref:y,className:utils.cn(A({variant:n,size:v,direction:e,perspective:b}),"flex items-center",e==="up"||e==="down"?"flex-col":"flex-row",r),style:{...T,transform:I,...V},...O,children:jsxRuntime.jsx(framerMotion.motion.div,{ref:M,className:utils.cn("marquee-content flex shrink-0 font-bold",e==="up"||e==="down"?"flex-col":"flex-row",d&&"hover:[animation-play-state:paused]"),style:{gap:`${m}px`},...C(),children:Array.from({length:z}).map((p,t)=>jsxRuntime.jsxs(a__namespace.Fragment,{children:[jsxRuntime.jsx("div",{className:utils.cn("flex shrink-0 items-center justify-center",e==="up"||e==="down"?"flex-col":"flex-row"),style:{transform:`rotateX(${h}deg) rotateY(${P}deg) rotateZ(${H}deg)`,transformStyle:"preserve-3d"},children:c}),t<z-1&&m>0&&jsxRuntime.jsx("div",{style:{width:e==="up"||e==="down"?"100%":`${m}px`,height:e==="up"||e==="down"?`${m}px`:"100%"}})]},t))})})});l.displayName="Marquee3D";var f={Hero:a__namespace.forwardRef((r,n)=>jsxRuntime.jsx(l,{ref:n,variant:"rainbow",size:"3xl",speed:30,rotateX:-10,gradient:true,...r})),Neon:a__namespace.forwardRef((r,n)=>jsxRuntime.jsx(l,{ref:n,variant:"neon",size:"xl",speed:40,rotateY:5,pauseOnHover:true,...r})),Metallic:a__namespace.forwardRef((r,n)=>jsxRuntime.jsx(l,{ref:n,variant:"metallic",size:"lg",speed:35,rotateX:-5,rotateY:2,gradient:true,gradientColor:"#c4c4c4",...r})),Fire:a__namespace.forwardRef((r,n)=>jsxRuntime.jsx(l,{ref:n,variant:"fire",size:"2xl",speed:60,rotateZ:1,gradient:true,gradientColor:"#ff6600",...r})),Glass:a__namespace.forwardRef((r,n)=>jsxRuntime.jsx(l,{ref:n,variant:"glass",size:"lg",speed:25,rotateX:-8,pauseOnHover:true,gradient:true,gradientColor:"rgba(255,255,255,0.9)",...r}))};f.Hero.displayName="Marquee3DPreset.Hero";f.Neon.displayName="Marquee3DPreset.Neon";f.Metallic.displayName="Marquee3DPreset.Metallic";f.Fire.displayName="Marquee3DPreset.Fire";f.Glass.displayName="Marquee3DPreset.Glass";var S=a__namespace.forwardRef(({children:r,floatIntensity:n=10,floatSpeed:v=3,...e},b)=>{let c=typeof r=="string"?r:"";return jsxRuntime.jsx(l,{ref:b,...e,children:c?jsxRuntime.jsx("div",{className:"flex space-x-1",children:c.split("").map((u,d)=>jsxRuntime.jsx(framerMotion.motion.span,{className:"inline-block",animate:{y:[0,-n,0],rotateX:[0,5,0],rotateY:[0,2,0]},transition:{duration:v,ease:"easeInOut",repeat:1/0,delay:d*.1},children:u===" "?"\xA0":u},d))}):r})});S.displayName="Marquee3DFloating";exports.Marquee3D=l;exports.Marquee3DFloating=S;exports.Marquee3DPreset=f;exports.marquee3DVariants=A;