@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.
@@ -4,11 +4,11 @@ import { isValidElement as c } from "react";
4
4
  import { Collapsible as u, CollapsibleContent as m, CollapsibleTrigger as p } from "../collapsible.js";
5
5
  import { Badge as f } from "../badge.js";
6
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 r } from "../../lib/cn.js";
7
+ import { cn as n } from "../../lib/cn.js";
8
8
  const w = ({ className: e, ...t }) => /* @__PURE__ */ o(
9
9
  u,
10
10
  {
11
- className: r(
11
+ className: n(
12
12
  "not-prose group/tool w-full overflow-hidden rounded-xl bg-card",
13
13
  e
14
14
  ),
@@ -22,12 +22,12 @@ const y = {
22
22
  "output-available": { label: "Completed", color: "success", icon: b },
23
23
  "output-error": { label: "Error", color: "danger", icon: x }
24
24
  }, C = ({ state: e }) => {
25
- const { label: t, color: n, icon: a, pulse: i } = y[e];
26
- return /* @__PURE__ */ l(f, { variant: "soft", color: n, children: [
25
+ const { label: t, color: r, icon: a, pulse: i } = y[e];
26
+ return /* @__PURE__ */ l(f, { variant: "soft", color: r, children: [
27
27
  /* @__PURE__ */ o(
28
28
  a,
29
29
  {
30
- className: r(
30
+ className: n(
31
31
  "size-3",
32
32
  i && "animate-pulse motion-reduce:animate-none"
33
33
  ),
@@ -43,14 +43,14 @@ function T(e) {
43
43
  const S = ({
44
44
  className: e,
45
45
  title: t,
46
- type: n,
46
+ type: r,
47
47
  state: a,
48
48
  ...i
49
49
  }) => /* @__PURE__ */ l(
50
50
  p,
51
51
  {
52
- className: r(
53
- "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",
52
+ className: n(
53
+ "group/tool-header flex w-full items-center justify-between gap-4 py-3 text-left transition-colors hover:text-primary motion-reduce:transition-none",
54
54
  "outline-none focus-visible:ring-3 focus-visible:ring-ring",
55
55
  e
56
56
  ),
@@ -58,7 +58,7 @@ const S = ({
58
58
  children: [
59
59
  /* @__PURE__ */ l("div", { className: "flex items-center gap-2", children: [
60
60
  /* @__PURE__ */ o(g, { className: "size-4 shrink-0 text-tertiary", "aria-hidden": !0 }),
61
- /* @__PURE__ */ o("span", { className: "font-medium text-base", children: t ?? T(n) }),
61
+ /* @__PURE__ */ o("span", { className: "font-medium text-base", children: t ?? T(r) }),
62
62
  /* @__PURE__ */ o(C, { state: a })
63
63
  ] }),
64
64
  /* @__PURE__ */ o(
@@ -75,7 +75,7 @@ S.displayName = "ToolHeader";
75
75
  const j = ({ className: e, ...t }) => /* @__PURE__ */ o(
76
76
  m,
77
77
  {
78
- className: r(
78
+ className: n(
79
79
  "overflow-hidden text-foreground outline-none",
80
80
  "data-[state=closed]:pointer-events-none",
81
81
  e
@@ -90,13 +90,13 @@ const s = ({
90
90
  }) => /* @__PURE__ */ o(
91
91
  "pre",
92
92
  {
93
- className: r(
93
+ className: n(
94
94
  "overflow-x-auto rounded-md bg-surface p-3 text-xs leading-relaxed text-foreground tabular-nums",
95
95
  t
96
96
  ),
97
97
  children: /* @__PURE__ */ o("code", { children: e })
98
98
  }
99
- ), d = ({ children: e }) => /* @__PURE__ */ o("h4", { className: "text-xs font-medium uppercase tracking-wide text-tertiary", children: e }), k = ({ className: e, input: t, ...n }) => /* @__PURE__ */ l("div", { className: r("space-y-2 overflow-hidden p-4", e), ...n, children: [
99
+ ), d = ({ children: e }) => /* @__PURE__ */ o("h4", { className: "text-xs font-medium uppercase tracking-wide text-tertiary", children: e }), k = ({ className: e, input: t, ...r }) => /* @__PURE__ */ l("div", { className: n("space-y-2 overflow-hidden p-4", e), ...r, children: [
100
100
  /* @__PURE__ */ o(d, { children: "Parameters" }),
101
101
  /* @__PURE__ */ o(s, { code: JSON.stringify(t, null, 2) })
102
102
  ] });
@@ -104,11 +104,11 @@ k.displayName = "ToolInput";
104
104
  const O = (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, P = ({
105
105
  className: e,
106
106
  output: t,
107
- errorText: n,
107
+ errorText: r,
108
108
  ...a
109
- }) => t || n ? /* @__PURE__ */ l("div", { className: r("space-y-2 p-4", e), ...a, children: [
110
- /* @__PURE__ */ o(d, { children: n ? "Error" : "Result" }),
111
- n ? /* @__PURE__ */ o("div", { className: "rounded-md bg-danger-50 p-3 text-xs leading-relaxed text-danger-700 whitespace-pre-wrap", children: n }) : /* @__PURE__ */ o("div", { className: "overflow-x-auto text-xs text-foreground [&_table]:w-full", children: O(t) })
109
+ }) => t || r ? /* @__PURE__ */ l("div", { className: n("space-y-2 p-4", e), ...a, children: [
110
+ /* @__PURE__ */ o(d, { children: r ? "Error" : "Result" }),
111
+ 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: O(t) })
112
112
  ] }) : null;
113
113
  P.displayName = "ToolOutput";
114
114
  export {
@@ -14,7 +14,7 @@ import * as React from "react";
14
14
  */
15
15
  export type VoiceState = "idle" | "connecting" | "listening" | "thinking" | "speaking" | "muted" | "asleep";
16
16
  export type VoiceVariant = "orb" | "aura" | "wave";
17
- export declare const VOICE_PALETTES: readonly ["default", "blue", "violet", "emerald", "sunset"];
17
+ export declare const VOICE_PALETTES: readonly ["default", "identity", "mono", "blue", "violet", "emerald", "sunset"];
18
18
  export type VoicePalette = (typeof VOICE_PALETTES)[number];
19
19
  /** Backwards-compatible name for the palette type originally used by Orb. */
20
20
  export type VoiceOrbPalette = VoicePalette;
@@ -30,6 +30,12 @@ export interface VoiceProps extends React.HTMLAttributes<HTMLDivElement> {
30
30
  volume?: number;
31
31
  /** Shared shader colorway. Default "default". */
32
32
  palette?: VoiceOrbPalette;
33
+ /**
34
+ * Optional identity. Two orbs given different seeds render distinguishable
35
+ * patterns, so a list of agents/voices reads as distinct rather than
36
+ * repeated. Omit for the generic orb.
37
+ */
38
+ seed?: string | number;
33
39
  /** Fired once on mount (API parity with the old Persona `onReady`). */
34
40
  onReady?: () => void;
35
41
  "aria-label"?: string;