@actioneer/ads 0.6.0 → 0.7.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 (112) hide show
  1. package/components/ai-elements/agent-trace.d.ts +2 -2
  2. package/components/ai-elements/agent-trace.js +163 -104
  3. package/components/ai-elements/chain-of-thought.d.ts +2 -2
  4. package/components/ai-elements/chain-of-thought.js +1 -1
  5. package/components/ai-elements/index.d.ts +0 -5
  6. package/components/ai-elements/inline-citation.js +1 -1
  7. package/components/alert.d.ts +6 -6
  8. package/components/alert.js +89 -53
  9. package/components/answer-sources.d.ts +2 -6
  10. package/components/answer-sources.js +58 -60
  11. package/components/answer.d.ts +5 -0
  12. package/components/answer.js +311 -271
  13. package/components/assistant-ui/composer-harness.js +15 -20
  14. package/components/assistant-ui/composer.d.ts +3 -1
  15. package/components/assistant-ui/composer.js +148 -144
  16. package/components/assistant-ui/index.d.ts +0 -3
  17. package/components/assistant-ui/thread-context.d.ts +3 -1
  18. package/components/assistant-ui/thread.js +50 -42
  19. package/components/avatar.js +42 -42
  20. package/components/badge.d.ts +5 -6
  21. package/components/badge.js +13 -76
  22. package/components/body-page-header.d.ts +15 -0
  23. package/components/body-page-header.js +24 -0
  24. package/components/brand-loader.d.ts +0 -3
  25. package/components/brand-loader.js +10 -32
  26. package/components/breadcrumbs.d.ts +0 -7
  27. package/components/breadcrumbs.js +54 -71
  28. package/components/button.d.ts +1 -1
  29. package/components/button.js +55 -49
  30. package/components/chart.js +298 -296
  31. package/components/chip.d.ts +13 -1
  32. package/components/chip.js +93 -80
  33. package/components/collection-header.d.ts +17 -0
  34. package/components/collection-header.js +31 -0
  35. package/components/connector-card.d.ts +6 -6
  36. package/components/connector-card.js +31 -32
  37. package/components/date-range-picker.d.ts +2 -1
  38. package/components/date-range-picker.js +158 -122
  39. package/components/drawer.d.ts +19 -3
  40. package/components/drawer.js +109 -100
  41. package/components/dropdown.d.ts +1 -2
  42. package/components/dropdown.js +88 -89
  43. package/components/field.js +39 -34
  44. package/components/file-dropzone.js +1 -1
  45. package/components/index.d.ts +4 -4
  46. package/components/index.js +499 -546
  47. package/components/infinite-canvas.js +24 -24
  48. package/components/input-field.d.ts +18 -3
  49. package/components/input-field.js +88 -72
  50. package/components/input.js +16 -15
  51. package/components/modal.d.ts +31 -3
  52. package/components/modal.js +243 -169
  53. package/components/number-field.js +45 -42
  54. package/components/page-body.d.ts +12 -0
  55. package/components/page-body.js +18 -0
  56. package/components/pagination.js +36 -36
  57. package/components/select.d.ts +21 -0
  58. package/components/select.js +189 -148
  59. package/components/setting-row.d.ts +6 -5
  60. package/components/setting-row.js +33 -32
  61. package/components/sidebar.d.ts +2 -0
  62. package/components/sidebar.js +165 -155
  63. package/components/skeleton.js +8 -7
  64. package/components/slider.js +1 -1
  65. package/components/surface-loader.d.ts +11 -0
  66. package/components/surface-loader.js +35 -0
  67. package/components/table.d.ts +16 -10
  68. package/components/table.js +426 -410
  69. package/components/tabs.d.ts +2 -0
  70. package/components/tabs.js +159 -294
  71. package/components/textarea.js +9 -9
  72. package/components/toast.d.ts +1 -1
  73. package/components/toast.js +181 -118
  74. package/components/tree.d.ts +5 -1
  75. package/components/tree.js +54 -49
  76. package/components/typography.d.ts +4 -4
  77. package/components/typography.js +13 -13
  78. package/components/ui/button.d.ts +1 -1
  79. package/components/ui/dialog.js +33 -33
  80. package/demo/components/add-to-artifact.js +6 -10
  81. package/lib/cn.js +11 -4
  82. package/lib/icons.d.ts +4 -0
  83. package/lib/icons.js +107 -106
  84. package/lib/interactive.d.ts +1 -1
  85. package/llms.txt +95 -152
  86. package/manifest.json +1628 -2729
  87. package/package.json +1 -2
  88. package/styles.css +347 -223
  89. package/theme.css +303 -177
  90. package/components/agent-icon.d.ts +0 -76
  91. package/components/agent-icon.js +0 -265
  92. package/components/ai-elements/queue.d.ts +0 -60
  93. package/components/ai-elements/queue.js +0 -193
  94. package/components/ai-elements/speech-input.d.ts +0 -16
  95. package/components/ai-elements/speech-input.js +0 -151
  96. package/components/ai-elements/task-progress.d.ts +0 -41
  97. package/components/ai-elements/task-progress.js +0 -224
  98. package/components/ai-elements/task.d.ts +0 -39
  99. package/components/ai-elements/task.js +0 -105
  100. package/components/ai-elements/voice.d.ts +0 -90
  101. package/components/ai-elements/voice.js +0 -496
  102. package/components/assistant-ui/follow-up-suggestions.d.ts +0 -11
  103. package/components/assistant-ui/follow-up-suggestions.js +0 -72
  104. package/components/assistant-ui/suggestions.d.ts +0 -7
  105. package/components/assistant-ui/suggestions.js +0 -19
  106. package/components/assistant-ui/voice.d.ts +0 -18
  107. package/components/link.d.ts +0 -14
  108. package/components/link.js +0 -72
  109. package/components/navbar.d.ts +0 -15
  110. package/components/navbar.js +0 -68
  111. package/components/pixel-icon.d.ts +0 -37
  112. package/components/pixel-icon.js +0 -859
@@ -1,151 +0,0 @@
1
- "use client";
2
- import { jsxs as J, jsx as f } from "react/jsx-runtime";
3
- import { useState as b, useRef as l, useEffect as Y, useCallback as I } from "react";
4
- import { Button as K } from "../button.js";
5
- import { Spinner as Q } from "../spinner.js";
6
- import { Stop as V, MicOff as W, Mic as X } from "../../lib/icons.js";
7
- import { cn as _ } from "../../lib/cn.js";
8
- const Z = () => window.SpeechRecognition ?? window.webkitSpeechRecognition, $ = () => typeof window > "u" ? "none" : "SpeechRecognition" in window || "webkitSpeechRecognition" in window ? "speech-recognition" : "MediaRecorder" in window && "mediaDevices" in navigator ? "media-recorder" : "none", ce = ({
9
- className: C,
10
- onTranscriptionChange: M,
11
- onAudioRecorded: R,
12
- onError: x,
13
- lang: D = "en-US",
14
- disabled: F,
15
- ...O
16
- }) => {
17
- const [s, d] = b(!1), [L, z] = b(!1), [o] = b($), [T, N] = b(!1), p = l(null), m = l(null), g = l(null), y = l([]), u = l(M), h = l(R), r = l(x);
18
- u.current = M, h.current = R, r.current = x, Y(() => {
19
- if (o !== "speech-recognition")
20
- return;
21
- const t = Z();
22
- if (!t)
23
- return;
24
- const e = new t();
25
- e.continuous = !0, e.interimResults = !0, e.lang = D;
26
- const c = () => d(!0), v = () => d(!1), w = (n) => {
27
- var A, G;
28
- const i = n;
29
- let a = "";
30
- for (let k = i.resultIndex; k < i.results.length; k += 1) {
31
- const P = i.results[k];
32
- P.isFinal && (a += ((A = P[0]) == null ? void 0 : A.transcript) ?? "");
33
- }
34
- a && ((G = u.current) == null || G.call(u, a));
35
- }, S = (n) => {
36
- var i;
37
- d(!1), (i = r.current) == null || i.call(r, n.error);
38
- };
39
- return e.addEventListener("start", c), e.addEventListener("end", v), e.addEventListener("result", w), e.addEventListener("error", S), p.current = e, N(!0), () => {
40
- e.removeEventListener("start", c), e.removeEventListener("end", v), e.removeEventListener("result", w), e.removeEventListener("error", S), e.stop(), p.current = null, N(!1);
41
- };
42
- }, [o, D]), Y(
43
- () => () => {
44
- var t;
45
- if (((t = m.current) == null ? void 0 : t.state) === "recording" && m.current.stop(), g.current)
46
- for (const e of g.current.getTracks())
47
- e.stop();
48
- },
49
- []
50
- );
51
- const j = I(async () => {
52
- var t;
53
- if (h.current)
54
- try {
55
- const e = await navigator.mediaDevices.getUserMedia({ audio: !0 });
56
- g.current = e;
57
- const c = new MediaRecorder(e);
58
- y.current = [];
59
- const v = (n) => {
60
- n.data.size > 0 && y.current.push(n.data);
61
- }, w = async () => {
62
- var i;
63
- for (const a of e.getTracks())
64
- a.stop();
65
- g.current = null;
66
- const n = new Blob(y.current, {
67
- type: "audio/webm"
68
- });
69
- if (n.size > 0 && h.current) {
70
- z(!0);
71
- try {
72
- const a = await h.current(n);
73
- a && ((i = u.current) == null || i.call(u, a));
74
- } catch {
75
- } finally {
76
- z(!1);
77
- }
78
- }
79
- }, S = () => {
80
- d(!1);
81
- for (const n of e.getTracks())
82
- n.stop();
83
- g.current = null;
84
- };
85
- c.addEventListener("dataavailable", v), c.addEventListener("stop", w), c.addEventListener("error", S), m.current = c, c.start(), d(!0);
86
- } catch (e) {
87
- d(!1), (t = r.current) == null || t.call(
88
- r,
89
- e instanceof Error ? e.name : "not-allowed"
90
- );
91
- }
92
- }, []), B = I(() => {
93
- var t;
94
- ((t = m.current) == null ? void 0 : t.state) === "recording" && m.current.stop(), d(!1);
95
- }, []), q = I(() => {
96
- var t;
97
- if (o === "speech-recognition" && p.current)
98
- if (s)
99
- p.current.stop();
100
- else
101
- try {
102
- p.current.start();
103
- } catch (e) {
104
- (t = r.current) == null || t.call(
105
- r,
106
- e instanceof Error ? e.name : "not-allowed"
107
- );
108
- }
109
- else o === "media-recorder" && (s ? B() : j());
110
- }, [o, s, j, B]), E = o === "none" || o === "media-recorder" && !R, H = F || E || o === "speech-recognition" && !T || L, U = L ? "Transcribing" : s ? "Stop recording" : E ? "Speech input not supported" : "Start recording";
111
- return /* @__PURE__ */ J("div", { className: "relative inline-flex items-center justify-center", children: [
112
- s && [
113
- "",
114
- "[animation-delay:200ms]",
115
- "[animation-delay:300ms]"
116
- ].map((t, e) => /* @__PURE__ */ f(
117
- "span",
118
- {
119
- "aria-hidden": !0,
120
- className: _(
121
- "absolute inset-0 animate-ping rounded-full bg-danger/20",
122
- "[animation-duration:1.5s] motion-reduce:hidden",
123
- t
124
- )
125
- },
126
- e
127
- )),
128
- /* @__PURE__ */ f(
129
- K,
130
- {
131
- "aria-label": U,
132
- "aria-pressed": s,
133
- className: _(
134
- "relative z-10 rounded-full",
135
- s && "bg-danger text-danger-foreground shadow-none hover:bg-danger/90 focus-visible:ring-danger/40",
136
- C
137
- ),
138
- disabled: H,
139
- size: "icon",
140
- title: U,
141
- variant: "secondary",
142
- ...O,
143
- onClick: q,
144
- children: L ? /* @__PURE__ */ f(Q, { variant: "action", size: "sm", "aria-hidden": !0 }) : s ? /* @__PURE__ */ f(V, {}) : E ? /* @__PURE__ */ f(W, {}) : /* @__PURE__ */ f(X, {})
145
- }
146
- )
147
- ] });
148
- };
149
- export {
150
- ce as SpeechInput
151
- };
@@ -1,41 +0,0 @@
1
- import { VariantProps } from 'class-variance-authority';
2
- import * as React from "react";
3
- export type TaskProgressStatus = "complete" | "active" | "pending";
4
- export interface TaskProgressStep {
5
- id: React.Key;
6
- label: React.ReactNode;
7
- /** Plain-text label used in live screen-reader announcements. */
8
- accessibilityLabel?: string;
9
- status: TaskProgressStatus;
10
- /** Consumer-formatted elapsed time for the active step, e.g. `0:36`. */
11
- elapsed?: string;
12
- }
13
- declare const taskProgressVariants: (props?: ({
14
- isSticky?: boolean | null | undefined;
15
- } & import('class-variance-authority/types').ClassProp) | undefined) => string;
16
- declare const taskProgressDockVariants: (props?: ({
17
- isSticky?: boolean | null | undefined;
18
- } & import('class-variance-authority/types').ClassProp) | undefined) => string;
19
- export interface TaskProgressDockProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof taskProgressDockVariants> {
20
- }
21
- /**
22
- * Pins TaskProgress directly above an existing chat composer and removes the
23
- * seam between the two surfaces. Pass the real ADS Composer as the next child.
24
- */
25
- export declare const TaskProgressDock: React.ForwardRefExoticComponent<TaskProgressDockProps & React.RefAttributes<HTMLDivElement>>;
26
- export interface TaskProgressProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "children">, VariantProps<typeof taskProgressVariants> {
27
- steps: readonly TaskProgressStep[];
28
- /** Controlled expanded state. */
29
- open?: boolean;
30
- /** Initial expanded state when uncontrolled. */
31
- defaultOpen?: boolean;
32
- onOpenChange?: (open: boolean) => void;
33
- /** Expanded header label. */
34
- title?: string;
35
- /** Optional collapsed-label override. Defaults to the active/latest step. */
36
- summary?: React.ReactNode;
37
- /** Collapsed label when no steps exist. */
38
- emptyLabel?: React.ReactNode;
39
- }
40
- export declare const TaskProgress: React.ForwardRefExoticComponent<TaskProgressProps & React.RefAttributes<HTMLDivElement>>;
41
- export {};
@@ -1,224 +0,0 @@
1
- "use client";
2
- import { jsx as t, jsxs as n, Fragment as q } from "react/jsx-runtime";
3
- import * as i from "react";
4
- import { cva as C } from "class-variance-authority";
5
- import { Collapsible as B, CollapsibleTrigger as G, CollapsibleContent as H } from "../collapsible.js";
6
- import { Spinner as J } from "../spinner.js";
7
- import { ChevronDown as K, Check as M, Clock as Q } from "../../lib/icons.js";
8
- import { cn as l } from "../../lib/cn.js";
9
- const U = C(
10
- "w-full overflow-hidden rounded-2xl bg-card text-foreground before:pointer-events-none before:absolute before:inset-0 before:rounded-[inherit] before:bg-[linear-gradient(to_bottom,var(--border-strong)_0%,transparent_100%)] before:p-px before:content-[''] before:[mask:linear-gradient(var(--foreground)_0_0)_content-box,linear-gradient(var(--foreground)_0_0)] before:[mask-composite:exclude]!",
11
- {
12
- variants: {
13
- isSticky: {
14
- true: "sticky top-0 z-20",
15
- false: "relative"
16
- }
17
- },
18
- defaultVariants: {
19
- isSticky: !0
20
- }
21
- }
22
- ), X = C(
23
- // The composer must sit flush under the progress bar: kill its standalone
24
- // entrance animation (a mid-flight slide-in reads as a gap between the two
25
- // surfaces) and square the shell's top corners to butt-joint the bar.
26
- "flex w-full flex-col rounded-2xl bg-transparent [&_.aui-composer-root]:relative [&_.aui-composer-root]:z-10 [&_.aui-composer-root]:-mt-px [&_.aui-composer-root]:animate-none [&_.aui-composer-root>*:first-child]:rounded-t-none",
27
- {
28
- variants: {
29
- isSticky: {
30
- true: "sticky bottom-0 z-20",
31
- false: "relative"
32
- }
33
- },
34
- defaultVariants: {
35
- isSticky: !0
36
- }
37
- }
38
- ), w = i.createContext(!1), Y = i.forwardRef(({ className: a, isSticky: r, ...d }, f) => /* @__PURE__ */ t(w.Provider, { value: !0, children: /* @__PURE__ */ t(
39
- "div",
40
- {
41
- ref: f,
42
- "data-slot": "task-progress-dock",
43
- className: l(X({ isSticky: r }), a),
44
- ...d
45
- }
46
- ) }));
47
- Y.displayName = "TaskProgressDock";
48
- function y({ status: a }) {
49
- return /* @__PURE__ */ n(
50
- "span",
51
- {
52
- "aria-hidden": !0,
53
- className: l(
54
- "flex size-5 shrink-0 items-center justify-center",
55
- a === "complete" && "text-success",
56
- a === "active" && "text-info",
57
- a === "pending" && "text-tertiary"
58
- ),
59
- children: [
60
- a === "complete" && /* @__PURE__ */ t(M, { className: "size-4", strokeWidth: 2 }),
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
- ),
71
- a === "pending" && /* @__PURE__ */ t(Q, { className: "size-4" })
72
- ]
73
- }
74
- );
75
- }
76
- const Z = {
77
- complete: "Complete",
78
- active: "In progress",
79
- pending: "Pending"
80
- };
81
- function N({ elapsed: a }) {
82
- return a ? /* @__PURE__ */ n("span", { className: "flex shrink-0 items-center gap-3 text-xs text-tertiary tabular-nums", children: [
83
- /* @__PURE__ */ t("span", { "aria-hidden": !0, className: "h-4 w-px bg-border" }),
84
- /* @__PURE__ */ t("span", { "aria-label": `Elapsed ${a}`, children: a })
85
- ] }) : null;
86
- }
87
- const O = i.forwardRef(
88
- ({
89
- className: a,
90
- steps: r,
91
- open: d,
92
- defaultOpen: f = !1,
93
- onOpenChange: u,
94
- title: c = "Task progress",
95
- summary: _,
96
- emptyLabel: I = "No task steps",
97
- isSticky: P,
98
- role: T,
99
- "aria-label": $,
100
- "aria-busy": z,
101
- ...D
102
- }, S) => {
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(
104
- (e, F, W) => F.status === "complete" ? W : e,
105
- -1
106
- ), E = r.findIndex(
107
- (e) => e.status === "pending"
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(
109
- (e) => e.status === "pending"
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(
111
- (e) => {
112
- x || j(e), u == null || u(e);
113
- },
114
- [x, u]
115
- );
116
- return /* @__PURE__ */ n(
117
- B,
118
- {
119
- ref: S,
120
- open: m,
121
- onOpenChange: L,
122
- role: T ?? "group",
123
- "aria-label": $ ?? c,
124
- "aria-busy": z ?? (o >= 0 || void 0),
125
- ...D,
126
- "data-slot": "task-progress",
127
- "data-status": A,
128
- className: l(
129
- U({ isSticky: g ? !1 : P }),
130
- g && "rounded-b-none",
131
- a
132
- ),
133
- children: [
134
- /* @__PURE__ */ t(
135
- "span",
136
- {
137
- className: "sr-only",
138
- role: "progressbar",
139
- "aria-label": c,
140
- "aria-valuemin": 0,
141
- "aria-valuemax": r.length,
142
- "aria-valuenow": b
143
- }
144
- ),
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.` }),
146
- /* @__PURE__ */ t(G, { asChild: !0, children: /* @__PURE__ */ n(
147
- "button",
148
- {
149
- type: "button",
150
- "aria-label": m ? `Collapse ${c}` : `Expand ${c}`,
151
- className: l(
152
- "flex min-h-14 w-full items-center gap-3 px-4 text-left sm:px-5",
153
- "rounded-t-2xl rounded-b-sm outline-none focus-visible:ring-3 focus-visible:ring-inset focus-visible:ring-ring",
154
- "transition-[color,transform] duration-150 ease-out active:scale-[0.97] motion-reduce:transition-none"
155
- ),
156
- children: [
157
- m ? /* @__PURE__ */ t("span", { className: "min-w-0 flex-1 truncate text-base font-medium text-secondary", children: c }) : /* @__PURE__ */ n(q, { children: [
158
- /* @__PURE__ */ t(y, { status: (s == null ? void 0 : s.status) ?? "pending" }),
159
- /* @__PURE__ */ t("span", { className: "min-w-0 flex-1 truncate text-base text-primary", children: _ ?? (s == null ? void 0 : s.label) ?? I }),
160
- (s == null ? void 0 : s.status) === "active" && /* @__PURE__ */ t(N, { elapsed: s.elapsed })
161
- ] }),
162
- /* @__PURE__ */ n(
163
- "span",
164
- {
165
- "aria-hidden": !0,
166
- className: "shrink-0 text-xs font-medium text-tertiary tabular-nums",
167
- children: [
168
- b,
169
- " / ",
170
- r.length
171
- ]
172
- }
173
- ),
174
- /* @__PURE__ */ t(
175
- K,
176
- {
177
- "aria-hidden": !0,
178
- className: l(
179
- "size-4 shrink-0 text-tertiary",
180
- m && "rotate-180"
181
- )
182
- }
183
- )
184
- ]
185
- }
186
- ) }),
187
- /* @__PURE__ */ t(H, { className: "outline-none", children: /* @__PURE__ */ t(
188
- "ol",
189
- {
190
- "aria-label": "Task steps",
191
- tabIndex: 0,
192
- className: "max-h-64 space-y-1 overflow-y-auto px-4 pb-4 sm:px-5",
193
- children: r.map((e) => /* @__PURE__ */ n(
194
- "li",
195
- {
196
- "data-status": e.status,
197
- className: l(
198
- "flex min-h-8 items-center gap-3 text-base",
199
- e.status === "pending" ? "text-tertiary" : "text-primary"
200
- ),
201
- children: [
202
- /* @__PURE__ */ n("span", { className: "sr-only", children: [
203
- Z[e.status],
204
- ": "
205
- ] }),
206
- /* @__PURE__ */ t(y, { status: e.status }),
207
- /* @__PURE__ */ t("span", { className: "min-w-0 flex-1 truncate", children: e.label }),
208
- e.status === "active" && /* @__PURE__ */ t(N, { elapsed: e.elapsed })
209
- ]
210
- },
211
- e.id
212
- ))
213
- }
214
- ) })
215
- ]
216
- }
217
- );
218
- }
219
- );
220
- O.displayName = "TaskProgress";
221
- export {
222
- O as TaskProgress,
223
- Y as TaskProgressDock
224
- };
@@ -1,39 +0,0 @@
1
- import { ComponentProps, ReactNode } from 'react';
2
- import { Collapsible, CollapsibleContent, CollapsibleTrigger } from '../collapsible';
3
- /**
4
- * Task — a collapsible list of the steps an agent took to accomplish a goal
5
- * (files searched, files read, scans run). An ADS-native port of the Vercel AI
6
- * Elements `Task` component; the public API mirrors upstream 1:1.
7
- */
8
- export type TaskItemFileProps = ComponentProps<"div">;
9
- /** An inline file/artifact pill inside a {@link TaskItem}. */
10
- export declare const TaskItemFile: {
11
- ({ children, className, ...props }: TaskItemFileProps): import("react").JSX.Element;
12
- displayName: string;
13
- };
14
- export type TaskItemProps = ComponentProps<"div">;
15
- export declare const TaskItem: {
16
- ({ children, className, ...props }: TaskItemProps): import("react").JSX.Element;
17
- displayName: string;
18
- };
19
- export type TaskProps = ComponentProps<typeof Collapsible>;
20
- export declare const Task: {
21
- ({ defaultOpen, className, open, children, ...props }: TaskProps): import("react").JSX.Element;
22
- displayName: string;
23
- };
24
- export type TaskTriggerProps = ComponentProps<typeof CollapsibleTrigger> & {
25
- title: string;
26
- /** Leading icon. Defaults to the search glyph. */
27
- icon?: ReactNode;
28
- /** Trailing metadata — counts, elapsed time. */
29
- endContent?: ReactNode;
30
- };
31
- export declare const TaskTrigger: {
32
- ({ children, className, title, icon, endContent, ...props }: TaskTriggerProps): import("react").JSX.Element;
33
- displayName: string;
34
- };
35
- export type TaskContentProps = ComponentProps<typeof CollapsibleContent>;
36
- export declare const TaskContent: {
37
- ({ children, className, ...props }: TaskContentProps): import("react").JSX.Element;
38
- displayName: string;
39
- };
@@ -1,105 +0,0 @@
1
- "use client";
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 p } from "motion/react";
5
- import { springDisclosure as u } from "../../lib/motion.js";
6
- import { Collapsible as h, CollapsibleContent as x, CollapsibleTrigger as f } from "../collapsible.js";
7
- import { Search as g, ChevronDown as N } from "../../lib/icons.js";
8
- import { cn as n } from "../../lib/cn.js";
9
- const l = m(!0), k = ({
10
- children: t,
11
- className: a,
12
- ...s
13
- }) => /* @__PURE__ */ e(
14
- "div",
15
- {
16
- className: n(
17
- "inline-flex items-center gap-1 rounded-md bg-fill px-1.5 py-0.5 text-xs text-fill-foreground",
18
- a
19
- ),
20
- ...s,
21
- children: t
22
- }
23
- );
24
- k.displayName = "TaskItemFile";
25
- const v = ({ children: t, className: a, ...s }) => /* @__PURE__ */ e("div", { className: n("text-base text-secondary", a), ...s, children: t });
26
- v.displayName = "TaskItem";
27
- const y = ({
28
- defaultOpen: t = !0,
29
- className: a,
30
- open: s,
31
- children: i,
32
- ...r
33
- }) => /* @__PURE__ */ e(
34
- h,
35
- {
36
- className: n(a),
37
- defaultOpen: t,
38
- open: s,
39
- ...r,
40
- children: /* @__PURE__ */ e(l.Provider, { value: s ?? t, children: i })
41
- }
42
- );
43
- y.displayName = "Task";
44
- const T = ({
45
- children: t,
46
- className: a,
47
- title: s,
48
- icon: i,
49
- endContent: r,
50
- ...c
51
- }) => /* @__PURE__ */ e(f, { asChild: !0, className: n("group", a), ...c, children: t ?? /* @__PURE__ */ o(
52
- "button",
53
- {
54
- type: "button",
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
- 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
- /* @__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-150 ease-out group-data-[state=open]:rotate-180 motion-reduce:transition-none",
65
- "aria-hidden": !0
66
- }
67
- )
68
- ] })
69
- ]
70
- }
71
- ) });
72
- T.displayName = "TaskTrigger";
73
- const b = ({
74
- children: t,
75
- className: a,
76
- ...s
77
- }) => {
78
- const i = d(l);
79
- return /* @__PURE__ */ e(x, { forceMount: !0, asChild: !0, ...s, children: /* @__PURE__ */ e(
80
- p.div,
81
- {
82
- initial: !1,
83
- animate: i ? "open" : "closed",
84
- variants: {
85
- open: { height: "auto", opacity: 1 },
86
- closed: { height: 0, opacity: 0 }
87
- },
88
- transition: u,
89
- className: n(
90
- "overflow-hidden text-secondary outline-none",
91
- "data-[state=closed]:pointer-events-none",
92
- a
93
- ),
94
- children: /* @__PURE__ */ e("div", { className: "mt-2 ml-2 [--tree-rail-lead:9px]", children: t })
95
- }
96
- ) });
97
- };
98
- b.displayName = "TaskContent";
99
- export {
100
- y as Task,
101
- b as TaskContent,
102
- v as TaskItem,
103
- k as TaskItemFile,
104
- T as TaskTrigger
105
- };
@@ -1,90 +0,0 @@
1
- import * as React from "react";
2
- /**
3
- * Voice — the ADS voice orb and its session controls.
4
- *
5
- * `Voice` renders one volume-reactive WebGL orb, driven entirely by props so
6
- * consumers keep a transport-neutral integration surface. Its colourway is set
7
- * by `palette`; every palette is chromatic — the orb never renders greyscale —
8
- * and an optional `seed` gives each agent/voice a distinct hue through the
9
- * `identity` palette, so a list of voices reads as distinct rather than repeated.
10
- *
11
- * The controls (VoiceControl + friends) are standalone and props-driven — no
12
- * assistant-ui runtime — so they compose with any transport.
13
- *
14
- * Reduced motion: the shader freezes its noise field and drops volume
15
- * reactivity, keeping the static coloured orb.
16
- */
17
- export type VoiceState = "idle" | "connecting" | "listening" | "thinking" | "speaking" | "muted" | "asleep";
18
- /** The orb is the sole visual; `variant` is retained for API stability. */
19
- export type VoiceVariant = "orb";
20
- export declare const VOICE_PALETTES: readonly ["default", "identity", "blue", "violet", "emerald", "sunset"];
21
- export type VoicePalette = (typeof VOICE_PALETTES)[number];
22
- /** Backwards-compatible name for the palette type originally used by Orb. */
23
- export type VoiceOrbPalette = VoicePalette;
24
- export declare const VOICE_VARIANTS: readonly ["orb"];
25
- export declare const VOICE_STATES: readonly ["idle", "connecting", "listening", "thinking", "speaking", "muted", "asleep"];
26
- export interface VoiceProps extends React.HTMLAttributes<HTMLDivElement> {
27
- /** Reactive animation state. */
28
- state?: VoiceState;
29
- /** Visualizer style. The orb is the only visual. */
30
- variant?: VoiceVariant;
31
- className?: string;
32
- /** Normalized audio energy 0–1. Default 0. */
33
- volume?: number;
34
- /** Shader colorway. Every palette is chromatic. Default "default". */
35
- palette?: VoiceOrbPalette;
36
- /**
37
- * Optional identity. With `palette="identity"`, the seed becomes a distinct
38
- * hue per subject, so a list of agents/voices reads as distinct rather than
39
- * repeated. Omit for the generic orb.
40
- */
41
- seed?: string | number;
42
- /**
43
- * Fill the box. By default the orb disc occupies ~42% of its box (a legacy
44
- * proportion left from when a glow halo filled the surround); at avatar sizes
45
- * that leaves the disc tiny inside empty padding. Set `fill` so the disc
46
- * fills its box — the correct choice for any small/avatar-sized orb.
47
- */
48
- fill?: boolean;
49
- /** Fired once on mount (API parity with the old Persona `onReady`). */
50
- onReady?: () => void;
51
- "aria-label"?: string;
52
- }
53
- export declare const Voice: React.ForwardRefExoticComponent<VoiceProps & React.RefAttributes<HTMLDivElement>>;
54
- export interface VoiceStatusDotProps {
55
- /** The session state the dot reflects. */
56
- state?: VoiceState;
57
- className?: string;
58
- }
59
- export declare function VoiceStatusDot({ state, className }: VoiceStatusDotProps): React.JSX.Element;
60
- export interface VoiceConnectButtonProps {
61
- onConnect?: () => void;
62
- disabled?: boolean;
63
- className?: string;
64
- }
65
- export declare function VoiceConnectButton({ onConnect, disabled, className, }: VoiceConnectButtonProps): React.JSX.Element;
66
- export interface VoiceMuteButtonProps {
67
- isMuted?: boolean;
68
- onMute?: () => void;
69
- onUnmute?: () => void;
70
- disabled?: boolean;
71
- className?: string;
72
- }
73
- export declare function VoiceMuteButton({ isMuted, onMute, onUnmute, disabled, className, }: VoiceMuteButtonProps): React.JSX.Element;
74
- export interface VoiceDisconnectButtonProps {
75
- onDisconnect?: () => void;
76
- disabled?: boolean;
77
- className?: string;
78
- }
79
- export declare function VoiceDisconnectButton({ onDisconnect, disabled, className, }: VoiceDisconnectButtonProps): React.JSX.Element;
80
- export interface VoiceControlProps {
81
- /** Session status. */
82
- status: "ended" | "starting" | "running";
83
- isMuted?: boolean;
84
- onConnect?: () => void;
85
- onMute?: () => void;
86
- onUnmute?: () => void;
87
- onDisconnect?: () => void;
88
- className?: string;
89
- }
90
- export declare function VoiceControl({ status, isMuted, onConnect, onMute, onUnmute, onDisconnect, className, }: VoiceControlProps): React.JSX.Element;