@hanzo/ui 5.3.35 → 5.3.36
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/create-registry.js +0 -0
- package/bin/npx-registry-mcp.js +0 -0
- package/bin/registry-mcp-wrapper.sh +0 -0
- package/bin/registry-mcp.js +0 -0
- package/bin/start-mcp-server.sh +0 -0
- package/bin/test-mcp.sh +0 -0
- package/dist/3d/button.js +1 -297
- package/dist/3d/button.mjs +1 -272
- package/dist/3d/card.js +1 -233
- package/dist/3d/card.mjs +1 -206
- package/dist/3d/carousel.js +1 -370
- package/dist/3d/carousel.mjs +1 -343
- package/dist/3d/grid.js +1 -361
- package/dist/3d/grid.mjs +1 -336
- package/dist/3d/index.js +1 -1517
- package/dist/3d/index.mjs +1 -1471
- package/dist/3d/marquee.js +1 -351
- package/dist/3d/marquee.mjs +1 -326
- package/dist/3d/pin.js +1 -45
- package/dist/3d/pin.mjs +1 -23
- package/dist/accordion.js +1 -79
- package/dist/accordion.mjs +1 -54
- package/dist/alert-dialog.js +1 -224
- package/dist/alert-dialog.mjs +1 -191
- package/dist/alert.js +1 -97
- package/dist/alert.mjs +1 -91
- package/dist/animation/animated-background.js +1 -423
- package/dist/animation/animated-background.mjs +1 -417
- package/dist/animation/animated-beam.js +1 -118
- package/dist/animation/animated-beam.mjs +1 -96
- package/dist/animation/animated-cursor.js +1 -274
- package/dist/animation/animated-cursor.mjs +1 -269
- package/dist/animation/animated-icon.js +2 -356
- package/dist/animation/animated-icon.mjs +2 -350
- package/dist/animation/animated-list.js +1 -338
- package/dist/animation/animated-list.mjs +1 -332
- package/dist/animation/animated-number.js +1 -282
- package/dist/animation/animated-number.mjs +1 -276
- package/dist/animation/animated-testimonials.js +1 -96
- package/dist/animation/animated-testimonials.mjs +1 -74
- package/dist/animation/animated-tooltip.js +1 -66
- package/dist/animation/animated-tooltip.mjs +1 -44
- package/dist/animation/apple-cards-carousel.js +1 -307
- package/dist/animation/apple-cards-carousel.mjs +1 -284
- package/dist/animation/apple-hello-effect.js +1 -59
- package/dist/animation/apple-hello-effect.mjs +1 -37
- package/dist/animation/index.js +2 -1951
- package/dist/animation/index.mjs +2 -1920
- package/dist/avatar.js +1 -70
- package/dist/avatar.mjs +1 -46
- package/dist/badge.js +1 -60
- package/dist/badge.mjs +1 -54
- package/dist/blocks/index.js +2 -1684
- package/dist/blocks/index.mjs +2 -1645
- package/dist/breadcrumb.js +1 -106
- package/dist/breadcrumb.mjs +1 -98
- package/dist/calendar-ext/index.js +1 -207
- package/dist/calendar-ext/index.mjs +1 -169
- package/dist/calendar.js +1 -193
- package/dist/calendar.mjs +1 -168
- package/dist/carousel.js +1 -282
- package/dist/carousel.mjs +1 -253
- package/dist/charts/index.js +6 -5840
- package/dist/charts/index.mjs +6 -5749
- package/dist/checkbox.js +1 -59
- package/dist/checkbox.mjs +1 -34
- package/dist/code/block.js +2 -225
- package/dist/code/block.mjs +2 -202
- package/dist/code/compare.js +5 -444
- package/dist/code/compare.mjs +5 -421
- package/dist/code/diff.js +12 -429
- package/dist/code/diff.mjs +11 -405
- package/dist/code/editor.js +1 -242
- package/dist/code/editor.mjs +1 -217
- package/dist/code/explorer.js +1 -290
- package/dist/code/explorer.mjs +1 -267
- package/dist/code/index.js +26 -2514
- package/dist/code/index.mjs +24 -2471
- package/dist/code/preview.js +6 -363
- package/dist/code/preview.mjs +6 -340
- package/dist/code/snippet.js +2 -273
- package/dist/code/snippet.mjs +2 -249
- package/dist/code/tabs.js +1 -74
- package/dist/code/tabs.mjs +1 -52
- package/dist/code/terminal.js +3 -436
- package/dist/code/terminal.mjs +3 -413
- package/dist/collapsible.js +1 -32
- package/dist/collapsible.mjs +1 -8
- package/dist/command.js +1 -282
- package/dist/command.mjs +1 -251
- package/dist/context-menu.js +1 -206
- package/dist/context-menu.mjs +1 -170
- package/dist/desktop/hooks.js +1 -223
- package/dist/desktop/hooks.mjs +1 -198
- package/dist/desktop/index.js +1 -685
- package/dist/desktop/index.mjs +1 -657
- package/dist/desktop/spotlight.js +1 -260
- package/dist/desktop/spotlight.mjs +1 -235
- package/dist/desktop/window.js +1 -273
- package/dist/desktop/window.mjs +1 -247
- package/dist/device/index.js +1 -2
- package/dist/device/index.mjs +0 -1
- package/dist/dialog.js +1 -245
- package/dist/dialog.mjs +1 -213
- package/dist/dock/basic.js +1 -173
- package/dist/dock/basic.mjs +1 -150
- package/dist/dock/index.js +1 -647
- package/dist/dock/index.mjs +1 -620
- package/dist/dock/limelight-nav.js +1 -314
- package/dist/dock/limelight-nav.mjs +1 -293
- package/dist/dock/macos.js +1 -140
- package/dist/dock/macos.mjs +1 -117
- package/dist/dock/menu.js +1 -69
- package/dist/dock/menu.mjs +1 -47
- package/dist/dock/message.js +1 -148
- package/dist/dock/message.mjs +1 -126
- package/dist/drawer.js +1 -114
- package/dist/drawer.mjs +1 -102
- package/dist/dropdown-menu.js +1 -201
- package/dist/dropdown-menu.mjs +1 -165
- package/dist/finance/AdvancedChart.js +2 -47
- package/dist/finance/AdvancedChart.mjs +2 -45
- package/dist/finance/CompanyProfile.js +2 -47
- package/dist/finance/CompanyProfile.mjs +2 -45
- package/dist/finance/CryptoScreener.js +2 -44
- package/dist/finance/CryptoScreener.mjs +2 -42
- package/dist/finance/Financials.js +2 -51
- package/dist/finance/Financials.mjs +2 -49
- package/dist/finance/ForexScreener.js +2 -45
- package/dist/finance/ForexScreener.mjs +2 -43
- package/dist/finance/MarketOverview.js +2 -103
- package/dist/finance/MarketOverview.mjs +2 -101
- package/dist/finance/NewsTimeline.js +2 -43
- package/dist/finance/NewsTimeline.mjs +2 -41
- package/dist/finance/OrderEntry.js +1 -130
- package/dist/finance/OrderEntry.mjs +1 -128
- package/dist/finance/OrdersHistory.js +1 -63
- package/dist/finance/OrdersHistory.mjs +1 -61
- package/dist/finance/PositionsList.js +1 -79
- package/dist/finance/PositionsList.mjs +1 -77
- package/dist/finance/StockScreener.js +2 -45
- package/dist/finance/StockScreener.mjs +2 -43
- package/dist/finance/SymbolInfo.js +2 -45
- package/dist/finance/SymbolInfo.mjs +2 -43
- package/dist/finance/TechnicalAnalysis.js +2 -53
- package/dist/finance/TechnicalAnalysis.mjs +2 -51
- package/dist/finance/TickerTape.js +2 -55
- package/dist/finance/TickerTape.mjs +2 -53
- package/dist/finance/TradingPanel.js +1 -190
- package/dist/finance/TradingPanel.mjs +1 -188
- package/dist/finance/index.js +2 -929
- package/dist/finance/index.mjs +2 -913
- package/dist/form/index.js +1 -153
- package/dist/form/index.mjs +1 -123
- package/dist/form.js +1 -171
- package/dist/form.mjs +1 -141
- package/dist/hover-card.js +1 -57
- package/dist/hover-card.mjs +1 -33
- package/dist/index.js +192 -9618
- package/dist/index.mjs +192 -9202
- package/dist/input-otp.js +1 -78
- package/dist/input-otp.mjs +1 -53
- package/dist/kanban/index.js +1 -593
- package/dist/kanban/index.mjs +1 -571
- package/dist/lib/utils.js +1 -28
- package/dist/lib/utils.mjs +1 -24
- package/dist/mermaid/index.js +1 -280
- package/dist/mermaid/index.mjs +1 -253
- package/dist/navigation/index.js +1 -97
- package/dist/navigation/index.mjs +1 -78
- package/dist/navigation-menu.js +1 -148
- package/dist/navigation-menu.mjs +1 -115
- package/dist/pattern/grid-pattern.js +3 -325
- package/dist/pattern/grid-pattern.mjs +3 -302
- package/dist/pattern/index.js +3 -325
- package/dist/pattern/index.mjs +3 -302
- package/dist/popover.js +1 -62
- package/dist/popover.mjs +1 -36
- package/dist/progress.js +1 -61
- package/dist/progress.mjs +1 -36
- package/dist/project/gantt.js +1 -64
- package/dist/project/gantt.mjs +1 -42
- package/dist/project/index.js +1 -635
- package/dist/project/index.mjs +1 -610
- package/dist/project/kanban.js +1 -596
- package/dist/project/kanban.mjs +1 -571
- package/dist/project/list.js +1 -34
- package/dist/project/list.mjs +1 -11
- package/dist/radio-group.js +1 -67
- package/dist/radio-group.mjs +1 -44
- package/dist/resizable.js +1 -71
- package/dist/resizable.mjs +1 -47
- package/dist/scroll-area.js +1 -88
- package/dist/scroll-area.mjs +1 -65
- package/dist/select.js +1 -139
- package/dist/select.mjs +1 -110
- package/dist/separator.js +1 -58
- package/dist/separator.mjs +1 -33
- package/dist/sheet.js +1 -147
- package/dist/sheet.mjs +1 -116
- package/dist/skeleton.js +1 -31
- package/dist/skeleton.mjs +1 -26
- package/dist/slider.js +1 -98
- package/dist/slider.mjs +1 -72
- package/dist/sonner.js +1 -33
- package/dist/sonner.mjs +1 -28
- package/dist/spline/index.js +1 -210
- package/dist/spline/index.mjs +1 -201
- package/dist/spline/media-stack.js +1 -192
- package/dist/spline/media-stack.mjs +1 -184
- package/dist/spline/player.js +1 -36
- package/dist/spline/player.mjs +1 -30
- package/dist/switch.js +1 -61
- package/dist/switch.mjs +1 -36
- package/dist/table.js +1 -109
- package/dist/table.mjs +1 -100
- package/dist/tabs.js +1 -127
- package/dist/tabs.mjs +1 -101
- package/dist/tailwind/index.mjs +1 -2011
- package/dist/textarea.js +1 -77
- package/dist/textarea.mjs +1 -55
- package/dist/toggle-group.js +1 -117
- package/dist/toggle-group.mjs +1 -92
- package/dist/toggle.js +1 -70
- package/dist/toggle.mjs +1 -47
- package/dist/tooltip.js +1 -66
- package/dist/tooltip.mjs +1 -39
- package/dist/types/index.mjs +1 -51
- package/dist/ui/announcement.js +1 -133
- package/dist/ui/announcement.mjs +1 -111
- package/dist/ui/avatar-group.js +1 -87
- package/dist/ui/avatar-group.mjs +1 -64
- package/dist/ui/banner.js +1 -84
- package/dist/ui/banner.mjs +1 -61
- package/dist/ui/cursor.js +1 -77
- package/dist/ui/cursor.mjs +1 -55
- package/dist/ui/index.js +1 -494
- package/dist/ui/index.mjs +1 -461
- package/dist/ui/marquee.js +1 -73
- package/dist/ui/marquee.mjs +1 -51
- package/dist/ui/pill.js +1 -84
- package/dist/ui/pill.mjs +1 -61
- package/dist/ui/spinner.js +1 -27
- package/dist/ui/spinner.mjs +1 -25
- package/dist/ui/tags.js +1 -116
- package/dist/ui/tags.mjs +1 -94
- package/dist/ui/ticker.js +1 -72
- package/dist/ui/ticker.mjs +1 -50
- package/dist/util/index.mjs +1 -404
- package/package.json +28 -27
- package/dist/primitives/index.js +0 -9619
- package/dist/primitives/index.mjs +0 -9203
- package/dist/primitives-export.js +0 -9619
- package/dist/primitives-export.mjs +0 -9203
package/dist/dock/basic.mjs
CHANGED
|
@@ -1,151 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import
|
|
3
|
-
import { useMotionValue, useSpring, useTransform, motion } from 'framer-motion';
|
|
4
|
-
import { clsx } from 'clsx';
|
|
5
|
-
import { twMerge } from 'tailwind-merge';
|
|
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
|
-
function cn(...inputs) {
|
|
11
|
-
return twMerge(clsx(inputs));
|
|
12
|
-
}
|
|
13
|
-
__name(cn, "cn");
|
|
14
|
-
var DockContext = React.createContext({
|
|
15
|
-
magnification: 60,
|
|
16
|
-
distance: 140
|
|
17
|
-
});
|
|
18
|
-
var Dock = React.forwardRef(
|
|
19
|
-
({
|
|
20
|
-
className,
|
|
21
|
-
children,
|
|
22
|
-
position = "bottom",
|
|
23
|
-
magnification = 60,
|
|
24
|
-
distance = 140
|
|
25
|
-
}, ref) => {
|
|
26
|
-
const positionClasses = {
|
|
27
|
-
bottom: "bottom-0 left-1/2 -translate-x-1/2 flex-row",
|
|
28
|
-
left: "left-0 top-1/2 -translate-y-1/2 flex-col",
|
|
29
|
-
right: "right-0 top-1/2 -translate-y-1/2 flex-col"
|
|
30
|
-
};
|
|
31
|
-
return /* @__PURE__ */ jsx(DockContext.Provider, { value: { magnification, distance }, children: /* @__PURE__ */ jsx(
|
|
32
|
-
"div",
|
|
33
|
-
{
|
|
34
|
-
ref,
|
|
35
|
-
className: cn(
|
|
36
|
-
"fixed z-50 flex items-end gap-1 rounded-2xl border border-white/10 bg-black/10 p-2 backdrop-blur-xl",
|
|
37
|
-
"shadow-2xl shadow-black/20",
|
|
38
|
-
"before:absolute before:inset-0 before:rounded-2xl before:bg-gradient-to-b before:from-white/10 before:to-transparent before:opacity-50",
|
|
39
|
-
positionClasses[position],
|
|
40
|
-
className
|
|
41
|
-
),
|
|
42
|
-
children
|
|
43
|
-
}
|
|
44
|
-
) });
|
|
45
|
-
}
|
|
46
|
-
);
|
|
47
|
-
Dock.displayName = "Dock";
|
|
48
|
-
var DockItem = React.forwardRef(
|
|
49
|
-
({
|
|
50
|
-
className,
|
|
51
|
-
children,
|
|
52
|
-
onClick,
|
|
53
|
-
tooltip,
|
|
54
|
-
magnification: itemMagnification,
|
|
55
|
-
distance: itemDistance
|
|
56
|
-
}, ref) => {
|
|
57
|
-
const buttonRef = React.useRef(null);
|
|
58
|
-
const { magnification: contextMagnification, distance: contextDistance } = React.useContext(DockContext);
|
|
59
|
-
const magnification = itemMagnification ?? contextMagnification;
|
|
60
|
-
const distance = itemDistance ?? contextDistance;
|
|
61
|
-
const [isHovered, setIsHovered] = React.useState(false);
|
|
62
|
-
const mouseX = useMotionValue(Infinity);
|
|
63
|
-
const springConfig = { mass: 0.1, stiffness: 150, damping: 12 };
|
|
64
|
-
const size = useSpring(
|
|
65
|
-
useTransform(
|
|
66
|
-
mouseX,
|
|
67
|
-
[-distance, 0, distance],
|
|
68
|
-
[48, 48 + magnification, 48]
|
|
69
|
-
),
|
|
70
|
-
springConfig
|
|
71
|
-
);
|
|
72
|
-
const handleMouseMove = /* @__PURE__ */ __name((e) => {
|
|
73
|
-
if (!buttonRef.current) return;
|
|
74
|
-
const rect = buttonRef.current.getBoundingClientRect();
|
|
75
|
-
const centerX = rect.left + rect.width / 2;
|
|
76
|
-
mouseX.set(e.clientX - centerX);
|
|
77
|
-
}, "handleMouseMove");
|
|
78
|
-
const handleMouseLeave = /* @__PURE__ */ __name(() => {
|
|
79
|
-
mouseX.set(Infinity);
|
|
80
|
-
setIsHovered(false);
|
|
81
|
-
}, "handleMouseLeave");
|
|
82
|
-
return /* @__PURE__ */ jsxs(
|
|
83
|
-
motion.div,
|
|
84
|
-
{
|
|
85
|
-
className: "relative",
|
|
86
|
-
onMouseMove: handleMouseMove,
|
|
87
|
-
onMouseLeave: handleMouseLeave,
|
|
88
|
-
onMouseEnter: () => setIsHovered(true),
|
|
89
|
-
children: [
|
|
90
|
-
tooltip && isHovered && /* @__PURE__ */ jsxs(
|
|
91
|
-
motion.div,
|
|
92
|
-
{
|
|
93
|
-
initial: { opacity: 0, y: 10, scale: 0.9 },
|
|
94
|
-
animate: { opacity: 1, y: 0, scale: 1 },
|
|
95
|
-
exit: { opacity: 0, y: 5, scale: 0.95 },
|
|
96
|
-
transition: { duration: 0.15 },
|
|
97
|
-
className: "absolute bottom-full left-1/2 mb-2 -translate-x-1/2 whitespace-nowrap rounded-lg bg-black/80 px-2 py-1 text-xs text-white backdrop-blur-md",
|
|
98
|
-
children: [
|
|
99
|
-
tooltip,
|
|
100
|
-
/* @__PURE__ */ jsx("div", { className: "absolute -bottom-1 left-1/2 h-2 w-2 -translate-x-1/2 rotate-45 bg-black/80" })
|
|
101
|
-
]
|
|
102
|
-
}
|
|
103
|
-
),
|
|
104
|
-
/* @__PURE__ */ jsxs(
|
|
105
|
-
motion.button,
|
|
106
|
-
{
|
|
107
|
-
ref: buttonRef,
|
|
108
|
-
style: {
|
|
109
|
-
width: size,
|
|
110
|
-
height: size
|
|
111
|
-
},
|
|
112
|
-
whileTap: { scale: 0.9 },
|
|
113
|
-
onClick,
|
|
114
|
-
className: cn(
|
|
115
|
-
"relative flex items-center justify-center rounded-xl bg-white/10 backdrop-blur-md transition-colors",
|
|
116
|
-
"hover:bg-white/20",
|
|
117
|
-
"focus:outline-none focus-visible:ring-2 focus-visible:ring-white/50",
|
|
118
|
-
className
|
|
119
|
-
),
|
|
120
|
-
children: [
|
|
121
|
-
/* @__PURE__ */ jsx(
|
|
122
|
-
motion.div,
|
|
123
|
-
{
|
|
124
|
-
style: {
|
|
125
|
-
width: size,
|
|
126
|
-
height: size
|
|
127
|
-
},
|
|
128
|
-
className: "flex items-center justify-center",
|
|
129
|
-
children
|
|
130
|
-
}
|
|
131
|
-
),
|
|
132
|
-
/* @__PURE__ */ jsx(
|
|
133
|
-
motion.div,
|
|
134
|
-
{
|
|
135
|
-
className: "absolute inset-0 rounded-xl",
|
|
136
|
-
style: {
|
|
137
|
-
background: "linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 100%)"
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
)
|
|
141
|
-
]
|
|
142
|
-
}
|
|
143
|
-
)
|
|
144
|
-
]
|
|
145
|
-
}
|
|
146
|
-
);
|
|
147
|
-
}
|
|
148
|
-
);
|
|
149
|
-
DockItem.displayName = "DockItem";
|
|
150
|
-
|
|
151
|
-
export { Dock, DockItem };
|
|
2
|
+
import*as e from'react';import {useMotionValue,useSpring,useTransform,motion}from'framer-motion';import {clsx}from'clsx';import {twMerge}from'tailwind-merge';import {jsx,jsxs}from'react/jsx-runtime';var I=Object.defineProperty;var n=(t,o)=>I(t,"name",{value:o,configurable:true});function f(...t){return twMerge(clsx(t))}n(f,"cn");var h=e.createContext({magnification:60,distance:140}),S=e.forwardRef(({className:t,children:o,position:c="bottom",magnification:r=60,distance:l=140},m)=>{let g={bottom:"bottom-0 left-1/2 -translate-x-1/2 flex-row",left:"left-0 top-1/2 -translate-y-1/2 flex-col",right:"right-0 top-1/2 -translate-y-1/2 flex-col"};return jsx(h.Provider,{value:{magnification:r,distance:l},children:jsx("div",{ref:m,className:f("fixed z-50 flex items-end gap-1 rounded-2xl border border-white/10 bg-black/10 p-2 backdrop-blur-xl","shadow-2xl shadow-black/20","before:absolute before:inset-0 before:rounded-2xl before:bg-gradient-to-b before:from-white/10 before:to-transparent before:opacity-50",g[c],t),children:o})})});S.displayName="Dock";var U=e.forwardRef(({className:t,children:o,onClick:c,tooltip:r,magnification:l,distance:m},g)=>{let u=e.useRef(null),{magnification:y,distance:k}=e.useContext(h),w=l??y,p=m??k,[R,x]=e.useState(false),d=useMotionValue(1/0),D={mass:.1,stiffness:150,damping:12},s=useSpring(useTransform(d,[-p,0,p],[48,48+w,48]),D),M=n(C=>{if(!u.current)return;let v=u.current.getBoundingClientRect(),P=v.left+v.width/2;d.set(C.clientX-P);},"handleMouseMove"),N=n(()=>{d.set(1/0),x(false);},"handleMouseLeave");return jsxs(motion.div,{className:"relative",onMouseMove:M,onMouseLeave:N,onMouseEnter:()=>x(true),children:[r&&R&&jsxs(motion.div,{initial:{opacity:0,y:10,scale:.9},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:5,scale:.95},transition:{duration:.15},className:"absolute bottom-full left-1/2 mb-2 -translate-x-1/2 whitespace-nowrap rounded-lg bg-black/80 px-2 py-1 text-xs text-white backdrop-blur-md",children:[r,jsx("div",{className:"absolute -bottom-1 left-1/2 h-2 w-2 -translate-x-1/2 rotate-45 bg-black/80"})]}),jsxs(motion.button,{ref:u,style:{width:s,height:s},whileTap:{scale:.9},onClick:c,className:f("relative flex items-center justify-center rounded-xl bg-white/10 backdrop-blur-md transition-colors","hover:bg-white/20","focus:outline-none focus-visible:ring-2 focus-visible:ring-white/50",t),children:[jsx(motion.div,{style:{width:s,height:s},className:"flex items-center justify-center",children:o}),jsx(motion.div,{className:"absolute inset-0 rounded-xl",style:{background:"linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 100%)"}})]})]})});U.displayName="DockItem";export{S as Dock,U as DockItem};
|