@actioneer/ads 0.3.0 → 0.3.1
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 +25 -5
- package/components/ai-elements/chain-of-thought.js +248 -204
- package/components/ai-elements/research-activity.d.ts +17 -0
- package/components/ai-elements/research-activity.js +125 -107
- package/components/ai-elements/task.d.ts +7 -3
- package/components/ai-elements/task.js +84 -52
- package/components/ai-elements/tool.js +16 -16
- package/components/ai-elements/voice.d.ts +7 -1
- package/components/ai-elements/voice.js +234 -180
- package/components/alert.js +28 -16
- package/components/code-block.d.ts +11 -5
- package/components/code-block.js +161 -62
- package/components/scroll-area.js +10 -10
- package/components/sidebar.js +1 -1
- package/components/stepper.d.ts +17 -9
- package/components/stepper.js +85 -96
- package/lib/icons.js +1 -1
- package/lib/motion.d.ts +2 -0
- package/lib/motion.js +21 -20
- package/llms.txt +2 -1
- package/manifest.json +22 -5
- package/package.json +1 -1
- package/styles.css +108 -2
- package/theme.css +10 -2
|
@@ -28,6 +28,23 @@ export interface ResearchActivityProps extends Omit<React.HTMLAttributes<HTMLDiv
|
|
|
28
28
|
* otherwise scroll away exactly when the run is still moving.
|
|
29
29
|
*/
|
|
30
30
|
sticky?: boolean;
|
|
31
|
+
/**
|
|
32
|
+
* Show the disclosure chevron. Turn it off when the consumer controls `open`
|
|
33
|
+
* and the line is a status readout rather than a toggle — a chevron that
|
|
34
|
+
* does nothing is a false affordance.
|
|
35
|
+
*/
|
|
36
|
+
collapsible?: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* Where the summary/live line sits when the trace is open. `"bottom"` puts
|
|
39
|
+
* it directly beneath the steps — while running that is where the next step
|
|
40
|
+
* appears, and on completion it stays put rather than jumping back over the
|
|
41
|
+
* trace it just narrated. A CLOSED trace always shows its line at the top:
|
|
42
|
+
* it is then standing in for the whole trace, so it has to sit where the
|
|
43
|
+
* trace would be.
|
|
44
|
+
*
|
|
45
|
+
* Visual order only — the trigger stays before its content in the DOM.
|
|
46
|
+
*/
|
|
47
|
+
activityPlacement?: "top" | "bottom";
|
|
31
48
|
/** Controlled disclosure of the trace. */
|
|
32
49
|
open?: boolean;
|
|
33
50
|
/** Initial disclosure state. */
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as
|
|
2
|
+
import { jsxs as r, jsx as e, Fragment as P } from "react/jsx-runtime";
|
|
3
3
|
import * as s from "react";
|
|
4
|
-
import { MotionConfig as
|
|
5
|
-
import { cva as
|
|
6
|
-
import { Collapsible as
|
|
7
|
-
import { Spinner as
|
|
8
|
-
import { Sparkles as
|
|
9
|
-
import { EASE_OUT as
|
|
10
|
-
import { cn as
|
|
11
|
-
import { Shimmer as
|
|
12
|
-
const
|
|
4
|
+
import { MotionConfig as I, AnimatePresence as O, motion as ee } from "motion/react";
|
|
5
|
+
import { cva as te } from "class-variance-authority";
|
|
6
|
+
import { Collapsible as re, CollapsibleTrigger as M, CollapsibleContent as ae } from "../collapsible.js";
|
|
7
|
+
import { Spinner as T } from "../spinner.js";
|
|
8
|
+
import { Sparkles as V, ChevronDown as B } from "../../lib/icons.js";
|
|
9
|
+
import { EASE_OUT as D } from "../../lib/motion.js";
|
|
10
|
+
import { cn as l } from "../../lib/cn.js";
|
|
11
|
+
import { Shimmer as F } from "./shimmer.js";
|
|
12
|
+
const ie = te("w-full", {
|
|
13
13
|
variants: {
|
|
14
14
|
status: {
|
|
15
15
|
active: "text-foreground",
|
|
16
16
|
complete: "text-secondary"
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
|
-
}),
|
|
19
|
+
}), se = {
|
|
20
20
|
initial: {
|
|
21
21
|
opacity: 0,
|
|
22
22
|
transform: "translate3d(0, 7px, 0)",
|
|
@@ -26,32 +26,32 @@ const re = I("w-full", {
|
|
|
26
26
|
opacity: 1,
|
|
27
27
|
transform: "translate3d(0, 0, 0)",
|
|
28
28
|
filter: "blur(0px)",
|
|
29
|
-
transition: { duration: 0.18, ease:
|
|
29
|
+
transition: { duration: 0.18, ease: D }
|
|
30
30
|
},
|
|
31
31
|
exit: {
|
|
32
32
|
opacity: 0,
|
|
33
33
|
transform: "translate3d(0, -7px, 0)",
|
|
34
34
|
filter: "blur(2px)",
|
|
35
|
-
transition: { duration: 0.12, ease:
|
|
35
|
+
transition: { duration: 0.12, ease: D }
|
|
36
36
|
}
|
|
37
37
|
};
|
|
38
|
-
function
|
|
39
|
-
elapsed:
|
|
38
|
+
function K({
|
|
39
|
+
elapsed: t,
|
|
40
40
|
firstInsight: n,
|
|
41
41
|
sourceCount: d
|
|
42
42
|
}) {
|
|
43
|
-
return /* @__PURE__ */
|
|
44
|
-
/* @__PURE__ */
|
|
43
|
+
return /* @__PURE__ */ r("span", { className: "flex min-w-0 flex-wrap items-baseline gap-x-2 gap-y-1", children: [
|
|
44
|
+
/* @__PURE__ */ r("span", { children: [
|
|
45
45
|
"Researched ",
|
|
46
46
|
d,
|
|
47
47
|
" ",
|
|
48
48
|
d === 1 ? "source" : "sources"
|
|
49
49
|
] }),
|
|
50
50
|
/* @__PURE__ */ e("span", { "aria-hidden": !0, className: "text-tertiary", children: "·" }),
|
|
51
|
-
/* @__PURE__ */ e("span", { className: "text-xs text-tertiary tabular-nums", children:
|
|
52
|
-
n != null && /* @__PURE__ */
|
|
51
|
+
/* @__PURE__ */ e("span", { className: "text-xs text-tertiary tabular-nums", children: t }),
|
|
52
|
+
n != null && /* @__PURE__ */ r(P, { children: [
|
|
53
53
|
/* @__PURE__ */ e("span", { "aria-hidden": !0, className: "text-tertiary", children: "·" }),
|
|
54
|
-
/* @__PURE__ */
|
|
54
|
+
/* @__PURE__ */ r("span", { className: "text-xs text-tertiary", children: [
|
|
55
55
|
"first insight",
|
|
56
56
|
" ",
|
|
57
57
|
/* @__PURE__ */ e("span", { className: "tabular-nums", children: n })
|
|
@@ -59,117 +59,130 @@ function F({
|
|
|
59
59
|
] })
|
|
60
60
|
] });
|
|
61
61
|
}
|
|
62
|
-
const
|
|
62
|
+
const ne = s.forwardRef(
|
|
63
63
|
({
|
|
64
|
-
status:
|
|
64
|
+
status: t,
|
|
65
65
|
elapsed: n,
|
|
66
66
|
sourceCount: d,
|
|
67
|
-
firstInsight:
|
|
68
|
-
sticky:
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
67
|
+
firstInsight: w,
|
|
68
|
+
sticky: p = !1,
|
|
69
|
+
collapsible: h = !0,
|
|
70
|
+
activityPlacement: U = "top",
|
|
71
|
+
activity: c,
|
|
72
|
+
activityKey: _,
|
|
73
|
+
stepIndex: R,
|
|
74
|
+
stepCount: S,
|
|
75
|
+
summary: x,
|
|
76
|
+
open: k,
|
|
77
|
+
defaultOpen: $ = !1,
|
|
76
78
|
onOpenChange: a,
|
|
77
|
-
children:
|
|
78
|
-
className:
|
|
79
|
-
role:
|
|
80
|
-
"aria-label":
|
|
81
|
-
"aria-busy":
|
|
82
|
-
...
|
|
83
|
-
},
|
|
84
|
-
const
|
|
85
|
-
!i &&
|
|
86
|
-
),
|
|
79
|
+
children: q,
|
|
80
|
+
className: G,
|
|
81
|
+
role: H,
|
|
82
|
+
"aria-label": J,
|
|
83
|
+
"aria-busy": Q,
|
|
84
|
+
...W
|
|
85
|
+
}, X) => {
|
|
86
|
+
const m = k !== void 0, i = c != null, [Y, y] = s.useState(
|
|
87
|
+
!i && t === "active" || $
|
|
88
|
+
), z = s.useRef(t), N = s.useRef(!1), E = s.useRef(null), b = s.useRef(null), g = m ? k : Y, v = !i && t === "active" || g, f = U === "bottom" && v;
|
|
87
89
|
s.useLayoutEffect(() => {
|
|
88
|
-
var
|
|
89
|
-
const u =
|
|
90
|
-
if (
|
|
91
|
-
u !== "active" && (
|
|
90
|
+
var L, j;
|
|
91
|
+
const u = z.current;
|
|
92
|
+
if (z.current = t, t === "active") {
|
|
93
|
+
u !== "active" && (N.current = !1), u !== "active" && !i && !m && y(!0);
|
|
92
94
|
return;
|
|
93
95
|
}
|
|
94
|
-
if (u !== "active" ||
|
|
95
|
-
const
|
|
96
|
-
|
|
97
|
-
}, [i,
|
|
98
|
-
const
|
|
96
|
+
if (u !== "active" || N.current && i) return;
|
|
97
|
+
const A = document.activeElement;
|
|
98
|
+
A && ((L = E.current) != null && L.contains(A)) && ((j = b.current) == null || j.focus()), m || y(!1), a == null || a(!1);
|
|
99
|
+
}, [i, m, a, t]);
|
|
100
|
+
const Z = s.useCallback(
|
|
99
101
|
(u) => {
|
|
100
|
-
!i &&
|
|
102
|
+
!i && t !== "complete" || (N.current = !0, m || y(u), a == null || a(u));
|
|
101
103
|
},
|
|
102
|
-
[i,
|
|
103
|
-
),
|
|
104
|
-
return /* @__PURE__ */
|
|
105
|
-
|
|
104
|
+
[i, m, a, t]
|
|
105
|
+
), o = t === "active", C = o ? `activity-${_ ?? (typeof c == "string" ? c : "current")}` : "summary";
|
|
106
|
+
return /* @__PURE__ */ r(
|
|
107
|
+
re,
|
|
106
108
|
{
|
|
107
|
-
ref:
|
|
109
|
+
ref: X,
|
|
108
110
|
open: v,
|
|
109
|
-
onOpenChange:
|
|
110
|
-
role:
|
|
111
|
-
"aria-label":
|
|
112
|
-
"aria-busy":
|
|
113
|
-
...
|
|
111
|
+
onOpenChange: Z,
|
|
112
|
+
role: H ?? "region",
|
|
113
|
+
"aria-label": J ?? "Research activity",
|
|
114
|
+
"aria-busy": Q ?? (o || void 0),
|
|
115
|
+
...W,
|
|
114
116
|
"data-slot": "research-activity",
|
|
115
|
-
"data-status":
|
|
116
|
-
className:
|
|
117
|
+
"data-status": t,
|
|
118
|
+
className: l(
|
|
119
|
+
ie({ status: t }),
|
|
120
|
+
f && "flex flex-col",
|
|
121
|
+
G
|
|
122
|
+
),
|
|
117
123
|
children: [
|
|
118
|
-
/* @__PURE__ */ e("span", { className: "sr-only", "aria-live": "polite", "aria-atomic": "true", children:
|
|
119
|
-
i ? /* @__PURE__ */ e(
|
|
124
|
+
/* @__PURE__ */ e("span", { className: "sr-only", "aria-live": "polite", "aria-atomic": "true", children: o ? "Research in progress" : "Research complete" }),
|
|
125
|
+
i ? /* @__PURE__ */ e(M, { asChild: !0, children: /* @__PURE__ */ r(
|
|
120
126
|
"button",
|
|
121
127
|
{
|
|
122
|
-
ref:
|
|
128
|
+
ref: b,
|
|
123
129
|
type: "button",
|
|
124
130
|
"data-slot": "research-activity-trigger",
|
|
125
|
-
className:
|
|
131
|
+
className: l(
|
|
126
132
|
"group/research-trigger flex min-h-9 w-full cursor-pointer items-center gap-2.5 rounded-sm py-1 text-left text-sm outline-none",
|
|
127
133
|
"transition-[color,transform] duration-(--duration-fast) ease-out hover:text-primary active:scale-(--scale-press)",
|
|
128
134
|
"focus-visible:ring-3 focus-visible:ring-ring motion-reduce:transition-none",
|
|
129
|
-
|
|
135
|
+
p && "sticky z-10 bg-background",
|
|
136
|
+
p && (f ? "bottom-0" : "top-0"),
|
|
137
|
+
f && "order-last mt-3"
|
|
130
138
|
),
|
|
131
139
|
children: [
|
|
132
|
-
/* @__PURE__ */
|
|
140
|
+
/* @__PURE__ */ r("span", { className: "sr-only", children: [
|
|
133
141
|
v ? "Collapse" : "Expand",
|
|
134
142
|
" research activity:",
|
|
135
143
|
" "
|
|
136
144
|
] }),
|
|
137
|
-
/* @__PURE__ */ e("span", { "aria-hidden": !0, className: "flex size-4 shrink-0 items-center justify-center", children:
|
|
138
|
-
/* @__PURE__ */ e(
|
|
139
|
-
|
|
145
|
+
/* @__PURE__ */ e("span", { "aria-hidden": !0, className: "flex size-4 shrink-0 items-center justify-center", children: o ? /* @__PURE__ */ e(T, { size: "sm", color: "current", role: "presentation" }) : /* @__PURE__ */ e(V, { className: "size-4" }) }),
|
|
146
|
+
/* @__PURE__ */ e(I, { reducedMotion: "user", children: /* @__PURE__ */ e("span", { className: "relative h-5 min-w-0 flex-1 overflow-hidden", children: /* @__PURE__ */ e(O, { initial: !1, children: /* @__PURE__ */ e(
|
|
147
|
+
ee.span,
|
|
140
148
|
{
|
|
141
|
-
variants:
|
|
149
|
+
variants: se,
|
|
142
150
|
initial: "initial",
|
|
143
151
|
animate: "animate",
|
|
144
152
|
exit: "exit",
|
|
145
153
|
className: "absolute inset-0 flex items-center truncate whitespace-nowrap",
|
|
146
|
-
children:
|
|
147
|
-
|
|
154
|
+
children: o ? typeof c == "string" ? /* @__PURE__ */ e(F, { as: "span", className: "truncate text-sm", children: c }) : c : x !== void 0 ? x : /* @__PURE__ */ e(
|
|
155
|
+
K,
|
|
148
156
|
{
|
|
149
157
|
elapsed: n,
|
|
150
|
-
firstInsight:
|
|
158
|
+
firstInsight: w,
|
|
151
159
|
sourceCount: d
|
|
152
160
|
}
|
|
153
161
|
)
|
|
154
162
|
},
|
|
155
|
-
|
|
163
|
+
C
|
|
156
164
|
) }) }) }),
|
|
157
|
-
|
|
158
|
-
|
|
165
|
+
o && /* @__PURE__ */ r("span", { className: l(
|
|
166
|
+
"shrink-0 text-xs text-tertiary tabular-nums",
|
|
167
|
+
// Reserve the caret slot (size-4 + gap-2) so trailing metadata
|
|
168
|
+
// keeps the same right edge as sibling rows that show a caret.
|
|
169
|
+
!h && "pe-6"
|
|
170
|
+
), children: [
|
|
171
|
+
R != null && S != null && /* @__PURE__ */ r(P, { children: [
|
|
159
172
|
/* @__PURE__ */ e("span", { className: "sr-only", children: "Step " }),
|
|
160
|
-
g,
|
|
161
|
-
" of ",
|
|
162
173
|
R,
|
|
174
|
+
" of ",
|
|
175
|
+
S,
|
|
163
176
|
/* @__PURE__ */ e("span", { "aria-hidden": !0, children: " · " })
|
|
164
177
|
] }),
|
|
165
178
|
/* @__PURE__ */ e("span", { className: "sr-only", children: "Elapsed " }),
|
|
166
179
|
n
|
|
167
180
|
] }),
|
|
168
|
-
/* @__PURE__ */ e(
|
|
169
|
-
|
|
181
|
+
h && /* @__PURE__ */ e(
|
|
182
|
+
B,
|
|
170
183
|
{
|
|
171
184
|
"aria-hidden": !0,
|
|
172
|
-
className:
|
|
185
|
+
className: l(
|
|
173
186
|
"size-4 shrink-0 text-tertiary transition-transform duration-(--duration-normal) ease-out motion-reduce:transition-none",
|
|
174
187
|
v && "rotate-180"
|
|
175
188
|
)
|
|
@@ -177,14 +190,14 @@ const ae = s.forwardRef(
|
|
|
177
190
|
)
|
|
178
191
|
]
|
|
179
192
|
}
|
|
180
|
-
) }) :
|
|
193
|
+
) }) : o ? /* @__PURE__ */ r(
|
|
181
194
|
"div",
|
|
182
195
|
{
|
|
183
196
|
"data-slot": "research-activity-header",
|
|
184
197
|
className: "flex min-h-9 w-full items-center gap-2.5 py-1 text-left",
|
|
185
198
|
children: [
|
|
186
199
|
/* @__PURE__ */ e(
|
|
187
|
-
|
|
200
|
+
T,
|
|
188
201
|
{
|
|
189
202
|
size: "sm",
|
|
190
203
|
color: "current",
|
|
@@ -192,47 +205,52 @@ const ae = s.forwardRef(
|
|
|
192
205
|
"aria-hidden": !0
|
|
193
206
|
}
|
|
194
207
|
),
|
|
195
|
-
/* @__PURE__ */ e(
|
|
196
|
-
/* @__PURE__ */
|
|
208
|
+
/* @__PURE__ */ e(F, { as: "span", className: "text-sm", children: "Researching…" }),
|
|
209
|
+
/* @__PURE__ */ r("span", { className: l(
|
|
210
|
+
"ml-auto shrink-0 text-xs text-tertiary tabular-nums",
|
|
211
|
+
!h && "pe-6"
|
|
212
|
+
), children: [
|
|
197
213
|
/* @__PURE__ */ e("span", { className: "sr-only", children: "Elapsed " }),
|
|
198
214
|
n
|
|
199
215
|
] })
|
|
200
216
|
]
|
|
201
217
|
}
|
|
202
|
-
) : /* @__PURE__ */ e(
|
|
218
|
+
) : /* @__PURE__ */ e(M, { asChild: !0, children: /* @__PURE__ */ r(
|
|
203
219
|
"button",
|
|
204
220
|
{
|
|
205
|
-
ref:
|
|
221
|
+
ref: b,
|
|
206
222
|
type: "button",
|
|
207
223
|
"data-slot": "research-activity-trigger",
|
|
208
|
-
className:
|
|
224
|
+
className: l(
|
|
209
225
|
"group/research-trigger flex min-h-9 w-full cursor-pointer items-center gap-2 rounded-sm py-1 text-left text-sm outline-none",
|
|
210
226
|
"transition-[color,transform] duration-(--duration-fast) ease-out hover:text-primary active:scale-(--scale-press)",
|
|
211
227
|
"focus-visible:ring-3 focus-visible:ring-ring motion-reduce:transition-none",
|
|
212
|
-
|
|
228
|
+
p && "sticky z-10 bg-background",
|
|
229
|
+
p && (f ? "bottom-0" : "top-0"),
|
|
230
|
+
f && "order-last mt-3"
|
|
213
231
|
),
|
|
214
232
|
children: [
|
|
215
|
-
/* @__PURE__ */
|
|
216
|
-
|
|
233
|
+
/* @__PURE__ */ r("span", { className: "sr-only", children: [
|
|
234
|
+
g ? "Collapse" : "Expand",
|
|
217
235
|
" research activity:",
|
|
218
236
|
" "
|
|
219
237
|
] }),
|
|
220
|
-
/* @__PURE__ */ e(
|
|
221
|
-
/* @__PURE__ */ e("span", { className: "min-w-0 flex-1", children:
|
|
222
|
-
|
|
238
|
+
/* @__PURE__ */ e(V, { "aria-hidden": !0, className: "size-4 shrink-0" }),
|
|
239
|
+
/* @__PURE__ */ e("span", { className: "min-w-0 flex-1", children: x !== void 0 ? x : /* @__PURE__ */ e(
|
|
240
|
+
K,
|
|
223
241
|
{
|
|
224
242
|
elapsed: n,
|
|
225
|
-
firstInsight:
|
|
243
|
+
firstInsight: w,
|
|
226
244
|
sourceCount: d
|
|
227
245
|
}
|
|
228
246
|
) }),
|
|
229
|
-
/* @__PURE__ */ e(
|
|
230
|
-
|
|
247
|
+
h && /* @__PURE__ */ e(
|
|
248
|
+
B,
|
|
231
249
|
{
|
|
232
250
|
"aria-hidden": !0,
|
|
233
|
-
className:
|
|
251
|
+
className: l(
|
|
234
252
|
"size-4 shrink-0 text-tertiary transition-transform duration-(--duration-normal) ease-out motion-reduce:transition-none",
|
|
235
|
-
|
|
253
|
+
g && "rotate-180"
|
|
236
254
|
)
|
|
237
255
|
}
|
|
238
256
|
)
|
|
@@ -240,13 +258,13 @@ const ae = s.forwardRef(
|
|
|
240
258
|
}
|
|
241
259
|
) }),
|
|
242
260
|
/* @__PURE__ */ e(
|
|
243
|
-
|
|
261
|
+
ae,
|
|
244
262
|
{
|
|
245
|
-
ref:
|
|
263
|
+
ref: E,
|
|
246
264
|
forceMount: !0,
|
|
247
265
|
"data-slot": "research-activity-content",
|
|
248
266
|
className: "mt-3 overflow-hidden text-foreground outline-none data-[state=closed]:hidden",
|
|
249
|
-
children:
|
|
267
|
+
children: q
|
|
250
268
|
}
|
|
251
269
|
)
|
|
252
270
|
]
|
|
@@ -254,7 +272,7 @@ const ae = s.forwardRef(
|
|
|
254
272
|
);
|
|
255
273
|
}
|
|
256
274
|
);
|
|
257
|
-
|
|
275
|
+
ne.displayName = "ResearchActivity";
|
|
258
276
|
export {
|
|
259
|
-
|
|
277
|
+
ne as ResearchActivity
|
|
260
278
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ComponentProps } from 'react';
|
|
1
|
+
import { ComponentProps, ReactNode } from 'react';
|
|
2
2
|
import { Collapsible, CollapsibleContent, CollapsibleTrigger } from '../collapsible';
|
|
3
3
|
/**
|
|
4
4
|
* Task — a collapsible list of the steps an agent took to accomplish a goal
|
|
@@ -18,14 +18,18 @@ export declare const TaskItem: {
|
|
|
18
18
|
};
|
|
19
19
|
export type TaskProps = ComponentProps<typeof Collapsible>;
|
|
20
20
|
export declare const Task: {
|
|
21
|
-
({ defaultOpen, className, ...props }: TaskProps): import("react").JSX.Element;
|
|
21
|
+
({ defaultOpen, className, open, children, ...props }: TaskProps): import("react").JSX.Element;
|
|
22
22
|
displayName: string;
|
|
23
23
|
};
|
|
24
24
|
export type TaskTriggerProps = ComponentProps<typeof CollapsibleTrigger> & {
|
|
25
25
|
title: string;
|
|
26
|
+
/** Leading icon. Defaults to the search glyph. */
|
|
27
|
+
icon?: ReactNode;
|
|
28
|
+
/** Trailing metadata — counts, elapsed time. */
|
|
29
|
+
endContent?: ReactNode;
|
|
26
30
|
};
|
|
27
31
|
export declare const TaskTrigger: {
|
|
28
|
-
({ children, className, title, ...props }: TaskTriggerProps): import("react").JSX.Element;
|
|
32
|
+
({ children, className, title, icon, endContent, ...props }: TaskTriggerProps): import("react").JSX.Element;
|
|
29
33
|
displayName: string;
|
|
30
34
|
};
|
|
31
35
|
export type TaskContentProps = ComponentProps<typeof CollapsibleContent>;
|
|
@@ -1,73 +1,105 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
2
|
+
import { jsx as e, jsxs as o } from "react/jsx-runtime";
|
|
3
|
+
import { createContext as m, useContext as d } from "react";
|
|
4
|
+
import { motion as u } from "motion/react";
|
|
5
|
+
import { EASE_DISCLOSURE as p } from "../../lib/motion.js";
|
|
6
|
+
import { Collapsible as h, CollapsibleContent as f, CollapsibleTrigger as x } from "../collapsible.js";
|
|
7
|
+
import { Search as g, ChevronDown as N } from "../../lib/icons.js";
|
|
8
|
+
import { cn as i } from "../../lib/cn.js";
|
|
9
|
+
const l = m(!0), k = ({
|
|
10
|
+
children: t,
|
|
11
|
+
className: a,
|
|
9
12
|
...s
|
|
10
|
-
}) => /* @__PURE__ */
|
|
13
|
+
}) => /* @__PURE__ */ e(
|
|
11
14
|
"div",
|
|
12
15
|
{
|
|
13
|
-
className:
|
|
16
|
+
className: i(
|
|
14
17
|
"inline-flex items-center gap-1 rounded-md bg-fill px-1.5 py-0.5 text-xs text-fill-foreground",
|
|
15
|
-
|
|
18
|
+
a
|
|
16
19
|
),
|
|
17
20
|
...s,
|
|
18
|
-
children:
|
|
21
|
+
children: t
|
|
19
22
|
}
|
|
20
23
|
);
|
|
21
|
-
|
|
22
|
-
const
|
|
23
|
-
|
|
24
|
-
const
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
24
|
+
k.displayName = "TaskItemFile";
|
|
25
|
+
const v = ({ children: t, className: a, ...s }) => /* @__PURE__ */ e("div", { className: i("text-base text-secondary", a), ...s, children: t });
|
|
26
|
+
v.displayName = "TaskItem";
|
|
27
|
+
const T = ({
|
|
28
|
+
defaultOpen: t = !0,
|
|
29
|
+
className: a,
|
|
30
|
+
open: s,
|
|
31
|
+
children: n,
|
|
32
|
+
...r
|
|
33
|
+
}) => /* @__PURE__ */ e(
|
|
34
|
+
h,
|
|
35
|
+
{
|
|
36
|
+
className: i(a),
|
|
37
|
+
defaultOpen: t,
|
|
38
|
+
open: s,
|
|
39
|
+
...r,
|
|
40
|
+
children: /* @__PURE__ */ e(l.Provider, { value: s ?? t, children: n })
|
|
41
|
+
}
|
|
42
|
+
);
|
|
43
|
+
T.displayName = "Task";
|
|
44
|
+
const y = ({
|
|
45
|
+
children: t,
|
|
46
|
+
className: a,
|
|
29
47
|
title: s,
|
|
30
|
-
|
|
31
|
-
|
|
48
|
+
icon: n,
|
|
49
|
+
endContent: r,
|
|
50
|
+
...c
|
|
51
|
+
}) => /* @__PURE__ */ e(x, { asChild: !0, className: i("group", a), ...c, children: t ?? /* @__PURE__ */ o(
|
|
32
52
|
"button",
|
|
33
53
|
{
|
|
34
54
|
type: "button",
|
|
35
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",
|
|
36
56
|
children: [
|
|
37
|
-
/* @__PURE__ */
|
|
38
|
-
/* @__PURE__ */
|
|
39
|
-
/* @__PURE__ */
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
57
|
+
/* @__PURE__ */ e("span", { className: "flex size-4 shrink-0 items-center justify-center [&>svg]:size-4", "aria-hidden": !0, children: n ?? /* @__PURE__ */ e(g, { className: "size-4 shrink-0" }) }),
|
|
58
|
+
/* @__PURE__ */ e("span", { className: "text-base", children: s }),
|
|
59
|
+
/* @__PURE__ */ o("span", { className: "ml-auto flex shrink-0 items-center gap-2", children: [
|
|
60
|
+
r != null && /* @__PURE__ */ e("span", { className: "text-xs text-tertiary tabular-nums", children: r }),
|
|
61
|
+
/* @__PURE__ */ e(
|
|
62
|
+
N,
|
|
63
|
+
{
|
|
64
|
+
className: "size-4 shrink-0 transition-transform duration-(--duration-fast) ease-out group-data-[state=open]:rotate-180 motion-reduce:transition-none",
|
|
65
|
+
"aria-hidden": !0
|
|
66
|
+
}
|
|
67
|
+
)
|
|
68
|
+
] })
|
|
46
69
|
]
|
|
47
70
|
}
|
|
48
71
|
) });
|
|
49
|
-
|
|
50
|
-
const
|
|
51
|
-
children:
|
|
52
|
-
className:
|
|
72
|
+
y.displayName = "TaskTrigger";
|
|
73
|
+
const b = ({
|
|
74
|
+
children: t,
|
|
75
|
+
className: a,
|
|
53
76
|
...s
|
|
54
|
-
}) =>
|
|
55
|
-
l
|
|
56
|
-
{
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
77
|
+
}) => {
|
|
78
|
+
const n = d(l);
|
|
79
|
+
return /* @__PURE__ */ e(f, { forceMount: !0, asChild: !0, ...s, children: /* @__PURE__ */ e(
|
|
80
|
+
u.div,
|
|
81
|
+
{
|
|
82
|
+
initial: !1,
|
|
83
|
+
animate: n ? "open" : "closed",
|
|
84
|
+
variants: {
|
|
85
|
+
open: { height: "auto", opacity: 1 },
|
|
86
|
+
closed: { height: 0, opacity: 0 }
|
|
87
|
+
},
|
|
88
|
+
transition: { duration: n ? 0.28 : 0.2, ease: p },
|
|
89
|
+
className: i(
|
|
90
|
+
"overflow-hidden text-foreground outline-none",
|
|
91
|
+
"data-[state=closed]:pointer-events-none",
|
|
92
|
+
a
|
|
93
|
+
),
|
|
94
|
+
children: /* @__PURE__ */ e("div", { className: "mt-2 ml-2", children: t })
|
|
95
|
+
}
|
|
96
|
+
) });
|
|
97
|
+
};
|
|
98
|
+
b.displayName = "TaskContent";
|
|
67
99
|
export {
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
100
|
+
T as Task,
|
|
101
|
+
b as TaskContent,
|
|
102
|
+
v as TaskItem,
|
|
103
|
+
k as TaskItemFile,
|
|
104
|
+
y as TaskTrigger
|
|
73
105
|
};
|