@actioneer/ads 0.5.7 → 0.5.9
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.d.ts +1 -0
- package/components/avatar.js +27 -26
- package/components/badge.d.ts +1 -1
- package/components/breadcrumbs.d.ts +2 -0
- package/components/breadcrumbs.js +52 -50
- 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.d.ts +6 -0
- package/components/chart.js +743 -672
- 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 +18 -11
- package/components/drawer.js +81 -78
- 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.d.ts +5 -1
- package/components/modal.js +121 -76
- 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.d.ts +4 -0
- package/components/pixel-icon.js +210 -164
- 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.d.ts +1 -0
- package/components/segmented.js +39 -36
- package/components/select.d.ts +7 -0
- package/components/select.js +186 -137
- 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 +16 -0
- package/components/table.js +393 -260
- 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 +363 -0
- package/demo/lib/artifact-library.js +142 -0
- package/demo/lib/artifact-pin-guard.js +12 -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 +24 -0
- package/lib/icons.js +114 -108
- 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 +53 -19
- package/manifest.json +258 -36
- 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
|
@@ -58,7 +58,16 @@ function y({ status: a }) {
|
|
|
58
58
|
),
|
|
59
59
|
children: [
|
|
60
60
|
a === "complete" && /* @__PURE__ */ t(M, { className: "size-4", strokeWidth: 2 }),
|
|
61
|
-
a === "active" && /* @__PURE__ */ t(
|
|
61
|
+
a === "active" && /* @__PURE__ */ t(
|
|
62
|
+
J,
|
|
63
|
+
{
|
|
64
|
+
variant: "content",
|
|
65
|
+
size: "sm",
|
|
66
|
+
color: "current",
|
|
67
|
+
role: "presentation",
|
|
68
|
+
"aria-hidden": !0
|
|
69
|
+
}
|
|
70
|
+
),
|
|
62
71
|
a === "pending" && /* @__PURE__ */ t(Q, { className: "size-4" })
|
|
63
72
|
]
|
|
64
73
|
}
|
|
@@ -84,25 +93,25 @@ const O = i.forwardRef(
|
|
|
84
93
|
onOpenChange: u,
|
|
85
94
|
title: c = "Task progress",
|
|
86
95
|
summary: _,
|
|
87
|
-
emptyLabel:
|
|
88
|
-
isSticky:
|
|
96
|
+
emptyLabel: I = "No task steps",
|
|
97
|
+
isSticky: P,
|
|
89
98
|
role: T,
|
|
90
99
|
"aria-label": $,
|
|
91
100
|
"aria-busy": z,
|
|
92
101
|
...D
|
|
93
102
|
}, S) => {
|
|
94
|
-
const g = i.useContext(w),
|
|
103
|
+
const g = i.useContext(w), x = d !== void 0, [V, j] = i.useState(f), m = x ? d : V, o = r.findIndex((e) => e.status === "active"), p = r.reduce(
|
|
95
104
|
(e, F, W) => F.status === "complete" ? W : e,
|
|
96
105
|
-1
|
|
97
106
|
), E = r.findIndex(
|
|
98
107
|
(e) => e.status === "pending"
|
|
99
|
-
), h = o >= 0 ? o : p >= 0 ? p : E, s = h >= 0 ? r[h] : void 0,
|
|
108
|
+
), h = o >= 0 ? o : p >= 0 ? p : E, s = h >= 0 ? r[h] : void 0, b = o >= 0 ? o + 1 : p >= 0 ? p + 1 : 0, R = r.filter(
|
|
100
109
|
(e) => e.status === "pending"
|
|
101
110
|
).length, v = r.length > 0 && r.every((e) => e.status === "complete"), A = o >= 0 ? "active" : v ? "complete" : "pending", k = s ? s.accessibilityLabel ?? (typeof s.label == "string" ? s.label : "") : "", L = i.useCallback(
|
|
102
111
|
(e) => {
|
|
103
|
-
|
|
112
|
+
x || j(e), u == null || u(e);
|
|
104
113
|
},
|
|
105
|
-
[
|
|
114
|
+
[x, u]
|
|
106
115
|
);
|
|
107
116
|
return /* @__PURE__ */ n(
|
|
108
117
|
B,
|
|
@@ -110,14 +119,14 @@ const O = i.forwardRef(
|
|
|
110
119
|
ref: S,
|
|
111
120
|
open: m,
|
|
112
121
|
onOpenChange: L,
|
|
113
|
-
role: T ?? "
|
|
122
|
+
role: T ?? "group",
|
|
114
123
|
"aria-label": $ ?? c,
|
|
115
124
|
"aria-busy": z ?? (o >= 0 || void 0),
|
|
116
125
|
...D,
|
|
117
126
|
"data-slot": "task-progress",
|
|
118
127
|
"data-status": A,
|
|
119
128
|
className: l(
|
|
120
|
-
U({ isSticky: g ? !1 :
|
|
129
|
+
U({ isSticky: g ? !1 : P }),
|
|
121
130
|
g && "rounded-b-none",
|
|
122
131
|
a
|
|
123
132
|
),
|
|
@@ -130,10 +139,10 @@ const O = i.forwardRef(
|
|
|
130
139
|
"aria-label": c,
|
|
131
140
|
"aria-valuemin": 0,
|
|
132
141
|
"aria-valuemax": r.length,
|
|
133
|
-
"aria-valuenow":
|
|
142
|
+
"aria-valuenow": b
|
|
134
143
|
}
|
|
135
144
|
),
|
|
136
|
-
/* @__PURE__ */ t("span", { className: "sr-only", "aria-live": "polite", "aria-atomic": "true", children: v ? `All ${r.length} steps complete` : `Step ${
|
|
145
|
+
/* @__PURE__ */ t("span", { className: "sr-only", "aria-live": "polite", "aria-atomic": "true", children: v ? `All ${r.length} steps complete` : `Step ${b} of ${r.length}${k ? `: ${k}` : ""}. ${R} pending.` }),
|
|
137
146
|
/* @__PURE__ */ t(G, { asChild: !0, children: /* @__PURE__ */ n(
|
|
138
147
|
"button",
|
|
139
148
|
{
|
|
@@ -142,21 +151,21 @@ const O = i.forwardRef(
|
|
|
142
151
|
className: l(
|
|
143
152
|
"flex min-h-14 w-full items-center gap-3 px-4 text-left sm:px-5",
|
|
144
153
|
"rounded-t-2xl rounded-b-sm outline-none focus-visible:ring-3 focus-visible:ring-inset focus-visible:ring-ring",
|
|
145
|
-
"transition-[color,transform] duration-
|
|
154
|
+
"transition-[color,transform] duration-150 ease-out active:scale-[0.97] motion-reduce:transition-none"
|
|
146
155
|
),
|
|
147
156
|
children: [
|
|
148
|
-
m ? /* @__PURE__ */ t("span", { className: "min-w-0 flex-1 truncate text-base font-
|
|
157
|
+
m ? /* @__PURE__ */ t("span", { className: "min-w-0 flex-1 truncate text-base font-medium text-secondary", children: c }) : /* @__PURE__ */ n(q, { children: [
|
|
149
158
|
/* @__PURE__ */ t(y, { status: (s == null ? void 0 : s.status) ?? "pending" }),
|
|
150
|
-
/* @__PURE__ */ t("span", { className: "min-w-0 flex-1 truncate text-base text-primary", children: _ ?? (s == null ? void 0 : s.label) ??
|
|
159
|
+
/* @__PURE__ */ t("span", { className: "min-w-0 flex-1 truncate text-base text-primary", children: _ ?? (s == null ? void 0 : s.label) ?? I }),
|
|
151
160
|
(s == null ? void 0 : s.status) === "active" && /* @__PURE__ */ t(N, { elapsed: s.elapsed })
|
|
152
161
|
] }),
|
|
153
162
|
/* @__PURE__ */ n(
|
|
154
163
|
"span",
|
|
155
164
|
{
|
|
156
165
|
"aria-hidden": !0,
|
|
157
|
-
className: "shrink-0 text-xs font-
|
|
166
|
+
className: "shrink-0 text-xs font-medium text-tertiary tabular-nums",
|
|
158
167
|
children: [
|
|
159
|
-
|
|
168
|
+
b,
|
|
160
169
|
" / ",
|
|
161
170
|
r.length
|
|
162
171
|
]
|
|
@@ -179,6 +188,7 @@ const O = i.forwardRef(
|
|
|
179
188
|
"ol",
|
|
180
189
|
{
|
|
181
190
|
"aria-label": "Task steps",
|
|
191
|
+
tabIndex: 0,
|
|
182
192
|
className: "max-h-64 space-y-1 overflow-y-auto px-4 pb-4 sm:px-5",
|
|
183
193
|
children: r.map((e) => /* @__PURE__ */ n(
|
|
184
194
|
"li",
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as e, jsxs as o } from "react/jsx-runtime";
|
|
3
3
|
import { createContext as m, useContext as d } from "react";
|
|
4
|
-
import { motion as
|
|
5
|
-
import {
|
|
4
|
+
import { motion as p } from "motion/react";
|
|
5
|
+
import { springDisclosure as u } from "../../lib/motion.js";
|
|
6
6
|
import { Collapsible as h, CollapsibleContent as x, CollapsibleTrigger as f } from "../collapsible.js";
|
|
7
7
|
import { Search as g, ChevronDown as N } from "../../lib/icons.js";
|
|
8
|
-
import { cn as
|
|
8
|
+
import { cn as n } from "../../lib/cn.js";
|
|
9
9
|
const l = m(!0), k = ({
|
|
10
10
|
children: t,
|
|
11
11
|
className: a,
|
|
@@ -13,7 +13,7 @@ const l = m(!0), k = ({
|
|
|
13
13
|
}) => /* @__PURE__ */ e(
|
|
14
14
|
"div",
|
|
15
15
|
{
|
|
16
|
-
className:
|
|
16
|
+
className: n(
|
|
17
17
|
"inline-flex items-center gap-1 rounded-md bg-fill px-1.5 py-0.5 text-xs text-fill-foreground",
|
|
18
18
|
a
|
|
19
19
|
),
|
|
@@ -22,22 +22,22 @@ const l = m(!0), k = ({
|
|
|
22
22
|
}
|
|
23
23
|
);
|
|
24
24
|
k.displayName = "TaskItemFile";
|
|
25
|
-
const v = ({ children: t, className: a, ...s }) => /* @__PURE__ */ e("div", { className:
|
|
25
|
+
const v = ({ children: t, className: a, ...s }) => /* @__PURE__ */ e("div", { className: n("text-base text-secondary", a), ...s, children: t });
|
|
26
26
|
v.displayName = "TaskItem";
|
|
27
27
|
const y = ({
|
|
28
28
|
defaultOpen: t = !0,
|
|
29
29
|
className: a,
|
|
30
30
|
open: s,
|
|
31
|
-
children:
|
|
31
|
+
children: i,
|
|
32
32
|
...r
|
|
33
33
|
}) => /* @__PURE__ */ e(
|
|
34
34
|
h,
|
|
35
35
|
{
|
|
36
|
-
className:
|
|
36
|
+
className: n(a),
|
|
37
37
|
defaultOpen: t,
|
|
38
38
|
open: s,
|
|
39
39
|
...r,
|
|
40
|
-
children: /* @__PURE__ */ e(l.Provider, { value: s ?? t, children:
|
|
40
|
+
children: /* @__PURE__ */ e(l.Provider, { value: s ?? t, children: i })
|
|
41
41
|
}
|
|
42
42
|
);
|
|
43
43
|
y.displayName = "Task";
|
|
@@ -45,23 +45,23 @@ const T = ({
|
|
|
45
45
|
children: t,
|
|
46
46
|
className: a,
|
|
47
47
|
title: s,
|
|
48
|
-
icon:
|
|
48
|
+
icon: i,
|
|
49
49
|
endContent: r,
|
|
50
50
|
...c
|
|
51
|
-
}) => /* @__PURE__ */ e(f, { asChild: !0, className:
|
|
51
|
+
}) => /* @__PURE__ */ e(f, { asChild: !0, className: n("group", a), ...c, children: t ?? /* @__PURE__ */ o(
|
|
52
52
|
"button",
|
|
53
53
|
{
|
|
54
54
|
type: "button",
|
|
55
55
|
className: "flex w-full cursor-pointer items-center gap-2 rounded-sm text-base text-secondary outline-none transition-colors hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring motion-reduce:transition-none",
|
|
56
56
|
children: [
|
|
57
|
-
/* @__PURE__ */ e("span", { className: "flex size-4 shrink-0 items-center justify-center [&>svg]:size-4", "aria-hidden": !0, children:
|
|
57
|
+
/* @__PURE__ */ e("span", { className: "flex size-4 shrink-0 items-center justify-center [&>svg]:size-4", "aria-hidden": !0, children: i ?? /* @__PURE__ */ e(g, { className: "size-4 shrink-0" }) }),
|
|
58
58
|
/* @__PURE__ */ e("span", { className: "text-base", children: s }),
|
|
59
59
|
/* @__PURE__ */ o("span", { className: "ml-auto flex shrink-0 items-center gap-2", children: [
|
|
60
60
|
r != null && /* @__PURE__ */ e("span", { className: "text-xs text-tertiary tabular-nums", children: r }),
|
|
61
61
|
/* @__PURE__ */ e(
|
|
62
62
|
N,
|
|
63
63
|
{
|
|
64
|
-
className: "size-4 shrink-0 transition-transform duration-
|
|
64
|
+
className: "size-4 shrink-0 transition-transform duration-150 ease-out group-data-[state=open]:rotate-180 motion-reduce:transition-none",
|
|
65
65
|
"aria-hidden": !0
|
|
66
66
|
}
|
|
67
67
|
)
|
|
@@ -75,18 +75,18 @@ const b = ({
|
|
|
75
75
|
className: a,
|
|
76
76
|
...s
|
|
77
77
|
}) => {
|
|
78
|
-
const
|
|
78
|
+
const i = d(l);
|
|
79
79
|
return /* @__PURE__ */ e(x, { forceMount: !0, asChild: !0, ...s, children: /* @__PURE__ */ e(
|
|
80
|
-
|
|
80
|
+
p.div,
|
|
81
81
|
{
|
|
82
82
|
initial: !1,
|
|
83
|
-
animate:
|
|
83
|
+
animate: i ? "open" : "closed",
|
|
84
84
|
variants: {
|
|
85
85
|
open: { height: "auto", opacity: 1 },
|
|
86
86
|
closed: { height: 0, opacity: 0 }
|
|
87
87
|
},
|
|
88
|
-
transition:
|
|
89
|
-
className:
|
|
88
|
+
transition: u,
|
|
89
|
+
className: n(
|
|
90
90
|
"overflow-hidden text-secondary outline-none",
|
|
91
91
|
"data-[state=closed]:pointer-events-none",
|
|
92
92
|
a
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as t, jsxs as l } from "react/jsx-runtime";
|
|
3
|
-
import { isValidElement as
|
|
4
|
-
import { Collapsible as
|
|
3
|
+
import { isValidElement as p } from "react";
|
|
4
|
+
import { Collapsible as m, CollapsibleTrigger as f, CollapsibleContent as h } from "../collapsible.js";
|
|
5
5
|
import { Badge as x } from "../badge.js";
|
|
6
6
|
import { ChevronDown as g, CloseCircle as b, CheckCircle as N, Clock as v, CircleDashed as y } from "../../lib/icons.js";
|
|
7
7
|
import { cn as r } from "../../lib/cn.js";
|
|
8
8
|
import { TraceStateIcon as w } from "./chain-of-thought-icon.js";
|
|
9
9
|
const C = ({ className: e, ...o }) => /* @__PURE__ */ t(
|
|
10
|
-
|
|
10
|
+
m,
|
|
11
11
|
{
|
|
12
12
|
className: r(
|
|
13
13
|
"not-prose group/tool w-full overflow-hidden rounded-xl bg-card",
|
|
@@ -84,7 +84,7 @@ const O = {
|
|
|
84
84
|
/* @__PURE__ */ t(
|
|
85
85
|
g,
|
|
86
86
|
{
|
|
87
|
-
className: "size-4 shrink-0 text-tertiary transition-transform duration-
|
|
87
|
+
className: "size-4 shrink-0 text-tertiary transition-transform duration-150 ease-out group-data-[state=open]/tool-header:rotate-180 motion-reduce:transition-none",
|
|
88
88
|
"aria-hidden": !0
|
|
89
89
|
}
|
|
90
90
|
)
|
|
@@ -116,12 +116,12 @@ const c = ({
|
|
|
116
116
|
),
|
|
117
117
|
children: /* @__PURE__ */ t("code", { children: e })
|
|
118
118
|
}
|
|
119
|
-
), d = ({ children: e }) => /* @__PURE__ */ t("
|
|
119
|
+
), d = ({ children: e }) => /* @__PURE__ */ t("p", { className: "text-xs font-normal uppercase tracking-wide text-tertiary", children: e }), I = ({ className: e, input: o, ...n }) => /* @__PURE__ */ l("div", { className: r("space-y-2 overflow-hidden p-4", e), ...n, children: [
|
|
120
120
|
/* @__PURE__ */ t(d, { children: "Parameters" }),
|
|
121
121
|
/* @__PURE__ */ t(c, { code: JSON.stringify(o, null, 2) })
|
|
122
122
|
] });
|
|
123
123
|
I.displayName = "ToolInput";
|
|
124
|
-
const P = (e) => typeof e == "object" && e !== null && !
|
|
124
|
+
const P = (e) => typeof e == "object" && e !== null && !p(e) ? /* @__PURE__ */ t(c, { code: JSON.stringify(e, null, 2) }) : typeof e == "string" ? /* @__PURE__ */ t("div", { className: "rounded-md bg-surface p-3 text-xs leading-relaxed text-secondary whitespace-pre-wrap", children: e }) : e, z = ({
|
|
125
125
|
className: e,
|
|
126
126
|
output: o,
|
|
127
127
|
errorText: n,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as e, jsxs as
|
|
2
|
+
import { jsx as e, jsxs as d } from "react/jsx-runtime";
|
|
3
3
|
import { cn as t } from "../../lib/cn.js";
|
|
4
4
|
function g({
|
|
5
5
|
turns: i,
|
|
@@ -7,11 +7,11 @@ function g({
|
|
|
7
7
|
userLabel: o = "User",
|
|
8
8
|
emptyMessage: m = "No transcript captured yet.",
|
|
9
9
|
className: n,
|
|
10
|
-
...
|
|
10
|
+
...l
|
|
11
11
|
}) {
|
|
12
|
-
return i.length === 0 ? /* @__PURE__ */ e("p", { className: t("text-sm text-muted-foreground", n), "data-slot": "transcript", ...
|
|
12
|
+
return i.length === 0 ? /* @__PURE__ */ e("p", { className: t("text-sm text-muted-foreground", n), "data-slot": "transcript", ...l, children: m }) : /* @__PURE__ */ e("div", { className: t("space-y-3", n), "data-slot": "transcript", ...l, children: i.map((s) => {
|
|
13
13
|
const r = s.role === "user", a = r ? s.tone ?? "neutral" : "neutral";
|
|
14
|
-
return /* @__PURE__ */ e("div", { className: t("flex w-full", r ? "justify-end" : "justify-start"), children: /* @__PURE__ */
|
|
14
|
+
return /* @__PURE__ */ e("div", { className: t("flex w-full", r ? "justify-end" : "justify-start"), children: /* @__PURE__ */ d(
|
|
15
15
|
"div",
|
|
16
16
|
{
|
|
17
17
|
className: t(
|
|
@@ -21,10 +21,11 @@ function g({
|
|
|
21
21
|
a === "negative" && "bg-danger-100/70"
|
|
22
22
|
),
|
|
23
23
|
children: [
|
|
24
|
-
/* @__PURE__ */
|
|
24
|
+
/* @__PURE__ */ d("div", { className: t("mb-1 flex items-center gap-3", r && "justify-end"), children: [
|
|
25
25
|
a !== "neutral" && /* @__PURE__ */ e(
|
|
26
26
|
"span",
|
|
27
27
|
{
|
|
28
|
+
role: "img",
|
|
28
29
|
"aria-label": a === "positive" ? "Positive response" : "Negative response",
|
|
29
30
|
className: t(
|
|
30
31
|
"size-1.5 rounded-dot",
|
|
@@ -389,7 +389,7 @@ function ue({ state: t = "idle", className: e }) {
|
|
|
389
389
|
{
|
|
390
390
|
"aria-hidden": !0,
|
|
391
391
|
className: R(
|
|
392
|
-
"inline-block size-2.5 shrink-0 rounded-dot transition-[background-color,opacity] duration-
|
|
392
|
+
"inline-block size-2.5 shrink-0 rounded-dot transition-[background-color,opacity] duration-200 ease-out motion-reduce:transition-none",
|
|
393
393
|
ae[t],
|
|
394
394
|
e
|
|
395
395
|
)
|
package/components/alert.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as
|
|
2
|
+
import { jsxs as u, jsx as e } from "react/jsx-runtime";
|
|
3
3
|
import * as i from "react";
|
|
4
|
-
import { cva as
|
|
4
|
+
import { cva as m } from "class-variance-authority";
|
|
5
5
|
import { Info as l, WarningCircle as g, Warning as p, CheckCircle as x, Close as v } from "../lib/icons.js";
|
|
6
6
|
import { cn as n } from "../lib/cn.js";
|
|
7
|
-
const h =
|
|
7
|
+
const h = m(
|
|
8
8
|
"flex w-full items-start gap-4 rounded-2xl bg-muted p-4",
|
|
9
9
|
{
|
|
10
10
|
variants: {
|
|
@@ -25,17 +25,17 @@ const h = u(
|
|
|
25
25
|
danger: g,
|
|
26
26
|
info: l
|
|
27
27
|
}, N = i.forwardRef(
|
|
28
|
-
({ className: t, variant: r = "default", icon: a, onClose: s, children: o, ...c },
|
|
29
|
-
const
|
|
30
|
-
return /* @__PURE__ */
|
|
28
|
+
({ className: t, variant: r = "default", icon: a, onClose: s, children: o, ...c }, f) => {
|
|
29
|
+
const d = w[r ?? "default"];
|
|
30
|
+
return /* @__PURE__ */ u(
|
|
31
31
|
"div",
|
|
32
32
|
{
|
|
33
|
-
ref:
|
|
33
|
+
ref: f,
|
|
34
34
|
role: "alert",
|
|
35
35
|
className: n(h({ variant: r }), t),
|
|
36
36
|
...c,
|
|
37
37
|
children: [
|
|
38
|
-
/* @__PURE__ */ e("span", { className: "flex shrink-0 select-none items-center justify-center py-1 text-(--alert-accent) [&_svg]:size-4", children: a ?? /* @__PURE__ */ e(
|
|
38
|
+
/* @__PURE__ */ e("span", { className: "flex shrink-0 select-none items-center justify-center py-1 text-(--alert-accent) [&_svg]:size-4", children: a ?? /* @__PURE__ */ e(d, { "aria-hidden": !0 }) }),
|
|
39
39
|
/* @__PURE__ */ e("div", { className: "flex min-w-0 grow flex-col items-start", children: o }),
|
|
40
40
|
s && /* @__PURE__ */ e(
|
|
41
41
|
"button",
|
|
@@ -44,7 +44,7 @@ const h = u(
|
|
|
44
44
|
"aria-label": "Dismiss",
|
|
45
45
|
onClick: s,
|
|
46
46
|
className: n(
|
|
47
|
-
"inline-flex size-6 shrink-0 items-center justify-center rounded-
|
|
47
|
+
"inline-flex size-6 shrink-0 items-center justify-center rounded-sm text-muted-foreground",
|
|
48
48
|
"transition-colors hover:bg-fill hover:text-foreground",
|
|
49
49
|
"outline-none focus-visible:ring-3 focus-visible:ring-ring",
|
|
50
50
|
"[&_svg]:size-4"
|
|
@@ -62,7 +62,7 @@ const b = i.forwardRef(({ className: t, ...r }, a) => /* @__PURE__ */ e(
|
|
|
62
62
|
"p",
|
|
63
63
|
{
|
|
64
64
|
ref: a,
|
|
65
|
-
className: n("text-xs font-normal leading-6 text-
|
|
65
|
+
className: n("text-xs font-normal leading-6 text-foreground", t),
|
|
66
66
|
...r
|
|
67
67
|
}
|
|
68
68
|
));
|
|
@@ -37,7 +37,7 @@ const b = c.forwardRef(({ icon: n, count: e, className: a, children: t, ...i },
|
|
|
37
37
|
children: [
|
|
38
38
|
n,
|
|
39
39
|
t,
|
|
40
|
-
e != null && e > 1 && /* @__PURE__ */ s("span", { className: "tabular-nums
|
|
40
|
+
e != null && e > 1 && /* @__PURE__ */ s("span", { className: "tabular-nums", children: [
|
|
41
41
|
"· ",
|
|
42
42
|
e
|
|
43
43
|
] })
|