@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
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as e, jsxs as l, Fragment as
|
|
2
|
+
import { jsx as e, jsxs as l, Fragment as E } from "react/jsx-runtime";
|
|
3
3
|
import { Badge as y } from "../badge.js";
|
|
4
4
|
import { Collapsible as N, CollapsibleTrigger as C, CollapsibleContent as T } from "../collapsible.js";
|
|
5
|
-
import { ChevronRight as
|
|
5
|
+
import { ChevronRight as j, ChevronDown as w, WarningCircle as M, Database as R } from "../../lib/icons.js";
|
|
6
6
|
import { cn as n } from "../../lib/cn.js";
|
|
7
|
-
import { createContext as O, memo as
|
|
8
|
-
import { motion as
|
|
9
|
-
import {
|
|
10
|
-
const
|
|
7
|
+
import { createContext as O, memo as c, useContext as _, useState as D, useRef as P, useEffect as A } from "react";
|
|
8
|
+
import { motion as B } from "motion/react";
|
|
9
|
+
import { springDisclosure as F } from "../../lib/motion.js";
|
|
10
|
+
const k = O(!1), S = O("tree"), I = c(
|
|
11
11
|
({
|
|
12
12
|
className: i,
|
|
13
|
-
role:
|
|
13
|
+
role: o = "list",
|
|
14
14
|
connector: a = "tree",
|
|
15
|
-
children:
|
|
15
|
+
children: r,
|
|
16
16
|
...t
|
|
17
17
|
}) => /* @__PURE__ */ e(
|
|
18
18
|
"div",
|
|
19
19
|
{
|
|
20
20
|
"data-slot": "chain-of-thought",
|
|
21
|
-
role:
|
|
21
|
+
role: o,
|
|
22
22
|
className: n(
|
|
23
23
|
"w-full",
|
|
24
24
|
a === "rail" && [
|
|
@@ -28,35 +28,35 @@ const S = O(!1), k = O("tree"), B = d(
|
|
|
28
28
|
i
|
|
29
29
|
),
|
|
30
30
|
...t,
|
|
31
|
-
children: /* @__PURE__ */ e(
|
|
31
|
+
children: /* @__PURE__ */ e(S.Provider, { value: a, children: r })
|
|
32
32
|
}
|
|
33
33
|
)
|
|
34
|
-
),
|
|
34
|
+
), L = c(
|
|
35
35
|
({
|
|
36
36
|
className: i,
|
|
37
|
-
defaultOpen:
|
|
37
|
+
defaultOpen: o,
|
|
38
38
|
open: a,
|
|
39
|
-
onOpenChange:
|
|
39
|
+
onOpenChange: r,
|
|
40
40
|
status: t = "complete",
|
|
41
41
|
role: s = "listitem",
|
|
42
42
|
"aria-busy": h,
|
|
43
43
|
children: m,
|
|
44
|
-
...
|
|
44
|
+
...d
|
|
45
45
|
}) => {
|
|
46
|
-
const p = _(
|
|
47
|
-
|
|
48
|
-
), x =
|
|
49
|
-
return
|
|
46
|
+
const p = _(S), u = a !== void 0, [g, f] = D(
|
|
47
|
+
o ?? t === "active"
|
|
48
|
+
), x = P(t), z = x.current !== "active" && t === "active", v = u ? a : z || g;
|
|
49
|
+
return A(() => {
|
|
50
50
|
const b = x.current;
|
|
51
|
-
x.current = t, !(b === "active" || t !== "active") && (u || f(!0),
|
|
52
|
-
}, [u,
|
|
51
|
+
x.current = t, !(b === "active" || t !== "active") && (u || f(!0), r == null || r(!0));
|
|
52
|
+
}, [u, r, t]), /* @__PURE__ */ e(
|
|
53
53
|
N,
|
|
54
54
|
{
|
|
55
55
|
"data-slot": "chain-of-thought-step",
|
|
56
56
|
"data-status": t,
|
|
57
57
|
open: v,
|
|
58
58
|
onOpenChange: (b) => {
|
|
59
|
-
u || f(b),
|
|
59
|
+
u || f(b), r == null || r(b);
|
|
60
60
|
},
|
|
61
61
|
role: s,
|
|
62
62
|
"aria-current": t === "active" ? "step" : void 0,
|
|
@@ -94,17 +94,17 @@ const S = O(!1), k = O("tree"), B = d(
|
|
|
94
94
|
t === "error" && "text-danger",
|
|
95
95
|
i
|
|
96
96
|
),
|
|
97
|
-
...
|
|
98
|
-
children: /* @__PURE__ */ e(
|
|
97
|
+
...d,
|
|
98
|
+
children: /* @__PURE__ */ e(k.Provider, { value: v, children: m })
|
|
99
99
|
}
|
|
100
100
|
);
|
|
101
101
|
}
|
|
102
|
-
),
|
|
102
|
+
), W = c(
|
|
103
103
|
({
|
|
104
104
|
className: i,
|
|
105
|
-
children:
|
|
105
|
+
children: o,
|
|
106
106
|
leftIcon: a,
|
|
107
|
-
endContent:
|
|
107
|
+
endContent: r,
|
|
108
108
|
caret: t = !0,
|
|
109
109
|
swapIconOnHover: s = !0,
|
|
110
110
|
...h
|
|
@@ -117,7 +117,7 @@ const S = O(!1), k = O("tree"), B = d(
|
|
|
117
117
|
"group/cot-trigger flex min-h-9 w-full cursor-pointer items-center gap-3 rounded-sm text-left text-base text-current outline-none",
|
|
118
118
|
// Rows carry no hover fill: the caret is the affordance, and a filled
|
|
119
119
|
// band on every row makes a dense trace read as a list of buttons.
|
|
120
|
-
"transition-colors duration-
|
|
120
|
+
"transition-colors duration-150 ease-out hover:text-primary",
|
|
121
121
|
"focus-visible:ring-3 focus-visible:ring-ring motion-reduce:transition-none",
|
|
122
122
|
i
|
|
123
123
|
),
|
|
@@ -127,22 +127,22 @@ const S = O(!1), k = O("tree"), B = d(
|
|
|
127
127
|
{
|
|
128
128
|
"aria-hidden": !0,
|
|
129
129
|
className: "relative z-10 block size-4 shrink-0",
|
|
130
|
-
children: a ? /* @__PURE__ */ l(
|
|
130
|
+
children: a ? /* @__PURE__ */ l(E, { children: [
|
|
131
131
|
/* @__PURE__ */ e(
|
|
132
132
|
"span",
|
|
133
133
|
{
|
|
134
134
|
className: n(
|
|
135
|
-
"absolute inset-0 flex items-center justify-center transition-opacity duration-
|
|
135
|
+
"absolute inset-0 flex items-center justify-center transition-opacity duration-150 ease-out [&>svg]:size-4 motion-reduce:transition-none",
|
|
136
136
|
!t && s && "group-hover/cot-trigger:opacity-0 group-data-[state=open]/cot-trigger:opacity-0"
|
|
137
137
|
),
|
|
138
138
|
children: a
|
|
139
139
|
}
|
|
140
140
|
),
|
|
141
141
|
!t && s && /* @__PURE__ */ e(
|
|
142
|
-
|
|
142
|
+
j,
|
|
143
143
|
{
|
|
144
144
|
className: n(
|
|
145
|
-
"absolute inset-0 size-4 opacity-0 transition-[opacity,transform] duration-
|
|
145
|
+
"absolute inset-0 size-4 opacity-0 transition-[opacity,transform] duration-150 ease-out motion-reduce:transition-none",
|
|
146
146
|
"group-hover/cot-trigger:opacity-100 group-data-[state=open]/cot-trigger:opacity-100",
|
|
147
147
|
"group-data-[state=open]/cot-trigger:rotate-90"
|
|
148
148
|
)
|
|
@@ -151,13 +151,13 @@ const S = O(!1), k = O("tree"), B = d(
|
|
|
151
151
|
] }) : /* @__PURE__ */ e("span", { className: "absolute top-1/2 left-1/2 size-1.5 -translate-x-1/2 -translate-y-1/2 rounded-dot bg-current" })
|
|
152
152
|
}
|
|
153
153
|
),
|
|
154
|
-
/* @__PURE__ */ e("span", { className: "min-w-0 flex-1", children:
|
|
154
|
+
/* @__PURE__ */ e("span", { className: "min-w-0 flex-1", children: o }),
|
|
155
155
|
/* @__PURE__ */ l("span", { className: "ml-auto flex shrink-0 items-center gap-2", children: [
|
|
156
|
-
|
|
156
|
+
r != null && /* @__PURE__ */ e("span", { className: "text-xs text-tertiary tabular-nums", children: r }),
|
|
157
157
|
t && /* @__PURE__ */ e(
|
|
158
158
|
w,
|
|
159
159
|
{
|
|
160
|
-
className: "size-4 shrink-0 text-tertiary transition-transform duration-
|
|
160
|
+
className: "size-4 shrink-0 text-tertiary transition-transform duration-150 ease-out group-data-[state=open]/cot-trigger:rotate-180 motion-reduce:transition-none",
|
|
161
161
|
"aria-hidden": !0
|
|
162
162
|
}
|
|
163
163
|
)
|
|
@@ -165,11 +165,11 @@ const S = O(!1), k = O("tree"), B = d(
|
|
|
165
165
|
]
|
|
166
166
|
}
|
|
167
167
|
) })
|
|
168
|
-
),
|
|
169
|
-
({ className: i, children:
|
|
170
|
-
const t = _(
|
|
171
|
-
return /* @__PURE__ */ e(T, { forceMount: !0, asChild: !0, ...
|
|
172
|
-
|
|
168
|
+
), X = c(
|
|
169
|
+
({ className: i, children: o, rail: a = !0, ...r }) => {
|
|
170
|
+
const t = _(k);
|
|
171
|
+
return /* @__PURE__ */ e(T, { forceMount: !0, asChild: !0, ...r, children: /* @__PURE__ */ e(
|
|
172
|
+
B.div,
|
|
173
173
|
{
|
|
174
174
|
"data-slot": "chain-of-thought-content",
|
|
175
175
|
initial: !1,
|
|
@@ -178,7 +178,7 @@ const S = O(!1), k = O("tree"), B = d(
|
|
|
178
178
|
open: { height: "auto", opacity: 1 },
|
|
179
179
|
closed: { height: 0, opacity: 0 }
|
|
180
180
|
},
|
|
181
|
-
transition:
|
|
181
|
+
transition: F,
|
|
182
182
|
className: n(
|
|
183
183
|
"overflow-hidden text-secondary outline-none",
|
|
184
184
|
"data-[state=closed]:pointer-events-none",
|
|
@@ -199,14 +199,14 @@ const S = O(!1), k = O("tree"), B = d(
|
|
|
199
199
|
"has-[[data-slot=chain-of-thought-evidence][data-state=closed]:last-child]:before:bottom-9"
|
|
200
200
|
]
|
|
201
201
|
),
|
|
202
|
-
children:
|
|
202
|
+
children: o
|
|
203
203
|
}
|
|
204
204
|
)
|
|
205
205
|
}
|
|
206
206
|
) });
|
|
207
207
|
}
|
|
208
|
-
),
|
|
209
|
-
({ className: i, ...
|
|
208
|
+
), q = c(
|
|
209
|
+
({ className: i, ...o }) => /* @__PURE__ */ e(
|
|
210
210
|
"div",
|
|
211
211
|
{
|
|
212
212
|
"data-slot": "chain-of-thought-item",
|
|
@@ -215,39 +215,39 @@ const S = O(!1), k = O("tree"), B = d(
|
|
|
215
215
|
"before:absolute before:top-2 before:left-0 before:size-1.5 before:rounded-dot before:bg-current before:content-['']",
|
|
216
216
|
i
|
|
217
217
|
),
|
|
218
|
-
...
|
|
218
|
+
...o
|
|
219
219
|
}
|
|
220
220
|
)
|
|
221
|
-
),
|
|
222
|
-
({ className: i, ...
|
|
221
|
+
), G = c(
|
|
222
|
+
({ className: i, ...o }) => /* @__PURE__ */ e(
|
|
223
223
|
"div",
|
|
224
224
|
{
|
|
225
225
|
className: n("flex flex-wrap items-center gap-2", i),
|
|
226
|
-
...
|
|
226
|
+
...o
|
|
227
227
|
}
|
|
228
228
|
)
|
|
229
|
-
),
|
|
230
|
-
({ className: i, children:
|
|
229
|
+
), J = c(
|
|
230
|
+
({ className: i, children: o, ...a }) => /* @__PURE__ */ e(
|
|
231
231
|
y,
|
|
232
232
|
{
|
|
233
233
|
className: n("gap-1 font-normal", i),
|
|
234
234
|
color: "default",
|
|
235
235
|
variant: "soft",
|
|
236
236
|
...a,
|
|
237
|
-
children:
|
|
237
|
+
children: o
|
|
238
238
|
}
|
|
239
239
|
)
|
|
240
|
-
),
|
|
240
|
+
), K = c(
|
|
241
241
|
({
|
|
242
242
|
className: i,
|
|
243
|
-
title:
|
|
243
|
+
title: o,
|
|
244
244
|
tag: a,
|
|
245
|
-
meta:
|
|
245
|
+
meta: r,
|
|
246
246
|
source: t,
|
|
247
247
|
error: s,
|
|
248
248
|
icon: h,
|
|
249
249
|
defaultOpen: m = !1,
|
|
250
|
-
children:
|
|
250
|
+
children: d,
|
|
251
251
|
...p
|
|
252
252
|
}) => /* @__PURE__ */ l(
|
|
253
253
|
N,
|
|
@@ -275,7 +275,7 @@ const S = O(!1), k = O("tree"), B = d(
|
|
|
275
275
|
"data-slot": "chain-of-thought-evidence-trigger",
|
|
276
276
|
className: n(
|
|
277
277
|
"group/cot-evidence flex min-h-8 w-full cursor-pointer items-center gap-2 rounded-md text-left outline-none",
|
|
278
|
-
"transition-colors duration-
|
|
278
|
+
"transition-colors duration-150 ease-out hover:text-primary",
|
|
279
279
|
"focus-visible:ring-3 focus-visible:ring-ring motion-reduce:transition-none"
|
|
280
280
|
),
|
|
281
281
|
children: [
|
|
@@ -287,10 +287,10 @@ const S = O(!1), k = O("tree"), B = d(
|
|
|
287
287
|
"shrink-0 [&>svg]:size-3.5",
|
|
288
288
|
s != null ? "text-danger" : "text-tertiary"
|
|
289
289
|
),
|
|
290
|
-
children: h ?? (s != null ? /* @__PURE__ */ e(
|
|
290
|
+
children: h ?? (s != null ? /* @__PURE__ */ e(M, {}) : /* @__PURE__ */ e(R, {}))
|
|
291
291
|
}
|
|
292
292
|
),
|
|
293
|
-
/* @__PURE__ */ e("span", { className: "min-w-0 flex-1 truncate text-base font-normal text-secondary", children:
|
|
293
|
+
/* @__PURE__ */ e("span", { className: "min-w-0 flex-1 truncate text-base font-normal text-secondary", children: o }),
|
|
294
294
|
a != null && /* @__PURE__ */ e(
|
|
295
295
|
y,
|
|
296
296
|
{
|
|
@@ -300,13 +300,13 @@ const S = O(!1), k = O("tree"), B = d(
|
|
|
300
300
|
children: a
|
|
301
301
|
}
|
|
302
302
|
),
|
|
303
|
-
|
|
303
|
+
r != null && /* @__PURE__ */ e("span", { className: "shrink-0 text-xs text-tertiary tabular-nums", children: r }),
|
|
304
304
|
/* @__PURE__ */ e(
|
|
305
305
|
w,
|
|
306
306
|
{
|
|
307
307
|
"aria-hidden": !0,
|
|
308
308
|
className: n(
|
|
309
|
-
"size-3.5 shrink-0 text-tertiary transition-transform duration-
|
|
309
|
+
"size-3.5 shrink-0 text-tertiary transition-transform duration-150 ease-out motion-reduce:transition-none",
|
|
310
310
|
"group-data-[state=open]/cot-evidence:rotate-180"
|
|
311
311
|
)
|
|
312
312
|
}
|
|
@@ -320,11 +320,11 @@ const S = O(!1), k = O("tree"), B = d(
|
|
|
320
320
|
"data-slot": "chain-of-thought-evidence-content",
|
|
321
321
|
className: n(
|
|
322
322
|
"overflow-hidden outline-none",
|
|
323
|
-
"data-[state=closed]:pointer-events-none
|
|
323
|
+
"data-[state=closed]:pointer-events-none"
|
|
324
324
|
),
|
|
325
325
|
children: /* @__PURE__ */ l("div", { className: "flex flex-col gap-1.5 pt-1.5", children: [
|
|
326
326
|
s != null && /* @__PURE__ */ e("p", { className: "text-xs text-danger", children: s }),
|
|
327
|
-
|
|
327
|
+
d,
|
|
328
328
|
t != null && /* @__PURE__ */ e("p", { className: "text-xs text-tertiary", children: t })
|
|
329
329
|
] })
|
|
330
330
|
}
|
|
@@ -332,16 +332,16 @@ const S = O(!1), k = O("tree"), B = d(
|
|
|
332
332
|
]
|
|
333
333
|
}
|
|
334
334
|
)
|
|
335
|
-
),
|
|
335
|
+
), Q = c(
|
|
336
336
|
({
|
|
337
337
|
className: i,
|
|
338
|
-
columns:
|
|
338
|
+
columns: o,
|
|
339
339
|
rows: a,
|
|
340
|
-
totalRows:
|
|
340
|
+
totalRows: r,
|
|
341
341
|
flag: t,
|
|
342
342
|
...s
|
|
343
343
|
}) => {
|
|
344
|
-
const h =
|
|
344
|
+
const h = r != null && r > a.length, m = (t == null ? void 0 : t.color) ?? "default";
|
|
345
345
|
return /* @__PURE__ */ l(
|
|
346
346
|
"div",
|
|
347
347
|
{
|
|
@@ -350,31 +350,31 @@ const S = O(!1), k = O("tree"), B = d(
|
|
|
350
350
|
...s,
|
|
351
351
|
children: [
|
|
352
352
|
/* @__PURE__ */ e("div", { className: "max-h-56 overflow-auto", children: /* @__PURE__ */ l("table", { className: "w-full border-collapse text-xs tabular-nums", children: [
|
|
353
|
-
/* @__PURE__ */ e("thead", { children: /* @__PURE__ */ e("tr", { className: "text-tertiary", children:
|
|
353
|
+
/* @__PURE__ */ e("thead", { children: /* @__PURE__ */ e("tr", { className: "text-tertiary", children: o.map((d) => /* @__PURE__ */ e(
|
|
354
354
|
"th",
|
|
355
355
|
{
|
|
356
356
|
className: n(
|
|
357
357
|
"sticky top-0 bg-surface px-2.5 py-1.5 font-normal whitespace-nowrap",
|
|
358
|
-
|
|
358
|
+
d.align === "end" ? "text-right" : "text-left"
|
|
359
359
|
),
|
|
360
|
-
children:
|
|
360
|
+
children: d.label
|
|
361
361
|
},
|
|
362
|
-
|
|
362
|
+
d.key
|
|
363
363
|
)) }) }),
|
|
364
|
-
/* @__PURE__ */ e("tbody", { children: a.map((
|
|
365
|
-
const u = t != null && String(
|
|
366
|
-
return /* @__PURE__ */ e("tr", { className: n(u && "bg-muted"), children:
|
|
364
|
+
/* @__PURE__ */ e("tbody", { children: a.map((d, p) => {
|
|
365
|
+
const u = t != null && String(d[t.key]) === String(t.value);
|
|
366
|
+
return /* @__PURE__ */ e("tr", { className: n(u && "bg-muted"), children: o.map((g, f) => /* @__PURE__ */ e(
|
|
367
367
|
"td",
|
|
368
368
|
{
|
|
369
369
|
className: n(
|
|
370
370
|
"px-2.5 py-1 whitespace-nowrap",
|
|
371
371
|
g.align === "end" ? "text-right" : "text-left",
|
|
372
372
|
f === 0 ? "text-secondary" : "text-tertiary",
|
|
373
|
-
u && f === 0 && "font-
|
|
373
|
+
u && f === 0 && "font-medium",
|
|
374
374
|
u && f === 0 && m === "danger" && "text-danger",
|
|
375
375
|
u && f === 0 && m === "warning" && "text-warning"
|
|
376
376
|
),
|
|
377
|
-
children:
|
|
377
|
+
children: d[g.key]
|
|
378
378
|
},
|
|
379
379
|
g.key
|
|
380
380
|
)) }, p);
|
|
@@ -383,19 +383,19 @@ const S = O(!1), k = O("tree"), B = d(
|
|
|
383
383
|
h && /* @__PURE__ */ l("p", { className: "px-2.5 py-1.5 text-xs text-tertiary tabular-nums", children: [
|
|
384
384
|
a.length,
|
|
385
385
|
" of ",
|
|
386
|
-
|
|
386
|
+
r,
|
|
387
387
|
" rows"
|
|
388
388
|
] })
|
|
389
389
|
]
|
|
390
390
|
}
|
|
391
391
|
);
|
|
392
392
|
}
|
|
393
|
-
),
|
|
394
|
-
({ className: i, role:
|
|
393
|
+
), U = c(
|
|
394
|
+
({ className: i, role: o = "list", ...a }) => /* @__PURE__ */ e(
|
|
395
395
|
"div",
|
|
396
396
|
{
|
|
397
397
|
"data-slot": "chain-of-thought-metrics",
|
|
398
|
-
role:
|
|
398
|
+
role: o,
|
|
399
399
|
className: n(
|
|
400
400
|
"flex flex-col gap-2 rounded-lg bg-muted px-4 py-3",
|
|
401
401
|
i
|
|
@@ -409,12 +409,12 @@ const S = O(!1), k = O("tree"), B = d(
|
|
|
409
409
|
warning: "text-warning",
|
|
410
410
|
success: "text-success",
|
|
411
411
|
info: "text-info"
|
|
412
|
-
}, Y =
|
|
412
|
+
}, Y = c(
|
|
413
413
|
({
|
|
414
414
|
className: i,
|
|
415
|
-
label:
|
|
415
|
+
label: o,
|
|
416
416
|
value: a,
|
|
417
|
-
sub:
|
|
417
|
+
sub: r,
|
|
418
418
|
color: t = "default",
|
|
419
419
|
role: s = "listitem",
|
|
420
420
|
...h
|
|
@@ -431,10 +431,10 @@ const S = O(!1), k = O("tree"), B = d(
|
|
|
431
431
|
...h,
|
|
432
432
|
children: [
|
|
433
433
|
/* @__PURE__ */ l("div", { className: "min-w-0 text-xs text-tertiary", children: [
|
|
434
|
-
|
|
435
|
-
|
|
434
|
+
o,
|
|
435
|
+
r != null && /* @__PURE__ */ l("span", { children: [
|
|
436
436
|
" (",
|
|
437
|
-
|
|
437
|
+
r,
|
|
438
438
|
")"
|
|
439
439
|
] })
|
|
440
440
|
] }),
|
|
@@ -442,7 +442,7 @@ const S = O(!1), k = O("tree"), B = d(
|
|
|
442
442
|
"div",
|
|
443
443
|
{
|
|
444
444
|
className: n(
|
|
445
|
-
"shrink-0 text-base font-
|
|
445
|
+
"shrink-0 text-base font-medium tabular-nums",
|
|
446
446
|
V[t]
|
|
447
447
|
),
|
|
448
448
|
children: a
|
|
@@ -451,35 +451,35 @@ const S = O(!1), k = O("tree"), B = d(
|
|
|
451
451
|
]
|
|
452
452
|
}
|
|
453
453
|
)
|
|
454
|
-
), Z =
|
|
455
|
-
({ className: i, children:
|
|
456
|
-
/* @__PURE__ */ e("div", { className: "relative flex max-h-88 items-center justify-center overflow-hidden rounded-lg bg-muted p-3", children:
|
|
454
|
+
), Z = c(
|
|
455
|
+
({ className: i, children: o, caption: a, ...r }) => /* @__PURE__ */ l("div", { className: n("space-y-2", i), ...r, children: [
|
|
456
|
+
/* @__PURE__ */ e("div", { className: "relative flex max-h-88 items-center justify-center overflow-hidden rounded-lg bg-muted p-3", children: o }),
|
|
457
457
|
a && /* @__PURE__ */ e("p", { className: "text-xs text-tertiary", children: a })
|
|
458
458
|
] })
|
|
459
459
|
);
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
460
|
+
I.displayName = "ChainOfThought";
|
|
461
|
+
L.displayName = "ChainOfThoughtStep";
|
|
462
|
+
W.displayName = "ChainOfThoughtTrigger";
|
|
463
|
+
X.displayName = "ChainOfThoughtContent";
|
|
464
|
+
q.displayName = "ChainOfThoughtItem";
|
|
465
|
+
G.displayName = "ChainOfThoughtSearchResults";
|
|
466
|
+
J.displayName = "ChainOfThoughtSearchResult";
|
|
467
|
+
K.displayName = "ChainOfThoughtEvidence";
|
|
468
|
+
Q.displayName = "ChainOfThoughtEvidenceTable";
|
|
469
|
+
U.displayName = "ChainOfThoughtMetrics";
|
|
470
470
|
Y.displayName = "ChainOfThoughtMetric";
|
|
471
471
|
Z.displayName = "ChainOfThoughtImage";
|
|
472
472
|
export {
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
473
|
+
I as ChainOfThought,
|
|
474
|
+
X as ChainOfThoughtContent,
|
|
475
|
+
K as ChainOfThoughtEvidence,
|
|
476
|
+
Q as ChainOfThoughtEvidenceTable,
|
|
477
477
|
Z as ChainOfThoughtImage,
|
|
478
|
-
|
|
478
|
+
q as ChainOfThoughtItem,
|
|
479
479
|
Y as ChainOfThoughtMetric,
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
480
|
+
U as ChainOfThoughtMetrics,
|
|
481
|
+
J as ChainOfThoughtSearchResult,
|
|
482
|
+
G as ChainOfThoughtSearchResults,
|
|
483
|
+
L as ChainOfThoughtStep,
|
|
484
|
+
W as ChainOfThoughtTrigger
|
|
485
485
|
};
|
|
@@ -75,6 +75,7 @@ function Y({
|
|
|
75
75
|
{
|
|
76
76
|
"aria-hidden": !0,
|
|
77
77
|
role: "presentation",
|
|
78
|
+
variant: "content",
|
|
78
79
|
size: "sm",
|
|
79
80
|
color: "muted"
|
|
80
81
|
}
|
|
@@ -130,6 +131,7 @@ function Z({
|
|
|
130
131
|
{
|
|
131
132
|
"aria-hidden": !0,
|
|
132
133
|
role: "presentation",
|
|
134
|
+
variant: "content",
|
|
133
135
|
size: "sm",
|
|
134
136
|
color: "current"
|
|
135
137
|
}
|
|
@@ -150,24 +152,24 @@ const ee = g.forwardRef(
|
|
|
150
152
|
title: i,
|
|
151
153
|
tag: o,
|
|
152
154
|
source: s,
|
|
153
|
-
progress:
|
|
155
|
+
progress: c,
|
|
154
156
|
elapsed: y,
|
|
155
|
-
meta:
|
|
157
|
+
meta: d,
|
|
156
158
|
accessibleSummary: u,
|
|
157
159
|
open: b,
|
|
158
160
|
defaultOpen: N = !1,
|
|
159
161
|
onOpenChange: C,
|
|
160
|
-
onSourceSelect:
|
|
162
|
+
onSourceSelect: h,
|
|
161
163
|
errorContent: _,
|
|
162
164
|
onRetry: w,
|
|
163
165
|
children: k,
|
|
164
|
-
role: A = "
|
|
166
|
+
role: A = "group",
|
|
165
167
|
"aria-label": z,
|
|
166
168
|
"aria-describedby": R,
|
|
167
169
|
"aria-busy": j,
|
|
168
170
|
...I
|
|
169
171
|
}, $) => {
|
|
170
|
-
const n = r ?? "ready", B = n === "querying" || n === "partial" || n === "rendering",
|
|
172
|
+
const n = r ?? "ready", B = n === "querying" || n === "partial" || n === "rendering", m = d !== void 0 ? d : X(n, c, y), q = K[n], f = g.useId(), p = n === "ready" && u != null, D = [
|
|
171
173
|
R,
|
|
172
174
|
p ? f : void 0
|
|
173
175
|
].filter(Boolean).join(" ") || void 0;
|
|
@@ -203,7 +205,7 @@ const ee = g.forwardRef(
|
|
|
203
205
|
type: "button",
|
|
204
206
|
className: l(
|
|
205
207
|
"group/ai-chart-trigger flex w-full items-center gap-2.5 px-2.5 py-2 text-left",
|
|
206
|
-
"outline-none transition-[background,color,transform] duration-
|
|
208
|
+
"outline-none transition-[background,color,transform] duration-150 ease-out hover:bg-fill active:scale-[0.97] motion-reduce:active:scale-100",
|
|
207
209
|
"focus-visible:ring-3 focus-visible:ring-inset focus-visible:ring-ring motion-reduce:transition-none"
|
|
208
210
|
),
|
|
209
211
|
children: [
|
|
@@ -225,18 +227,18 @@ const ee = g.forwardRef(
|
|
|
225
227
|
children: o
|
|
226
228
|
}
|
|
227
229
|
),
|
|
228
|
-
|
|
230
|
+
m != null && /* @__PURE__ */ e(
|
|
229
231
|
"span",
|
|
230
232
|
{
|
|
231
233
|
"data-slot": "ai-chart-meta",
|
|
232
234
|
className: "ml-auto shrink-0 text-xs tabular-nums",
|
|
233
|
-
children:
|
|
235
|
+
children: m
|
|
234
236
|
}
|
|
235
237
|
),
|
|
236
238
|
/* @__PURE__ */ e(
|
|
237
239
|
P,
|
|
238
240
|
{
|
|
239
|
-
className: "size-4 shrink-0 text-tertiary transition-transform duration-
|
|
241
|
+
className: "size-4 shrink-0 text-tertiary transition-transform duration-200 ease-out group-data-[state=open]/ai-chart-trigger:rotate-180 motion-reduce:transition-none",
|
|
240
242
|
"aria-hidden": !0
|
|
241
243
|
}
|
|
242
244
|
)
|
|
@@ -248,7 +250,7 @@ const ee = g.forwardRef(
|
|
|
248
250
|
{
|
|
249
251
|
className: l(
|
|
250
252
|
"overflow-hidden px-2.5 pb-2.5 outline-none",
|
|
251
|
-
"data-[state=closed]:pointer-events-none
|
|
253
|
+
"data-[state=closed]:pointer-events-none"
|
|
252
254
|
),
|
|
253
255
|
children: [
|
|
254
256
|
/* @__PURE__ */ e(
|
|
@@ -260,7 +262,7 @@ const ee = g.forwardRef(
|
|
|
260
262
|
Z,
|
|
261
263
|
{
|
|
262
264
|
status: n,
|
|
263
|
-
progress:
|
|
265
|
+
progress: c,
|
|
264
266
|
errorContent: _,
|
|
265
267
|
onRetry: w,
|
|
266
268
|
children: k
|
|
@@ -273,13 +275,13 @@ const ee = g.forwardRef(
|
|
|
273
275
|
{
|
|
274
276
|
className: "mt-2 text-xs text-tertiary",
|
|
275
277
|
"data-slot": "ai-chart-source",
|
|
276
|
-
children:
|
|
278
|
+
children: h ? /* @__PURE__ */ a(
|
|
277
279
|
"button",
|
|
278
280
|
{
|
|
279
281
|
type: "button",
|
|
280
|
-
className: "rounded-sm text-left outline-none transition-colors duration-
|
|
282
|
+
className: "rounded-sm text-left outline-none transition-colors duration-150 ease-out hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring motion-reduce:transition-none",
|
|
281
283
|
"aria-label": `Open source ${s}`,
|
|
282
|
-
onClick: () =>
|
|
284
|
+
onClick: () => h(s),
|
|
283
285
|
children: [
|
|
284
286
|
"from ",
|
|
285
287
|
/* @__PURE__ */ e("span", { className: "font-normal tabular-nums", children: s })
|