@hanzo/ui 5.3.25 → 5.3.28

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 (326) hide show
  1. package/content/index.ts +26 -0
  2. package/docs/_registry/index.ts +426 -0
  3. package/docs/_registry/layout/docs-min.tsx +197 -0
  4. package/docs/_registry/layout/page-min.tsx +128 -0
  5. package/docs/components/accordion.tsx +118 -0
  6. package/docs/components/banner.tsx +144 -0
  7. package/docs/components/callout.tsx +112 -0
  8. package/docs/components/card.tsx +52 -0
  9. package/docs/components/codeblock.tsx +258 -0
  10. package/docs/components/dialog/search-algolia.tsx +132 -0
  11. package/docs/components/dialog/search-default.tsx +131 -0
  12. package/docs/components/dialog/search-orama.tsx +143 -0
  13. package/docs/components/dialog/search.tsx +529 -0
  14. package/docs/components/dynamic-codeblock.tsx +129 -0
  15. package/docs/components/files.tsx +81 -0
  16. package/docs/components/github-info.tsx +107 -0
  17. package/docs/components/heading.tsx +33 -0
  18. package/docs/components/image-zoom.css +77 -0
  19. package/docs/components/image-zoom.tsx +58 -0
  20. package/docs/components/index.ts +7 -0
  21. package/docs/components/inline-toc.tsx +48 -0
  22. package/docs/components/sidebar/base.tsx +451 -0
  23. package/docs/components/sidebar/link-item.tsx +65 -0
  24. package/docs/components/sidebar/page-tree.tsx +113 -0
  25. package/docs/components/sidebar/tabs/dropdown.tsx +109 -0
  26. package/docs/components/sidebar/tabs/index.tsx +89 -0
  27. package/docs/components/steps.tsx +9 -0
  28. package/docs/components/tabs.tsx +203 -0
  29. package/docs/components/toc/clerk.tsx +173 -0
  30. package/docs/components/toc/default.tsx +57 -0
  31. package/docs/components/toc/index.tsx +136 -0
  32. package/docs/components/type-table.tsx +174 -0
  33. package/docs/components/ui/accordion.tsx +88 -0
  34. package/docs/components/ui/button.tsx +28 -0
  35. package/docs/components/ui/collapsible.tsx +42 -0
  36. package/docs/components/ui/navigation-menu.tsx +83 -0
  37. package/docs/components/ui/popover.tsx +32 -0
  38. package/docs/components/ui/scroll-area.tsx +59 -0
  39. package/docs/components/ui/tabs.tsx +145 -0
  40. package/docs/contexts/i18n.tsx +56 -0
  41. package/docs/contexts/search.tsx +165 -0
  42. package/docs/contexts/tree.tsx +65 -0
  43. package/docs/css/black.css +39 -0
  44. package/docs/css/catppuccin.css +49 -0
  45. package/docs/css/colors/index.css +51 -0
  46. package/docs/css/dusk.css +47 -0
  47. package/docs/css/layouts/docs.css +1 -0
  48. package/docs/css/layouts/home.css +1 -0
  49. package/docs/css/layouts/notebook.css +1 -0
  50. package/docs/css/neutral.css +7 -0
  51. package/docs/css/ocean.css +48 -0
  52. package/docs/css/preset.css +305 -0
  53. package/docs/css/purple.css +39 -0
  54. package/docs/css/shadcn.css +36 -0
  55. package/docs/css/shiki.css +90 -0
  56. package/docs/css/solar.css +75 -0
  57. package/docs/css/style.css +9 -0
  58. package/docs/css/vitepress.css +77 -0
  59. package/docs/i18n.tsx +30 -0
  60. package/docs/icons.tsx +354 -0
  61. package/docs/layouts/docs/client.tsx +129 -0
  62. package/docs/layouts/docs/index.tsx +321 -0
  63. package/docs/layouts/docs/page/client.tsx +376 -0
  64. package/docs/layouts/docs/page/index.tsx +251 -0
  65. package/docs/layouts/docs/sidebar.tsx +265 -0
  66. package/docs/layouts/home/client.tsx +375 -0
  67. package/docs/layouts/home/index.tsx +51 -0
  68. package/docs/layouts/home/navbar.tsx +55 -0
  69. package/docs/layouts/notebook/client.tsx +281 -0
  70. package/docs/layouts/notebook/index.tsx +461 -0
  71. package/docs/layouts/notebook/page/client.tsx +375 -0
  72. package/docs/layouts/notebook/page/index.tsx +251 -0
  73. package/docs/layouts/notebook/sidebar.tsx +248 -0
  74. package/docs/layouts/shared/index.tsx +89 -0
  75. package/docs/layouts/shared/language-toggle.tsx +66 -0
  76. package/docs/layouts/shared/link-item.tsx +119 -0
  77. package/docs/layouts/shared/search-toggle.tsx +78 -0
  78. package/docs/layouts/shared/theme-toggle.tsx +86 -0
  79. package/docs/mdx.server.tsx +37 -0
  80. package/docs/mdx.tsx +97 -0
  81. package/docs/og.tsx +101 -0
  82. package/docs/page.tsx +85 -0
  83. package/docs/provider/base.tsx +173 -0
  84. package/docs/provider/next.tsx +23 -0
  85. package/docs/provider/react-router.tsx +23 -0
  86. package/docs/provider/tanstack.tsx +23 -0
  87. package/docs/provider/waku.tsx +23 -0
  88. package/docs/source.ts +3 -0
  89. package/docs/theme/typography/LICENSE +21 -0
  90. package/docs/theme/typography/index.ts +201 -0
  91. package/docs/theme/typography/styles.ts +449 -0
  92. package/docs/utils/cn.ts +1 -0
  93. package/docs/utils/is-active.ts +23 -0
  94. package/docs/utils/merge-refs.ts +15 -0
  95. package/docs/utils/use-copy-button.ts +39 -0
  96. package/docs/utils/use-footer-items.ts +27 -0
  97. package/docs/utils/use-is-scroll-top.ts +21 -0
  98. package/package.json +8 -2
  99. package/dist/3d/button.js +0 -298
  100. package/dist/3d/button.mjs +0 -273
  101. package/dist/3d/card.js +0 -234
  102. package/dist/3d/card.mjs +0 -207
  103. package/dist/3d/carousel.js +0 -371
  104. package/dist/3d/carousel.mjs +0 -344
  105. package/dist/3d/grid.js +0 -362
  106. package/dist/3d/grid.mjs +0 -337
  107. package/dist/3d/index.js +0 -1518
  108. package/dist/3d/index.mjs +0 -1472
  109. package/dist/3d/marquee.js +0 -352
  110. package/dist/3d/marquee.mjs +0 -327
  111. package/dist/3d/pin.js +0 -46
  112. package/dist/3d/pin.mjs +0 -24
  113. package/dist/accordion.js +0 -80
  114. package/dist/accordion.mjs +0 -55
  115. package/dist/alert-dialog.js +0 -220
  116. package/dist/alert-dialog.mjs +0 -187
  117. package/dist/alert.js +0 -68
  118. package/dist/alert.mjs +0 -64
  119. package/dist/animation/animated-background.js +0 -424
  120. package/dist/animation/animated-background.mjs +0 -418
  121. package/dist/animation/animated-beam.js +0 -119
  122. package/dist/animation/animated-beam.mjs +0 -97
  123. package/dist/animation/animated-cursor.js +0 -275
  124. package/dist/animation/animated-cursor.mjs +0 -270
  125. package/dist/animation/animated-icon.js +0 -357
  126. package/dist/animation/animated-icon.mjs +0 -351
  127. package/dist/animation/animated-list.js +0 -339
  128. package/dist/animation/animated-list.mjs +0 -333
  129. package/dist/animation/animated-number.js +0 -283
  130. package/dist/animation/animated-number.mjs +0 -277
  131. package/dist/animation/animated-testimonials.js +0 -97
  132. package/dist/animation/animated-testimonials.mjs +0 -75
  133. package/dist/animation/animated-tooltip.js +0 -67
  134. package/dist/animation/animated-tooltip.mjs +0 -45
  135. package/dist/animation/apple-cards-carousel.js +0 -308
  136. package/dist/animation/apple-cards-carousel.mjs +0 -285
  137. package/dist/animation/apple-hello-effect.js +0 -60
  138. package/dist/animation/apple-hello-effect.mjs +0 -38
  139. package/dist/animation/index.js +0 -1952
  140. package/dist/animation/index.mjs +0 -1921
  141. package/dist/avatar.js +0 -71
  142. package/dist/avatar.mjs +0 -47
  143. package/dist/badge.js +0 -66
  144. package/dist/badge.mjs +0 -40
  145. package/dist/blocks/index.js +0 -1665
  146. package/dist/blocks/index.mjs +0 -1626
  147. package/dist/breadcrumb.js +0 -107
  148. package/dist/breadcrumb.mjs +0 -99
  149. package/dist/calendar.js +0 -189
  150. package/dist/calendar.mjs +0 -164
  151. package/dist/carousel.js +0 -278
  152. package/dist/carousel.mjs +0 -249
  153. package/dist/checkbox.js +0 -60
  154. package/dist/checkbox.mjs +0 -35
  155. package/dist/code/block.js +0 -226
  156. package/dist/code/block.mjs +0 -203
  157. package/dist/code/compare.js +0 -446
  158. package/dist/code/compare.mjs +0 -423
  159. package/dist/code/diff.js +0 -430
  160. package/dist/code/diff.mjs +0 -407
  161. package/dist/code/editor.js +0 -243
  162. package/dist/code/editor.mjs +0 -218
  163. package/dist/code/explorer.js +0 -291
  164. package/dist/code/explorer.mjs +0 -268
  165. package/dist/code/index.js +0 -2551
  166. package/dist/code/index.mjs +0 -2510
  167. package/dist/code/preview.js +0 -400
  168. package/dist/code/preview.mjs +0 -377
  169. package/dist/code/snippet.js +0 -274
  170. package/dist/code/snippet.mjs +0 -250
  171. package/dist/code/tabs.js +0 -75
  172. package/dist/code/tabs.mjs +0 -53
  173. package/dist/code/terminal.js +0 -437
  174. package/dist/code/terminal.mjs +0 -414
  175. package/dist/collapsible.js +0 -33
  176. package/dist/collapsible.mjs +0 -9
  177. package/dist/command.js +0 -262
  178. package/dist/command.mjs +0 -232
  179. package/dist/context-menu.js +0 -207
  180. package/dist/context-menu.mjs +0 -171
  181. package/dist/device/index.js +0 -3
  182. package/dist/device/index.mjs +0 -2
  183. package/dist/dialog.js +0 -151
  184. package/dist/dialog.mjs +0 -121
  185. package/dist/dock/basic.js +0 -174
  186. package/dist/dock/basic.mjs +0 -151
  187. package/dist/dock/index.js +0 -628
  188. package/dist/dock/index.mjs +0 -601
  189. package/dist/dock/limelight-nav.js +0 -295
  190. package/dist/dock/limelight-nav.mjs +0 -274
  191. package/dist/dock/macos.js +0 -141
  192. package/dist/dock/macos.mjs +0 -118
  193. package/dist/dock/menu.js +0 -70
  194. package/dist/dock/menu.mjs +0 -48
  195. package/dist/dock/message.js +0 -144
  196. package/dist/dock/message.mjs +0 -122
  197. package/dist/drawer.js +0 -115
  198. package/dist/drawer.mjs +0 -103
  199. package/dist/dropdown-menu.js +0 -202
  200. package/dist/dropdown-menu.mjs +0 -166
  201. package/dist/finance/AdvancedChart.js +0 -48
  202. package/dist/finance/AdvancedChart.mjs +0 -46
  203. package/dist/finance/CompanyProfile.js +0 -48
  204. package/dist/finance/CompanyProfile.mjs +0 -46
  205. package/dist/finance/CryptoScreener.js +0 -45
  206. package/dist/finance/CryptoScreener.mjs +0 -43
  207. package/dist/finance/Financials.js +0 -52
  208. package/dist/finance/Financials.mjs +0 -50
  209. package/dist/finance/ForexScreener.js +0 -46
  210. package/dist/finance/ForexScreener.mjs +0 -44
  211. package/dist/finance/MarketOverview.js +0 -104
  212. package/dist/finance/MarketOverview.mjs +0 -102
  213. package/dist/finance/NewsTimeline.js +0 -44
  214. package/dist/finance/NewsTimeline.mjs +0 -42
  215. package/dist/finance/OrderEntry.js +0 -131
  216. package/dist/finance/OrderEntry.mjs +0 -129
  217. package/dist/finance/OrdersHistory.js +0 -64
  218. package/dist/finance/OrdersHistory.mjs +0 -62
  219. package/dist/finance/PositionsList.js +0 -80
  220. package/dist/finance/PositionsList.mjs +0 -78
  221. package/dist/finance/StockScreener.js +0 -46
  222. package/dist/finance/StockScreener.mjs +0 -44
  223. package/dist/finance/SymbolInfo.js +0 -46
  224. package/dist/finance/SymbolInfo.mjs +0 -44
  225. package/dist/finance/TechnicalAnalysis.js +0 -54
  226. package/dist/finance/TechnicalAnalysis.mjs +0 -52
  227. package/dist/finance/TickerTape.js +0 -56
  228. package/dist/finance/TickerTape.mjs +0 -54
  229. package/dist/finance/TradingPanel.js +0 -191
  230. package/dist/finance/TradingPanel.mjs +0 -189
  231. package/dist/finance/index.js +0 -930
  232. package/dist/finance/index.mjs +0 -914
  233. package/dist/form/index.js +0 -155
  234. package/dist/form/index.mjs +0 -125
  235. package/dist/form.js +0 -172
  236. package/dist/form.mjs +0 -142
  237. package/dist/hover-card.js +0 -58
  238. package/dist/hover-card.mjs +0 -34
  239. package/dist/index.js +0 -10179
  240. package/dist/index.mjs +0 -9785
  241. package/dist/input-otp.js +0 -79
  242. package/dist/input-otp.mjs +0 -54
  243. package/dist/lib/utils.js +0 -28
  244. package/dist/lib/utils.mjs +0 -24
  245. package/dist/navigation/index.js +0 -98
  246. package/dist/navigation/index.mjs +0 -79
  247. package/dist/navigation-menu.js +0 -149
  248. package/dist/navigation-menu.mjs +0 -116
  249. package/dist/pattern/grid-pattern.js +0 -333
  250. package/dist/pattern/grid-pattern.mjs +0 -310
  251. package/dist/pattern/index.js +0 -333
  252. package/dist/pattern/index.mjs +0 -310
  253. package/dist/popover.js +0 -63
  254. package/dist/popover.mjs +0 -37
  255. package/dist/primitives/index.js +0 -10179
  256. package/dist/primitives/index.mjs +0 -9785
  257. package/dist/primitives-export.js +0 -10179
  258. package/dist/primitives-export.mjs +0 -9785
  259. package/dist/progress.js +0 -62
  260. package/dist/progress.mjs +0 -37
  261. package/dist/project/gantt.js +0 -65
  262. package/dist/project/gantt.mjs +0 -43
  263. package/dist/project/index.js +0 -636
  264. package/dist/project/index.mjs +0 -611
  265. package/dist/project/kanban.js +0 -597
  266. package/dist/project/kanban.mjs +0 -572
  267. package/dist/project/list.js +0 -35
  268. package/dist/project/list.mjs +0 -12
  269. package/dist/radio-group.js +0 -68
  270. package/dist/radio-group.mjs +0 -45
  271. package/dist/resizable.js +0 -72
  272. package/dist/resizable.mjs +0 -48
  273. package/dist/scroll-area.js +0 -89
  274. package/dist/scroll-area.mjs +0 -66
  275. package/dist/select.js +0 -140
  276. package/dist/select.mjs +0 -111
  277. package/dist/separator.js +0 -59
  278. package/dist/separator.mjs +0 -34
  279. package/dist/sheet.js +0 -148
  280. package/dist/sheet.mjs +0 -117
  281. package/dist/skeleton.js +0 -32
  282. package/dist/skeleton.mjs +0 -27
  283. package/dist/slider.js +0 -99
  284. package/dist/slider.mjs +0 -73
  285. package/dist/sonner.js +0 -34
  286. package/dist/sonner.mjs +0 -29
  287. package/dist/switch.js +0 -62
  288. package/dist/switch.mjs +0 -37
  289. package/dist/table.js +0 -110
  290. package/dist/table.mjs +0 -101
  291. package/dist/tabs.js +0 -82
  292. package/dist/tabs.mjs +0 -57
  293. package/dist/tailwind/index.js +0 -2023
  294. package/dist/tailwind/index.mjs +0 -2011
  295. package/dist/textarea.js +0 -78
  296. package/dist/textarea.mjs +0 -56
  297. package/dist/toggle-group.js +0 -118
  298. package/dist/toggle-group.mjs +0 -93
  299. package/dist/toggle.js +0 -71
  300. package/dist/toggle.mjs +0 -48
  301. package/dist/tooltip.js +0 -67
  302. package/dist/tooltip.mjs +0 -40
  303. package/dist/types/index.js +0 -57
  304. package/dist/types/index.mjs +0 -51
  305. package/dist/ui/announcement.js +0 -129
  306. package/dist/ui/announcement.mjs +0 -107
  307. package/dist/ui/avatar-group.js +0 -88
  308. package/dist/ui/avatar-group.mjs +0 -65
  309. package/dist/ui/banner.js +0 -85
  310. package/dist/ui/banner.mjs +0 -62
  311. package/dist/ui/cursor.js +0 -78
  312. package/dist/ui/cursor.mjs +0 -56
  313. package/dist/ui/index.js +0 -475
  314. package/dist/ui/index.mjs +0 -442
  315. package/dist/ui/marquee.js +0 -74
  316. package/dist/ui/marquee.mjs +0 -52
  317. package/dist/ui/pill.js +0 -85
  318. package/dist/ui/pill.mjs +0 -62
  319. package/dist/ui/spinner.js +0 -28
  320. package/dist/ui/spinner.mjs +0 -26
  321. package/dist/ui/tags.js +0 -101
  322. package/dist/ui/tags.mjs +0 -79
  323. package/dist/ui/ticker.js +0 -73
  324. package/dist/ui/ticker.mjs +0 -51
  325. package/dist/util/index.js +0 -457
  326. package/dist/util/index.mjs +0 -399
@@ -1,352 +0,0 @@
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;
@@ -1,327 +0,0 @@
1
- "use client";
2
- import * as React from 'react';
3
- import { cva } from 'class-variance-authority';
4
- import { motion } from 'framer-motion';
5
- import { cn } from '@hanzo/ui/lib/utils';
6
- import { jsx, jsxs } from 'react/jsx-runtime';
7
-
8
- var __defProp = Object.defineProperty;
9
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
10
- var marquee3DVariants = cva(
11
- [
12
- "relative overflow-hidden whitespace-nowrap",
13
- "transform-gpu will-change-transform",
14
- "[perspective:1000px]"
15
- ],
16
- {
17
- variants: {
18
- variant: {
19
- default: [
20
- "bg-background text-foreground",
21
- "[&_.marquee-content]:text-current"
22
- ],
23
- neon: [
24
- "bg-black text-cyan-400",
25
- "[&_.marquee-content]:text-cyan-400",
26
- "[&_.marquee-content]:drop-shadow-[0_0_10px_currentColor]",
27
- "[&_.marquee-content]:animate-pulse"
28
- ],
29
- rainbow: [
30
- "bg-black",
31
- "[&_.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",
32
- "[&_.marquee-content]:bg-clip-text [&_.marquee-content]:text-transparent"
33
- ],
34
- metallic: [
35
- "bg-slate-900",
36
- "[&_.marquee-content]:bg-gradient-to-b [&_.marquee-content]:from-gray-200 [&_.marquee-content]:via-gray-400 [&_.marquee-content]:to-gray-600",
37
- "[&_.marquee-content]:bg-clip-text [&_.marquee-content]:text-transparent"
38
- ],
39
- fire: [
40
- "bg-black",
41
- "[&_.marquee-content]:bg-gradient-to-t [&_.marquee-content]:from-red-600 [&_.marquee-content]:via-orange-500 [&_.marquee-content]:to-yellow-400",
42
- "[&_.marquee-content]:bg-clip-text [&_.marquee-content]:text-transparent",
43
- "[&_.marquee-content]:drop-shadow-[0_0_20px_#ff6600]"
44
- ],
45
- glass: [
46
- "bg-white/10 backdrop-blur-sm",
47
- "[&_.marquee-content]:text-white/90",
48
- "[&_.marquee-content]:drop-shadow-[0_0_10px_rgba(255,255,255,0.3)]"
49
- ]
50
- },
51
- size: {
52
- sm: "h-8 text-sm [&_.marquee-content]:py-1",
53
- default: "h-12 text-base [&_.marquee-content]:py-2",
54
- lg: "h-16 text-lg [&_.marquee-content]:py-3",
55
- xl: "h-20 text-xl [&_.marquee-content]:py-4",
56
- "2xl": "h-24 text-2xl [&_.marquee-content]:py-5",
57
- "3xl": "h-32 text-3xl [&_.marquee-content]:py-6"
58
- },
59
- direction: {
60
- left: "",
61
- right: "",
62
- up: "flex-col",
63
- down: "flex-col"
64
- },
65
- perspective: {
66
- none: "[perspective:none]",
67
- sm: "[perspective:500px]",
68
- default: "[perspective:1000px]",
69
- lg: "[perspective:1500px]",
70
- xl: "[perspective:2000px]"
71
- }
72
- },
73
- defaultVariants: {
74
- variant: "default",
75
- size: "default",
76
- direction: "left",
77
- perspective: "default"
78
- }
79
- }
80
- );
81
- var Marquee3D = React.forwardRef(
82
- ({
83
- className,
84
- variant,
85
- size,
86
- direction = "left",
87
- perspective,
88
- children,
89
- speed = 50,
90
- pauseOnHover = false,
91
- reverse = false,
92
- repeat = 5,
93
- gap = 0,
94
- rotateX = 0,
95
- rotateY = 0,
96
- rotateZ = 0,
97
- autoFill = false,
98
- gradient = false,
99
- gradientColor = "#ffffff",
100
- gradientWidth = 200,
101
- style,
102
- ...props
103
- }, ref) => {
104
- const [containerWidth, setContainerWidth] = React.useState(0);
105
- const [contentWidth, setContentWidth] = React.useState(0);
106
- const containerRef = React.useRef(null);
107
- const contentRef = React.useRef(null);
108
- React.useEffect(() => {
109
- const measureDimensions = /* @__PURE__ */ __name(() => {
110
- if (containerRef.current && contentRef.current) {
111
- const containerRect = containerRef.current.getBoundingClientRect();
112
- const contentRect = contentRef.current.getBoundingClientRect();
113
- if (direction === "left" || direction === "right") {
114
- setContainerWidth(containerRect.width);
115
- setContentWidth(contentRect.width);
116
- } else {
117
- setContainerWidth(containerRect.height);
118
- setContentWidth(contentRect.height);
119
- }
120
- }
121
- }, "measureDimensions");
122
- measureDimensions();
123
- window.addEventListener("resize", measureDimensions);
124
- return () => window.removeEventListener("resize", measureDimensions);
125
- }, [direction, children]);
126
- const duration = React.useMemo(() => {
127
- if (contentWidth === 0) return 20;
128
- return contentWidth / speed;
129
- }, [contentWidth, speed]);
130
- const actualRepeat = React.useMemo(() => {
131
- if (autoFill && containerWidth > 0 && contentWidth > 0) {
132
- return Math.ceil(containerWidth / contentWidth) + 2;
133
- }
134
- return repeat;
135
- }, [autoFill, containerWidth, contentWidth, repeat]);
136
- const getAnimationProps = /* @__PURE__ */ __name(() => {
137
- const distance = contentWidth + gap;
138
- let animateProps = {};
139
- if (direction === "left") {
140
- animateProps = {
141
- x: reverse ? [distance, -distance] : [-distance, distance]
142
- };
143
- } else if (direction === "right") {
144
- animateProps = {
145
- x: reverse ? [-distance, distance] : [distance, -distance]
146
- };
147
- } else if (direction === "up") {
148
- animateProps = {
149
- y: reverse ? [distance, -distance] : [-distance, distance]
150
- };
151
- } else if (direction === "down") {
152
- animateProps = {
153
- y: reverse ? [-distance, distance] : [distance, -distance]
154
- };
155
- }
156
- return {
157
- animate: animateProps,
158
- transition: {
159
- duration,
160
- ease: "linear",
161
- repeat: Infinity
162
- }
163
- };
164
- }, "getAnimationProps");
165
- const transform3D = `perspective(1000px) rotateX(${rotateX}deg) rotateY(${rotateY}deg) rotateZ(${rotateZ}deg)`;
166
- const gradientMask = gradient ? {
167
- maskImage: `linear-gradient(to right, transparent, ${gradientColor} ${gradientWidth}px, ${gradientColor} calc(100% - ${gradientWidth}px), transparent)`,
168
- WebkitMaskImage: `linear-gradient(to right, transparent, ${gradientColor} ${gradientWidth}px, ${gradientColor} calc(100% - ${gradientWidth}px), transparent)`
169
- } : {};
170
- return /* @__PURE__ */ jsx(
171
- "div",
172
- {
173
- ref: containerRef,
174
- className: cn(
175
- marquee3DVariants({ variant, size, direction, perspective }),
176
- "flex items-center",
177
- direction === "up" || direction === "down" ? "flex-col" : "flex-row",
178
- className
179
- ),
180
- style: {
181
- ...style,
182
- transform: transform3D,
183
- ...gradientMask
184
- },
185
- ...props,
186
- children: /* @__PURE__ */ jsx(
187
- motion.div,
188
- {
189
- ref: contentRef,
190
- className: cn(
191
- "marquee-content flex shrink-0 font-bold",
192
- direction === "up" || direction === "down" ? "flex-col" : "flex-row",
193
- pauseOnHover && "hover:[animation-play-state:paused]"
194
- ),
195
- style: {
196
- gap: `${gap}px`
197
- },
198
- ...getAnimationProps(),
199
- children: Array.from({ length: actualRepeat }).map((_, index) => /* @__PURE__ */ jsxs(React.Fragment, { children: [
200
- /* @__PURE__ */ jsx(
201
- "div",
202
- {
203
- className: cn(
204
- "flex shrink-0 items-center justify-center",
205
- direction === "up" || direction === "down" ? "flex-col" : "flex-row"
206
- ),
207
- style: {
208
- transform: `rotateX(${rotateX}deg) rotateY(${rotateY}deg) rotateZ(${rotateZ}deg)`,
209
- transformStyle: "preserve-3d"
210
- },
211
- children
212
- }
213
- ),
214
- index < actualRepeat - 1 && gap > 0 && /* @__PURE__ */ jsx(
215
- "div",
216
- {
217
- style: {
218
- width: direction === "up" || direction === "down" ? "100%" : `${gap}px`,
219
- height: direction === "up" || direction === "down" ? `${gap}px` : "100%"
220
- }
221
- }
222
- )
223
- ] }, index))
224
- }
225
- )
226
- }
227
- );
228
- }
229
- );
230
- Marquee3D.displayName = "Marquee3D";
231
- var Marquee3DPreset = {
232
- Hero: React.forwardRef((props, ref) => /* @__PURE__ */ jsx(
233
- Marquee3D,
234
- {
235
- ref,
236
- variant: "rainbow",
237
- size: "3xl",
238
- speed: 30,
239
- rotateX: -10,
240
- gradient: true,
241
- ...props
242
- }
243
- )),
244
- Neon: React.forwardRef((props, ref) => /* @__PURE__ */ jsx(
245
- Marquee3D,
246
- {
247
- ref,
248
- variant: "neon",
249
- size: "xl",
250
- speed: 40,
251
- rotateY: 5,
252
- pauseOnHover: true,
253
- ...props
254
- }
255
- )),
256
- Metallic: React.forwardRef((props, ref) => /* @__PURE__ */ jsx(
257
- Marquee3D,
258
- {
259
- ref,
260
- variant: "metallic",
261
- size: "lg",
262
- speed: 35,
263
- rotateX: -5,
264
- rotateY: 2,
265
- gradient: true,
266
- gradientColor: "#c4c4c4",
267
- ...props
268
- }
269
- )),
270
- Fire: React.forwardRef((props, ref) => /* @__PURE__ */ jsx(
271
- Marquee3D,
272
- {
273
- ref,
274
- variant: "fire",
275
- size: "2xl",
276
- speed: 60,
277
- rotateZ: 1,
278
- gradient: true,
279
- gradientColor: "#ff6600",
280
- ...props
281
- }
282
- )),
283
- Glass: React.forwardRef((props, ref) => /* @__PURE__ */ jsx(
284
- Marquee3D,
285
- {
286
- ref,
287
- variant: "glass",
288
- size: "lg",
289
- speed: 25,
290
- rotateX: -8,
291
- pauseOnHover: true,
292
- gradient: true,
293
- gradientColor: "rgba(255,255,255,0.9)",
294
- ...props
295
- }
296
- ))
297
- };
298
- Marquee3DPreset.Hero.displayName = "Marquee3DPreset.Hero";
299
- Marquee3DPreset.Neon.displayName = "Marquee3DPreset.Neon";
300
- Marquee3DPreset.Metallic.displayName = "Marquee3DPreset.Metallic";
301
- Marquee3DPreset.Fire.displayName = "Marquee3DPreset.Fire";
302
- Marquee3DPreset.Glass.displayName = "Marquee3DPreset.Glass";
303
- var Marquee3DFloating = React.forwardRef(({ children, floatIntensity = 10, floatSpeed = 3, ...props }, ref) => {
304
- const text = typeof children === "string" ? children : "";
305
- return /* @__PURE__ */ jsx(Marquee3D, { ref, ...props, children: text ? /* @__PURE__ */ jsx("div", { className: "flex space-x-1", children: text.split("").map((char, index) => /* @__PURE__ */ jsx(
306
- motion.span,
307
- {
308
- className: "inline-block",
309
- animate: {
310
- y: [0, -floatIntensity, 0],
311
- rotateX: [0, 5, 0],
312
- rotateY: [0, 2, 0]
313
- },
314
- transition: {
315
- duration: floatSpeed,
316
- ease: "easeInOut",
317
- repeat: Infinity,
318
- delay: index * 0.1
319
- },
320
- children: char === " " ? "\xA0" : char
321
- },
322
- index
323
- )) }) : children });
324
- });
325
- Marquee3DFloating.displayName = "Marquee3DFloating";
326
-
327
- export { Marquee3D, Marquee3DFloating, Marquee3DPreset, marquee3DVariants };