@vllnt/ui 0.2.0 → 0.2.1-canary.4abeac1
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/CHANGELOG.md +12 -1
- package/README.md +27 -12
- package/dist/components/activity-log/activity-log.js +1 -0
- package/dist/components/anchor-port/anchor-port.js +51 -0
- package/dist/components/anchor-port/index.js +4 -0
- package/dist/components/animated-text/animated-text.js +1 -0
- package/dist/components/bottom-bar/bottom-bar.js +25 -0
- package/dist/components/bottom-bar/index.js +4 -0
- package/dist/components/canvas-shell/canvas-foundation-demo.js +183 -0
- package/dist/components/canvas-shell/canvas-shell-route-config.js +0 -0
- package/dist/components/canvas-shell/canvas-shell.js +261 -0
- package/dist/components/canvas-shell/index.js +4 -0
- package/dist/components/canvas-view/canvas-view.js +461 -0
- package/dist/components/canvas-view/index.js +6 -0
- package/dist/components/chart/area-chart.js +1 -0
- package/dist/components/chart/line-chart.js +1 -0
- package/dist/components/chat-dock-section/chat-dock-section.js +56 -0
- package/dist/components/chat-dock-section/index.js +6 -0
- package/dist/components/checklist/checklist.js +7 -0
- package/dist/components/checklist/index.js +3 -1
- package/dist/components/connector-edge/connector-edge.js +66 -0
- package/dist/components/connector-edge/index.js +6 -0
- package/dist/components/conversation-thread/conversation-thread.js +348 -0
- package/dist/components/conversation-thread/index.js +20 -0
- package/dist/components/curriculum/curriculum.js +349 -0
- package/dist/components/curriculum/index.js +10 -0
- package/dist/components/data-list/data-list.js +1 -0
- package/dist/components/edge-label/edge-label.js +26 -0
- package/dist/components/edge-label/index.js +4 -0
- package/dist/components/form/form.js +432 -0
- package/dist/components/form/index.js +20 -0
- package/dist/components/glass-panel/glass-panel.js +21 -0
- package/dist/components/glass-panel/index.js +4 -0
- package/dist/components/group-hull/group-hull.js +29 -0
- package/dist/components/group-hull/index.js +4 -0
- package/dist/components/index.js +136 -0
- package/dist/components/left-rail/index.js +4 -0
- package/dist/components/left-rail/left-rail.js +25 -0
- package/dist/components/mini-map-panel/index.js +6 -0
- package/dist/components/mini-map-panel/mini-map-panel.js +74 -0
- package/dist/components/multi-select/index.js +6 -0
- package/dist/components/multi-select/multi-select.js +258 -0
- package/dist/components/object-card/index.js +6 -0
- package/dist/components/object-card/object-card.js +126 -0
- package/dist/components/object-handle/index.js +4 -0
- package/dist/components/object-handle/object-handle.js +38 -0
- package/dist/components/overview-board/index.js +8 -0
- package/dist/components/overview-board/overview-board.js +127 -0
- package/dist/components/progress-tracker/index.js +20 -0
- package/dist/components/progress-tracker/progress-tracker.js +527 -0
- package/dist/components/right-dock/index.js +4 -0
- package/dist/components/right-dock/right-dock.js +28 -0
- package/dist/components/segmented-control/index.js +12 -0
- package/dist/components/segmented-control/segmented-control.js +61 -0
- package/dist/components/spinner/unicode-spinner.js +1 -0
- package/dist/components/tags-input/index.js +4 -0
- package/dist/components/tags-input/tags-input.js +178 -0
- package/dist/components/top-bar/index.js +4 -0
- package/dist/components/top-bar/top-bar.js +31 -0
- package/dist/components/usage-breakdown/usage-breakdown.js +1 -0
- package/dist/components/workspace-switcher/index.js +6 -0
- package/dist/components/workspace-switcher/workspace-switcher.js +61 -0
- package/dist/components/zoom-hud/index.js +4 -0
- package/dist/components/zoom-hud/zoom-hud.js +61 -0
- package/dist/index.d.ts +686 -5
- package/package.json +7 -3
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef } from "react";
|
|
3
|
+
import { cn } from "../../lib/utils";
|
|
4
|
+
import { Badge } from "../badge";
|
|
5
|
+
import { Button } from "../button";
|
|
6
|
+
const stateClasses = {
|
|
7
|
+
blocked: "border-amber-500/30 bg-amber-500/10 text-amber-700 dark:text-amber-300",
|
|
8
|
+
complete: "border-emerald-500/30 bg-emerald-500/10 text-emerald-700 dark:text-emerald-300",
|
|
9
|
+
idle: "border-border/70 bg-muted/60 text-muted-foreground",
|
|
10
|
+
running: "border-sky-500/30 bg-sky-500/10 text-sky-700 dark:text-sky-300"
|
|
11
|
+
};
|
|
12
|
+
function ObjectCardHeader({
|
|
13
|
+
kind,
|
|
14
|
+
ports,
|
|
15
|
+
state,
|
|
16
|
+
summary,
|
|
17
|
+
title
|
|
18
|
+
}) {
|
|
19
|
+
return /* @__PURE__ */ jsxs("div", { className: "flex items-start justify-between gap-3", children: [
|
|
20
|
+
/* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
|
|
21
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center gap-2", children: [
|
|
22
|
+
/* @__PURE__ */ jsx(
|
|
23
|
+
Badge,
|
|
24
|
+
{
|
|
25
|
+
className: "rounded-full border-border/60 bg-background/70 px-2.5 py-1 text-[11px] uppercase tracking-[0.2em] text-muted-foreground",
|
|
26
|
+
variant: "outline",
|
|
27
|
+
children: kind
|
|
28
|
+
}
|
|
29
|
+
),
|
|
30
|
+
/* @__PURE__ */ jsx(
|
|
31
|
+
"span",
|
|
32
|
+
{
|
|
33
|
+
className: cn(
|
|
34
|
+
"inline-flex items-center rounded-full border px-2.5 py-1 text-xs font-medium capitalize",
|
|
35
|
+
stateClasses[state]
|
|
36
|
+
),
|
|
37
|
+
children: state
|
|
38
|
+
}
|
|
39
|
+
)
|
|
40
|
+
] }),
|
|
41
|
+
/* @__PURE__ */ jsxs("div", { className: "space-y-1", children: [
|
|
42
|
+
/* @__PURE__ */ jsx("h3", { className: "text-lg font-semibold tracking-tight text-foreground", children: title }),
|
|
43
|
+
summary ? /* @__PURE__ */ jsx("p", { className: "max-w-[32ch] text-sm leading-6 text-muted-foreground", children: summary }) : null
|
|
44
|
+
] })
|
|
45
|
+
] }),
|
|
46
|
+
ports ? /* @__PURE__ */ jsx("div", { className: "flex shrink-0 items-start", children: ports }) : null
|
|
47
|
+
] });
|
|
48
|
+
}
|
|
49
|
+
function ObjectCardMetrics({ metrics }) {
|
|
50
|
+
if (!metrics?.length) {
|
|
51
|
+
return null;
|
|
52
|
+
}
|
|
53
|
+
return /* @__PURE__ */ jsx("dl", { className: "grid grid-cols-2 gap-3 rounded-2xl border border-border/60 bg-background/75 p-3", children: metrics.map((metric) => /* @__PURE__ */ jsxs("div", { className: "space-y-1", children: [
|
|
54
|
+
/* @__PURE__ */ jsx("dt", { className: "text-[11px] uppercase tracking-[0.18em] text-muted-foreground", children: metric.label }),
|
|
55
|
+
/* @__PURE__ */ jsx("dd", { className: "text-sm font-medium text-foreground", children: metric.value })
|
|
56
|
+
] }, metric.label)) });
|
|
57
|
+
}
|
|
58
|
+
function ObjectCardActions({ actions }) {
|
|
59
|
+
if (!actions?.length) {
|
|
60
|
+
return null;
|
|
61
|
+
}
|
|
62
|
+
return /* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-2", children: actions.map((action) => {
|
|
63
|
+
const handleActionClick = () => {
|
|
64
|
+
action.onClick?.();
|
|
65
|
+
};
|
|
66
|
+
return /* @__PURE__ */ jsx(
|
|
67
|
+
Button,
|
|
68
|
+
{
|
|
69
|
+
className: "rounded-full",
|
|
70
|
+
onClick: handleActionClick,
|
|
71
|
+
size: "sm",
|
|
72
|
+
type: "button",
|
|
73
|
+
variant: "outline",
|
|
74
|
+
children: action.label
|
|
75
|
+
},
|
|
76
|
+
action.label
|
|
77
|
+
);
|
|
78
|
+
}) });
|
|
79
|
+
}
|
|
80
|
+
const ObjectCard = forwardRef(
|
|
81
|
+
({
|
|
82
|
+
actions,
|
|
83
|
+
children,
|
|
84
|
+
className,
|
|
85
|
+
footer,
|
|
86
|
+
kind = "Object",
|
|
87
|
+
metrics = [],
|
|
88
|
+
ports,
|
|
89
|
+
state = "idle",
|
|
90
|
+
summary,
|
|
91
|
+
title,
|
|
92
|
+
...props
|
|
93
|
+
}, ref) => /* @__PURE__ */ jsxs(
|
|
94
|
+
"article",
|
|
95
|
+
{
|
|
96
|
+
className: cn(
|
|
97
|
+
"group relative flex min-w-[320px] max-w-[420px] flex-col gap-4 rounded-[1.5rem] border border-border/70 bg-[linear-gradient(180deg,hsl(var(--background)),hsl(var(--muted)/0.22))] p-5 shadow-[0_24px_80px_hsl(var(--foreground)/0.08)] transition-transform duration-200 hover:-translate-y-0.5",
|
|
98
|
+
className
|
|
99
|
+
),
|
|
100
|
+
"data-state": state,
|
|
101
|
+
ref,
|
|
102
|
+
...props,
|
|
103
|
+
children: [
|
|
104
|
+
/* @__PURE__ */ jsx("div", { className: "pointer-events-none absolute inset-x-5 top-0 h-px bg-[linear-gradient(90deg,transparent,hsl(var(--foreground)/0.22),transparent)]" }),
|
|
105
|
+
/* @__PURE__ */ jsx(
|
|
106
|
+
ObjectCardHeader,
|
|
107
|
+
{
|
|
108
|
+
kind,
|
|
109
|
+
ports,
|
|
110
|
+
state,
|
|
111
|
+
summary,
|
|
112
|
+
title
|
|
113
|
+
}
|
|
114
|
+
),
|
|
115
|
+
/* @__PURE__ */ jsx(ObjectCardMetrics, { metrics }),
|
|
116
|
+
children ? /* @__PURE__ */ jsx("div", { className: "space-y-3", children }) : null,
|
|
117
|
+
/* @__PURE__ */ jsx(ObjectCardActions, { actions }),
|
|
118
|
+
footer ? /* @__PURE__ */ jsx("div", { className: "border-t border-border/60 pt-3 text-sm text-muted-foreground", children: footer }) : null
|
|
119
|
+
]
|
|
120
|
+
}
|
|
121
|
+
)
|
|
122
|
+
);
|
|
123
|
+
ObjectCard.displayName = "ObjectCard";
|
|
124
|
+
export {
|
|
125
|
+
ObjectCard
|
|
126
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef } from "react";
|
|
3
|
+
import { cn } from "../../lib/utils";
|
|
4
|
+
const ObjectHandle = forwardRef(
|
|
5
|
+
({ className, hint, label = "Move", ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
6
|
+
"button",
|
|
7
|
+
{
|
|
8
|
+
className: cn(
|
|
9
|
+
"inline-flex items-center gap-2 rounded-full border border-border/60 bg-background/85 px-3 py-1.5 text-xs font-medium text-muted-foreground shadow-sm transition-colors hover:border-border hover:text-foreground",
|
|
10
|
+
className
|
|
11
|
+
),
|
|
12
|
+
ref,
|
|
13
|
+
type: "button",
|
|
14
|
+
...props,
|
|
15
|
+
children: [
|
|
16
|
+
/* @__PURE__ */ jsxs(
|
|
17
|
+
"span",
|
|
18
|
+
{
|
|
19
|
+
"aria-hidden": "true",
|
|
20
|
+
className: "grid grid-cols-2 gap-0.5 text-[8px] leading-none",
|
|
21
|
+
children: [
|
|
22
|
+
/* @__PURE__ */ jsx("span", { children: "\u2022" }),
|
|
23
|
+
/* @__PURE__ */ jsx("span", { children: "\u2022" }),
|
|
24
|
+
/* @__PURE__ */ jsx("span", { children: "\u2022" }),
|
|
25
|
+
/* @__PURE__ */ jsx("span", { children: "\u2022" })
|
|
26
|
+
]
|
|
27
|
+
}
|
|
28
|
+
),
|
|
29
|
+
/* @__PURE__ */ jsx("span", { children: label }),
|
|
30
|
+
hint ? /* @__PURE__ */ jsx("span", { className: "text-muted-foreground/80", children: hint }) : null
|
|
31
|
+
]
|
|
32
|
+
}
|
|
33
|
+
)
|
|
34
|
+
);
|
|
35
|
+
ObjectHandle.displayName = "ObjectHandle";
|
|
36
|
+
export {
|
|
37
|
+
ObjectHandle
|
|
38
|
+
};
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef } from "react";
|
|
3
|
+
import { AlertCircle, ArrowRight, Inbox, ListTodo, Siren } from "lucide-react";
|
|
4
|
+
import { cn } from "../../lib/utils";
|
|
5
|
+
import { Button } from "../button";
|
|
6
|
+
const toneClassNames = {
|
|
7
|
+
danger: "border-red-500/30 bg-red-500/8",
|
|
8
|
+
default: "border-border/70 bg-background/80",
|
|
9
|
+
warning: "border-amber-500/30 bg-amber-500/8"
|
|
10
|
+
};
|
|
11
|
+
const toneAccentClassNames = {
|
|
12
|
+
danger: "text-red-600 dark:text-red-300",
|
|
13
|
+
default: "text-primary",
|
|
14
|
+
warning: "text-amber-600 dark:text-amber-300"
|
|
15
|
+
};
|
|
16
|
+
const OverviewCard = forwardRef(
|
|
17
|
+
({
|
|
18
|
+
className,
|
|
19
|
+
ctaLabel,
|
|
20
|
+
description,
|
|
21
|
+
handleCtaClick,
|
|
22
|
+
heading,
|
|
23
|
+
icon,
|
|
24
|
+
metric,
|
|
25
|
+
tone = "default",
|
|
26
|
+
...props
|
|
27
|
+
}, ref) => /* @__PURE__ */ jsxs(
|
|
28
|
+
"section",
|
|
29
|
+
{
|
|
30
|
+
className: cn(
|
|
31
|
+
"flex min-h-[172px] flex-col gap-4 rounded-2xl border p-5 shadow-[0_8px_30px_hsl(var(--foreground)/0.06)] backdrop-blur-xl",
|
|
32
|
+
toneClassNames[tone],
|
|
33
|
+
className
|
|
34
|
+
),
|
|
35
|
+
ref,
|
|
36
|
+
...props,
|
|
37
|
+
children: [
|
|
38
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-start justify-between gap-3", children: [
|
|
39
|
+
/* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
|
|
40
|
+
/* @__PURE__ */ jsx("div", { className: "text-[11px] font-medium uppercase tracking-[0.24em] text-muted-foreground", children: heading }),
|
|
41
|
+
/* @__PURE__ */ jsx("div", { className: "text-3xl font-semibold tracking-tight text-foreground", children: metric })
|
|
42
|
+
] }),
|
|
43
|
+
/* @__PURE__ */ jsx(
|
|
44
|
+
"div",
|
|
45
|
+
{
|
|
46
|
+
className: cn(
|
|
47
|
+
"flex size-10 items-center justify-center rounded-xl bg-background/80",
|
|
48
|
+
toneAccentClassNames[tone]
|
|
49
|
+
),
|
|
50
|
+
children: icon
|
|
51
|
+
}
|
|
52
|
+
)
|
|
53
|
+
] }),
|
|
54
|
+
/* @__PURE__ */ jsx("p", { className: "text-sm leading-6 text-muted-foreground", children: description }),
|
|
55
|
+
ctaLabel ? /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsxs(
|
|
56
|
+
Button,
|
|
57
|
+
{
|
|
58
|
+
onClick: handleCtaClick,
|
|
59
|
+
size: "sm",
|
|
60
|
+
type: "button",
|
|
61
|
+
variant: "ghost",
|
|
62
|
+
children: [
|
|
63
|
+
ctaLabel,
|
|
64
|
+
/* @__PURE__ */ jsx(ArrowRight, { className: "size-4" })
|
|
65
|
+
]
|
|
66
|
+
}
|
|
67
|
+
) }) : null
|
|
68
|
+
]
|
|
69
|
+
}
|
|
70
|
+
)
|
|
71
|
+
);
|
|
72
|
+
OverviewCard.displayName = "OverviewCard";
|
|
73
|
+
function getDefaultIcon(heading) {
|
|
74
|
+
if (typeof heading !== "string") {
|
|
75
|
+
return /* @__PURE__ */ jsx(Inbox, { className: "size-5" });
|
|
76
|
+
}
|
|
77
|
+
if (heading.toLowerCase().includes("error")) {
|
|
78
|
+
return /* @__PURE__ */ jsx(AlertCircle, { className: "size-5" });
|
|
79
|
+
}
|
|
80
|
+
if (heading.toLowerCase().includes("action")) {
|
|
81
|
+
return /* @__PURE__ */ jsx(ListTodo, { className: "size-5" });
|
|
82
|
+
}
|
|
83
|
+
if (heading.toLowerCase().includes("run")) {
|
|
84
|
+
return /* @__PURE__ */ jsx(Siren, { className: "size-5" });
|
|
85
|
+
}
|
|
86
|
+
return /* @__PURE__ */ jsx(Inbox, { className: "size-5" });
|
|
87
|
+
}
|
|
88
|
+
const OverviewBoard = forwardRef(
|
|
89
|
+
({ className, eyebrow, heading, items, subtitle, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
90
|
+
"section",
|
|
91
|
+
{
|
|
92
|
+
className: cn("mx-auto flex w-full max-w-6xl flex-col gap-6", className),
|
|
93
|
+
ref,
|
|
94
|
+
...props,
|
|
95
|
+
children: [
|
|
96
|
+
/* @__PURE__ */ jsxs("div", { className: "space-y-3", children: [
|
|
97
|
+
eyebrow ? /* @__PURE__ */ jsx("div", { className: "text-[11px] font-medium uppercase tracking-[0.28em] text-muted-foreground", children: eyebrow }) : null,
|
|
98
|
+
/* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
|
|
99
|
+
/* @__PURE__ */ jsx("h2", { className: "text-3xl font-semibold tracking-tight text-foreground", children: heading }),
|
|
100
|
+
subtitle ? /* @__PURE__ */ jsx("p", { className: "max-w-3xl text-sm leading-6 text-muted-foreground", children: subtitle }) : null
|
|
101
|
+
] })
|
|
102
|
+
] }),
|
|
103
|
+
/* @__PURE__ */ jsx("div", { className: "grid gap-4 md:grid-cols-2 xl:grid-cols-3", children: items.map((item) => {
|
|
104
|
+
const handleCtaClick = item.handleCtaClick;
|
|
105
|
+
return /* @__PURE__ */ jsx(
|
|
106
|
+
OverviewCard,
|
|
107
|
+
{
|
|
108
|
+
ctaLabel: item.ctaLabel,
|
|
109
|
+
description: item.description,
|
|
110
|
+
handleCtaClick,
|
|
111
|
+
heading: item.heading,
|
|
112
|
+
icon: item.icon ?? getDefaultIcon(item.heading),
|
|
113
|
+
metric: item.metric,
|
|
114
|
+
tone: item.tone
|
|
115
|
+
},
|
|
116
|
+
item.id
|
|
117
|
+
);
|
|
118
|
+
}) })
|
|
119
|
+
]
|
|
120
|
+
}
|
|
121
|
+
)
|
|
122
|
+
);
|
|
123
|
+
OverviewBoard.displayName = "OverviewBoard";
|
|
124
|
+
export {
|
|
125
|
+
OverviewBoard,
|
|
126
|
+
OverviewCard
|
|
127
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ProgressTracker,
|
|
3
|
+
ProgressTrackerBadge,
|
|
4
|
+
ProgressTrackerModule,
|
|
5
|
+
ProgressTrackerModules,
|
|
6
|
+
ProgressTrackerOverview,
|
|
7
|
+
ProgressTrackerStat,
|
|
8
|
+
ProgressTrackerStats,
|
|
9
|
+
useProgressTrackerContext
|
|
10
|
+
} from "./progress-tracker";
|
|
11
|
+
export {
|
|
12
|
+
ProgressTracker,
|
|
13
|
+
ProgressTrackerBadge,
|
|
14
|
+
ProgressTrackerModule,
|
|
15
|
+
ProgressTrackerModules,
|
|
16
|
+
ProgressTrackerOverview,
|
|
17
|
+
ProgressTrackerStat,
|
|
18
|
+
ProgressTrackerStats,
|
|
19
|
+
useProgressTrackerContext
|
|
20
|
+
};
|