@actioneer/ads 0.5.7 → 0.5.8
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/ads-init.mjs +6 -0
- package/components/accordion.js +50 -48
- package/components/agent-icon.d.ts +12 -0
- package/components/agent-icon.js +133 -120
- package/components/ai-elements/chain-of-thought.d.ts +1 -1
- package/components/ai-elements/chain-of-thought.js +108 -108
- package/components/ai-elements/chart.js +16 -14
- package/components/ai-elements/inline-citation.js +41 -41
- package/components/ai-elements/message.js +4 -4
- package/components/ai-elements/queue.js +7 -7
- package/components/ai-elements/research-activity.js +114 -114
- package/components/ai-elements/shimmer.d.ts +2 -2
- package/components/ai-elements/speech-input.js +28 -28
- package/components/ai-elements/task-progress.js +26 -16
- package/components/ai-elements/task.js +17 -17
- package/components/ai-elements/tool.js +6 -6
- package/components/ai-elements/transcript.js +6 -5
- package/components/ai-elements/voice.js +1 -1
- package/components/alert.js +10 -10
- package/components/answer-sources.js +1 -1
- package/components/answer.js +115 -114
- package/components/assistant-ui/action-bar.js +94 -48
- package/components/assistant-ui/attachment.js +103 -75
- package/components/assistant-ui/badge.d.ts +1 -1
- package/components/assistant-ui/badge.js +17 -17
- package/components/assistant-ui/chain-of-thought.d.ts +1 -1
- package/components/assistant-ui/composer-add-context.js +9 -9
- package/components/assistant-ui/composer-deep-research.js +5 -5
- package/components/assistant-ui/composer-harness.js +11 -9
- package/components/assistant-ui/composer-trigger-popover.js +45 -34
- package/components/assistant-ui/composer.js +59 -59
- package/components/assistant-ui/error.js +14 -14
- package/components/assistant-ui/file.d.ts +1 -1
- package/components/assistant-ui/image.d.ts +1 -1
- package/components/assistant-ui/image.js +113 -103
- package/components/assistant-ui/markdown-text.js +18 -18
- package/components/assistant-ui/message.js +46 -45
- package/components/assistant-ui/quote.js +1 -1
- package/components/assistant-ui/reasoning.d.ts +1 -1
- package/components/assistant-ui/reasoning.js +66 -77
- package/components/assistant-ui/suggestions.js +4 -4
- package/components/assistant-ui/thread.js +22 -22
- package/components/assistant-ui/tool-fallback.js +60 -63
- package/components/assistant-ui/tool-group.d.ts +1 -1
- package/components/assistant-ui/tool-group.js +36 -42
- package/components/audio-waveform.js +25 -24
- package/components/autocomplete.d.ts +1 -0
- package/components/autocomplete.js +45 -43
- package/components/avatar.js +24 -24
- package/components/badge.d.ts +1 -1
- package/components/breadcrumbs.js +2 -2
- package/components/button.d.ts +2 -2
- package/components/button.js +22 -20
- package/components/card.js +8 -8
- package/components/carousel.js +105 -104
- package/components/chart.js +9 -7
- package/components/checkbox.js +74 -38
- package/components/chip.d.ts +1 -1
- package/components/code-block.js +3 -3
- package/components/collapsible.js +67 -23
- package/components/connector-card.js +6 -6
- package/components/drawer.d.ts +15 -10
- package/components/drawer.js +78 -77
- package/components/dropdown.d.ts +2 -0
- package/components/dropdown.js +88 -79
- package/components/empty-state.d.ts +1 -1
- package/components/empty-state.js +7 -7
- package/components/field.d.ts +4 -0
- package/components/field.js +45 -34
- package/components/file-dropzone.js +12 -12
- package/components/index.d.ts +3 -0
- package/components/index.js +584 -558
- package/components/input-field.js +51 -46
- package/components/input.js +20 -20
- package/components/link.js +9 -9
- package/components/modal.js +105 -73
- package/components/navbar.d.ts +1 -1
- package/components/navbar.js +1 -1
- package/components/number-field.js +38 -29
- package/components/page-header.js +12 -12
- package/components/pagination.js +19 -19
- package/components/panel.js +2 -2
- package/components/pixel-blast-svg.js +3 -3
- package/components/pixel-icon.js +0 -1
- package/components/popover.d.ts +1 -1
- package/components/popover.js +66 -64
- package/components/progress-circle.js +36 -32
- package/components/progress.js +28 -24
- package/components/radio.js +59 -49
- package/components/resizable-panel.js +1 -1
- package/components/reveal.d.ts +2 -2
- package/components/ripple.d.ts +3 -3
- package/components/scroll-area.js +17 -16
- package/components/segmented.js +26 -26
- package/components/select.d.ts +2 -0
- package/components/select.js +61 -57
- package/components/setting-row.js +45 -42
- package/components/sidebar.js +131 -127
- package/components/skeleton.js +5 -5
- package/components/spinner.d.ts +13 -4
- package/components/spinner.js +42 -42
- package/components/stepper.js +21 -21
- package/components/switch.js +41 -39
- package/components/table.d.ts +9 -0
- package/components/table.js +370 -247
- package/components/tabs.js +149 -137
- package/components/toast.js +66 -66
- package/components/tooltip.js +2 -2
- package/components/tree.js +62 -51
- package/components/typography.d.ts +2 -1
- package/components/typography.js +33 -32
- package/components/ui/button.d.ts +2 -2
- package/components/ui/button.js +19 -19
- package/components/ui/collapsible.d.ts +1 -5
- package/components/ui/dialog.d.ts +3 -3
- package/components/ui/dialog.js +95 -58
- package/components/ui/tooltip.d.ts +2 -2
- package/components/ui/tooltip.js +67 -33
- package/components/viz-charts.js +95 -95
- package/demo/components/add-to-artifact.js +341 -0
- package/demo/lib/artifact-library.js +134 -0
- package/fonts/aribau-grotesk-medium.woff2 +0 -0
- package/fonts/aribau-grotesk-regular.woff2 +0 -0
- package/fonts.css +11 -11
- package/hooks/agents-ui/use-agent-audio-visualizer-aura.js +17 -16
- package/hooks/agents-ui/use-agent-audio-visualizer-wave.js +21 -20
- package/lib/icons.d.ts +4 -0
- package/lib/icons.js +103 -102
- package/lib/motion.d.ts +42 -39
- package/lib/motion.js +112 -52
- package/lib/spinner-mark.d.ts +9 -0
- package/lib/spinner-mark.js +98 -0
- package/llms.txt +52 -18
- package/manifest.json +240 -31
- package/package.json +1 -1
- package/styles.css +143 -124
- package/theme.css +90 -93
- package/components/ui/collapsible.js +0 -35
- package/fonts/aribau-grotesk-500.otf +0 -0
- package/fonts/aribau-grotesk-600.woff2 +0 -0
package/components/select.js
CHANGED
|
@@ -1,107 +1,111 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as
|
|
3
|
-
import * as
|
|
4
|
-
import { cva as
|
|
5
|
-
import { MotionConfig as
|
|
6
|
-
import { ChevronDown as
|
|
2
|
+
import { jsxs as b, jsx as i } from "react/jsx-runtime";
|
|
3
|
+
import * as a from "react";
|
|
4
|
+
import { cva as V } from "class-variance-authority";
|
|
5
|
+
import { MotionConfig as $, AnimatePresence as C, motion as K } from "motion/react";
|
|
6
|
+
import { ChevronDown as L, Check as O } from "../lib/icons.js";
|
|
7
7
|
import { cn as d } from "../lib/cn.js";
|
|
8
|
-
import { inputBaseClass as
|
|
9
|
-
import { floatVariants as
|
|
10
|
-
import { Ripple as
|
|
11
|
-
const
|
|
8
|
+
import { inputBaseClass as P } from "./field.js";
|
|
9
|
+
import { floatVariants as T } from "../lib/motion.js";
|
|
10
|
+
import { Ripple as _ } from "./ripple.js";
|
|
11
|
+
const B = V(
|
|
12
12
|
d(
|
|
13
|
-
|
|
13
|
+
P,
|
|
14
14
|
"items-center justify-between gap-2 text-left cursor-pointer",
|
|
15
15
|
"[&_svg]:pointer-events-none [&_svg]:shrink-0"
|
|
16
16
|
),
|
|
17
17
|
{
|
|
18
18
|
variants: {
|
|
19
19
|
size: {
|
|
20
|
-
sm: "h-8 text-xs",
|
|
21
|
-
md: "h-10 text-xs",
|
|
22
|
-
lg: "h-11 text-base"
|
|
20
|
+
sm: "h-8 rounded-sm text-xs",
|
|
21
|
+
md: "h-10 rounded-md text-xs",
|
|
22
|
+
lg: "h-11 rounded-md text-base"
|
|
23
23
|
}
|
|
24
24
|
},
|
|
25
25
|
defaultVariants: { size: "md" }
|
|
26
26
|
}
|
|
27
|
-
),
|
|
27
|
+
), U = a.forwardRef(
|
|
28
28
|
({
|
|
29
|
-
items:
|
|
29
|
+
items: o,
|
|
30
30
|
value: c,
|
|
31
|
-
onChange:
|
|
31
|
+
onChange: m,
|
|
32
32
|
placeholder: I = "Select…",
|
|
33
33
|
size: N,
|
|
34
34
|
disabled: w,
|
|
35
35
|
isInvalid: E,
|
|
36
36
|
className: R,
|
|
37
37
|
id: A,
|
|
38
|
-
placement: v = "bottom"
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
38
|
+
placement: v = "bottom",
|
|
39
|
+
"aria-label": S,
|
|
40
|
+
"aria-describedby": z
|
|
41
|
+
}, j) => {
|
|
42
|
+
const [r, l] = a.useState(!1), [s, x] = a.useState(-1), g = a.useRef(null), k = a.useRef(null), u = a.useId(), h = o.find((e) => e.value === c), M = a.useCallback(() => {
|
|
43
|
+
const e = o.findIndex((t) => t.value === c);
|
|
44
|
+
return e >= 0 && !o[e].disabled ? e : o.findIndex((t) => !t.disabled);
|
|
45
|
+
}, [o, c]);
|
|
46
|
+
a.useEffect(() => {
|
|
47
|
+
if (!r) return;
|
|
46
48
|
const e = (t) => {
|
|
47
49
|
var n;
|
|
48
50
|
(n = g.current) != null && n.contains(t.target) || l(!1);
|
|
49
51
|
};
|
|
50
52
|
return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
|
|
51
|
-
}, [
|
|
53
|
+
}, [r]), a.useEffect(() => {
|
|
52
54
|
var t;
|
|
53
|
-
if (!
|
|
54
|
-
const e = (t = k.current) == null ? void 0 : t.children[
|
|
55
|
+
if (!r || s < 0) return;
|
|
56
|
+
const e = (t = k.current) == null ? void 0 : t.children[s];
|
|
55
57
|
e == null || e.scrollIntoView({ block: "nearest" });
|
|
56
|
-
}, [
|
|
58
|
+
}, [r, s]);
|
|
57
59
|
const f = () => {
|
|
58
|
-
w || (x(
|
|
60
|
+
w || (x(M()), l(!0));
|
|
59
61
|
}, y = (e) => {
|
|
60
62
|
x((t) => {
|
|
61
63
|
let n = t;
|
|
62
|
-
for (let p = 0; p <
|
|
63
|
-
if (n = (n + e +
|
|
64
|
+
for (let p = 0; p < o.length; p++)
|
|
65
|
+
if (n = (n + e + o.length) % o.length, !o[n].disabled) return n;
|
|
64
66
|
return t;
|
|
65
67
|
});
|
|
66
68
|
}, D = (e) => {
|
|
67
|
-
const t =
|
|
68
|
-
!t || t.disabled || (
|
|
69
|
+
const t = o[e];
|
|
70
|
+
!t || t.disabled || (m == null || m(t.value), l(!1));
|
|
69
71
|
};
|
|
70
|
-
return /* @__PURE__ */
|
|
71
|
-
/* @__PURE__ */
|
|
72
|
+
return /* @__PURE__ */ b("div", { ref: g, className: "relative", children: [
|
|
73
|
+
/* @__PURE__ */ b(
|
|
72
74
|
"button",
|
|
73
75
|
{
|
|
74
|
-
ref:
|
|
76
|
+
ref: j,
|
|
75
77
|
id: A,
|
|
76
78
|
type: "button",
|
|
77
79
|
role: "combobox",
|
|
78
80
|
"aria-haspopup": "listbox",
|
|
79
|
-
"aria-expanded":
|
|
81
|
+
"aria-expanded": r,
|
|
80
82
|
"aria-controls": u,
|
|
81
83
|
"aria-invalid": E || void 0,
|
|
84
|
+
"aria-label": S,
|
|
85
|
+
"aria-describedby": z,
|
|
82
86
|
disabled: w,
|
|
83
|
-
onClick: () =>
|
|
87
|
+
onClick: () => r ? l(!1) : f(),
|
|
84
88
|
onKeyDown: (e) => {
|
|
85
89
|
switch (e.key) {
|
|
86
90
|
case "ArrowDown":
|
|
87
|
-
e.preventDefault(),
|
|
91
|
+
e.preventDefault(), r ? y(1) : f();
|
|
88
92
|
break;
|
|
89
93
|
case "ArrowUp":
|
|
90
|
-
e.preventDefault(),
|
|
94
|
+
e.preventDefault(), r ? y(-1) : f();
|
|
91
95
|
break;
|
|
92
96
|
case "Enter":
|
|
93
97
|
case " ":
|
|
94
|
-
e.preventDefault(),
|
|
98
|
+
e.preventDefault(), r ? D(s) : f();
|
|
95
99
|
break;
|
|
96
100
|
case "Escape":
|
|
97
|
-
|
|
101
|
+
r && (e.preventDefault(), l(!1));
|
|
98
102
|
break;
|
|
99
103
|
case "Tab":
|
|
100
104
|
l(!1);
|
|
101
105
|
break;
|
|
102
106
|
}
|
|
103
107
|
},
|
|
104
|
-
className: d(
|
|
108
|
+
className: d(B({ size: N }), R),
|
|
105
109
|
children: [
|
|
106
110
|
/* @__PURE__ */ i(
|
|
107
111
|
"span",
|
|
@@ -114,11 +118,11 @@ const T = j(
|
|
|
114
118
|
}
|
|
115
119
|
),
|
|
116
120
|
/* @__PURE__ */ i(
|
|
117
|
-
|
|
121
|
+
L,
|
|
118
122
|
{
|
|
119
123
|
className: d(
|
|
120
|
-
"size-4 text-muted-foreground transition-transform duration-
|
|
121
|
-
|
|
124
|
+
"size-4 text-muted-foreground transition-transform duration-150 ease-out motion-reduce:transition-none",
|
|
125
|
+
r && "rotate-180"
|
|
122
126
|
),
|
|
123
127
|
"aria-hidden": !0
|
|
124
128
|
}
|
|
@@ -126,14 +130,14 @@ const T = j(
|
|
|
126
130
|
]
|
|
127
131
|
}
|
|
128
132
|
),
|
|
129
|
-
/* @__PURE__ */ i(
|
|
130
|
-
|
|
133
|
+
/* @__PURE__ */ i($, { reducedMotion: "user", children: /* @__PURE__ */ i(C, { children: r && /* @__PURE__ */ b(
|
|
134
|
+
K.ul,
|
|
131
135
|
{
|
|
132
136
|
ref: k,
|
|
133
137
|
id: u,
|
|
134
138
|
role: "listbox",
|
|
135
|
-
"aria-activedescendant":
|
|
136
|
-
variants:
|
|
139
|
+
"aria-activedescendant": s >= 0 ? `${u}-opt-${s}` : void 0,
|
|
140
|
+
variants: T,
|
|
137
141
|
initial: "hidden",
|
|
138
142
|
animate: "visible",
|
|
139
143
|
exit: "hidden",
|
|
@@ -146,10 +150,10 @@ const T = j(
|
|
|
146
150
|
v === "top" ? "bottom-full mb-1.5" : "top-full mt-1.5"
|
|
147
151
|
),
|
|
148
152
|
children: [
|
|
149
|
-
/* @__PURE__ */ i(
|
|
150
|
-
|
|
151
|
-
const n = e.value === c, p = t ===
|
|
152
|
-
return /* @__PURE__ */
|
|
153
|
+
/* @__PURE__ */ i(_, { origin: v === "top" ? "bottom" : "top" }),
|
|
154
|
+
o.map((e, t) => {
|
|
155
|
+
const n = e.value === c, p = t === s;
|
|
156
|
+
return /* @__PURE__ */ b(
|
|
153
157
|
"li",
|
|
154
158
|
{
|
|
155
159
|
id: `${u}-opt-${t}`,
|
|
@@ -166,7 +170,7 @@ const T = j(
|
|
|
166
170
|
),
|
|
167
171
|
children: [
|
|
168
172
|
/* @__PURE__ */ i("span", { className: "truncate", children: e.label }),
|
|
169
|
-
n && /* @__PURE__ */ i(
|
|
173
|
+
n && /* @__PURE__ */ i(O, { className: "size-4 shrink-0", "aria-hidden": !0 })
|
|
170
174
|
]
|
|
171
175
|
},
|
|
172
176
|
e.value
|
|
@@ -178,7 +182,7 @@ const T = j(
|
|
|
178
182
|
] });
|
|
179
183
|
}
|
|
180
184
|
);
|
|
181
|
-
|
|
185
|
+
U.displayName = "Select";
|
|
182
186
|
export {
|
|
183
|
-
|
|
187
|
+
U as Select
|
|
184
188
|
};
|
|
@@ -1,61 +1,64 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as c, jsx as
|
|
3
|
-
import * as
|
|
2
|
+
import { jsxs as c, jsx as e } from "react/jsx-runtime";
|
|
3
|
+
import * as d from "react";
|
|
4
4
|
import { cva as g } from "class-variance-authority";
|
|
5
|
-
import { cn as
|
|
6
|
-
const
|
|
5
|
+
import { cn as a } from "../lib/cn.js";
|
|
6
|
+
const p = g(
|
|
7
7
|
"flex w-full items-center gap-3 rounded-lg bg-card px-4 py-3 text-left",
|
|
8
8
|
{
|
|
9
9
|
variants: {
|
|
10
10
|
isPressable: {
|
|
11
|
-
true:
|
|
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
|
-
),
|
|
11
|
+
true: "relative",
|
|
17
12
|
false: ""
|
|
18
13
|
}
|
|
19
14
|
},
|
|
20
15
|
defaultVariants: { isPressable: !1 }
|
|
21
16
|
}
|
|
22
|
-
),
|
|
23
|
-
({ className:
|
|
24
|
-
const
|
|
17
|
+
), x = d.forwardRef(
|
|
18
|
+
({ className: i, icon: s, label: t, description: n, action: r, onSelect: o, ...f }, m) => {
|
|
19
|
+
const l = !!o;
|
|
25
20
|
return /* @__PURE__ */ c(
|
|
26
21
|
"div",
|
|
27
22
|
{
|
|
28
|
-
ref:
|
|
23
|
+
ref: m,
|
|
29
24
|
"data-slot": "setting-row",
|
|
30
|
-
|
|
31
|
-
|
|
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,
|
|
25
|
+
className: a(p({ isPressable: l }), i),
|
|
26
|
+
...f,
|
|
38
27
|
children: [
|
|
39
|
-
|
|
28
|
+
l && /* @__PURE__ */ e(
|
|
29
|
+
"button",
|
|
30
|
+
{
|
|
31
|
+
type: "button",
|
|
32
|
+
"aria-label": typeof t == "string" ? t : "Open setting",
|
|
33
|
+
onClick: o,
|
|
34
|
+
className: a(
|
|
35
|
+
"absolute inset-0 rounded-lg outline-none",
|
|
36
|
+
"transition-[background-color,transform] duration-150 ease-out",
|
|
37
|
+
"hover:bg-muted focus-visible:ring-3 focus-visible:ring-ring",
|
|
38
|
+
"active:scale-[0.97] motion-reduce:transition-none"
|
|
39
|
+
)
|
|
40
|
+
}
|
|
41
|
+
),
|
|
42
|
+
s && /* @__PURE__ */ e(
|
|
40
43
|
"span",
|
|
41
44
|
{
|
|
42
45
|
"aria-hidden": !0,
|
|
43
|
-
className: "flex size-5 shrink-0 items-center justify-center text-tertiary [&>svg]:size-4.5",
|
|
44
|
-
children:
|
|
46
|
+
className: "relative z-10 flex size-5 shrink-0 items-center justify-center text-tertiary pointer-events-none [&>svg]:size-4.5",
|
|
47
|
+
children: s
|
|
45
48
|
}
|
|
46
49
|
),
|
|
47
|
-
/* @__PURE__ */ c("div", { className: "flex min-w-0 flex-1 flex-col gap-0.5", children: [
|
|
48
|
-
/* @__PURE__ */
|
|
49
|
-
|
|
50
|
+
/* @__PURE__ */ c("div", { className: "relative z-10 flex min-w-0 flex-1 flex-col gap-0.5 pointer-events-none", children: [
|
|
51
|
+
/* @__PURE__ */ e("div", { className: "min-w-0 truncate text-base text-foreground", children: t }),
|
|
52
|
+
n && /* @__PURE__ */ e("div", { className: "min-w-0 text-xs text-tertiary", children: n })
|
|
50
53
|
] }),
|
|
51
|
-
|
|
54
|
+
r && // The trailing control owns its own click — a pressable row must not
|
|
52
55
|
// also fire when the reader aims at the button inside it.
|
|
53
|
-
/* @__PURE__ */
|
|
56
|
+
/* @__PURE__ */ e(
|
|
54
57
|
"span",
|
|
55
58
|
{
|
|
56
|
-
className: "shrink-0",
|
|
57
|
-
onClick: (
|
|
58
|
-
children:
|
|
59
|
+
className: "relative z-20 shrink-0",
|
|
60
|
+
onClick: (u) => u.stopPropagation(),
|
|
61
|
+
children: r
|
|
59
62
|
}
|
|
60
63
|
)
|
|
61
64
|
]
|
|
@@ -63,24 +66,24 @@ const x = g(
|
|
|
63
66
|
);
|
|
64
67
|
}
|
|
65
68
|
);
|
|
66
|
-
|
|
67
|
-
const v =
|
|
68
|
-
({ className:
|
|
69
|
+
x.displayName = "SettingRow";
|
|
70
|
+
const v = d.forwardRef(
|
|
71
|
+
({ className: i, ...s }, t) => /* @__PURE__ */ e(
|
|
69
72
|
"div",
|
|
70
73
|
{
|
|
71
|
-
ref:
|
|
74
|
+
ref: t,
|
|
72
75
|
"data-slot": "setting-list",
|
|
73
|
-
className:
|
|
76
|
+
className: a(
|
|
74
77
|
"flex w-full flex-col gap-0.5 rounded-xl bg-surface p-1",
|
|
75
|
-
|
|
78
|
+
i
|
|
76
79
|
),
|
|
77
|
-
...
|
|
80
|
+
...s
|
|
78
81
|
}
|
|
79
82
|
)
|
|
80
83
|
);
|
|
81
84
|
v.displayName = "SettingList";
|
|
82
85
|
export {
|
|
83
86
|
v as SettingList,
|
|
84
|
-
|
|
85
|
-
|
|
87
|
+
x as SettingRow,
|
|
88
|
+
p as settingRowVariants
|
|
86
89
|
};
|