@actioneer/ads 0.1.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.
- package/LICENSE +21 -0
- package/bin/ads-init.mjs +314 -0
- package/components/accordion.d.ts +13 -0
- package/components/accordion.js +91 -0
- package/components/agents-ui/agent-audio-visualizer-aura.d.ts +11 -0
- package/components/agents-ui/agent-audio-visualizer-aura.js +277 -0
- package/components/agents-ui/agent-audio-visualizer-wave.d.ts +12 -0
- package/components/agents-ui/agent-audio-visualizer-wave.js +203 -0
- package/components/agents-ui/react-shader-toy.d.ts +87 -0
- package/components/agents-ui/react-shader-toy.js +531 -0
- package/components/ai-elements/chain-of-thought.d.ts +30 -0
- package/components/ai-elements/chain-of-thought.js +182 -0
- package/components/ai-elements/index.d.ts +11 -0
- package/components/ai-elements/inline-citation.d.ts +44 -0
- package/components/ai-elements/inline-citation.js +314 -0
- package/components/ai-elements/message.d.ts +96 -0
- package/components/ai-elements/message.js +308 -0
- package/components/ai-elements/queue.d.ts +60 -0
- package/components/ai-elements/queue.js +193 -0
- package/components/ai-elements/reasoning.d.ts +26 -0
- package/components/ai-elements/reasoning.js +131 -0
- package/components/ai-elements/shimmer.d.ts +25 -0
- package/components/ai-elements/shimmer.js +44 -0
- package/components/ai-elements/speech-input.d.ts +16 -0
- package/components/ai-elements/speech-input.js +151 -0
- package/components/ai-elements/task-progress.d.ts +41 -0
- package/components/ai-elements/task-progress.js +211 -0
- package/components/ai-elements/task.d.ts +35 -0
- package/components/ai-elements/task.js +73 -0
- package/components/ai-elements/tool.d.ts +53 -0
- package/components/ai-elements/tool.js +116 -0
- package/components/ai-elements/voice.d.ts +74 -0
- package/components/ai-elements/voice.js +875 -0
- package/components/alert.d.ts +21 -0
- package/components/alert.js +76 -0
- package/components/answer.d.ts +984 -0
- package/components/answer.js +543 -0
- package/components/assistant-ui/action-bar.d.ts +3 -0
- package/components/assistant-ui/action-bar.js +57 -0
- package/components/assistant-ui/answer-tool-ui.d.ts +5 -0
- package/components/assistant-ui/answer-tool-ui.js +42 -0
- package/components/assistant-ui/attachment.d.ts +50 -0
- package/components/assistant-ui/attachment.js +353 -0
- package/components/assistant-ui/badge.d.ts +11 -0
- package/components/assistant-ui/badge.js +54 -0
- package/components/assistant-ui/branch-picker.d.ts +3 -0
- package/components/assistant-ui/branch-picker.js +36 -0
- package/components/assistant-ui/chain-of-thought.d.ts +46 -0
- package/components/assistant-ui/composer-add-context.d.ts +50 -0
- package/components/assistant-ui/composer-add-context.js +209 -0
- package/components/assistant-ui/composer-deep-research.d.ts +16 -0
- package/components/assistant-ui/composer-deep-research.js +38 -0
- package/components/assistant-ui/composer-harness.d.ts +18 -0
- package/components/assistant-ui/composer-harness.js +186 -0
- package/components/assistant-ui/composer-trigger-popover.d.ts +47 -0
- package/components/assistant-ui/composer-trigger-popover.js +147 -0
- package/components/assistant-ui/composer.d.ts +8 -0
- package/components/assistant-ui/composer.js +276 -0
- package/components/assistant-ui/directive-text.d.ts +16 -0
- package/components/assistant-ui/directive-text.js +40 -0
- package/components/assistant-ui/error.d.ts +6 -0
- package/components/assistant-ui/error.js +39 -0
- package/components/assistant-ui/file.d.ts +37 -0
- package/components/assistant-ui/file.js +159 -0
- package/components/assistant-ui/follow-up-suggestions.d.ts +7 -0
- package/components/assistant-ui/follow-up-suggestions.js +44 -0
- package/components/assistant-ui/image.d.ts +46 -0
- package/components/assistant-ui/image.js +351 -0
- package/components/assistant-ui/index.d.ts +28 -0
- package/components/assistant-ui/markdown-text.d.ts +1 -0
- package/components/assistant-ui/markdown-text.js +242 -0
- package/components/assistant-ui/message-timing.d.ts +25 -0
- package/components/assistant-ui/message-timing.js +56 -0
- package/components/assistant-ui/message.d.ts +4 -0
- package/components/assistant-ui/message.js +159 -0
- package/components/assistant-ui/primitives.d.ts +2 -0
- package/components/assistant-ui/quote.d.ts +37 -0
- package/components/assistant-ui/quote.js +150 -0
- package/components/assistant-ui/reasoning.d.ts +44 -0
- package/components/assistant-ui/reasoning.js +261 -0
- package/components/assistant-ui/selection-toolbar.d.ts +29 -0
- package/components/assistant-ui/selection-toolbar.js +91 -0
- package/components/assistant-ui/smart-message-text.d.ts +15 -0
- package/components/assistant-ui/smart-message-text.js +29 -0
- package/components/assistant-ui/sources.d.ts +17 -0
- package/components/assistant-ui/sources.js +121 -0
- package/components/assistant-ui/suggestions.d.ts +7 -0
- package/components/assistant-ui/suggestions.js +19 -0
- package/components/assistant-ui/thread-context.d.ts +37 -0
- package/components/assistant-ui/thread-context.js +8 -0
- package/components/assistant-ui/thread.d.ts +5 -0
- package/components/assistant-ui/thread.js +77 -0
- package/components/assistant-ui/tool-fallback.d.ts +36 -0
- package/components/assistant-ui/tool-fallback.js +428 -0
- package/components/assistant-ui/tool-group.d.ts +33 -0
- package/components/assistant-ui/tool-group.js +173 -0
- package/components/assistant-ui/tooltip-icon-button.d.ts +7 -0
- package/components/assistant-ui/tooltip-icon-button.js +31 -0
- package/components/assistant-ui/voice.d.ts +18 -0
- package/components/autocomplete.d.ts +18 -0
- package/components/autocomplete.js +162 -0
- package/components/avatar.d.ts +26 -0
- package/components/avatar.js +92 -0
- package/components/badge.d.ts +10 -0
- package/components/badge.js +83 -0
- package/components/brand-loader.d.ts +16 -0
- package/components/brand-loader.js +64 -0
- package/components/breadcrumbs.d.ts +8 -0
- package/components/breadcrumbs.js +58 -0
- package/components/button.d.ts +13 -0
- package/components/button.js +100 -0
- package/components/card.d.ts +19 -0
- package/components/card.js +82 -0
- package/components/carousel.d.ts +31 -0
- package/components/carousel.js +351 -0
- package/components/chart.d.ts +165 -0
- package/components/chart.js +841 -0
- package/components/checkbox.d.ts +13 -0
- package/components/checkbox.js +84 -0
- package/components/chip.d.ts +13 -0
- package/components/chip.js +112 -0
- package/components/collapsible.d.ts +5 -0
- package/components/collapsible.js +31 -0
- package/components/connector-card.d.ts +62 -0
- package/components/connector-card.js +154 -0
- package/components/divider.d.ts +23 -0
- package/components/divider.js +69 -0
- package/components/drawer.d.ts +45 -0
- package/components/drawer.js +234 -0
- package/components/dropdown.d.ts +33 -0
- package/components/dropdown.js +198 -0
- package/components/empty-state.d.ts +8 -0
- package/components/empty-state.js +30 -0
- package/components/field.d.ts +20 -0
- package/components/field.js +74 -0
- package/components/index.d.ts +56 -0
- package/components/index.js +444 -0
- package/components/input-field.d.ts +22 -0
- package/components/input-field.js +91 -0
- package/components/input.d.ts +8 -0
- package/components/input.js +61 -0
- package/components/kbd.d.ts +6 -0
- package/components/kbd.js +26 -0
- package/components/link.d.ts +14 -0
- package/components/link.js +72 -0
- package/components/modal.d.ts +18 -0
- package/components/modal.js +156 -0
- package/components/navbar.d.ts +15 -0
- package/components/navbar.js +68 -0
- package/components/number-field.d.ts +11 -0
- package/components/number-field.js +89 -0
- package/components/pagination.d.ts +28 -0
- package/components/pagination.js +179 -0
- package/components/panel.d.ts +14 -0
- package/components/panel.js +71 -0
- package/components/pixel-blast-svg.d.ts +22 -0
- package/components/pixel-blast-svg.js +154 -0
- package/components/popover.d.ts +20 -0
- package/components/popover.js +101 -0
- package/components/progress-circle.d.ts +11 -0
- package/components/progress-circle.js +75 -0
- package/components/progress.d.ts +22 -0
- package/components/progress.js +66 -0
- package/components/radio.d.ts +16 -0
- package/components/radio.js +101 -0
- package/components/segmented.d.ts +16 -0
- package/components/segmented.js +103 -0
- package/components/select.d.ts +28 -0
- package/components/select.js +180 -0
- package/components/selection-action-bar.d.ts +11 -0
- package/components/selection-action-bar.js +59 -0
- package/components/sidebar.d.ts +118 -0
- package/components/sidebar.js +375 -0
- package/components/skeleton.d.ts +6 -0
- package/components/skeleton.js +26 -0
- package/components/slider.d.ts +11 -0
- package/components/slider.js +62 -0
- package/components/spinner.d.ts +11 -0
- package/components/spinner.js +62 -0
- package/components/switch.d.ts +7 -0
- package/components/switch.js +61 -0
- package/components/table.d.ts +59 -0
- package/components/table.js +254 -0
- package/components/tabs.d.ts +29 -0
- package/components/tabs.js +371 -0
- package/components/textarea.d.ts +5 -0
- package/components/textarea.js +24 -0
- package/components/timeline.d.ts +7 -0
- package/components/timeline.js +47 -0
- package/components/toast.d.ts +74 -0
- package/components/toast.js +211 -0
- package/components/tooltip.d.ts +11 -0
- package/components/tooltip.js +143 -0
- package/components/tree.d.ts +42 -0
- package/components/tree.js +86 -0
- package/components/typography.d.ts +33 -0
- package/components/typography.js +65 -0
- package/components/ui/avatar.d.ts +11 -0
- package/components/ui/avatar.js +56 -0
- package/components/ui/button.d.ts +10 -0
- package/components/ui/button.js +57 -0
- package/components/ui/collapsible.d.ts +5 -0
- package/components/ui/collapsible.js +35 -0
- package/components/ui/dialog.d.ts +17 -0
- package/components/ui/dialog.js +93 -0
- package/components/ui/tabs.d.ts +22 -0
- package/components/ui/tooltip.d.ts +7 -0
- package/components/ui/tooltip.js +56 -0
- package/fonts/aribau-grotesk-400.otf +0 -0
- package/fonts/aribau-grotesk-700.otf +0 -0
- package/fonts.css +21 -0
- package/hooks/agents-ui/use-agent-audio-visualizer-aura.d.ts +8 -0
- package/hooks/agents-ui/use-agent-audio-visualizer-aura.js +62 -0
- package/hooks/agents-ui/use-agent-audio-visualizer-wave.d.ts +7 -0
- package/hooks/agents-ui/use-agent-audio-visualizer-wave.js +60 -0
- package/hooks/agents-ui/voice-visualizer-types.d.ts +9 -0
- package/lib/cn.d.ts +3 -0
- package/lib/cn.js +9 -0
- package/lib/icons.d.ts +378 -0
- package/lib/icons.js +119 -0
- package/lib/interactive.d.ts +24 -0
- package/lib/interactive.js +36 -0
- package/lib/motion.d.ts +58 -0
- package/lib/motion.js +70 -0
- package/lib/router.d.ts +3 -0
- package/lib/utils.d.ts +6 -0
- package/llms.txt +537 -0
- package/manifest.json +5085 -0
- package/package.json +60 -0
- package/styles.css +653 -0
- package/theme.css +273 -0
|
@@ -0,0 +1,73 @@
|
|
|
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,
|
|
9
|
+
...s
|
|
10
|
+
}) => /* @__PURE__ */ a(
|
|
11
|
+
"div",
|
|
12
|
+
{
|
|
13
|
+
className: o(
|
|
14
|
+
"inline-flex items-center gap-1 rounded-md bg-fill px-1.5 py-0.5 text-xs text-fill-foreground",
|
|
15
|
+
t
|
|
16
|
+
),
|
|
17
|
+
...s,
|
|
18
|
+
children: e
|
|
19
|
+
}
|
|
20
|
+
);
|
|
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,
|
|
29
|
+
title: s,
|
|
30
|
+
...n
|
|
31
|
+
}) => /* @__PURE__ */ a(d, { asChild: !0, className: o("group", t), ...n, children: e ?? /* @__PURE__ */ r(
|
|
32
|
+
"button",
|
|
33
|
+
{
|
|
34
|
+
type: "button",
|
|
35
|
+
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
|
+
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
|
+
)
|
|
46
|
+
]
|
|
47
|
+
}
|
|
48
|
+
) });
|
|
49
|
+
g.displayName = "TaskTrigger";
|
|
50
|
+
const x = ({
|
|
51
|
+
children: e,
|
|
52
|
+
className: t,
|
|
53
|
+
...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";
|
|
67
|
+
export {
|
|
68
|
+
f as Task,
|
|
69
|
+
x as TaskContent,
|
|
70
|
+
u as TaskItem,
|
|
71
|
+
p as TaskItemFile,
|
|
72
|
+
g as TaskTrigger
|
|
73
|
+
};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { ComponentProps } from 'react';
|
|
2
|
+
import { Collapsible, CollapsibleContent, CollapsibleTrigger } from '../collapsible';
|
|
3
|
+
/**
|
|
4
|
+
* Tool — a collapsible record of a single tool call: its name, a status badge,
|
|
5
|
+
* the input parameters, and the result/error. An ADS-native port of the Vercel
|
|
6
|
+
* AI Elements `Tool` component.
|
|
7
|
+
*
|
|
8
|
+
* Deviations from upstream (see the port notes): the `ai` package's
|
|
9
|
+
* `ToolUIPart` type is re-declared locally as {@link ToolState}; the upstream
|
|
10
|
+
* `CodeBlock` (syntax-highlighted) is mapped to a plain ADS-tokenized `<pre>`
|
|
11
|
+
* block; shadcn `Badge` is mapped to the ADS `Badge`.
|
|
12
|
+
*/
|
|
13
|
+
/**
|
|
14
|
+
* The tool-call lifecycle. Re-declared locally so this component carries no
|
|
15
|
+
* dependency on the `ai` package's `ToolUIPart["state"]` union.
|
|
16
|
+
*/
|
|
17
|
+
export type ToolState = "input-streaming" | "input-available" | "output-available" | "output-error";
|
|
18
|
+
export type ToolProps = ComponentProps<typeof Collapsible>;
|
|
19
|
+
export declare const Tool: {
|
|
20
|
+
({ className, ...props }: ToolProps): import("react").JSX.Element;
|
|
21
|
+
displayName: string;
|
|
22
|
+
};
|
|
23
|
+
export type ToolHeaderProps = {
|
|
24
|
+
title?: string;
|
|
25
|
+
type: string;
|
|
26
|
+
state: ToolState;
|
|
27
|
+
className?: string;
|
|
28
|
+
} & Omit<ComponentProps<typeof CollapsibleTrigger>, "type">;
|
|
29
|
+
export declare const ToolHeader: {
|
|
30
|
+
({ className, title, type, state, ...props }: ToolHeaderProps): import("react").JSX.Element;
|
|
31
|
+
displayName: string;
|
|
32
|
+
};
|
|
33
|
+
export type ToolContentProps = ComponentProps<typeof CollapsibleContent>;
|
|
34
|
+
export declare const ToolContent: {
|
|
35
|
+
({ className, ...props }: ToolContentProps): import("react").JSX.Element;
|
|
36
|
+
displayName: string;
|
|
37
|
+
};
|
|
38
|
+
export type ToolInputProps = ComponentProps<"div"> & {
|
|
39
|
+
input: unknown;
|
|
40
|
+
};
|
|
41
|
+
export declare const ToolInput: {
|
|
42
|
+
({ className, input, ...props }: ToolInputProps): import("react").JSX.Element;
|
|
43
|
+
displayName: string;
|
|
44
|
+
};
|
|
45
|
+
export type ToolOutputProps = Omit<ComponentProps<"div">, "output"> & {
|
|
46
|
+
/** ReactNode passes through; any other value is stringified as JSON. */
|
|
47
|
+
output?: unknown;
|
|
48
|
+
errorText?: string;
|
|
49
|
+
};
|
|
50
|
+
export declare const ToolOutput: {
|
|
51
|
+
({ className, output, errorText, ...props }: ToolOutputProps): import("react").JSX.Element | null;
|
|
52
|
+
displayName: string;
|
|
53
|
+
};
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as o, jsxs as l } from "react/jsx-runtime";
|
|
3
|
+
import { isValidElement as c } from "react";
|
|
4
|
+
import { Collapsible as u, CollapsibleContent as m, CollapsibleTrigger as p } from "../collapsible.js";
|
|
5
|
+
import { Badge as f } from "../badge.js";
|
|
6
|
+
import { Wrench as g, ChevronDown as h, CloseCircle as x, CheckCircle as b, Clock as N, CircleDashed as v } from "../../lib/icons.js";
|
|
7
|
+
import { cn as t } from "../../lib/cn.js";
|
|
8
|
+
const y = ({ className: e, ...n }) => /* @__PURE__ */ o(
|
|
9
|
+
u,
|
|
10
|
+
{
|
|
11
|
+
className: t(
|
|
12
|
+
"not-prose group/tool w-full overflow-hidden rounded-xl bg-card",
|
|
13
|
+
e
|
|
14
|
+
),
|
|
15
|
+
...n
|
|
16
|
+
}
|
|
17
|
+
);
|
|
18
|
+
y.displayName = "Tool";
|
|
19
|
+
const w = {
|
|
20
|
+
"input-streaming": { label: "Pending", color: "default", icon: v },
|
|
21
|
+
"input-available": { label: "Running", color: "info", icon: N, pulse: !0 },
|
|
22
|
+
"output-available": { label: "Completed", color: "success", icon: b },
|
|
23
|
+
"output-error": { label: "Error", color: "danger", icon: x }
|
|
24
|
+
}, C = ({ state: e }) => {
|
|
25
|
+
const { label: n, color: r, icon: a, pulse: i } = w[e];
|
|
26
|
+
return /* @__PURE__ */ l(f, { variant: "soft", color: r, children: [
|
|
27
|
+
/* @__PURE__ */ o(
|
|
28
|
+
a,
|
|
29
|
+
{
|
|
30
|
+
className: t(
|
|
31
|
+
"size-3",
|
|
32
|
+
i && "animate-pulse motion-reduce:animate-none"
|
|
33
|
+
),
|
|
34
|
+
"aria-hidden": !0
|
|
35
|
+
}
|
|
36
|
+
),
|
|
37
|
+
n
|
|
38
|
+
] });
|
|
39
|
+
}, T = ({
|
|
40
|
+
className: e,
|
|
41
|
+
title: n,
|
|
42
|
+
type: r,
|
|
43
|
+
state: a,
|
|
44
|
+
...i
|
|
45
|
+
}) => /* @__PURE__ */ l(
|
|
46
|
+
p,
|
|
47
|
+
{
|
|
48
|
+
className: t(
|
|
49
|
+
"group/tool-header flex w-full items-center justify-between gap-4 px-4 py-3 text-left transition-colors hover:bg-muted motion-reduce:transition-none",
|
|
50
|
+
"outline-none focus-visible:ring-3 focus-visible:ring-ring",
|
|
51
|
+
e
|
|
52
|
+
),
|
|
53
|
+
...i,
|
|
54
|
+
children: [
|
|
55
|
+
/* @__PURE__ */ l("div", { className: "flex items-center gap-2", children: [
|
|
56
|
+
/* @__PURE__ */ o(g, { className: "size-4 shrink-0 text-tertiary", "aria-hidden": !0 }),
|
|
57
|
+
/* @__PURE__ */ o("span", { className: "font-medium text-base", children: n ?? r.split("-").slice(1).join("-") }),
|
|
58
|
+
/* @__PURE__ */ o(C, { state: a })
|
|
59
|
+
] }),
|
|
60
|
+
/* @__PURE__ */ o(
|
|
61
|
+
h,
|
|
62
|
+
{
|
|
63
|
+
className: "size-4 shrink-0 text-tertiary transition-transform duration-(--duration-fast) ease-out group-data-[state=open]/tool-header:rotate-180 motion-reduce:transition-none",
|
|
64
|
+
"aria-hidden": !0
|
|
65
|
+
}
|
|
66
|
+
)
|
|
67
|
+
]
|
|
68
|
+
}
|
|
69
|
+
);
|
|
70
|
+
T.displayName = "ToolHeader";
|
|
71
|
+
const S = ({ className: e, ...n }) => /* @__PURE__ */ o(
|
|
72
|
+
m,
|
|
73
|
+
{
|
|
74
|
+
className: t(
|
|
75
|
+
"overflow-hidden text-foreground outline-none",
|
|
76
|
+
"data-[state=closed]:pointer-events-none",
|
|
77
|
+
e
|
|
78
|
+
),
|
|
79
|
+
...n
|
|
80
|
+
}
|
|
81
|
+
);
|
|
82
|
+
S.displayName = "ToolContent";
|
|
83
|
+
const s = ({
|
|
84
|
+
code: e,
|
|
85
|
+
className: n
|
|
86
|
+
}) => /* @__PURE__ */ o(
|
|
87
|
+
"pre",
|
|
88
|
+
{
|
|
89
|
+
className: t(
|
|
90
|
+
"overflow-x-auto rounded-md bg-surface p-3 text-xs leading-relaxed text-foreground tabular-nums",
|
|
91
|
+
n
|
|
92
|
+
),
|
|
93
|
+
children: /* @__PURE__ */ o("code", { children: e })
|
|
94
|
+
}
|
|
95
|
+
), d = ({ children: e }) => /* @__PURE__ */ o("h4", { className: "text-xs font-medium uppercase tracking-wide text-tertiary", children: e }), j = ({ className: e, input: n, ...r }) => /* @__PURE__ */ l("div", { className: t("space-y-2 overflow-hidden p-4", e), ...r, children: [
|
|
96
|
+
/* @__PURE__ */ o(d, { children: "Parameters" }),
|
|
97
|
+
/* @__PURE__ */ o(s, { code: JSON.stringify(n, null, 2) })
|
|
98
|
+
] });
|
|
99
|
+
j.displayName = "ToolInput";
|
|
100
|
+
const k = (e) => typeof e == "object" && e !== null && !c(e) ? /* @__PURE__ */ o(s, { code: JSON.stringify(e, null, 2) }) : typeof e == "string" ? /* @__PURE__ */ o("div", { className: "rounded-md bg-surface p-3 text-xs leading-relaxed text-foreground whitespace-pre-wrap", children: e }) : e, O = ({
|
|
101
|
+
className: e,
|
|
102
|
+
output: n,
|
|
103
|
+
errorText: r,
|
|
104
|
+
...a
|
|
105
|
+
}) => n || r ? /* @__PURE__ */ l("div", { className: t("space-y-2 p-4", e), ...a, children: [
|
|
106
|
+
/* @__PURE__ */ o(d, { children: r ? "Error" : "Result" }),
|
|
107
|
+
r ? /* @__PURE__ */ o("div", { className: "rounded-md bg-danger-50 p-3 text-xs leading-relaxed text-danger-700 whitespace-pre-wrap", children: r }) : /* @__PURE__ */ o("div", { className: "overflow-x-auto text-xs text-foreground [&_table]:w-full", children: k(n) })
|
|
108
|
+
] }) : null;
|
|
109
|
+
O.displayName = "ToolOutput";
|
|
110
|
+
export {
|
|
111
|
+
y as Tool,
|
|
112
|
+
S as ToolContent,
|
|
113
|
+
T as ToolHeader,
|
|
114
|
+
j as ToolInput,
|
|
115
|
+
O as ToolOutput
|
|
116
|
+
};
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
/**
|
|
3
|
+
* Voice — the approved ADS voice visualizers and controls.
|
|
4
|
+
*
|
|
5
|
+
* `Voice` renders three volume-reactive WebGL visuals: the original ADS orb,
|
|
6
|
+
* plus LiveKit Agents UI's Aura and Wave shaders. All are driven by props, so
|
|
7
|
+
* consumers keep a transport-neutral integration surface.
|
|
8
|
+
*
|
|
9
|
+
* The controls (VoiceControl + friends) are standalone and props-driven — no
|
|
10
|
+
* assistant-ui runtime — so they compose with any transport.
|
|
11
|
+
*
|
|
12
|
+
* Reduced motion: honored through `<MotionConfig reducedMotion="user">` for the
|
|
13
|
+
* personas and a `reduced` freeze for every shader.
|
|
14
|
+
*/
|
|
15
|
+
export type VoiceState = "idle" | "connecting" | "listening" | "thinking" | "speaking" | "muted" | "asleep";
|
|
16
|
+
export type VoiceVariant = "orb" | "aura" | "wave";
|
|
17
|
+
export declare const VOICE_PALETTES: readonly ["default", "blue", "violet", "emerald", "sunset"];
|
|
18
|
+
export type VoicePalette = (typeof VOICE_PALETTES)[number];
|
|
19
|
+
/** Backwards-compatible name for the palette type originally used by Orb. */
|
|
20
|
+
export type VoiceOrbPalette = VoicePalette;
|
|
21
|
+
export declare const VOICE_VARIANTS: readonly ["orb", "aura", "wave"];
|
|
22
|
+
export declare const VOICE_STATES: readonly ["idle", "connecting", "listening", "thinking", "speaking", "muted", "asleep"];
|
|
23
|
+
export interface VoiceProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
24
|
+
/** Reactive animation state. */
|
|
25
|
+
state?: VoiceState;
|
|
26
|
+
/** Visualizer style. */
|
|
27
|
+
variant?: VoiceVariant;
|
|
28
|
+
className?: string;
|
|
29
|
+
/** Normalized audio energy 0–1, shared by every visualizer. Default 0. */
|
|
30
|
+
volume?: number;
|
|
31
|
+
/** Shared shader colorway. Default "default". */
|
|
32
|
+
palette?: VoiceOrbPalette;
|
|
33
|
+
/** Fired once on mount (API parity with the old Persona `onReady`). */
|
|
34
|
+
onReady?: () => void;
|
|
35
|
+
"aria-label"?: string;
|
|
36
|
+
}
|
|
37
|
+
export declare const Voice: React.ForwardRefExoticComponent<VoiceProps & React.RefAttributes<HTMLDivElement>>;
|
|
38
|
+
export interface VoiceStatusDotProps {
|
|
39
|
+
/** The session state the dot reflects. */
|
|
40
|
+
state?: VoiceState;
|
|
41
|
+
className?: string;
|
|
42
|
+
}
|
|
43
|
+
export declare function VoiceStatusDot({ state, className }: VoiceStatusDotProps): React.JSX.Element;
|
|
44
|
+
export interface VoiceConnectButtonProps {
|
|
45
|
+
onConnect?: () => void;
|
|
46
|
+
disabled?: boolean;
|
|
47
|
+
className?: string;
|
|
48
|
+
}
|
|
49
|
+
export declare function VoiceConnectButton({ onConnect, disabled, className, }: VoiceConnectButtonProps): React.JSX.Element;
|
|
50
|
+
export interface VoiceMuteButtonProps {
|
|
51
|
+
isMuted?: boolean;
|
|
52
|
+
onMute?: () => void;
|
|
53
|
+
onUnmute?: () => void;
|
|
54
|
+
disabled?: boolean;
|
|
55
|
+
className?: string;
|
|
56
|
+
}
|
|
57
|
+
export declare function VoiceMuteButton({ isMuted, onMute, onUnmute, disabled, className, }: VoiceMuteButtonProps): React.JSX.Element;
|
|
58
|
+
export interface VoiceDisconnectButtonProps {
|
|
59
|
+
onDisconnect?: () => void;
|
|
60
|
+
disabled?: boolean;
|
|
61
|
+
className?: string;
|
|
62
|
+
}
|
|
63
|
+
export declare function VoiceDisconnectButton({ onDisconnect, disabled, className, }: VoiceDisconnectButtonProps): React.JSX.Element;
|
|
64
|
+
export interface VoiceControlProps {
|
|
65
|
+
/** Session status. */
|
|
66
|
+
status: "ended" | "starting" | "running";
|
|
67
|
+
isMuted?: boolean;
|
|
68
|
+
onConnect?: () => void;
|
|
69
|
+
onMute?: () => void;
|
|
70
|
+
onUnmute?: () => void;
|
|
71
|
+
onDisconnect?: () => void;
|
|
72
|
+
className?: string;
|
|
73
|
+
}
|
|
74
|
+
export declare function VoiceControl({ status, isMuted, onConnect, onMute, onUnmute, onDisconnect, className, }: VoiceControlProps): React.JSX.Element;
|