@actioneer/ads 0.3.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/components/ai-elements/agent-trace.d.ts +87 -0
  2. package/components/ai-elements/agent-trace.js +180 -0
  3. package/components/ai-elements/chain-of-thought.d.ts +25 -5
  4. package/components/ai-elements/chain-of-thought.js +227 -183
  5. package/components/ai-elements/index.d.ts +1 -0
  6. package/components/ai-elements/research-activity.d.ts +17 -0
  7. package/components/ai-elements/research-activity.js +125 -107
  8. package/components/ai-elements/task.d.ts +7 -3
  9. package/components/ai-elements/task.js +84 -52
  10. package/components/ai-elements/tool.js +19 -19
  11. package/components/ai-elements/voice.d.ts +28 -12
  12. package/components/ai-elements/voice.js +270 -649
  13. package/components/alert.js +28 -16
  14. package/components/assistant-ui/composer-harness.js +5 -4
  15. package/components/code-block.d.ts +11 -5
  16. package/components/code-block.js +161 -62
  17. package/components/index.js +259 -257
  18. package/components/scroll-area.js +10 -10
  19. package/components/sidebar.js +1 -1
  20. package/components/stepper.d.ts +17 -9
  21. package/components/stepper.js +85 -96
  22. package/lib/icons.js +2 -2
  23. package/lib/motion.d.ts +2 -0
  24. package/lib/motion.js +21 -20
  25. package/llms.txt +7 -1
  26. package/manifest.json +69 -6
  27. package/package.json +1 -1
  28. package/styles.css +110 -4
  29. package/theme.css +12 -4
  30. package/components/agents-ui/agent-audio-visualizer-aura.d.ts +0 -11
  31. package/components/agents-ui/agent-audio-visualizer-aura.js +0 -277
  32. package/components/agents-ui/agent-audio-visualizer-wave.d.ts +0 -12
  33. package/components/agents-ui/agent-audio-visualizer-wave.js +0 -203
  34. package/components/agents-ui/react-shader-toy.d.ts +0 -87
  35. package/components/agents-ui/react-shader-toy.js +0 -531
@@ -1,22 +1,22 @@
1
1
  "use client";
2
- import { jsxs as t, jsx as e, Fragment as K } from "react/jsx-runtime";
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 Y, AnimatePresence as Z, motion as C } from "motion/react";
5
- import { cva as I } from "class-variance-authority";
6
- import { Collapsible as O, CollapsibleTrigger as j, CollapsibleContent as ee } from "../collapsible.js";
7
- import { Spinner as L } from "../spinner.js";
8
- import { Sparkles as M, ChevronDown as T } from "../../lib/icons.js";
9
- import { EASE_OUT as V } from "../../lib/motion.js";
10
- import { cn as m } from "../../lib/cn.js";
11
- import { Shimmer as D } from "./shimmer.js";
12
- const re = I("w-full", {
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
- }), te = {
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: V }
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: V }
35
+ transition: { duration: 0.12, ease: D }
36
36
  }
37
37
  };
38
- function F({
39
- elapsed: r,
38
+ function K({
39
+ elapsed: t,
40
40
  firstInsight: n,
41
41
  sourceCount: d
42
42
  }) {
43
- return /* @__PURE__ */ t("span", { className: "flex min-w-0 flex-wrap items-baseline gap-x-2 gap-y-1", children: [
44
- /* @__PURE__ */ t("span", { children: [
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: r }),
52
- n != null && /* @__PURE__ */ t(K, { children: [
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__ */ t("span", { className: "text-xs text-tertiary", children: [
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 ae = s.forwardRef(
62
+ const ne = s.forwardRef(
63
63
  ({
64
- status: r,
64
+ status: t,
65
65
  elapsed: n,
66
66
  sourceCount: d,
67
- firstInsight: N,
68
- sticky: b = !1,
69
- activity: o,
70
- activityKey: P,
71
- stepIndex: g,
72
- stepCount: R,
73
- summary: f,
74
- open: w,
75
- defaultOpen: U = !1,
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: q,
80
- "aria-label": B,
81
- "aria-busy": G,
82
- ...H
83
- }, J) => {
84
- const c = w !== void 0, i = o != null, [Q, p] = s.useState(
85
- !i && r === "active" || U
86
- ), k = s.useRef(r), h = s.useRef(!1), S = s.useRef(null), x = s.useRef(null), y = c ? w : Q, v = !i && r === "active" || y;
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 E, A;
89
- const u = k.current;
90
- if (k.current = r, r === "active") {
91
- u !== "active" && (h.current = !1), u !== "active" && !i && !c && p(!0);
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" || h.current && i) return;
95
- const z = document.activeElement;
96
- z && ((E = S.current) != null && E.contains(z)) && ((A = x.current) == null || A.focus()), c || p(!1), a == null || a(!1);
97
- }, [i, c, a, r]);
98
- const W = s.useCallback(
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 && r !== "complete" || (h.current = !0, c || p(u), a == null || a(u));
102
+ !i && t !== "complete" || (N.current = !0, m || y(u), a == null || a(u));
101
103
  },
102
- [i, c, a, r]
103
- ), l = r === "active", X = l ? `activity-${P ?? (typeof o == "string" ? o : "current")}` : "summary";
104
- return /* @__PURE__ */ t(
105
- O,
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: J,
109
+ ref: X,
108
110
  open: v,
109
- onOpenChange: W,
110
- role: q ?? "region",
111
- "aria-label": B ?? "Research activity",
112
- "aria-busy": G ?? (l || void 0),
113
- ...H,
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": r,
116
- className: m(re({ status: r }), $),
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: l ? "Research in progress" : "Research complete" }),
119
- i ? /* @__PURE__ */ e(j, { asChild: !0, children: /* @__PURE__ */ t(
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: x,
128
+ ref: b,
123
129
  type: "button",
124
130
  "data-slot": "research-activity-trigger",
125
- className: m(
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
- b && "sticky top-0 z-10 bg-background"
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__ */ t("span", { className: "sr-only", children: [
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: l ? /* @__PURE__ */ e(L, { size: "sm", color: "current", role: "presentation" }) : /* @__PURE__ */ e(M, { className: "size-4" }) }),
138
- /* @__PURE__ */ e(Y, { reducedMotion: "user", children: /* @__PURE__ */ e("span", { className: "relative h-5 min-w-0 flex-1 overflow-hidden", children: /* @__PURE__ */ e(Z, { initial: !1, children: /* @__PURE__ */ e(
139
- C.span,
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: te,
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: l ? typeof o == "string" ? /* @__PURE__ */ e(D, { as: "span", className: "truncate text-sm", children: o }) : o : f !== void 0 ? f : /* @__PURE__ */ e(
147
- F,
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: N,
158
+ firstInsight: w,
151
159
  sourceCount: d
152
160
  }
153
161
  )
154
162
  },
155
- X
163
+ C
156
164
  ) }) }) }),
157
- l && /* @__PURE__ */ t("span", { className: "shrink-0 text-xs text-tertiary tabular-nums", children: [
158
- g != null && R != null && /* @__PURE__ */ t(K, { children: [
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
- T,
181
+ h && /* @__PURE__ */ e(
182
+ B,
170
183
  {
171
184
  "aria-hidden": !0,
172
- className: m(
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
- ) }) : l ? /* @__PURE__ */ t(
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
- L,
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(D, { as: "span", className: "text-sm", children: "Researching…" }),
196
- /* @__PURE__ */ t("span", { className: "ml-auto shrink-0 text-xs text-tertiary tabular-nums", children: [
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(j, { asChild: !0, children: /* @__PURE__ */ t(
218
+ ) : /* @__PURE__ */ e(M, { asChild: !0, children: /* @__PURE__ */ r(
203
219
  "button",
204
220
  {
205
- ref: x,
221
+ ref: b,
206
222
  type: "button",
207
223
  "data-slot": "research-activity-trigger",
208
- className: m(
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
- b && "sticky top-0 z-10 bg-background"
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__ */ t("span", { className: "sr-only", children: [
216
- y ? "Collapse" : "Expand",
233
+ /* @__PURE__ */ r("span", { className: "sr-only", children: [
234
+ g ? "Collapse" : "Expand",
217
235
  " research activity:",
218
236
  " "
219
237
  ] }),
220
- /* @__PURE__ */ e(M, { "aria-hidden": !0, className: "size-4 shrink-0" }),
221
- /* @__PURE__ */ e("span", { className: "min-w-0 flex-1", children: f !== void 0 ? f : /* @__PURE__ */ e(
222
- F,
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: N,
243
+ firstInsight: w,
226
244
  sourceCount: d
227
245
  }
228
246
  ) }),
229
- /* @__PURE__ */ e(
230
- T,
247
+ h && /* @__PURE__ */ e(
248
+ B,
231
249
  {
232
250
  "aria-hidden": !0,
233
- className: m(
251
+ className: l(
234
252
  "size-4 shrink-0 text-tertiary transition-transform duration-(--duration-normal) ease-out motion-reduce:transition-none",
235
- y && "rotate-180"
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
- ee,
261
+ ae,
244
262
  {
245
- ref: S,
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
- ae.displayName = "ResearchActivity";
275
+ ne.displayName = "ResearchActivity";
258
276
  export {
259
- ae as ResearchActivity
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 a, jsxs as r } from "react/jsx-runtime";
3
- import { Collapsible as i, CollapsibleContent as l, CollapsibleTrigger as d } from "../collapsible.js";
4
- import { Search as m, ChevronDown as c } from "../../lib/icons.js";
5
- import { cn as o } from "../../lib/cn.js";
6
- const p = ({
7
- children: e,
8
- className: t,
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__ */ a(
13
+ }) => /* @__PURE__ */ e(
11
14
  "div",
12
15
  {
13
- className: o(
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
- t
18
+ a
16
19
  ),
17
20
  ...s,
18
- children: e
21
+ children: t
19
22
  }
20
23
  );
21
- p.displayName = "TaskItemFile";
22
- const u = ({ children: e, className: t, ...s }) => /* @__PURE__ */ a("div", { className: o("text-base text-secondary", t), ...s, children: e });
23
- u.displayName = "TaskItem";
24
- const f = ({ defaultOpen: e = !0, className: t, ...s }) => /* @__PURE__ */ a(i, { className: o(t), defaultOpen: e, ...s });
25
- f.displayName = "Task";
26
- const g = ({
27
- children: e,
28
- className: t,
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
- ...n
31
- }) => /* @__PURE__ */ a(d, { asChild: !0, className: o("group", t), ...n, children: e ?? /* @__PURE__ */ r(
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__ */ a(m, { className: "size-4 shrink-0", "aria-hidden": !0 }),
38
- /* @__PURE__ */ a("span", { className: "text-base", children: s }),
39
- /* @__PURE__ */ a(
40
- c,
41
- {
42
- className: "size-4 shrink-0 transition-transform duration-(--duration-fast) ease-out group-data-[state=open]:rotate-180 motion-reduce:transition-none",
43
- "aria-hidden": !0
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
- g.displayName = "TaskTrigger";
50
- const x = ({
51
- children: e,
52
- className: t,
72
+ y.displayName = "TaskTrigger";
73
+ const b = ({
74
+ children: t,
75
+ className: a,
53
76
  ...s
54
- }) => /* @__PURE__ */ a(
55
- l,
56
- {
57
- className: o(
58
- "overflow-hidden text-foreground outline-none",
59
- "data-[state=closed]:pointer-events-none",
60
- t
61
- ),
62
- ...s,
63
- children: /* @__PURE__ */ a("div", { className: "mt-4 space-y-2 border-l-2 border-border pl-4", children: e })
64
- }
65
- );
66
- x.displayName = "TaskContent";
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
- f as Task,
69
- x as TaskContent,
70
- u as TaskItem,
71
- p as TaskItemFile,
72
- g as TaskTrigger
100
+ T as Task,
101
+ b as TaskContent,
102
+ v as TaskItem,
103
+ k as TaskItemFile,
104
+ y as TaskTrigger
73
105
  };