@actioneer/ads 0.2.4 → 0.3.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/components/ai-elements/chain-of-thought.d.ts +64 -2
- package/components/ai-elements/chain-of-thought.js +319 -100
- package/components/ai-elements/chart.d.ts +30 -0
- package/components/ai-elements/chart.js +303 -0
- package/components/ai-elements/index.d.ts +2 -0
- package/components/ai-elements/message.d.ts +12 -2
- package/components/ai-elements/message.js +133 -100
- package/components/ai-elements/research-activity.d.ts +45 -0
- package/components/ai-elements/research-activity.js +260 -0
- package/components/ai-elements/tool.js +42 -38
- package/components/answer.d.ts +16 -0
- package/components/answer.js +273 -249
- package/components/assistant-ui/attachment.js +5 -1
- package/components/assistant-ui/composer-deep-research.js +44 -29
- package/components/assistant-ui/composer-harness.js +45 -27
- package/components/assistant-ui/composer.js +16 -16
- package/components/assistant-ui/index.d.ts +0 -1
- package/components/assistant-ui/message.d.ts +7 -0
- package/components/assistant-ui/message.js +36 -36
- package/components/assistant-ui/thread.js +1 -1
- package/components/brand-texture.d.ts +37 -0
- package/components/brand-texture.js +54 -0
- package/components/code-block.d.ts +36 -0
- package/components/code-block.js +136 -0
- package/components/drawer.d.ts +1 -1
- package/components/file-dropzone.d.ts +32 -0
- package/components/file-dropzone.js +134 -0
- package/components/index.d.ts +10 -0
- package/components/index.js +482 -433
- package/components/infinite-canvas.d.ts +50 -0
- package/components/infinite-canvas.js +215 -0
- package/components/page-header.d.ts +22 -0
- package/components/page-header.js +52 -0
- package/components/resizable-panel.d.ts +29 -0
- package/components/resizable-panel.js +102 -0
- package/components/reveal.d.ts +36 -0
- package/components/reveal.js +35 -0
- package/components/scroll-area.d.ts +19 -0
- package/components/scroll-area.js +57 -0
- package/components/setting-row.d.ts +35 -0
- package/components/setting-row.js +86 -0
- package/components/sidebar.js +131 -131
- package/components/stepper.d.ts +32 -0
- package/components/stepper.js +113 -0
- package/components/table.js +16 -15
- package/components/tabs.js +1 -1
- package/lib/icons.d.ts +12 -0
- package/lib/icons.js +98 -95
- package/lib/motion.d.ts +5 -3
- package/lib/motion.js +28 -27
- package/llms.txt +122 -28
- package/manifest.json +871 -73
- package/package.json +2 -2
- package/styles.css +71 -28
- package/theme.css +19 -15
- package/components/assistant-ui/smart-message-text.d.ts +0 -15
- package/components/assistant-ui/smart-message-text.js +0 -29
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs as c, jsx as s } from "react/jsx-runtime";
|
|
3
|
+
import * as f from "react";
|
|
4
|
+
import { cva as g } from "class-variance-authority";
|
|
5
|
+
import { cn as o } from "../lib/cn.js";
|
|
6
|
+
const x = g(
|
|
7
|
+
"flex w-full items-center gap-3 rounded-lg bg-card px-4 py-3 text-left",
|
|
8
|
+
{
|
|
9
|
+
variants: {
|
|
10
|
+
isPressable: {
|
|
11
|
+
true: o(
|
|
12
|
+
"cursor-pointer outline-none",
|
|
13
|
+
"transition-[background-color,transform] duration-(--duration-fast) ease-out",
|
|
14
|
+
"hover:bg-muted focus-visible:ring-3 focus-visible:ring-ring",
|
|
15
|
+
"active:scale-(--scale-press) motion-reduce:transition-none"
|
|
16
|
+
),
|
|
17
|
+
false: ""
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
defaultVariants: { isPressable: !1 }
|
|
21
|
+
}
|
|
22
|
+
), p = f.forwardRef(
|
|
23
|
+
({ className: r, icon: i, label: n, description: l, action: d, onSelect: e, ...m }, u) => {
|
|
24
|
+
const a = !!e;
|
|
25
|
+
return /* @__PURE__ */ c(
|
|
26
|
+
"div",
|
|
27
|
+
{
|
|
28
|
+
ref: u,
|
|
29
|
+
"data-slot": "setting-row",
|
|
30
|
+
role: a ? "button" : void 0,
|
|
31
|
+
tabIndex: a ? 0 : void 0,
|
|
32
|
+
onClick: e,
|
|
33
|
+
onKeyDown: a ? (t) => {
|
|
34
|
+
(t.key === "Enter" || t.key === " ") && (t.preventDefault(), e == null || e());
|
|
35
|
+
} : void 0,
|
|
36
|
+
className: o(x({ isPressable: a }), r),
|
|
37
|
+
...m,
|
|
38
|
+
children: [
|
|
39
|
+
i && /* @__PURE__ */ s(
|
|
40
|
+
"span",
|
|
41
|
+
{
|
|
42
|
+
"aria-hidden": !0,
|
|
43
|
+
className: "flex size-5 shrink-0 items-center justify-center text-tertiary [&>svg]:size-4.5",
|
|
44
|
+
children: i
|
|
45
|
+
}
|
|
46
|
+
),
|
|
47
|
+
/* @__PURE__ */ c("div", { className: "flex min-w-0 flex-1 flex-col gap-0.5", children: [
|
|
48
|
+
/* @__PURE__ */ s("div", { className: "min-w-0 truncate text-base text-foreground", children: n }),
|
|
49
|
+
l && /* @__PURE__ */ s("div", { className: "min-w-0 text-xs text-tertiary", children: l })
|
|
50
|
+
] }),
|
|
51
|
+
d && // The trailing control owns its own click — a pressable row must not
|
|
52
|
+
// also fire when the reader aims at the button inside it.
|
|
53
|
+
/* @__PURE__ */ s(
|
|
54
|
+
"span",
|
|
55
|
+
{
|
|
56
|
+
className: "shrink-0",
|
|
57
|
+
onClick: (t) => t.stopPropagation(),
|
|
58
|
+
children: d
|
|
59
|
+
}
|
|
60
|
+
)
|
|
61
|
+
]
|
|
62
|
+
}
|
|
63
|
+
);
|
|
64
|
+
}
|
|
65
|
+
);
|
|
66
|
+
p.displayName = "SettingRow";
|
|
67
|
+
const v = f.forwardRef(
|
|
68
|
+
({ className: r, ...i }, n) => /* @__PURE__ */ s(
|
|
69
|
+
"div",
|
|
70
|
+
{
|
|
71
|
+
ref: n,
|
|
72
|
+
"data-slot": "setting-list",
|
|
73
|
+
className: o(
|
|
74
|
+
"flex w-full flex-col gap-0.5 rounded-xl bg-surface p-1",
|
|
75
|
+
r
|
|
76
|
+
),
|
|
77
|
+
...i
|
|
78
|
+
}
|
|
79
|
+
)
|
|
80
|
+
);
|
|
81
|
+
v.displayName = "SettingList";
|
|
82
|
+
export {
|
|
83
|
+
v as SettingList,
|
|
84
|
+
p as SettingRow,
|
|
85
|
+
x as settingRowVariants
|
|
86
|
+
};
|
package/components/sidebar.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
3
|
-
import * as
|
|
4
|
-
import { PanelLeft as
|
|
5
|
-
import { cn as
|
|
6
|
-
import { Tooltip as
|
|
2
|
+
import { jsx as t, jsxs as c } from "react/jsx-runtime";
|
|
3
|
+
import * as n from "react";
|
|
4
|
+
import { PanelLeft as k } from "../lib/icons.js";
|
|
5
|
+
import { cn as o } from "../lib/cn.js";
|
|
6
|
+
import { Tooltip as R } from "./tooltip.js";
|
|
7
7
|
import { Avatar as _ } from "./avatar.js";
|
|
8
|
-
const
|
|
8
|
+
const z = n.createContext({
|
|
9
9
|
collapsed: !1,
|
|
10
10
|
toggle: () => {
|
|
11
11
|
},
|
|
@@ -13,43 +13,43 @@ const k = o.createContext({
|
|
|
13
13
|
}
|
|
14
14
|
});
|
|
15
15
|
function j() {
|
|
16
|
-
return
|
|
16
|
+
return n.useContext(z);
|
|
17
17
|
}
|
|
18
|
-
const H =
|
|
18
|
+
const H = n.forwardRef(
|
|
19
19
|
({
|
|
20
20
|
className: a,
|
|
21
21
|
collapsed: e,
|
|
22
|
-
defaultCollapsed:
|
|
23
|
-
onCollapsedChange:
|
|
24
|
-
keyboardToggle:
|
|
22
|
+
defaultCollapsed: i = !1,
|
|
23
|
+
onCollapsedChange: r,
|
|
24
|
+
keyboardToggle: s = !0,
|
|
25
25
|
...d
|
|
26
|
-
},
|
|
27
|
-
const [p,
|
|
26
|
+
}, f) => {
|
|
27
|
+
const [p, v] = n.useState(i), b = e !== void 0, l = b ? e : p, h = n.useCallback(
|
|
28
28
|
(u) => {
|
|
29
|
-
|
|
29
|
+
b || v(u), r == null || r(u);
|
|
30
30
|
},
|
|
31
|
-
[
|
|
32
|
-
),
|
|
33
|
-
() =>
|
|
34
|
-
[l,
|
|
31
|
+
[b, r]
|
|
32
|
+
), g = n.useCallback(
|
|
33
|
+
() => h(!l),
|
|
34
|
+
[l, h]
|
|
35
35
|
);
|
|
36
|
-
|
|
37
|
-
if (!
|
|
38
|
-
const u = (
|
|
39
|
-
(
|
|
36
|
+
n.useEffect(() => {
|
|
37
|
+
if (!s) return;
|
|
38
|
+
const u = (m) => {
|
|
39
|
+
(m.metaKey || m.ctrlKey) && m.key.toLowerCase() === "b" && (m.preventDefault(), g());
|
|
40
40
|
};
|
|
41
41
|
return document.addEventListener("keydown", u), () => document.removeEventListener("keydown", u);
|
|
42
|
-
}, [
|
|
43
|
-
const
|
|
44
|
-
() => ({ collapsed: l, toggle:
|
|
45
|
-
[l,
|
|
42
|
+
}, [s, g]);
|
|
43
|
+
const x = n.useMemo(
|
|
44
|
+
() => ({ collapsed: l, toggle: g, setCollapsed: h }),
|
|
45
|
+
[l, g, h]
|
|
46
46
|
);
|
|
47
|
-
return /* @__PURE__ */
|
|
47
|
+
return /* @__PURE__ */ t(z.Provider, { value: x, children: /* @__PURE__ */ t(
|
|
48
48
|
"aside",
|
|
49
49
|
{
|
|
50
|
-
ref:
|
|
50
|
+
ref: f,
|
|
51
51
|
"data-collapsed": l ? "true" : "false",
|
|
52
|
-
className:
|
|
52
|
+
className: o(
|
|
53
53
|
"group/sidebar flex h-full shrink-0 flex-col bg-transparent",
|
|
54
54
|
l ? "w-(--sidebar-width-sm)" : "w-(--sidebar-width)",
|
|
55
55
|
a
|
|
@@ -61,43 +61,43 @@ const H = o.forwardRef(
|
|
|
61
61
|
);
|
|
62
62
|
H.displayName = "Sidebar";
|
|
63
63
|
function S({ children: a }) {
|
|
64
|
-
return /* @__PURE__ */
|
|
64
|
+
return /* @__PURE__ */ t("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
65
|
}
|
|
66
66
|
function E({
|
|
67
67
|
className: a,
|
|
68
68
|
onClick: e,
|
|
69
|
-
...
|
|
69
|
+
...i
|
|
70
70
|
}) {
|
|
71
|
-
const { collapsed:
|
|
72
|
-
return /* @__PURE__ */
|
|
73
|
-
|
|
71
|
+
const { collapsed: r, toggle: s } = j();
|
|
72
|
+
return /* @__PURE__ */ t(
|
|
73
|
+
R,
|
|
74
74
|
{
|
|
75
75
|
side: "right",
|
|
76
76
|
content: /* @__PURE__ */ c("span", { className: "flex items-center gap-1.5", children: [
|
|
77
|
-
|
|
77
|
+
r ? "Expand" : "Collapse",
|
|
78
78
|
/* @__PURE__ */ c("span", { className: "flex items-center gap-0.5", children: [
|
|
79
|
-
/* @__PURE__ */
|
|
80
|
-
/* @__PURE__ */
|
|
79
|
+
/* @__PURE__ */ t(S, { children: "⌘" }),
|
|
80
|
+
/* @__PURE__ */ t(S, { children: "B" })
|
|
81
81
|
] })
|
|
82
82
|
] }),
|
|
83
|
-
children: /* @__PURE__ */
|
|
83
|
+
children: /* @__PURE__ */ t(
|
|
84
84
|
"button",
|
|
85
85
|
{
|
|
86
86
|
type: "button",
|
|
87
|
-
"aria-label":
|
|
88
|
-
"aria-pressed":
|
|
87
|
+
"aria-label": r ? "Expand sidebar" : "Collapse sidebar",
|
|
88
|
+
"aria-pressed": r,
|
|
89
89
|
onClick: (d) => {
|
|
90
|
-
e == null || e(d),
|
|
90
|
+
e == null || e(d), s();
|
|
91
91
|
},
|
|
92
|
-
className:
|
|
92
|
+
className: o(
|
|
93
93
|
"inline-flex size-(--sidebar-item) shrink-0 items-center justify-center rounded-md border border-transparent text-muted-foreground",
|
|
94
94
|
"transition-colors hover:border-border hover:bg-elevated hover:text-foreground",
|
|
95
95
|
"outline-none focus-visible:ring-3 focus-visible:ring-ring",
|
|
96
96
|
"[&_svg]:size-4.5",
|
|
97
97
|
a
|
|
98
98
|
),
|
|
99
|
-
...
|
|
100
|
-
children: /* @__PURE__ */
|
|
99
|
+
...i,
|
|
100
|
+
children: /* @__PURE__ */ t(k, {})
|
|
101
101
|
}
|
|
102
102
|
)
|
|
103
103
|
}
|
|
@@ -106,42 +106,42 @@ function E({
|
|
|
106
106
|
function X({
|
|
107
107
|
logo: a,
|
|
108
108
|
href: e,
|
|
109
|
-
label:
|
|
110
|
-
showTrigger:
|
|
111
|
-
children:
|
|
109
|
+
label: i = "Home",
|
|
110
|
+
showTrigger: r = !0,
|
|
111
|
+
children: s,
|
|
112
112
|
className: d,
|
|
113
|
-
...
|
|
113
|
+
...f
|
|
114
114
|
}) {
|
|
115
|
-
const p =
|
|
115
|
+
const p = o(
|
|
116
116
|
// 20px mark centered in a 32px square — the same box as every other rail icon.
|
|
117
117
|
// group/brand lets a BrandMark logo play its blip loop on hover.
|
|
118
118
|
"group/brand flex size-(--sidebar-item) items-center justify-center",
|
|
119
119
|
"[&_img]:size-(--sidebar-logo) [&_svg]:size-(--sidebar-logo)",
|
|
120
|
-
|
|
120
|
+
r && "group-hover/sidebar:hidden"
|
|
121
121
|
);
|
|
122
122
|
return /* @__PURE__ */ c(
|
|
123
123
|
"div",
|
|
124
124
|
{
|
|
125
|
-
className:
|
|
125
|
+
className: o(
|
|
126
126
|
"flex h-(--sidebar-header) shrink-0 items-center justify-between gap-2 px-3",
|
|
127
127
|
"group-data-[collapsed=true]/sidebar:justify-center group-data-[collapsed=true]/sidebar:px-2",
|
|
128
128
|
d
|
|
129
129
|
),
|
|
130
|
-
...
|
|
130
|
+
...f,
|
|
131
131
|
children: [
|
|
132
|
-
e ? /* @__PURE__ */
|
|
133
|
-
|
|
134
|
-
|
|
132
|
+
e ? /* @__PURE__ */ t("a", { href: e, "aria-label": i, className: p, children: a }) : /* @__PURE__ */ t("span", { className: p, children: a }),
|
|
133
|
+
r && /* @__PURE__ */ t("div", { className: "hidden group-hover/sidebar:flex", children: /* @__PURE__ */ t(E, {}) }),
|
|
134
|
+
s && /* @__PURE__ */ t("div", { className: "flex items-center gap-1 group-data-[collapsed=true]/sidebar:hidden", children: s })
|
|
135
135
|
]
|
|
136
136
|
}
|
|
137
137
|
);
|
|
138
138
|
}
|
|
139
|
-
const I =
|
|
140
|
-
({ className: a, ...e },
|
|
139
|
+
const I = n.forwardRef(
|
|
140
|
+
({ className: a, ...e }, i) => /* @__PURE__ */ t(
|
|
141
141
|
"div",
|
|
142
142
|
{
|
|
143
|
-
ref:
|
|
144
|
-
className:
|
|
143
|
+
ref: i,
|
|
144
|
+
className: o(
|
|
145
145
|
"flex h-(--sidebar-header) shrink-0 items-center justify-between gap-2 px-3",
|
|
146
146
|
"group-data-[collapsed=true]/sidebar:justify-center group-data-[collapsed=true]/sidebar:px-2",
|
|
147
147
|
a
|
|
@@ -151,63 +151,63 @@ const I = o.forwardRef(
|
|
|
151
151
|
)
|
|
152
152
|
);
|
|
153
153
|
I.displayName = "SidebarHeader";
|
|
154
|
-
const L =
|
|
155
|
-
({ className: a, ...e },
|
|
154
|
+
const L = n.forwardRef(
|
|
155
|
+
({ className: a, ...e }, i) => /* @__PURE__ */ t("nav", { ref: i, className: o("min-h-0 flex-1 space-y-5 overflow-y-auto p-3", a), ...e })
|
|
156
156
|
);
|
|
157
157
|
L.displayName = "SidebarNav";
|
|
158
|
-
const A =
|
|
159
|
-
({ className: a, label: e, children:
|
|
160
|
-
e && /* @__PURE__ */
|
|
161
|
-
/* @__PURE__ */
|
|
158
|
+
const A = n.forwardRef(
|
|
159
|
+
({ className: a, label: e, children: i, ...r }, s) => /* @__PURE__ */ c("div", { ref: s, className: a, ...r, children: [
|
|
160
|
+
e && /* @__PURE__ */ t("div", { className: "mb-1.5 px-3 text-[length:var(--sidebar-section-label-size)] leading-[var(--text-xs--line-height)] font-normal uppercase tracking-wider text-muted-foreground group-data-[collapsed=true]/sidebar:hidden", children: e }),
|
|
161
|
+
/* @__PURE__ */ t("div", { className: "flex flex-col gap-0.5", children: i })
|
|
162
162
|
] })
|
|
163
163
|
);
|
|
164
164
|
A.displayName = "SidebarSection";
|
|
165
|
-
const K =
|
|
166
|
-
({ className: a, icon: e, isActive:
|
|
165
|
+
const K = n.forwardRef(
|
|
166
|
+
({ className: a, icon: e, isActive: i, endContent: r, children: s, title: d, ...f }, p) => /* @__PURE__ */ c(
|
|
167
167
|
"a",
|
|
168
168
|
{
|
|
169
169
|
ref: p,
|
|
170
|
-
"aria-current":
|
|
171
|
-
title: d ?? (typeof
|
|
172
|
-
className:
|
|
173
|
-
"flex items-center gap-2.5 rounded-md px-3 py-1.5 text-xs transition-colors",
|
|
170
|
+
"aria-current": i ? "page" : void 0,
|
|
171
|
+
title: d ?? (typeof s == "string" ? s : void 0),
|
|
172
|
+
className: o(
|
|
173
|
+
"flex items-center gap-2.5 rounded-md px-3 py-1.5 text-[length:var(--sidebar-navigation-text-size)] leading-[var(--text-xs--line-height)] transition-colors",
|
|
174
174
|
"outline-none focus-visible:ring-3 focus-visible:ring-ring",
|
|
175
175
|
"[&_svg]:size-4 [&_svg]:shrink-0",
|
|
176
176
|
// Collapsed: a centered square (--sidebar-item) so every rail item lines up.
|
|
177
177
|
"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",
|
|
178
|
-
|
|
178
|
+
i ? "bg-fill font-medium text-foreground" : "text-muted-foreground hover:bg-fill/60 hover:text-foreground",
|
|
179
179
|
a
|
|
180
180
|
),
|
|
181
|
-
...
|
|
181
|
+
...f,
|
|
182
182
|
children: [
|
|
183
183
|
e,
|
|
184
|
-
/* @__PURE__ */
|
|
185
|
-
|
|
184
|
+
/* @__PURE__ */ t("span", { className: "min-w-0 flex-1 truncate group-data-[collapsed=true]/sidebar:hidden", children: s }),
|
|
185
|
+
r && /* @__PURE__ */ t("span", { className: "shrink-0 group-data-[collapsed=true]/sidebar:hidden", children: r })
|
|
186
186
|
]
|
|
187
187
|
}
|
|
188
188
|
)
|
|
189
189
|
);
|
|
190
190
|
K.displayName = "SidebarItem";
|
|
191
|
-
const M =
|
|
192
|
-
({ className: a, ...e },
|
|
191
|
+
const M = n.forwardRef(
|
|
192
|
+
({ className: a, ...e }, i) => /* @__PURE__ */ t(
|
|
193
193
|
"div",
|
|
194
194
|
{
|
|
195
|
-
ref:
|
|
196
|
-
className:
|
|
195
|
+
ref: i,
|
|
196
|
+
className: o("shrink-0 p-3 group-data-[collapsed=true]/sidebar:px-2", a),
|
|
197
197
|
...e
|
|
198
198
|
}
|
|
199
199
|
)
|
|
200
200
|
);
|
|
201
201
|
M.displayName = "SidebarFooter";
|
|
202
|
-
const q =
|
|
203
|
-
({ className: a, icon: e, children:
|
|
202
|
+
const q = n.forwardRef(
|
|
203
|
+
({ className: a, icon: e, children: i, ...r }, s) => /* @__PURE__ */ t("div", { className: "px-3 pb-1 group-data-[collapsed=true]/sidebar:px-2", children: /* @__PURE__ */ c(
|
|
204
204
|
"button",
|
|
205
205
|
{
|
|
206
|
-
ref:
|
|
206
|
+
ref: s,
|
|
207
207
|
type: "button",
|
|
208
|
-
className:
|
|
208
|
+
className: o(
|
|
209
209
|
"flex h-10 w-full items-center justify-start gap-2 rounded-md bg-elevated px-3",
|
|
210
|
-
"text-xs font-medium text-foreground",
|
|
210
|
+
"text-[length:var(--sidebar-navigation-text-size)] leading-[var(--text-xs--line-height)] font-medium text-foreground",
|
|
211
211
|
// Same hover feedback as ConnectorCard: raised at rest, lifts on
|
|
212
212
|
// hover, settles back on press.
|
|
213
213
|
"shadow-elevation",
|
|
@@ -218,53 +218,53 @@ const q = o.forwardRef(
|
|
|
218
218
|
"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",
|
|
219
219
|
a
|
|
220
220
|
),
|
|
221
|
-
...
|
|
221
|
+
...r,
|
|
222
222
|
children: [
|
|
223
223
|
e,
|
|
224
|
-
/* @__PURE__ */
|
|
224
|
+
/* @__PURE__ */ t("span", { className: "truncate group-data-[collapsed=true]/sidebar:hidden", children: i })
|
|
225
225
|
]
|
|
226
226
|
}
|
|
227
227
|
) })
|
|
228
228
|
);
|
|
229
229
|
q.displayName = "SidebarAction";
|
|
230
|
-
const B =
|
|
231
|
-
({ className: a, label: e, children:
|
|
230
|
+
const B = n.forwardRef(
|
|
231
|
+
({ className: a, label: e, children: i, ...r }, s) => /* @__PURE__ */ c(
|
|
232
232
|
"div",
|
|
233
233
|
{
|
|
234
|
-
ref:
|
|
235
|
-
className:
|
|
236
|
-
...
|
|
234
|
+
ref: s,
|
|
235
|
+
className: o("group-data-[collapsed=true]/sidebar:hidden", a),
|
|
236
|
+
...r,
|
|
237
237
|
children: [
|
|
238
|
-
e && /* @__PURE__ */
|
|
239
|
-
/* @__PURE__ */
|
|
238
|
+
e && /* @__PURE__ */ t("div", { className: "mb-1.5 px-3 text-[length:var(--sidebar-section-label-size)] leading-[var(--text-xs--line-height)] font-semibold uppercase tracking-wider text-muted-foreground", children: e }),
|
|
239
|
+
/* @__PURE__ */ t("div", { className: "flex flex-col gap-0.5", children: i })
|
|
240
240
|
]
|
|
241
241
|
}
|
|
242
242
|
)
|
|
243
243
|
);
|
|
244
244
|
B.displayName = "SidebarHistory";
|
|
245
|
-
const D =
|
|
246
|
-
const
|
|
247
|
-
|
|
248
|
-
const u =
|
|
249
|
-
if (!u || !
|
|
245
|
+
const D = n.forwardRef(({ className: a, children: e, title: i, action: r, isActive: s, icon: d, ...f }, p) => {
|
|
246
|
+
const v = n.useRef(null), b = n.useRef(null), [l, h] = n.useState(0);
|
|
247
|
+
n.useLayoutEffect(() => {
|
|
248
|
+
const u = v.current, m = b.current;
|
|
249
|
+
if (!u || !m) return;
|
|
250
250
|
const N = () => {
|
|
251
|
-
const w =
|
|
252
|
-
|
|
251
|
+
const w = m.scrollWidth - u.clientWidth;
|
|
252
|
+
h(w > 0 ? w + (r ? 32 : 0) : 0);
|
|
253
253
|
};
|
|
254
254
|
N();
|
|
255
255
|
const y = new ResizeObserver(N);
|
|
256
|
-
return y.observe(u), y.observe(
|
|
257
|
-
}, [e,
|
|
258
|
-
const
|
|
256
|
+
return y.observe(u), y.observe(m), () => y.disconnect();
|
|
257
|
+
}, [e, r]);
|
|
258
|
+
const g = l > 0, x = Math.max(500, Math.round(l * 18));
|
|
259
259
|
return /* @__PURE__ */ c(
|
|
260
260
|
"div",
|
|
261
261
|
{
|
|
262
|
-
className:
|
|
262
|
+
className: o(
|
|
263
263
|
"group/hist relative flex items-center rounded-md transition-colors",
|
|
264
|
-
|
|
264
|
+
s ? "bg-fill/60 text-foreground" : "text-muted-foreground hover:bg-fill/60 hover:text-foreground"
|
|
265
265
|
),
|
|
266
266
|
children: [
|
|
267
|
-
d && /* @__PURE__ */
|
|
267
|
+
d && /* @__PURE__ */ t(
|
|
268
268
|
"span",
|
|
269
269
|
{
|
|
270
270
|
"aria-hidden": !0,
|
|
@@ -272,43 +272,43 @@ const D = o.forwardRef(({ className: a, children: e, title: s, action: t, isActi
|
|
|
272
272
|
children: d
|
|
273
273
|
}
|
|
274
274
|
),
|
|
275
|
-
/* @__PURE__ */
|
|
275
|
+
/* @__PURE__ */ t(
|
|
276
276
|
"a",
|
|
277
277
|
{
|
|
278
278
|
ref: p,
|
|
279
|
-
title:
|
|
280
|
-
className:
|
|
279
|
+
title: i ?? (typeof e == "string" ? e : void 0),
|
|
280
|
+
className: o(
|
|
281
281
|
// Left pad matches a SidebarItem's text column (px-3 + icon size-4 +
|
|
282
282
|
// gap-2.5 = 2.375rem) so history titles line up under the nav labels.
|
|
283
|
-
"block min-w-0 flex-1 rounded-md py-1.5 pr-3 ps-(--sidebar-text-indent) text-xs",
|
|
283
|
+
"block min-w-0 flex-1 rounded-md py-1.5 pr-3 ps-(--sidebar-text-indent) text-[length:var(--sidebar-navigation-text-size)] leading-[var(--text-xs--line-height)]",
|
|
284
284
|
"outline-none focus-visible:ring-3 focus-visible:ring-ring",
|
|
285
285
|
a
|
|
286
286
|
),
|
|
287
|
-
...
|
|
288
|
-
children: /* @__PURE__ */
|
|
287
|
+
...f,
|
|
288
|
+
children: /* @__PURE__ */ t(
|
|
289
289
|
"span",
|
|
290
290
|
{
|
|
291
|
-
ref:
|
|
292
|
-
className:
|
|
291
|
+
ref: v,
|
|
292
|
+
className: o(
|
|
293
293
|
"block overflow-hidden",
|
|
294
294
|
// Rest: fade the right edge (no ellipsis). Hover: the title scrolls,
|
|
295
295
|
// so fade the LEFT edge where it exits; the action backdrop (or the
|
|
296
296
|
// string's own end) handles the right.
|
|
297
|
-
|
|
298
|
-
|
|
297
|
+
g && "[mask-image:linear-gradient(to_right,#000_calc(100%-1.5rem),transparent)]",
|
|
298
|
+
g && "group-hover/hist:[mask-image:linear-gradient(to_right,transparent,#000_1.25rem,#000_100%)]"
|
|
299
299
|
),
|
|
300
|
-
children: /* @__PURE__ */
|
|
300
|
+
children: /* @__PURE__ */ t(
|
|
301
301
|
"span",
|
|
302
302
|
{
|
|
303
|
-
ref:
|
|
304
|
-
className:
|
|
303
|
+
ref: b,
|
|
304
|
+
className: o(
|
|
305
305
|
"block w-max whitespace-nowrap transition-transform ease-linear",
|
|
306
|
-
|
|
306
|
+
g && "group-hover/hist:[transform:translateX(var(--mq-x))]",
|
|
307
307
|
"motion-reduce:transition-none motion-reduce:group-hover/hist:[transform:none]"
|
|
308
308
|
),
|
|
309
309
|
style: {
|
|
310
310
|
"--mq-x": `-${l}px`,
|
|
311
|
-
transitionDuration: `${
|
|
311
|
+
transitionDuration: `${x}ms`
|
|
312
312
|
},
|
|
313
313
|
children: e
|
|
314
314
|
}
|
|
@@ -317,10 +317,10 @@ const D = o.forwardRef(({ className: a, children: e, title: s, action: t, isActi
|
|
|
317
317
|
)
|
|
318
318
|
}
|
|
319
319
|
),
|
|
320
|
-
|
|
320
|
+
r && /* @__PURE__ */ t(
|
|
321
321
|
"span",
|
|
322
322
|
{
|
|
323
|
-
className:
|
|
323
|
+
className: o(
|
|
324
324
|
// Rounded end matches the row's radius so the backdrop doesn't
|
|
325
325
|
// square off the highlight's right corners.
|
|
326
326
|
"absolute inset-y-0 right-0 flex items-center rounded-e-md pl-8 pr-1",
|
|
@@ -329,7 +329,7 @@ const D = o.forwardRef(({ className: a, children: e, title: s, action: t, isActi
|
|
|
329
329
|
"pointer-events-none group-hover/hist:pointer-events-auto",
|
|
330
330
|
"focus-within:pointer-events-auto focus-within:opacity-100"
|
|
331
331
|
),
|
|
332
|
-
children:
|
|
332
|
+
children: r
|
|
333
333
|
}
|
|
334
334
|
)
|
|
335
335
|
]
|
|
@@ -337,23 +337,23 @@ const D = o.forwardRef(({ className: a, children: e, title: s, action: t, isActi
|
|
|
337
337
|
);
|
|
338
338
|
});
|
|
339
339
|
D.displayName = "SidebarHistoryItem";
|
|
340
|
-
const F =
|
|
341
|
-
({ className: a, name: e, role:
|
|
340
|
+
const F = n.forwardRef(
|
|
341
|
+
({ className: a, name: e, role: i, src: r, ...s }, d) => /* @__PURE__ */ c(
|
|
342
342
|
"a",
|
|
343
343
|
{
|
|
344
344
|
ref: d,
|
|
345
|
-
className:
|
|
345
|
+
className: o(
|
|
346
346
|
"flex items-center gap-2.5 rounded-md p-2 transition-colors hover:bg-fill/60",
|
|
347
347
|
"outline-none focus-visible:ring-3 focus-visible:ring-ring",
|
|
348
348
|
"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",
|
|
349
349
|
a
|
|
350
350
|
),
|
|
351
|
-
...
|
|
351
|
+
...s,
|
|
352
352
|
children: [
|
|
353
|
-
/* @__PURE__ */
|
|
353
|
+
/* @__PURE__ */ t(_, { size: "sm", name: e, src: r }),
|
|
354
354
|
/* @__PURE__ */ c("div", { className: "min-w-0 leading-tight group-data-[collapsed=true]/sidebar:hidden", children: [
|
|
355
|
-
/* @__PURE__ */
|
|
356
|
-
|
|
355
|
+
/* @__PURE__ */ t("div", { className: "truncate text-[length:var(--sidebar-navigation-text-size)] leading-[var(--text-xs--line-height)] font-medium text-foreground", children: e }),
|
|
356
|
+
i && /* @__PURE__ */ t("div", { className: "truncate text-[length:var(--sidebar-navigation-text-size)] leading-[var(--text-xs--line-height)] text-tertiary", children: i })
|
|
357
357
|
] })
|
|
358
358
|
]
|
|
359
359
|
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
/**
|
|
4
|
+
* Stepper — discrete, indexed progress through a known set of steps.
|
|
5
|
+
*
|
|
6
|
+
* `Progress` is a continuous bar and `Timeline` is a chronological list of
|
|
7
|
+
* content; neither says "step 2 of 5, and here is what 3 through 5 will be".
|
|
8
|
+
* Completed steps collapse to a check so the eye counts what is left, not what
|
|
9
|
+
* is done. The connector is a functional rail, like `Tree`'s — an allowed
|
|
10
|
+
* stroke.
|
|
11
|
+
*/
|
|
12
|
+
export type StepperStatus = "complete" | "current" | "upcoming";
|
|
13
|
+
export interface StepperStep {
|
|
14
|
+
/** Stable key, also used for the accessible label. */
|
|
15
|
+
id: string;
|
|
16
|
+
label: React.ReactNode;
|
|
17
|
+
/** Optional qualifier under the label. */
|
|
18
|
+
description?: React.ReactNode;
|
|
19
|
+
}
|
|
20
|
+
declare const markerVariants: (props?: ({
|
|
21
|
+
status?: "current" | "complete" | "upcoming" | null | undefined;
|
|
22
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
23
|
+
export interface StepperProps extends Omit<React.HTMLAttributes<HTMLOListElement>, "onSelect">, VariantProps<typeof markerVariants> {
|
|
24
|
+
steps: StepperStep[];
|
|
25
|
+
/** Zero-based index of the current step. */
|
|
26
|
+
activeIndex: number;
|
|
27
|
+
orientation?: "horizontal" | "vertical";
|
|
28
|
+
/** Makes completed steps navigable. */
|
|
29
|
+
onSelect?: (index: number) => void;
|
|
30
|
+
}
|
|
31
|
+
export declare const Stepper: React.ForwardRefExoticComponent<StepperProps & React.RefAttributes<HTMLOListElement>>;
|
|
32
|
+
export { markerVariants as stepperMarkerVariants };
|