@actioneer/ads 0.1.0
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/LICENSE +21 -0
- package/bin/ads-init.mjs +314 -0
- package/components/accordion.d.ts +13 -0
- package/components/accordion.js +91 -0
- package/components/agents-ui/agent-audio-visualizer-aura.d.ts +11 -0
- package/components/agents-ui/agent-audio-visualizer-aura.js +277 -0
- package/components/agents-ui/agent-audio-visualizer-wave.d.ts +12 -0
- package/components/agents-ui/agent-audio-visualizer-wave.js +203 -0
- package/components/agents-ui/react-shader-toy.d.ts +87 -0
- package/components/agents-ui/react-shader-toy.js +531 -0
- package/components/ai-elements/chain-of-thought.d.ts +30 -0
- package/components/ai-elements/chain-of-thought.js +182 -0
- package/components/ai-elements/index.d.ts +11 -0
- package/components/ai-elements/inline-citation.d.ts +44 -0
- package/components/ai-elements/inline-citation.js +314 -0
- package/components/ai-elements/message.d.ts +96 -0
- package/components/ai-elements/message.js +308 -0
- package/components/ai-elements/queue.d.ts +60 -0
- package/components/ai-elements/queue.js +193 -0
- package/components/ai-elements/reasoning.d.ts +26 -0
- package/components/ai-elements/reasoning.js +131 -0
- package/components/ai-elements/shimmer.d.ts +25 -0
- package/components/ai-elements/shimmer.js +44 -0
- package/components/ai-elements/speech-input.d.ts +16 -0
- package/components/ai-elements/speech-input.js +151 -0
- package/components/ai-elements/task-progress.d.ts +41 -0
- package/components/ai-elements/task-progress.js +211 -0
- package/components/ai-elements/task.d.ts +35 -0
- package/components/ai-elements/task.js +73 -0
- package/components/ai-elements/tool.d.ts +53 -0
- package/components/ai-elements/tool.js +116 -0
- package/components/ai-elements/voice.d.ts +74 -0
- package/components/ai-elements/voice.js +875 -0
- package/components/alert.d.ts +21 -0
- package/components/alert.js +76 -0
- package/components/answer.d.ts +984 -0
- package/components/answer.js +543 -0
- package/components/assistant-ui/action-bar.d.ts +3 -0
- package/components/assistant-ui/action-bar.js +57 -0
- package/components/assistant-ui/answer-tool-ui.d.ts +5 -0
- package/components/assistant-ui/answer-tool-ui.js +42 -0
- package/components/assistant-ui/attachment.d.ts +50 -0
- package/components/assistant-ui/attachment.js +353 -0
- package/components/assistant-ui/badge.d.ts +11 -0
- package/components/assistant-ui/badge.js +54 -0
- package/components/assistant-ui/branch-picker.d.ts +3 -0
- package/components/assistant-ui/branch-picker.js +36 -0
- package/components/assistant-ui/chain-of-thought.d.ts +46 -0
- package/components/assistant-ui/composer-add-context.d.ts +50 -0
- package/components/assistant-ui/composer-add-context.js +209 -0
- package/components/assistant-ui/composer-deep-research.d.ts +16 -0
- package/components/assistant-ui/composer-deep-research.js +38 -0
- package/components/assistant-ui/composer-harness.d.ts +18 -0
- package/components/assistant-ui/composer-harness.js +186 -0
- package/components/assistant-ui/composer-trigger-popover.d.ts +47 -0
- package/components/assistant-ui/composer-trigger-popover.js +147 -0
- package/components/assistant-ui/composer.d.ts +8 -0
- package/components/assistant-ui/composer.js +276 -0
- package/components/assistant-ui/directive-text.d.ts +16 -0
- package/components/assistant-ui/directive-text.js +40 -0
- package/components/assistant-ui/error.d.ts +6 -0
- package/components/assistant-ui/error.js +39 -0
- package/components/assistant-ui/file.d.ts +37 -0
- package/components/assistant-ui/file.js +159 -0
- package/components/assistant-ui/follow-up-suggestions.d.ts +7 -0
- package/components/assistant-ui/follow-up-suggestions.js +44 -0
- package/components/assistant-ui/image.d.ts +46 -0
- package/components/assistant-ui/image.js +351 -0
- package/components/assistant-ui/index.d.ts +28 -0
- package/components/assistant-ui/markdown-text.d.ts +1 -0
- package/components/assistant-ui/markdown-text.js +242 -0
- package/components/assistant-ui/message-timing.d.ts +25 -0
- package/components/assistant-ui/message-timing.js +56 -0
- package/components/assistant-ui/message.d.ts +4 -0
- package/components/assistant-ui/message.js +159 -0
- package/components/assistant-ui/primitives.d.ts +2 -0
- package/components/assistant-ui/quote.d.ts +37 -0
- package/components/assistant-ui/quote.js +150 -0
- package/components/assistant-ui/reasoning.d.ts +44 -0
- package/components/assistant-ui/reasoning.js +261 -0
- package/components/assistant-ui/selection-toolbar.d.ts +29 -0
- package/components/assistant-ui/selection-toolbar.js +91 -0
- package/components/assistant-ui/smart-message-text.d.ts +15 -0
- package/components/assistant-ui/smart-message-text.js +29 -0
- package/components/assistant-ui/sources.d.ts +17 -0
- package/components/assistant-ui/sources.js +121 -0
- package/components/assistant-ui/suggestions.d.ts +7 -0
- package/components/assistant-ui/suggestions.js +19 -0
- package/components/assistant-ui/thread-context.d.ts +37 -0
- package/components/assistant-ui/thread-context.js +8 -0
- package/components/assistant-ui/thread.d.ts +5 -0
- package/components/assistant-ui/thread.js +77 -0
- package/components/assistant-ui/tool-fallback.d.ts +36 -0
- package/components/assistant-ui/tool-fallback.js +428 -0
- package/components/assistant-ui/tool-group.d.ts +33 -0
- package/components/assistant-ui/tool-group.js +173 -0
- package/components/assistant-ui/tooltip-icon-button.d.ts +7 -0
- package/components/assistant-ui/tooltip-icon-button.js +31 -0
- package/components/assistant-ui/voice.d.ts +18 -0
- package/components/autocomplete.d.ts +18 -0
- package/components/autocomplete.js +162 -0
- package/components/avatar.d.ts +26 -0
- package/components/avatar.js +92 -0
- package/components/badge.d.ts +10 -0
- package/components/badge.js +83 -0
- package/components/brand-loader.d.ts +16 -0
- package/components/brand-loader.js +64 -0
- package/components/breadcrumbs.d.ts +8 -0
- package/components/breadcrumbs.js +58 -0
- package/components/button.d.ts +13 -0
- package/components/button.js +100 -0
- package/components/card.d.ts +19 -0
- package/components/card.js +82 -0
- package/components/carousel.d.ts +31 -0
- package/components/carousel.js +351 -0
- package/components/chart.d.ts +165 -0
- package/components/chart.js +841 -0
- package/components/checkbox.d.ts +13 -0
- package/components/checkbox.js +84 -0
- package/components/chip.d.ts +13 -0
- package/components/chip.js +112 -0
- package/components/collapsible.d.ts +5 -0
- package/components/collapsible.js +31 -0
- package/components/connector-card.d.ts +62 -0
- package/components/connector-card.js +154 -0
- package/components/divider.d.ts +23 -0
- package/components/divider.js +69 -0
- package/components/drawer.d.ts +45 -0
- package/components/drawer.js +234 -0
- package/components/dropdown.d.ts +33 -0
- package/components/dropdown.js +198 -0
- package/components/empty-state.d.ts +8 -0
- package/components/empty-state.js +30 -0
- package/components/field.d.ts +20 -0
- package/components/field.js +74 -0
- package/components/index.d.ts +56 -0
- package/components/index.js +444 -0
- package/components/input-field.d.ts +22 -0
- package/components/input-field.js +91 -0
- package/components/input.d.ts +8 -0
- package/components/input.js +61 -0
- package/components/kbd.d.ts +6 -0
- package/components/kbd.js +26 -0
- package/components/link.d.ts +14 -0
- package/components/link.js +72 -0
- package/components/modal.d.ts +18 -0
- package/components/modal.js +156 -0
- package/components/navbar.d.ts +15 -0
- package/components/navbar.js +68 -0
- package/components/number-field.d.ts +11 -0
- package/components/number-field.js +89 -0
- package/components/pagination.d.ts +28 -0
- package/components/pagination.js +179 -0
- package/components/panel.d.ts +14 -0
- package/components/panel.js +71 -0
- package/components/pixel-blast-svg.d.ts +22 -0
- package/components/pixel-blast-svg.js +154 -0
- package/components/popover.d.ts +20 -0
- package/components/popover.js +101 -0
- package/components/progress-circle.d.ts +11 -0
- package/components/progress-circle.js +75 -0
- package/components/progress.d.ts +22 -0
- package/components/progress.js +66 -0
- package/components/radio.d.ts +16 -0
- package/components/radio.js +101 -0
- package/components/segmented.d.ts +16 -0
- package/components/segmented.js +103 -0
- package/components/select.d.ts +28 -0
- package/components/select.js +180 -0
- package/components/selection-action-bar.d.ts +11 -0
- package/components/selection-action-bar.js +59 -0
- package/components/sidebar.d.ts +118 -0
- package/components/sidebar.js +375 -0
- package/components/skeleton.d.ts +6 -0
- package/components/skeleton.js +26 -0
- package/components/slider.d.ts +11 -0
- package/components/slider.js +62 -0
- package/components/spinner.d.ts +11 -0
- package/components/spinner.js +62 -0
- package/components/switch.d.ts +7 -0
- package/components/switch.js +61 -0
- package/components/table.d.ts +59 -0
- package/components/table.js +254 -0
- package/components/tabs.d.ts +29 -0
- package/components/tabs.js +371 -0
- package/components/textarea.d.ts +5 -0
- package/components/textarea.js +24 -0
- package/components/timeline.d.ts +7 -0
- package/components/timeline.js +47 -0
- package/components/toast.d.ts +74 -0
- package/components/toast.js +211 -0
- package/components/tooltip.d.ts +11 -0
- package/components/tooltip.js +143 -0
- package/components/tree.d.ts +42 -0
- package/components/tree.js +86 -0
- package/components/typography.d.ts +33 -0
- package/components/typography.js +65 -0
- package/components/ui/avatar.d.ts +11 -0
- package/components/ui/avatar.js +56 -0
- package/components/ui/button.d.ts +10 -0
- package/components/ui/button.js +57 -0
- package/components/ui/collapsible.d.ts +5 -0
- package/components/ui/collapsible.js +35 -0
- package/components/ui/dialog.d.ts +17 -0
- package/components/ui/dialog.js +93 -0
- package/components/ui/tabs.d.ts +22 -0
- package/components/ui/tooltip.d.ts +7 -0
- package/components/ui/tooltip.js +56 -0
- package/fonts/aribau-grotesk-400.otf +0 -0
- package/fonts/aribau-grotesk-700.otf +0 -0
- package/fonts.css +21 -0
- package/hooks/agents-ui/use-agent-audio-visualizer-aura.d.ts +8 -0
- package/hooks/agents-ui/use-agent-audio-visualizer-aura.js +62 -0
- package/hooks/agents-ui/use-agent-audio-visualizer-wave.d.ts +7 -0
- package/hooks/agents-ui/use-agent-audio-visualizer-wave.js +60 -0
- package/hooks/agents-ui/voice-visualizer-types.d.ts +9 -0
- package/lib/cn.d.ts +3 -0
- package/lib/cn.js +9 -0
- package/lib/icons.d.ts +378 -0
- package/lib/icons.js +119 -0
- package/lib/interactive.d.ts +24 -0
- package/lib/interactive.js +36 -0
- package/lib/motion.d.ts +58 -0
- package/lib/motion.js +70 -0
- package/lib/router.d.ts +3 -0
- package/lib/utils.d.ts +6 -0
- package/llms.txt +537 -0
- package/manifest.json +5085 -0
- package/package.json +60 -0
- package/styles.css +653 -0
- package/theme.css +273 -0
|
@@ -0,0 +1,375 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as r, jsxs as c } from "react/jsx-runtime";
|
|
3
|
+
import * as i from "react";
|
|
4
|
+
import { PanelLeft as R } from "../lib/icons.js";
|
|
5
|
+
import { cn as n } from "../lib/cn.js";
|
|
6
|
+
import { Tooltip as z } from "./tooltip.js";
|
|
7
|
+
import { Avatar as _ } from "./avatar.js";
|
|
8
|
+
const k = i.createContext({
|
|
9
|
+
collapsed: !1,
|
|
10
|
+
toggle: () => {
|
|
11
|
+
},
|
|
12
|
+
setCollapsed: () => {
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
function j() {
|
|
16
|
+
return i.useContext(k);
|
|
17
|
+
}
|
|
18
|
+
const H = i.forwardRef(
|
|
19
|
+
({
|
|
20
|
+
className: a,
|
|
21
|
+
collapsed: e,
|
|
22
|
+
defaultCollapsed: s = !1,
|
|
23
|
+
onCollapsedChange: t,
|
|
24
|
+
keyboardToggle: o = !0,
|
|
25
|
+
...d
|
|
26
|
+
}, p) => {
|
|
27
|
+
const [x, h] = i.useState(s), b = e !== void 0, l = b ? e : x, g = i.useCallback(
|
|
28
|
+
(u) => {
|
|
29
|
+
b || h(u), t == null || t(u);
|
|
30
|
+
},
|
|
31
|
+
[b, t]
|
|
32
|
+
), m = i.useCallback(
|
|
33
|
+
() => g(!l),
|
|
34
|
+
[l, g]
|
|
35
|
+
);
|
|
36
|
+
i.useEffect(() => {
|
|
37
|
+
if (!o) return;
|
|
38
|
+
const u = (f) => {
|
|
39
|
+
(f.metaKey || f.ctrlKey) && f.key.toLowerCase() === "b" && (f.preventDefault(), m());
|
|
40
|
+
};
|
|
41
|
+
return document.addEventListener("keydown", u), () => document.removeEventListener("keydown", u);
|
|
42
|
+
}, [o, m]);
|
|
43
|
+
const v = i.useMemo(
|
|
44
|
+
() => ({ collapsed: l, toggle: m, setCollapsed: g }),
|
|
45
|
+
[l, m, g]
|
|
46
|
+
);
|
|
47
|
+
return /* @__PURE__ */ r(k.Provider, { value: v, children: /* @__PURE__ */ r(
|
|
48
|
+
"aside",
|
|
49
|
+
{
|
|
50
|
+
ref: p,
|
|
51
|
+
"data-collapsed": l ? "true" : "false",
|
|
52
|
+
className: n(
|
|
53
|
+
"group/sidebar flex h-full shrink-0 flex-col bg-transparent",
|
|
54
|
+
l ? "w-(--sidebar-width-sm)" : "w-(--sidebar-width)",
|
|
55
|
+
a
|
|
56
|
+
),
|
|
57
|
+
...d
|
|
58
|
+
}
|
|
59
|
+
) });
|
|
60
|
+
}
|
|
61
|
+
);
|
|
62
|
+
H.displayName = "Sidebar";
|
|
63
|
+
function S({ children: a }) {
|
|
64
|
+
return /* @__PURE__ */ r("kbd", { className: "inline-flex h-4 min-w-4 items-center justify-center rounded bg-background/20 px-1 text-xs leading-none", children: a });
|
|
65
|
+
}
|
|
66
|
+
function E({
|
|
67
|
+
className: a,
|
|
68
|
+
onClick: e,
|
|
69
|
+
...s
|
|
70
|
+
}) {
|
|
71
|
+
const { collapsed: t, toggle: o } = j();
|
|
72
|
+
return /* @__PURE__ */ r(
|
|
73
|
+
z,
|
|
74
|
+
{
|
|
75
|
+
side: "right",
|
|
76
|
+
content: /* @__PURE__ */ c("span", { className: "flex items-center gap-1.5", children: [
|
|
77
|
+
t ? "Expand" : "Collapse",
|
|
78
|
+
/* @__PURE__ */ c("span", { className: "flex items-center gap-0.5", children: [
|
|
79
|
+
/* @__PURE__ */ r(S, { children: "⌘" }),
|
|
80
|
+
/* @__PURE__ */ r(S, { children: "B" })
|
|
81
|
+
] })
|
|
82
|
+
] }),
|
|
83
|
+
children: /* @__PURE__ */ r(
|
|
84
|
+
"button",
|
|
85
|
+
{
|
|
86
|
+
type: "button",
|
|
87
|
+
"aria-label": t ? "Expand sidebar" : "Collapse sidebar",
|
|
88
|
+
"aria-pressed": t,
|
|
89
|
+
onClick: (d) => {
|
|
90
|
+
e == null || e(d), o();
|
|
91
|
+
},
|
|
92
|
+
className: n(
|
|
93
|
+
"inline-flex size-(--sidebar-item) shrink-0 items-center justify-center rounded-md border border-transparent text-muted-foreground",
|
|
94
|
+
"transition-colors hover:border-border hover:bg-elevated hover:text-foreground",
|
|
95
|
+
"outline-none focus-visible:ring-3 focus-visible:ring-ring",
|
|
96
|
+
"[&_svg]:size-4.5",
|
|
97
|
+
a
|
|
98
|
+
),
|
|
99
|
+
...s,
|
|
100
|
+
children: /* @__PURE__ */ r(R, {})
|
|
101
|
+
}
|
|
102
|
+
)
|
|
103
|
+
}
|
|
104
|
+
);
|
|
105
|
+
}
|
|
106
|
+
function X({
|
|
107
|
+
logo: a,
|
|
108
|
+
href: e,
|
|
109
|
+
label: s = "Home",
|
|
110
|
+
showTrigger: t = !0,
|
|
111
|
+
className: o,
|
|
112
|
+
...d
|
|
113
|
+
}) {
|
|
114
|
+
const p = n(
|
|
115
|
+
// 20px mark centered in a 32px square — the same box as every other rail icon.
|
|
116
|
+
// group/brand lets a BrandMark logo play its blip loop on hover.
|
|
117
|
+
"group/brand flex size-(--sidebar-item) items-center justify-center",
|
|
118
|
+
"[&_img]:size-(--sidebar-logo) [&_svg]:size-(--sidebar-logo)",
|
|
119
|
+
t && "group-hover/sidebar:hidden"
|
|
120
|
+
);
|
|
121
|
+
return /* @__PURE__ */ c(
|
|
122
|
+
"div",
|
|
123
|
+
{
|
|
124
|
+
className: n(
|
|
125
|
+
"flex h-(--sidebar-header) shrink-0 items-center justify-between gap-2 px-3",
|
|
126
|
+
"group-data-[collapsed=true]/sidebar:justify-center group-data-[collapsed=true]/sidebar:px-2",
|
|
127
|
+
o
|
|
128
|
+
),
|
|
129
|
+
...d,
|
|
130
|
+
children: [
|
|
131
|
+
e ? /* @__PURE__ */ r("a", { href: e, "aria-label": s, className: p, children: a }) : /* @__PURE__ */ r("span", { className: p, children: a }),
|
|
132
|
+
t && /* @__PURE__ */ r("div", { className: "hidden group-hover/sidebar:flex", children: /* @__PURE__ */ r(E, {}) })
|
|
133
|
+
]
|
|
134
|
+
}
|
|
135
|
+
);
|
|
136
|
+
}
|
|
137
|
+
const I = i.forwardRef(
|
|
138
|
+
({ className: a, ...e }, s) => /* @__PURE__ */ r(
|
|
139
|
+
"div",
|
|
140
|
+
{
|
|
141
|
+
ref: s,
|
|
142
|
+
className: n(
|
|
143
|
+
"flex h-(--sidebar-header) shrink-0 items-center justify-between gap-2 px-3",
|
|
144
|
+
"group-data-[collapsed=true]/sidebar:justify-center group-data-[collapsed=true]/sidebar:px-2",
|
|
145
|
+
a
|
|
146
|
+
),
|
|
147
|
+
...e
|
|
148
|
+
}
|
|
149
|
+
)
|
|
150
|
+
);
|
|
151
|
+
I.displayName = "SidebarHeader";
|
|
152
|
+
const L = i.forwardRef(
|
|
153
|
+
({ className: a, ...e }, s) => /* @__PURE__ */ r("nav", { ref: s, className: n("min-h-0 flex-1 space-y-5 overflow-y-auto p-3", a), ...e })
|
|
154
|
+
);
|
|
155
|
+
L.displayName = "SidebarNav";
|
|
156
|
+
const A = i.forwardRef(
|
|
157
|
+
({ className: a, label: e, children: s, ...t }, o) => /* @__PURE__ */ c("div", { ref: o, className: a, ...t, children: [
|
|
158
|
+
e && /* @__PURE__ */ r("div", { className: "mb-1.5 px-3 text-xs font-semibold uppercase tracking-wider text-muted-foreground group-data-[collapsed=true]/sidebar:hidden", children: e }),
|
|
159
|
+
/* @__PURE__ */ r("div", { className: "flex flex-col gap-0.5", children: s })
|
|
160
|
+
] })
|
|
161
|
+
);
|
|
162
|
+
A.displayName = "SidebarSection";
|
|
163
|
+
const K = i.forwardRef(
|
|
164
|
+
({ className: a, icon: e, isActive: s, endContent: t, children: o, title: d, ...p }, x) => /* @__PURE__ */ c(
|
|
165
|
+
"a",
|
|
166
|
+
{
|
|
167
|
+
ref: x,
|
|
168
|
+
"aria-current": s ? "page" : void 0,
|
|
169
|
+
title: d ?? (typeof o == "string" ? o : void 0),
|
|
170
|
+
className: n(
|
|
171
|
+
"flex items-center gap-2.5 rounded-md px-3 py-1.5 text-xs transition-colors",
|
|
172
|
+
"outline-none focus-visible:ring-3 focus-visible:ring-ring",
|
|
173
|
+
"[&_svg]:size-4 [&_svg]:shrink-0",
|
|
174
|
+
// Collapsed: a centered square (--sidebar-item) so every rail item lines up.
|
|
175
|
+
"group-data-[collapsed=true]/sidebar:mx-auto group-data-[collapsed=true]/sidebar:size-(--sidebar-item) group-data-[collapsed=true]/sidebar:justify-center group-data-[collapsed=true]/sidebar:p-0",
|
|
176
|
+
s ? "bg-fill font-medium text-foreground" : "text-muted-foreground hover:bg-fill/60 hover:text-foreground",
|
|
177
|
+
a
|
|
178
|
+
),
|
|
179
|
+
...p,
|
|
180
|
+
children: [
|
|
181
|
+
e,
|
|
182
|
+
/* @__PURE__ */ r("span", { className: "min-w-0 flex-1 truncate group-data-[collapsed=true]/sidebar:hidden", children: o }),
|
|
183
|
+
t && /* @__PURE__ */ r("span", { className: "shrink-0 group-data-[collapsed=true]/sidebar:hidden", children: t })
|
|
184
|
+
]
|
|
185
|
+
}
|
|
186
|
+
)
|
|
187
|
+
);
|
|
188
|
+
K.displayName = "SidebarItem";
|
|
189
|
+
const M = i.forwardRef(
|
|
190
|
+
({ className: a, ...e }, s) => /* @__PURE__ */ r(
|
|
191
|
+
"div",
|
|
192
|
+
{
|
|
193
|
+
ref: s,
|
|
194
|
+
className: n("shrink-0 p-3 group-data-[collapsed=true]/sidebar:px-2", a),
|
|
195
|
+
...e
|
|
196
|
+
}
|
|
197
|
+
)
|
|
198
|
+
);
|
|
199
|
+
M.displayName = "SidebarFooter";
|
|
200
|
+
const q = i.forwardRef(
|
|
201
|
+
({ className: a, icon: e, children: s, ...t }, o) => /* @__PURE__ */ r("div", { className: "px-3 pb-1 group-data-[collapsed=true]/sidebar:px-2", children: /* @__PURE__ */ c(
|
|
202
|
+
"button",
|
|
203
|
+
{
|
|
204
|
+
ref: o,
|
|
205
|
+
type: "button",
|
|
206
|
+
className: n(
|
|
207
|
+
"flex h-10 w-full items-center justify-start gap-2 rounded-md bg-elevated px-3",
|
|
208
|
+
"text-xs font-medium text-foreground",
|
|
209
|
+
// Same hover feedback as ConnectorCard: raised at rest, lifts on
|
|
210
|
+
// hover, settles back on press.
|
|
211
|
+
"shadow-elevation",
|
|
212
|
+
"transition-[transform,box-shadow] duration-(--duration-fast) ease-out motion-reduce:transition-none",
|
|
213
|
+
"hover:-translate-y-0.5 active:translate-y-0",
|
|
214
|
+
"outline-none focus-visible:ring-3 focus-visible:ring-ring",
|
|
215
|
+
"[&_svg]:size-4 [&_svg]:shrink-0",
|
|
216
|
+
"group-data-[collapsed=true]/sidebar:mx-auto group-data-[collapsed=true]/sidebar:size-(--sidebar-item) group-data-[collapsed=true]/sidebar:justify-center group-data-[collapsed=true]/sidebar:px-0",
|
|
217
|
+
a
|
|
218
|
+
),
|
|
219
|
+
...t,
|
|
220
|
+
children: [
|
|
221
|
+
e,
|
|
222
|
+
/* @__PURE__ */ r("span", { className: "truncate group-data-[collapsed=true]/sidebar:hidden", children: s })
|
|
223
|
+
]
|
|
224
|
+
}
|
|
225
|
+
) })
|
|
226
|
+
);
|
|
227
|
+
q.displayName = "SidebarAction";
|
|
228
|
+
const B = i.forwardRef(
|
|
229
|
+
({ className: a, label: e, children: s, ...t }, o) => /* @__PURE__ */ c(
|
|
230
|
+
"div",
|
|
231
|
+
{
|
|
232
|
+
ref: o,
|
|
233
|
+
className: n("group-data-[collapsed=true]/sidebar:hidden", a),
|
|
234
|
+
...t,
|
|
235
|
+
children: [
|
|
236
|
+
e && /* @__PURE__ */ r("div", { className: "mb-1.5 px-3 text-xs font-semibold uppercase tracking-wider text-muted-foreground", children: e }),
|
|
237
|
+
/* @__PURE__ */ r("div", { className: "flex flex-col gap-0.5", children: s })
|
|
238
|
+
]
|
|
239
|
+
}
|
|
240
|
+
)
|
|
241
|
+
);
|
|
242
|
+
B.displayName = "SidebarHistory";
|
|
243
|
+
const D = i.forwardRef(({ className: a, children: e, title: s, action: t, isActive: o, icon: d, ...p }, x) => {
|
|
244
|
+
const h = i.useRef(null), b = i.useRef(null), [l, g] = i.useState(0);
|
|
245
|
+
i.useLayoutEffect(() => {
|
|
246
|
+
const u = h.current, f = b.current;
|
|
247
|
+
if (!u || !f) return;
|
|
248
|
+
const N = () => {
|
|
249
|
+
const w = f.scrollWidth - u.clientWidth;
|
|
250
|
+
g(w > 0 ? w + (t ? 32 : 0) : 0);
|
|
251
|
+
};
|
|
252
|
+
N();
|
|
253
|
+
const y = new ResizeObserver(N);
|
|
254
|
+
return y.observe(u), y.observe(f), () => y.disconnect();
|
|
255
|
+
}, [e, t]);
|
|
256
|
+
const m = l > 0, v = Math.max(500, Math.round(l * 18));
|
|
257
|
+
return /* @__PURE__ */ c(
|
|
258
|
+
"div",
|
|
259
|
+
{
|
|
260
|
+
className: n(
|
|
261
|
+
"group/hist relative flex items-center rounded-md transition-colors",
|
|
262
|
+
o ? "bg-fill/60 text-foreground" : "text-muted-foreground hover:bg-fill/60 hover:text-foreground"
|
|
263
|
+
),
|
|
264
|
+
children: [
|
|
265
|
+
d && /* @__PURE__ */ r(
|
|
266
|
+
"span",
|
|
267
|
+
{
|
|
268
|
+
"aria-hidden": !0,
|
|
269
|
+
className: "pointer-events-none absolute inset-y-0 start-3 flex items-center [&_svg]:size-4 [&_svg]:shrink-0",
|
|
270
|
+
children: d
|
|
271
|
+
}
|
|
272
|
+
),
|
|
273
|
+
/* @__PURE__ */ r(
|
|
274
|
+
"a",
|
|
275
|
+
{
|
|
276
|
+
ref: x,
|
|
277
|
+
title: s ?? (typeof e == "string" ? e : void 0),
|
|
278
|
+
className: n(
|
|
279
|
+
// Left pad matches a SidebarItem's text column (px-3 + icon size-4 +
|
|
280
|
+
// gap-2.5 = 2.375rem) so history titles line up under the nav labels.
|
|
281
|
+
"block min-w-0 flex-1 rounded-md py-1.5 pr-3 ps-(--sidebar-text-indent) text-xs",
|
|
282
|
+
"outline-none focus-visible:ring-3 focus-visible:ring-ring",
|
|
283
|
+
a
|
|
284
|
+
),
|
|
285
|
+
...p,
|
|
286
|
+
children: /* @__PURE__ */ r(
|
|
287
|
+
"span",
|
|
288
|
+
{
|
|
289
|
+
ref: h,
|
|
290
|
+
className: n(
|
|
291
|
+
"block overflow-hidden",
|
|
292
|
+
// Rest: fade the right edge (no ellipsis). Hover: the title scrolls,
|
|
293
|
+
// so fade the LEFT edge where it exits; the action backdrop (or the
|
|
294
|
+
// string's own end) handles the right.
|
|
295
|
+
m && "[mask-image:linear-gradient(to_right,#000_calc(100%-1.5rem),transparent)]",
|
|
296
|
+
m && "group-hover/hist:[mask-image:linear-gradient(to_right,transparent,#000_1.25rem,#000_100%)]"
|
|
297
|
+
),
|
|
298
|
+
children: /* @__PURE__ */ r(
|
|
299
|
+
"span",
|
|
300
|
+
{
|
|
301
|
+
ref: b,
|
|
302
|
+
className: n(
|
|
303
|
+
"block w-max whitespace-nowrap transition-transform ease-linear",
|
|
304
|
+
m && "group-hover/hist:[transform:translateX(var(--mq-x))]",
|
|
305
|
+
"motion-reduce:transition-none motion-reduce:group-hover/hist:[transform:none]"
|
|
306
|
+
),
|
|
307
|
+
style: {
|
|
308
|
+
"--mq-x": `-${l}px`,
|
|
309
|
+
transitionDuration: `${v}ms`
|
|
310
|
+
},
|
|
311
|
+
children: e
|
|
312
|
+
}
|
|
313
|
+
)
|
|
314
|
+
}
|
|
315
|
+
)
|
|
316
|
+
}
|
|
317
|
+
),
|
|
318
|
+
t && /* @__PURE__ */ r(
|
|
319
|
+
"span",
|
|
320
|
+
{
|
|
321
|
+
className: n(
|
|
322
|
+
// Rounded end matches the row's radius so the backdrop doesn't
|
|
323
|
+
// square off the highlight's right corners.
|
|
324
|
+
"absolute inset-y-0 right-0 flex items-center rounded-e-md pl-8 pr-1",
|
|
325
|
+
"bg-gradient-to-l from-fill from-45% to-transparent",
|
|
326
|
+
"opacity-0 transition-opacity duration-(--duration-fast) group-hover/hist:opacity-100",
|
|
327
|
+
"pointer-events-none group-hover/hist:pointer-events-auto",
|
|
328
|
+
"focus-within:pointer-events-auto focus-within:opacity-100"
|
|
329
|
+
),
|
|
330
|
+
children: t
|
|
331
|
+
}
|
|
332
|
+
)
|
|
333
|
+
]
|
|
334
|
+
}
|
|
335
|
+
);
|
|
336
|
+
});
|
|
337
|
+
D.displayName = "SidebarHistoryItem";
|
|
338
|
+
const F = i.forwardRef(
|
|
339
|
+
({ className: a, name: e, role: s, src: t, ...o }, d) => /* @__PURE__ */ c(
|
|
340
|
+
"a",
|
|
341
|
+
{
|
|
342
|
+
ref: d,
|
|
343
|
+
className: n(
|
|
344
|
+
"flex items-center gap-2.5 rounded-md p-2 transition-colors hover:bg-fill/60",
|
|
345
|
+
"outline-none focus-visible:ring-3 focus-visible:ring-ring",
|
|
346
|
+
"group-data-[collapsed=true]/sidebar:mx-auto group-data-[collapsed=true]/sidebar:size-(--sidebar-item) group-data-[collapsed=true]/sidebar:justify-center group-data-[collapsed=true]/sidebar:p-0",
|
|
347
|
+
a
|
|
348
|
+
),
|
|
349
|
+
...o,
|
|
350
|
+
children: [
|
|
351
|
+
/* @__PURE__ */ r(_, { size: "sm", name: e, src: t }),
|
|
352
|
+
/* @__PURE__ */ c("div", { className: "min-w-0 leading-tight group-data-[collapsed=true]/sidebar:hidden", children: [
|
|
353
|
+
/* @__PURE__ */ r("div", { className: "truncate text-xs font-medium text-foreground", children: e }),
|
|
354
|
+
s && /* @__PURE__ */ r("div", { className: "truncate text-xs text-tertiary", children: s })
|
|
355
|
+
] })
|
|
356
|
+
]
|
|
357
|
+
}
|
|
358
|
+
)
|
|
359
|
+
);
|
|
360
|
+
F.displayName = "SidebarAccount";
|
|
361
|
+
export {
|
|
362
|
+
H as Sidebar,
|
|
363
|
+
F as SidebarAccount,
|
|
364
|
+
q as SidebarAction,
|
|
365
|
+
X as SidebarBrand,
|
|
366
|
+
M as SidebarFooter,
|
|
367
|
+
I as SidebarHeader,
|
|
368
|
+
B as SidebarHistory,
|
|
369
|
+
D as SidebarHistoryItem,
|
|
370
|
+
K as SidebarItem,
|
|
371
|
+
L as SidebarNav,
|
|
372
|
+
A as SidebarSection,
|
|
373
|
+
E as SidebarTrigger,
|
|
374
|
+
j as useSidebar
|
|
375
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export interface SkeletonProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
3
|
+
/** Render as a circle (equal width/height, fully rounded). */
|
|
4
|
+
circle?: boolean;
|
|
5
|
+
}
|
|
6
|
+
export declare const Skeleton: React.ForwardRefExoticComponent<SkeletonProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
3
|
+
import * as n from "react";
|
|
4
|
+
import { cn as f } from "../lib/cn.js";
|
|
5
|
+
const i = n.forwardRef(
|
|
6
|
+
({ className: e, circle: r = !1, ...t }, a) => /* @__PURE__ */ o(
|
|
7
|
+
"div",
|
|
8
|
+
{
|
|
9
|
+
ref: a,
|
|
10
|
+
"aria-hidden": !0,
|
|
11
|
+
className: f(
|
|
12
|
+
"relative overflow-hidden bg-muted",
|
|
13
|
+
r ? "rounded-full" : "rounded-md",
|
|
14
|
+
"after:absolute after:inset-0 after:-translate-x-full",
|
|
15
|
+
"after:bg-gradient-to-r after:from-transparent after:via-foreground/10 after:to-transparent",
|
|
16
|
+
"after:animate-[ads-shimmer_var(--duration-pulse)_infinite]",
|
|
17
|
+
e
|
|
18
|
+
),
|
|
19
|
+
...t
|
|
20
|
+
}
|
|
21
|
+
)
|
|
22
|
+
);
|
|
23
|
+
i.displayName = "Skeleton";
|
|
24
|
+
export {
|
|
25
|
+
i as Skeleton
|
|
26
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export interface SliderProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "value" | "onChange" | "type" | "min" | "max" | "step"> {
|
|
3
|
+
value: number;
|
|
4
|
+
onChange?: (value: number) => void;
|
|
5
|
+
min?: number;
|
|
6
|
+
max?: number;
|
|
7
|
+
step?: number;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
className?: string;
|
|
10
|
+
}
|
|
11
|
+
export declare const Slider: React.ForwardRefExoticComponent<SliderProps & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs as b, jsx as l } from "react/jsx-runtime";
|
|
3
|
+
import * as v from "react";
|
|
4
|
+
import { cn as s } from "../lib/cn.js";
|
|
5
|
+
const m = v.forwardRef(
|
|
6
|
+
({ value: d, onChange: t, min: e = 0, max: r = 100, step: u = 1, disabled: a, className: n, ...c }, f) => {
|
|
7
|
+
const i = Math.min(Math.max(d, e), r), o = r === e ? 0 : (i - e) / (r - e) * 100;
|
|
8
|
+
return /* @__PURE__ */ b(
|
|
9
|
+
"div",
|
|
10
|
+
{
|
|
11
|
+
className: s(
|
|
12
|
+
"relative flex h-5 w-full items-center",
|
|
13
|
+
a && "opacity-50",
|
|
14
|
+
n
|
|
15
|
+
),
|
|
16
|
+
children: [
|
|
17
|
+
/* @__PURE__ */ l(
|
|
18
|
+
"input",
|
|
19
|
+
{
|
|
20
|
+
ref: f,
|
|
21
|
+
type: "range",
|
|
22
|
+
min: e,
|
|
23
|
+
max: r,
|
|
24
|
+
step: u,
|
|
25
|
+
value: i,
|
|
26
|
+
disabled: a,
|
|
27
|
+
onChange: (p) => t == null ? void 0 : t(Number(p.target.value)),
|
|
28
|
+
className: s(
|
|
29
|
+
"peer absolute inset-0 z-10 h-full w-full cursor-pointer opacity-0",
|
|
30
|
+
"disabled:cursor-not-allowed"
|
|
31
|
+
),
|
|
32
|
+
...c
|
|
33
|
+
}
|
|
34
|
+
),
|
|
35
|
+
/* @__PURE__ */ l("div", { className: "h-1.5 w-full rounded-full bg-input", children: /* @__PURE__ */ l(
|
|
36
|
+
"div",
|
|
37
|
+
{
|
|
38
|
+
className: "h-full rounded-full bg-brand",
|
|
39
|
+
style: { width: `${o}%` }
|
|
40
|
+
}
|
|
41
|
+
) }),
|
|
42
|
+
/* @__PURE__ */ l(
|
|
43
|
+
"div",
|
|
44
|
+
{
|
|
45
|
+
className: s(
|
|
46
|
+
"pointer-events-none absolute size-4 -translate-x-1/2 rounded-full",
|
|
47
|
+
"border-2 border-background bg-brand shadow-elevation transition-shadow",
|
|
48
|
+
"peer-focus-visible:ring-3 peer-focus-visible:ring-ring"
|
|
49
|
+
),
|
|
50
|
+
style: { left: `${o}%` },
|
|
51
|
+
"aria-hidden": !0
|
|
52
|
+
}
|
|
53
|
+
)
|
|
54
|
+
]
|
|
55
|
+
}
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
);
|
|
59
|
+
m.displayName = "Slider";
|
|
60
|
+
export {
|
|
61
|
+
m as Slider
|
|
62
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
declare const spinnerVariants: (props?: ({
|
|
4
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
5
|
+
color?: "current" | "primary" | "muted" | null | undefined;
|
|
6
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
7
|
+
export interface SpinnerProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "color">, VariantProps<typeof spinnerVariants> {
|
|
8
|
+
label?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare const Spinner: React.ForwardRefExoticComponent<SpinnerProps & React.RefAttributes<HTMLDivElement>>;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as e, jsxs as c } from "react/jsx-runtime";
|
|
3
|
+
import * as d from "react";
|
|
4
|
+
import { cva as l } from "class-variance-authority";
|
|
5
|
+
import { cn as m } from "../lib/cn.js";
|
|
6
|
+
const r = "M12 2.5 C5 2.5 2.5 5 2.5 12 C2.5 19 5 21.5 12 21.5 C19 21.5 21.5 19 21.5 12 C21.5 5 19 2.5 12 2.5 Z", u = l("inline-block shrink-0", {
|
|
7
|
+
variants: {
|
|
8
|
+
size: {
|
|
9
|
+
sm: "size-4",
|
|
10
|
+
md: "size-6",
|
|
11
|
+
lg: "size-8"
|
|
12
|
+
},
|
|
13
|
+
color: {
|
|
14
|
+
current: "text-current",
|
|
15
|
+
primary: "text-brand",
|
|
16
|
+
muted: "text-muted-foreground"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
defaultVariants: { size: "md", color: "current" }
|
|
20
|
+
}), p = d.forwardRef(
|
|
21
|
+
({ className: i, size: n, color: a, label: t, ...s }, o) => /* @__PURE__ */ e(
|
|
22
|
+
"div",
|
|
23
|
+
{
|
|
24
|
+
ref: o,
|
|
25
|
+
role: "status",
|
|
26
|
+
"aria-label": t ?? "Loading",
|
|
27
|
+
className: m(u({ size: n, color: a }), i),
|
|
28
|
+
...s,
|
|
29
|
+
children: /* @__PURE__ */ c("svg", { viewBox: "0 0 24 24", fill: "none", "aria-hidden": !0, className: "size-full", children: [
|
|
30
|
+
/* @__PURE__ */ e(
|
|
31
|
+
"path",
|
|
32
|
+
{
|
|
33
|
+
d: r,
|
|
34
|
+
stroke: "currentColor",
|
|
35
|
+
strokeWidth: "2.5",
|
|
36
|
+
className: "opacity-15"
|
|
37
|
+
}
|
|
38
|
+
),
|
|
39
|
+
/* @__PURE__ */ e(
|
|
40
|
+
"g",
|
|
41
|
+
{
|
|
42
|
+
className: "origin-center animate-[ads-spin_var(--duration-spin)_linear_infinite] motion-reduce:animate-none",
|
|
43
|
+
children: /* @__PURE__ */ e(
|
|
44
|
+
"path",
|
|
45
|
+
{
|
|
46
|
+
d: r,
|
|
47
|
+
stroke: "currentColor",
|
|
48
|
+
strokeWidth: "2.5",
|
|
49
|
+
strokeLinecap: "round",
|
|
50
|
+
className: "animate-[ads-spin-head_var(--duration-spin)_var(--ease-in-out)_infinite] motion-reduce:animate-none"
|
|
51
|
+
}
|
|
52
|
+
)
|
|
53
|
+
}
|
|
54
|
+
)
|
|
55
|
+
] })
|
|
56
|
+
}
|
|
57
|
+
)
|
|
58
|
+
);
|
|
59
|
+
p.displayName = "Spinner";
|
|
60
|
+
export {
|
|
61
|
+
p as Spinner
|
|
62
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export interface SwitchProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "onChange"> {
|
|
3
|
+
checked?: boolean;
|
|
4
|
+
onCheckedChange?: (checked: boolean) => void;
|
|
5
|
+
size?: "sm" | "md";
|
|
6
|
+
}
|
|
7
|
+
export declare const Switch: React.ForwardRefExoticComponent<SwitchProps & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs as c, jsx as o } from "react/jsx-runtime";
|
|
3
|
+
import * as d from "react";
|
|
4
|
+
import { cn as s } from "../lib/cn.js";
|
|
5
|
+
const m = {
|
|
6
|
+
sm: { track: "h-5 w-9", knob: "size-4", on: "translate-x-4", off: "translate-x-0.5" },
|
|
7
|
+
md: { track: "h-6 w-11", knob: "size-5", on: "translate-x-5", off: "translate-x-0.5" }
|
|
8
|
+
}, b = d.forwardRef(
|
|
9
|
+
({ className: i, checked: t = !1, onCheckedChange: n, size: l = "md", disabled: e, children: a, ...u }, f) => {
|
|
10
|
+
const r = m[l];
|
|
11
|
+
return /* @__PURE__ */ c(
|
|
12
|
+
"label",
|
|
13
|
+
{
|
|
14
|
+
className: s(
|
|
15
|
+
"inline-flex items-center gap-2 text-xs text-foreground select-none",
|
|
16
|
+
e ? "cursor-not-allowed opacity-50" : "cursor-pointer"
|
|
17
|
+
),
|
|
18
|
+
children: [
|
|
19
|
+
/* @__PURE__ */ o(
|
|
20
|
+
"button",
|
|
21
|
+
{
|
|
22
|
+
ref: f,
|
|
23
|
+
type: "button",
|
|
24
|
+
role: "switch",
|
|
25
|
+
"aria-checked": t,
|
|
26
|
+
disabled: e,
|
|
27
|
+
onClick: () => n == null ? void 0 : n(!t),
|
|
28
|
+
className: s(
|
|
29
|
+
"relative inline-flex shrink-0 items-center rounded-full border border-transparent",
|
|
30
|
+
"transition-colors duration-(--duration-fast)",
|
|
31
|
+
"outline-none focus-visible:ring-3 focus-visible:ring-ring",
|
|
32
|
+
"disabled:cursor-not-allowed",
|
|
33
|
+
t ? "bg-brand" : "bg-input",
|
|
34
|
+
r.track,
|
|
35
|
+
i
|
|
36
|
+
),
|
|
37
|
+
...u,
|
|
38
|
+
children: /* @__PURE__ */ o(
|
|
39
|
+
"span",
|
|
40
|
+
{
|
|
41
|
+
"aria-hidden": !0,
|
|
42
|
+
className: s(
|
|
43
|
+
"inline-block rounded-full bg-elevated shadow-elevation",
|
|
44
|
+
"transition-transform duration-(--duration-fast) ease-out motion-reduce:transition-none",
|
|
45
|
+
r.knob,
|
|
46
|
+
t ? r.on : r.off
|
|
47
|
+
)
|
|
48
|
+
}
|
|
49
|
+
)
|
|
50
|
+
}
|
|
51
|
+
),
|
|
52
|
+
a && /* @__PURE__ */ o("span", { children: a })
|
|
53
|
+
]
|
|
54
|
+
}
|
|
55
|
+
);
|
|
56
|
+
}
|
|
57
|
+
);
|
|
58
|
+
b.displayName = "Switch";
|
|
59
|
+
export {
|
|
60
|
+
b as Switch
|
|
61
|
+
};
|