@actioneer/ads 0.5.7 → 0.5.9

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 (147) hide show
  1. package/bin/ads-init.mjs +6 -0
  2. package/components/accordion.js +50 -48
  3. package/components/agent-icon.d.ts +12 -0
  4. package/components/agent-icon.js +133 -120
  5. package/components/ai-elements/chain-of-thought.d.ts +1 -1
  6. package/components/ai-elements/chain-of-thought.js +108 -108
  7. package/components/ai-elements/chart.js +16 -14
  8. package/components/ai-elements/inline-citation.js +41 -41
  9. package/components/ai-elements/message.js +4 -4
  10. package/components/ai-elements/queue.js +7 -7
  11. package/components/ai-elements/research-activity.js +114 -114
  12. package/components/ai-elements/shimmer.d.ts +2 -2
  13. package/components/ai-elements/speech-input.js +28 -28
  14. package/components/ai-elements/task-progress.js +26 -16
  15. package/components/ai-elements/task.js +17 -17
  16. package/components/ai-elements/tool.js +6 -6
  17. package/components/ai-elements/transcript.js +6 -5
  18. package/components/ai-elements/voice.js +1 -1
  19. package/components/alert.js +10 -10
  20. package/components/answer-sources.js +1 -1
  21. package/components/answer.js +115 -114
  22. package/components/assistant-ui/action-bar.js +94 -48
  23. package/components/assistant-ui/attachment.js +103 -75
  24. package/components/assistant-ui/badge.d.ts +1 -1
  25. package/components/assistant-ui/badge.js +17 -17
  26. package/components/assistant-ui/chain-of-thought.d.ts +1 -1
  27. package/components/assistant-ui/composer-add-context.js +9 -9
  28. package/components/assistant-ui/composer-deep-research.js +5 -5
  29. package/components/assistant-ui/composer-harness.js +11 -9
  30. package/components/assistant-ui/composer-trigger-popover.js +45 -34
  31. package/components/assistant-ui/composer.js +59 -59
  32. package/components/assistant-ui/error.js +14 -14
  33. package/components/assistant-ui/file.d.ts +1 -1
  34. package/components/assistant-ui/image.d.ts +1 -1
  35. package/components/assistant-ui/image.js +113 -103
  36. package/components/assistant-ui/markdown-text.js +18 -18
  37. package/components/assistant-ui/message.js +46 -45
  38. package/components/assistant-ui/quote.js +1 -1
  39. package/components/assistant-ui/reasoning.d.ts +1 -1
  40. package/components/assistant-ui/reasoning.js +66 -77
  41. package/components/assistant-ui/suggestions.js +4 -4
  42. package/components/assistant-ui/thread.js +22 -22
  43. package/components/assistant-ui/tool-fallback.js +60 -63
  44. package/components/assistant-ui/tool-group.d.ts +1 -1
  45. package/components/assistant-ui/tool-group.js +36 -42
  46. package/components/audio-waveform.js +25 -24
  47. package/components/autocomplete.d.ts +1 -0
  48. package/components/autocomplete.js +45 -43
  49. package/components/avatar.d.ts +1 -0
  50. package/components/avatar.js +27 -26
  51. package/components/badge.d.ts +1 -1
  52. package/components/breadcrumbs.d.ts +2 -0
  53. package/components/breadcrumbs.js +52 -50
  54. package/components/button.d.ts +2 -2
  55. package/components/button.js +22 -20
  56. package/components/card.js +8 -8
  57. package/components/carousel.js +105 -104
  58. package/components/chart.d.ts +6 -0
  59. package/components/chart.js +743 -672
  60. package/components/checkbox.js +74 -38
  61. package/components/chip.d.ts +1 -1
  62. package/components/code-block.js +3 -3
  63. package/components/collapsible.js +67 -23
  64. package/components/connector-card.js +6 -6
  65. package/components/drawer.d.ts +18 -11
  66. package/components/drawer.js +81 -78
  67. package/components/dropdown.d.ts +2 -0
  68. package/components/dropdown.js +88 -79
  69. package/components/empty-state.d.ts +1 -1
  70. package/components/empty-state.js +7 -7
  71. package/components/field.d.ts +4 -0
  72. package/components/field.js +45 -34
  73. package/components/file-dropzone.js +12 -12
  74. package/components/index.d.ts +3 -0
  75. package/components/index.js +584 -558
  76. package/components/input-field.js +51 -46
  77. package/components/input.js +20 -20
  78. package/components/link.js +9 -9
  79. package/components/modal.d.ts +5 -1
  80. package/components/modal.js +121 -76
  81. package/components/navbar.d.ts +1 -1
  82. package/components/navbar.js +1 -1
  83. package/components/number-field.js +38 -29
  84. package/components/page-header.js +12 -12
  85. package/components/pagination.js +19 -19
  86. package/components/panel.js +2 -2
  87. package/components/pixel-blast-svg.js +3 -3
  88. package/components/pixel-icon.d.ts +4 -0
  89. package/components/pixel-icon.js +210 -164
  90. package/components/popover.d.ts +1 -1
  91. package/components/popover.js +66 -64
  92. package/components/progress-circle.js +36 -32
  93. package/components/progress.js +28 -24
  94. package/components/radio.js +59 -49
  95. package/components/resizable-panel.js +1 -1
  96. package/components/reveal.d.ts +2 -2
  97. package/components/ripple.d.ts +3 -3
  98. package/components/scroll-area.js +17 -16
  99. package/components/segmented.d.ts +1 -0
  100. package/components/segmented.js +39 -36
  101. package/components/select.d.ts +7 -0
  102. package/components/select.js +186 -137
  103. package/components/setting-row.js +45 -42
  104. package/components/sidebar.js +131 -127
  105. package/components/skeleton.js +5 -5
  106. package/components/spinner.d.ts +13 -4
  107. package/components/spinner.js +42 -42
  108. package/components/stepper.js +21 -21
  109. package/components/switch.js +41 -39
  110. package/components/table.d.ts +16 -0
  111. package/components/table.js +393 -260
  112. package/components/tabs.js +149 -137
  113. package/components/toast.js +66 -66
  114. package/components/tooltip.js +2 -2
  115. package/components/tree.js +62 -51
  116. package/components/typography.d.ts +2 -1
  117. package/components/typography.js +33 -32
  118. package/components/ui/button.d.ts +2 -2
  119. package/components/ui/button.js +19 -19
  120. package/components/ui/collapsible.d.ts +1 -5
  121. package/components/ui/dialog.d.ts +3 -3
  122. package/components/ui/dialog.js +95 -58
  123. package/components/ui/tooltip.d.ts +2 -2
  124. package/components/ui/tooltip.js +67 -33
  125. package/components/viz-charts.js +95 -95
  126. package/demo/components/add-to-artifact.js +363 -0
  127. package/demo/lib/artifact-library.js +142 -0
  128. package/demo/lib/artifact-pin-guard.js +12 -0
  129. package/fonts/aribau-grotesk-medium.woff2 +0 -0
  130. package/fonts/aribau-grotesk-regular.woff2 +0 -0
  131. package/fonts.css +11 -11
  132. package/hooks/agents-ui/use-agent-audio-visualizer-aura.js +17 -16
  133. package/hooks/agents-ui/use-agent-audio-visualizer-wave.js +21 -20
  134. package/lib/icons.d.ts +24 -0
  135. package/lib/icons.js +114 -108
  136. package/lib/motion.d.ts +42 -39
  137. package/lib/motion.js +112 -52
  138. package/lib/spinner-mark.d.ts +9 -0
  139. package/lib/spinner-mark.js +98 -0
  140. package/llms.txt +53 -19
  141. package/manifest.json +258 -36
  142. package/package.json +1 -1
  143. package/styles.css +143 -124
  144. package/theme.css +90 -93
  145. package/components/ui/collapsible.js +0 -35
  146. package/fonts/aribau-grotesk-500.otf +0 -0
  147. package/fonts/aribau-grotesk-600.woff2 +0 -0
@@ -1,57 +1,103 @@
1
1
  "use client";
2
- import { jsxs as o, jsx as e } from "react/jsx-runtime";
3
- import { MessageTiming as s } from "./message-timing.js";
4
- import { TooltipIconButton as i } from "./tooltip-icon-button.js";
5
- import { ActionBarPrimitive as t, AuiIf as r, ActionBarMorePrimitive as a } from "@assistant-ui/react";
6
- import { Check as d, Copy as l, Refresh as c, MoreHorizontal as m, Download as u, Pencil as h } from "../../lib/icons.js";
7
- const C = () => /* @__PURE__ */ o(
8
- t.Root,
9
- {
10
- hideWhenRunning: !0,
11
- autohide: "not-last",
12
- className: "aui-assistant-action-bar-root text-muted-foreground animate-in fade-in col-start-3 row-start-2 -ms-1 flex gap-1 duration-(--duration-normal)",
13
- children: [
14
- /* @__PURE__ */ e(t.Copy, { asChild: !0, children: /* @__PURE__ */ o(i, { tooltip: "Copy", children: [
15
- /* @__PURE__ */ e(r, { condition: (n) => n.message.isCopied, children: /* @__PURE__ */ e(d, { className: "animate-in zoom-in-95 fade-in duration-(--duration-normal) ease-out motion-reduce:animate-none" }) }),
16
- /* @__PURE__ */ e(r, { condition: (n) => !n.message.isCopied, children: /* @__PURE__ */ e(l, { className: "animate-in zoom-in-95 fade-in duration-(--duration-fast) ease-out motion-reduce:animate-none" }) })
17
- ] }) }),
18
- /* @__PURE__ */ e(t.Reload, { asChild: !0, children: /* @__PURE__ */ e(i, { tooltip: "Refresh", children: /* @__PURE__ */ e(c, {}) }) }),
19
- /* @__PURE__ */ e(s, {}),
20
- /* @__PURE__ */ o(a.Root, { children: [
21
- /* @__PURE__ */ e(a.Trigger, { asChild: !0, children: /* @__PURE__ */ e(
22
- i,
23
- {
24
- tooltip: "More",
25
- className: "data-[state=open]:bg-accent",
26
- children: /* @__PURE__ */ e(m, {})
27
- }
28
- ) }),
29
- /* @__PURE__ */ e(
30
- a.Content,
31
- {
32
- side: "bottom",
33
- align: "start",
34
- sideOffset: 6,
35
- className: "aui-action-bar-more-content bg-popover/95 text-popover-foreground data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=open]:animate-in data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=closed]:animate-out data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] overflow-hidden rounded-xl border p-1.5 shadow-lg backdrop-blur-sm",
36
- children: /* @__PURE__ */ e(t.ExportMarkdown, { asChild: !0, children: /* @__PURE__ */ o(a.Item, { className: "aui-action-bar-more-item hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground flex cursor-pointer items-center gap-2 rounded-lg px-2.5 py-1.5 text-xs outline-none select-none", children: [
37
- /* @__PURE__ */ e(u, { className: "size-4" }),
38
- "Export as Markdown"
39
- ] }) })
40
- }
41
- )
42
- ] })
43
- ]
44
- }
45
- ), N = () => /* @__PURE__ */ e(
46
- t.Root,
2
+ import { jsxs as t, Fragment as p, jsx as e } from "react/jsx-runtime";
3
+ import { MessageTiming as f } from "./message-timing.js";
4
+ import { TooltipIconButton as r } from "./tooltip-icon-button.js";
5
+ import { AddToArtifact as h } from "../../demo/components/add-to-artifact.js";
6
+ import { assistantPartsToMarkdown as g } from "../../demo/lib/artifact-library.js";
7
+ import { ActionBarPrimitive as o, AuiIf as u, ActionBarMorePrimitive as n, useAuiState as x } from "@assistant-ui/react";
8
+ import { Check as b, Copy as A, Refresh as C, MoreHorizontal as w, LayoutGrid as N, Download as k, Pencil as v } from "../../lib/icons.js";
9
+ import { useState as M } from "react";
10
+ const z = ({ open: s, onOpenChange: i }) => {
11
+ var m;
12
+ const a = x((c) => c.message.parts), l = g(a), d = (m = l.split(`
13
+ `).find((c) => c.trim().length > 0)) == null ? void 0 : m.replace(/^#+\s*/, "");
14
+ return /* @__PURE__ */ e(
15
+ h,
16
+ {
17
+ trigger: "none",
18
+ open: s,
19
+ onOpenChange: i,
20
+ block: {
21
+ kind: "markdown",
22
+ title: (d == null ? void 0 : d.slice(0, 72)) || "Saved answer",
23
+ source: "Ask AI",
24
+ markdown: l
25
+ }
26
+ }
27
+ );
28
+ }, S = () => {
29
+ const [s, i] = M(!1);
30
+ return /* @__PURE__ */ t(p, { children: [
31
+ /* @__PURE__ */ t(
32
+ o.Root,
33
+ {
34
+ hideWhenRunning: !0,
35
+ autohide: "not-last",
36
+ className: "aui-assistant-action-bar-root text-muted-foreground animate-in fade-in col-start-3 row-start-2 -ms-1 flex gap-1 duration-200",
37
+ children: [
38
+ /* @__PURE__ */ e(o.Copy, { asChild: !0, children: /* @__PURE__ */ t(r, { tooltip: "Copy", children: [
39
+ /* @__PURE__ */ e(u, { condition: (a) => a.message.isCopied, children: /* @__PURE__ */ e(b, { className: "animate-in zoom-in-95 fade-in duration-200 ease-out motion-reduce:animate-none" }) }),
40
+ /* @__PURE__ */ e(u, { condition: (a) => !a.message.isCopied, children: /* @__PURE__ */ e(A, { className: "animate-in zoom-in-95 fade-in duration-150 ease-out motion-reduce:animate-none" }) })
41
+ ] }) }),
42
+ /* @__PURE__ */ e(o.Reload, { asChild: !0, children: /* @__PURE__ */ e(r, { tooltip: "Refresh", children: /* @__PURE__ */ e(C, {}) }) }),
43
+ /* @__PURE__ */ e(f, {}),
44
+ /* @__PURE__ */ t(n.Root, { children: [
45
+ /* @__PURE__ */ e(n.Trigger, { asChild: !0, children: /* @__PURE__ */ e(
46
+ r,
47
+ {
48
+ tooltip: "More",
49
+ className: "data-[state=open]:bg-accent",
50
+ children: /* @__PURE__ */ e(w, {})
51
+ }
52
+ ) }),
53
+ /* @__PURE__ */ t(
54
+ n.Content,
55
+ {
56
+ side: "bottom",
57
+ align: "start",
58
+ sideOffset: 6,
59
+ className: "aui-action-bar-more-content bg-popover/95 text-popover-foreground data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=open]:animate-in data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=closed]:animate-out data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] overflow-hidden rounded-xl border p-1.5 shadow-lg backdrop-blur-sm",
60
+ children: [
61
+ /* @__PURE__ */ t(
62
+ n.Item,
63
+ {
64
+ onSelect: () => i(!0),
65
+ className: "aui-action-bar-more-item hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground flex cursor-pointer items-center gap-2 rounded-lg px-2.5 py-1.5 text-xs outline-none select-none",
66
+ children: [
67
+ /* @__PURE__ */ e(N, { className: "size-4" }),
68
+ "Add to Artifact"
69
+ ]
70
+ }
71
+ ),
72
+ /* @__PURE__ */ e(o.ExportMarkdown, { asChild: !0, children: /* @__PURE__ */ t(n.Item, { className: "aui-action-bar-more-item hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground flex cursor-pointer items-center gap-2 rounded-lg px-2.5 py-1.5 text-xs outline-none select-none", children: [
73
+ /* @__PURE__ */ e(k, { className: "size-4" }),
74
+ "Export as Markdown"
75
+ ] }) })
76
+ ]
77
+ }
78
+ )
79
+ ] })
80
+ ]
81
+ }
82
+ ),
83
+ /* @__PURE__ */ e(
84
+ z,
85
+ {
86
+ open: s,
87
+ onOpenChange: i
88
+ }
89
+ )
90
+ ] });
91
+ }, j = () => /* @__PURE__ */ e(
92
+ o.Root,
47
93
  {
48
94
  hideWhenRunning: !0,
49
95
  autohide: "not-last",
50
96
  className: "aui-user-action-bar-root flex flex-col items-end",
51
- children: /* @__PURE__ */ e(t.Edit, { asChild: !0, children: /* @__PURE__ */ e(i, { tooltip: "Edit", className: "aui-user-action-edit", children: /* @__PURE__ */ e(h, {}) }) })
97
+ children: /* @__PURE__ */ e(o.Edit, { asChild: !0, children: /* @__PURE__ */ e(r, { tooltip: "Edit", className: "aui-user-action-edit", children: /* @__PURE__ */ e(v, {}) }) })
52
98
  }
53
99
  );
54
100
  export {
55
- C as AssistantActionBar,
56
- N as UserActionBar
101
+ S as AssistantActionBar,
102
+ j as UserActionBar
57
103
  };
@@ -1,21 +1,22 @@
1
1
  "use client";
2
2
  var E = Object.defineProperty;
3
3
  var P = (a, t, r) => t in a ? E(a, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : a[t] = r;
4
- var y = (a, t, r) => P(a, typeof t != "symbol" ? t + "" : t, r);
5
- import { jsx as e, jsxs as o, Fragment as A } from "react/jsx-runtime";
6
- import { useRef as N, useState as w, useEffect as U } from "react";
7
- import { Plus as _, FileText as h, Loader as C, WarningCircle as k, At as L, Bolt as S, Close as R } from "../../lib/icons.js";
4
+ var A = (a, t, r) => P(a, typeof t != "symbol" ? t + "" : t, r);
5
+ import { jsx as e, jsxs as i, Fragment as N } from "react/jsx-runtime";
6
+ import { useRef as w, useState as C, useEffect as U } from "react";
7
+ import { Plus as _, FileText as h, WarningCircle as R, At as L, Bolt as S, Close as T } from "../../lib/icons.js";
8
+ import { Spinner as v } from "../spinner.js";
8
9
  import { CONTEXT_MIME as D } from "./composer-add-context.js";
9
10
  import { HARNESS_MIME as F } from "./composer-harness.js";
10
- import { ComposerPrimitive as T, useComposerRuntime as z, MessagePrimitive as M, useAui as O, useAuiState as l, AttachmentPrimitive as s } from "@assistant-ui/react";
11
+ import { ComposerPrimitive as z, useComposerRuntime as k, MessagePrimitive as M, useAui as O, useAuiState as l, AttachmentPrimitive as s } from "@assistant-ui/react";
11
12
  import { useShallow as H } from "zustand/shallow";
12
13
  import { Tooltip as $, TooltipTrigger as q, TooltipContent as B } from "../ui/tooltip.js";
13
14
  import { Dialog as G, DialogTrigger as W, DialogContent as X, DialogTitle as Y } from "../ui/dialog.js";
14
15
  import { Avatar as J, AvatarImage as K, AvatarFallback as Q } from "../ui/avatar.js";
15
- import { TooltipIconButton as g } from "./tooltip-icon-button.js";
16
+ import { TooltipIconButton as f } from "./tooltip-icon-button.js";
16
17
  import { cn as p } from "../../lib/cn.js";
17
18
  const V = (a) => {
18
- const [t, r] = w(void 0);
19
+ const [t, r] = C(void 0);
19
20
  return U(() => {
20
21
  if (!a) {
21
22
  r(void 0);
@@ -38,22 +39,40 @@ const V = (a) => {
38
39
  );
39
40
  return V(a) ?? t;
40
41
  }, Z = ({ src: a }) => {
41
- const [t, r] = w(!1);
42
- return /* @__PURE__ */ e(
43
- "img",
42
+ const [t, r] = C(!1);
43
+ return /* @__PURE__ */ i(
44
+ "div",
44
45
  {
45
- src: a,
46
- alt: "Attachment preview",
47
- className: p(
48
- "block h-auto max-h-[80vh] w-auto max-w-full object-contain",
49
- t ? "aui-attachment-preview-image-loaded" : "aui-attachment-preview-image-loading invisible"
50
- ),
51
- onLoad: () => r(!0)
46
+ className: "relative flex min-h-48 w-full items-center justify-center",
47
+ "aria-busy": !t || void 0,
48
+ children: [
49
+ !t && /* @__PURE__ */ e(
50
+ v,
51
+ {
52
+ variant: "content",
53
+ size: "md",
54
+ color: "muted",
55
+ label: "Loading attachment preview"
56
+ }
57
+ ),
58
+ /* @__PURE__ */ e(
59
+ "img",
60
+ {
61
+ src: a,
62
+ alt: "Attachment preview",
63
+ className: p(
64
+ "block h-auto max-h-[80vh] w-auto max-w-full object-contain",
65
+ t ? "aui-attachment-preview-image-loaded" : "aui-attachment-preview-image-loading absolute invisible"
66
+ ),
67
+ onLoad: () => r(!0)
68
+ }
69
+ )
70
+ ]
52
71
  }
53
72
  );
54
73
  }, ee = ({ children: a }) => {
55
74
  const t = j();
56
- return t ? /* @__PURE__ */ o(G, { children: [
75
+ return t ? /* @__PURE__ */ i(G, { children: [
57
76
  /* @__PURE__ */ e(
58
77
  W,
59
78
  {
@@ -62,14 +81,14 @@ const V = (a) => {
62
81
  children: a
63
82
  }
64
83
  ),
65
- /* @__PURE__ */ o(X, { className: "aui-attachment-preview-dialog-content [&>button]:bg-foreground/60 [&_svg]:text-background [&>button]:hover:[&_svg]:text-destructive p-2 sm:max-w-3xl [&>button]:rounded-full [&>button]:p-1 [&>button]:opacity-100 [&>button]:ring-0!", children: [
84
+ /* @__PURE__ */ i(X, { className: "aui-attachment-preview-dialog-content [&>button]:bg-foreground/60 [&_svg]:text-background [&>button]:hover:[&_svg]:text-destructive p-2 sm:max-w-3xl [&>button]:rounded-full [&>button]:p-1 [&>button]:opacity-100 [&>button]:ring-0!", children: [
66
85
  /* @__PURE__ */ e(Y, { className: "aui-sr-only sr-only", children: "Image Attachment Preview" }),
67
86
  /* @__PURE__ */ e("div", { className: "aui-attachment-preview bg-background relative mx-auto flex max-h-[80dvh] w-full items-center justify-center overflow-hidden", children: /* @__PURE__ */ e(Z, { src: t }) })
68
87
  ] })
69
88
  ] }) : a;
70
89
  }, te = () => {
71
90
  const a = j();
72
- return /* @__PURE__ */ o(J, { className: "aui-attachment-tile-avatar h-full w-full rounded-none", children: [
91
+ return /* @__PURE__ */ i(J, { className: "aui-attachment-tile-avatar h-full w-full rounded-none", children: [
73
92
  /* @__PURE__ */ e(
74
93
  K,
75
94
  {
@@ -81,9 +100,9 @@ const V = (a) => {
81
100
  /* @__PURE__ */ e(Q, { children: /* @__PURE__ */ e(h, { className: "aui-attachment-tile-fallback-icon text-muted-foreground size-8" }) })
82
101
  ] });
83
102
  }, I = () => {
84
- const t = O().attachment.source !== "message", r = l((i) => i.attachment.contentType === D), n = l((i) => i.attachment.contentType === F), c = l((i) => i.attachment.type === "image"), m = l((i) => {
85
- const b = i.attachment.type;
86
- switch (b) {
103
+ const t = O().attachment.source !== "message", r = l((o) => o.attachment.contentType === D), n = l((o) => o.attachment.contentType === F), c = l((o) => o.attachment.type === "image"), m = l((o) => {
104
+ const y = o.attachment.type;
105
+ switch (y) {
87
106
  case "image":
88
107
  return "Image";
89
108
  case "document":
@@ -91,13 +110,13 @@ const V = (a) => {
91
110
  case "file":
92
111
  return "File";
93
112
  default:
94
- return b;
113
+ return y;
95
114
  }
96
115
  }), d = l(
97
- (i) => i.attachment.status.type === "running" ? "uploading" : i.attachment.status.type === "incomplete" && i.attachment.status.reason === "error" ? "error" : void 0
98
- ), f = d === "uploading", u = d === "error";
99
- return r ? /* @__PURE__ */ e(ae, { isComposer: t }) : n ? /* @__PURE__ */ e(ne, { isComposer: t }) : c ? /* @__PURE__ */ o($, { children: [
100
- /* @__PURE__ */ o(
116
+ (o) => o.attachment.status.type === "running" ? "uploading" : o.attachment.status.type === "incomplete" && o.attachment.status.reason === "error" ? "error" : void 0
117
+ ), g = d === "uploading", u = d === "error";
118
+ return r ? /* @__PURE__ */ e(ae, { isComposer: t }) : n ? /* @__PURE__ */ e(ne, { isComposer: t }) : c ? /* @__PURE__ */ i($, { children: [
119
+ /* @__PURE__ */ i(
101
120
  s.Root,
102
121
  {
103
122
  className: p(
@@ -105,7 +124,7 @@ const V = (a) => {
105
124
  c && !t && "aui-attachment-root-message only:*:first:size-24"
106
125
  ),
107
126
  children: [
108
- /* @__PURE__ */ e(ee, { children: /* @__PURE__ */ e(q, { asChild: !0, children: /* @__PURE__ */ o(
127
+ /* @__PURE__ */ e(ee, { children: /* @__PURE__ */ e(q, { asChild: !0, children: /* @__PURE__ */ i(
109
128
  "div",
110
129
  {
111
130
  className: p(
@@ -114,15 +133,24 @@ const V = (a) => {
114
133
  ),
115
134
  role: "button",
116
135
  tabIndex: 0,
117
- "aria-label": `${m} attachment${u ? ", upload failed" : f ? ", uploading" : ""}`,
136
+ "aria-label": `${m} attachment${u ? ", upload failed" : g ? ", uploading" : ""}`,
118
137
  children: [
119
138
  /* @__PURE__ */ e(te, {}),
120
- f && /* @__PURE__ */ e(
139
+ g && /* @__PURE__ */ e(
121
140
  "div",
122
141
  {
123
142
  "aria-hidden": "true",
124
143
  className: "aui-attachment-tile-uploading bg-background/60 absolute inset-0 flex items-center justify-center backdrop-blur-[1px]",
125
- children: /* @__PURE__ */ e(C, { className: "text-muted-foreground size-5 animate-spin" })
144
+ children: /* @__PURE__ */ e(
145
+ v,
146
+ {
147
+ variant: "upload",
148
+ size: "sm",
149
+ color: "muted",
150
+ className: "size-5",
151
+ "aria-hidden": !0
152
+ }
153
+ )
126
154
  }
127
155
  ),
128
156
  u && /* @__PURE__ */ e(
@@ -130,13 +158,13 @@ const V = (a) => {
130
158
  {
131
159
  "aria-hidden": "true",
132
160
  className: "aui-attachment-tile-error bg-destructive/10 absolute inset-0 flex items-center justify-center",
133
- children: /* @__PURE__ */ e(k, { className: "text-destructive size-5" })
161
+ children: /* @__PURE__ */ e(R, { className: "text-destructive size-5" })
134
162
  }
135
163
  )
136
164
  ]
137
165
  }
138
166
  ) }) }),
139
- t && /* @__PURE__ */ e(oe, {})
167
+ t && /* @__PURE__ */ e(ie, {})
140
168
  ]
141
169
  }
142
170
  ),
@@ -146,11 +174,11 @@ const V = (a) => {
146
174
  {
147
175
  isComposer: t,
148
176
  typeLabel: m,
149
- isUploading: f,
177
+ isUploading: g,
150
178
  isError: u
151
179
  }
152
180
  );
153
- }, v = ({
181
+ }, x = ({
154
182
  label: a = "Remove attachment"
155
183
  }) => /* @__PURE__ */ e(s.Remove, { asChild: !0, children: /* @__PURE__ */ e(
156
184
  "button",
@@ -158,20 +186,20 @@ const V = (a) => {
158
186
  type: "button",
159
187
  "aria-label": a,
160
188
  className: "flex size-5 shrink-0 items-center justify-center rounded text-muted-foreground outline-none transition-colors hover:bg-foreground/10 hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring [&_svg]:size-3.5",
161
- children: /* @__PURE__ */ e(R, {})
189
+ children: /* @__PURE__ */ e(T, {})
162
190
  }
163
- ) }), ae = ({ isComposer: a }) => /* @__PURE__ */ e(s.Root, { className: "aui-attachment-root", children: /* @__PURE__ */ o("div", { className: "inline-flex max-w-[15rem] items-center gap-1.5 rounded-md bg-muted py-1 pe-1 ps-2 text-xs text-foreground", children: [
191
+ ) }), ae = ({ isComposer: a }) => /* @__PURE__ */ e(s.Root, { className: "aui-attachment-root", children: /* @__PURE__ */ i("div", { className: "inline-flex max-w-[15rem] items-center gap-1.5 rounded-md bg-muted py-1 pe-1 ps-2 text-xs text-foreground", children: [
164
192
  /* @__PURE__ */ e(L, { className: "size-3.5 shrink-0 text-muted-foreground" }),
165
193
  /* @__PURE__ */ e("span", { className: "truncate", children: /* @__PURE__ */ e(s.Name, {}) }),
166
- a && /* @__PURE__ */ e(v, { label: "Remove context" })
167
- ] }) }), ne = ({ isComposer: a }) => /* @__PURE__ */ e(s.Root, { className: "aui-attachment-root", children: /* @__PURE__ */ o("div", { className: "inline-flex max-w-[15rem] items-center gap-1.5 rounded-md bg-info-50 py-1 pe-1 ps-2 text-xs text-info-700", children: [
194
+ a && /* @__PURE__ */ e(x, { label: "Remove context" })
195
+ ] }) }), ne = ({ isComposer: a }) => /* @__PURE__ */ e(s.Root, { className: "aui-attachment-root", children: /* @__PURE__ */ i("div", { className: "inline-flex max-w-[15rem] items-center gap-1.5 rounded-md bg-info-50 py-1 pe-1 ps-2 text-xs text-info-700", children: [
168
196
  /* @__PURE__ */ e(S, { className: "size-3.5 shrink-0" }),
169
- /* @__PURE__ */ o("span", { className: "truncate", children: [
197
+ /* @__PURE__ */ i("span", { className: "truncate", children: [
170
198
  "Harness · ",
171
199
  /* @__PURE__ */ e(s.Name, {})
172
200
  ] }),
173
- a && /* @__PURE__ */ e(v, { label: "Remove harness" })
174
- ] }) }), re = ({ isComposer: a, typeLabel: t, isUploading: r, isError: n }) => /* @__PURE__ */ e(s.Root, { className: "aui-attachment-root", children: /* @__PURE__ */ o("div", { className: "flex w-56 max-w-full items-center gap-2.5 rounded-lg bg-muted p-1.5", children: [
201
+ a && /* @__PURE__ */ e(x, { label: "Remove harness" })
202
+ ] }) }), re = ({ isComposer: a, typeLabel: t, isUploading: r, isError: n }) => /* @__PURE__ */ e(s.Root, { className: "aui-attachment-root", children: /* @__PURE__ */ i("div", { className: "flex w-56 max-w-full items-center gap-2.5 rounded-lg bg-muted p-1.5", children: [
175
203
  /* @__PURE__ */ e(
176
204
  "div",
177
205
  {
@@ -179,43 +207,43 @@ const V = (a) => {
179
207
  "flex size-9 shrink-0 items-center justify-center rounded-md bg-background text-muted-foreground [&_svg]:size-4.5",
180
208
  n && "text-destructive"
181
209
  ),
182
- children: r ? /* @__PURE__ */ e(C, { className: "size-4 animate-spin" }) : n ? /* @__PURE__ */ e(k, {}) : /* @__PURE__ */ e(h, {})
210
+ children: r ? /* @__PURE__ */ e(v, { variant: "upload", size: "sm", "aria-hidden": !0 }) : n ? /* @__PURE__ */ e(R, {}) : /* @__PURE__ */ e(h, {})
183
211
  }
184
212
  ),
185
- /* @__PURE__ */ o("div", { className: "min-w-0 flex-1", children: [
213
+ /* @__PURE__ */ i("div", { className: "min-w-0 flex-1", children: [
186
214
  /* @__PURE__ */ e("div", { className: "truncate text-xs font-medium leading-tight text-foreground", children: /* @__PURE__ */ e(s.Name, {}) }),
187
215
  /* @__PURE__ */ e("div", { className: "truncate text-[11px] leading-tight text-muted-foreground", children: n ? "Upload failed" : r ? "Uploading…" : t })
188
216
  ] }),
189
- a && /* @__PURE__ */ e(v, { label: "Remove file" })
190
- ] }) }), oe = () => /* @__PURE__ */ e(s.Remove, { asChild: !0, children: /* @__PURE__ */ e(
191
- g,
217
+ a && /* @__PURE__ */ e(x, { label: "Remove file" })
218
+ ] }) }), ie = () => /* @__PURE__ */ e(s.Remove, { asChild: !0, children: /* @__PURE__ */ e(
219
+ f,
192
220
  {
193
221
  tooltip: "Remove file",
194
222
  className: "aui-attachment-tile-remove text-muted-foreground hover:[&_svg]:text-destructive absolute end-1.5 top-1.5 size-3.5 rounded-full bg-white opacity-100 shadow-sm hover:bg-white! [&_svg]:text-black",
195
223
  side: "top",
196
- children: /* @__PURE__ */ e(R, { className: "aui-attachment-remove-icon size-3 dark:stroke-[2.5px]" })
224
+ children: /* @__PURE__ */ e(T, { className: "aui-attachment-remove-icon size-3" })
197
225
  }
198
- ) }), we = () => (
226
+ ) }), Ce = () => (
199
227
  // Sits under the request as its parameters, so it reads left-to-right
200
228
  // with the question rather than trailing off the right edge.
201
229
  /* @__PURE__ */ e("div", { className: "aui-user-message-attachments-end mt-2.5 flex w-full flex-row flex-wrap justify-start gap-2 empty:hidden", children: /* @__PURE__ */ e(M.Attachments, { children: () => /* @__PURE__ */ e(I, {}) }) })
202
- ), Ce = () => /* @__PURE__ */ e("div", { className: "aui-composer-attachments flex w-full flex-row items-center gap-2 overflow-x-auto empty:hidden", children: /* @__PURE__ */ e(T.Attachments, { children: () => /* @__PURE__ */ e(I, {}) }) }), ke = () => /* @__PURE__ */ e(T.AddAttachment, { asChild: !0, children: /* @__PURE__ */ e(
203
- g,
230
+ ), Re = () => /* @__PURE__ */ e("div", { className: "aui-composer-attachments flex w-full flex-row items-center gap-2 overflow-x-auto empty:hidden", children: /* @__PURE__ */ e(z.Attachments, { children: () => /* @__PURE__ */ e(I, {}) }) }), Te = () => /* @__PURE__ */ e(z.AddAttachment, { asChild: !0, children: /* @__PURE__ */ e(
231
+ f,
204
232
  {
205
233
  tooltip: "Add Attachment",
206
234
  side: "bottom",
207
235
  variant: "ghost",
208
236
  size: "icon",
209
- className: "aui-composer-add-attachment hover:bg-muted-foreground/15 dark:border-muted-foreground/15 dark:hover:bg-muted-foreground/30 size-7 rounded-full p-1 text-xs font-semibold",
237
+ className: "aui-composer-add-attachment hover:bg-muted-foreground/15 size-7 rounded-full p-1 text-xs font-medium",
210
238
  "aria-label": "Add Attachment",
211
239
  children: /* @__PURE__ */ e(_, { className: "aui-attachment-add-icon size-4.5 stroke-[1.5px]" })
212
240
  }
213
- ) }), ie = "image/png,image/jpeg,image/webp,image/gif", se = /* @__PURE__ */ new Set([
241
+ ) }), oe = "image/png,image/jpeg,image/webp,image/gif", se = /* @__PURE__ */ new Set([
214
242
  "image/png",
215
243
  "image/jpeg",
216
244
  "image/webp",
217
245
  "image/gif"
218
- ]), x = [
246
+ ]), b = [
219
247
  "application/pdf",
220
248
  "application/msword",
221
249
  "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
@@ -236,13 +264,13 @@ const V = (a) => {
236
264
  "application/javascript",
237
265
  "application/typescript",
238
266
  ".pdf,.doc,.docx,.odt,.rtf,.ppt,.pptx,.xls,.xlsx,.csv,.tsv,.txt,.md,.markdown,.json,.html,.xml,.css,.js,.jsx,.ts,.tsx,.sql,.py,.yaml,.yml,.log"
239
- ].join(","), ce = `${ie},${x}`, le = (a) => new Promise((t, r) => {
267
+ ].join(","), ce = `${oe},${b}`, le = (a) => new Promise((t, r) => {
240
268
  const n = new FileReader();
241
269
  n.onload = () => t(n.result), n.onerror = () => r(n.error), n.readAsDataURL(a);
242
270
  });
243
- class Re {
271
+ class ze {
244
272
  constructor() {
245
- y(this, "accept", x);
273
+ A(this, "accept", b);
246
274
  }
247
275
  async add({ file: t }) {
248
276
  return {
@@ -271,13 +299,13 @@ class Re {
271
299
  async remove() {
272
300
  }
273
301
  }
274
- const Te = () => {
275
- const a = z(), t = N(null), r = (n) => {
302
+ const ke = () => {
303
+ const a = k(), t = w(null), r = (n) => {
276
304
  if (n != null && n.length)
277
305
  for (const c of Array.from(n))
278
306
  c.type.startsWith("image/") && !se.has(c.type) || a.addAttachment(c);
279
307
  };
280
- return /* @__PURE__ */ o(A, { children: [
308
+ return /* @__PURE__ */ i(N, { children: [
281
309
  /* @__PURE__ */ e(
282
310
  "input",
283
311
  {
@@ -292,14 +320,14 @@ const Te = () => {
292
320
  }
293
321
  ),
294
322
  /* @__PURE__ */ e(
295
- g,
323
+ f,
296
324
  {
297
325
  tooltip: "Upload image or file",
298
326
  side: "top",
299
327
  type: "button",
300
328
  variant: "ghost",
301
329
  size: "icon",
302
- className: "aui-composer-add-image hover:bg-muted-foreground/15 dark:border-muted-foreground/15 dark:hover:bg-muted-foreground/30 size-7 rounded-full p-1",
330
+ className: "aui-composer-add-image hover:bg-muted-foreground/15 size-7 rounded-full p-1",
303
331
  "aria-label": "Upload image or file",
304
332
  onClick: () => {
305
333
  var n;
@@ -309,16 +337,16 @@ const Te = () => {
309
337
  }
310
338
  )
311
339
  ] });
312
- }, ze = () => {
313
- const a = z(), t = N(null);
314
- return /* @__PURE__ */ o(A, { children: [
340
+ }, je = () => {
341
+ const a = k(), t = w(null);
342
+ return /* @__PURE__ */ i(N, { children: [
315
343
  /* @__PURE__ */ e(
316
344
  "input",
317
345
  {
318
346
  ref: t,
319
347
  hidden: !0,
320
348
  type: "file",
321
- accept: x,
349
+ accept: b,
322
350
  multiple: !0,
323
351
  onChange: (r) => {
324
352
  for (const n of Array.from(r.currentTarget.files ?? []))
@@ -328,7 +356,7 @@ const Te = () => {
328
356
  }
329
357
  ),
330
358
  /* @__PURE__ */ e(
331
- g,
359
+ f,
332
360
  {
333
361
  tooltip: "Attach business documents",
334
362
  side: "top",
@@ -347,11 +375,11 @@ const Te = () => {
347
375
  ] });
348
376
  };
349
377
  export {
350
- x as ACTIONEER_FILE_ACCEPT,
351
- Re as ActioneerFileAttachmentAdapter,
352
- ke as ComposerAddAttachment,
353
- ze as ComposerAddDocument,
354
- Te as ComposerAddImage,
355
- Ce as ComposerAttachments,
356
- we as UserMessageAttachments
378
+ b as ACTIONEER_FILE_ACCEPT,
379
+ ze as ActioneerFileAttachmentAdapter,
380
+ Te as ComposerAddAttachment,
381
+ je as ComposerAddDocument,
382
+ ke as ComposerAddImage,
383
+ Re as ComposerAttachments,
384
+ Ce as UserMessageAttachments
357
385
  };
@@ -1,7 +1,7 @@
1
1
  import { ComponentProps } from 'react';
2
2
  import { VariantProps } from 'class-variance-authority';
3
3
  declare const badgeVariants: (props?: ({
4
- variant?: "success" | "warning" | "info" | "muted" | "secondary" | "outline" | "ghost" | "destructive" | null | undefined;
4
+ variant?: "success" | "warning" | "info" | "outline" | "muted" | "secondary" | "ghost" | "destructive" | null | undefined;
5
5
  size?: "default" | "sm" | "lg" | null | undefined;
6
6
  } & import('class-variance-authority/types').ClassProp) | undefined) => string;
7
7
  export type BadgeProps = ComponentProps<"span"> & VariantProps<typeof badgeVariants> & {
@@ -1,21 +1,21 @@
1
1
  "use client";
2
- import { jsx as n } from "react/jsx-runtime";
3
- import { Slot as g } from "radix-ui";
4
- import { cva as s } from "class-variance-authority";
5
- import { cn as b } from "../../lib/cn.js";
6
- const m = s(
2
+ import { jsx as d } from "react/jsx-runtime";
3
+ import { Slot as s } from "radix-ui";
4
+ import { cva as g } from "class-variance-authority";
5
+ import { cn as u } from "../../lib/cn.js";
6
+ const i = g(
7
7
  "inline-flex items-center justify-center gap-1 rounded-md text-xs font-medium transition-colors [&_svg]:size-3 [&_svg]:shrink-0",
8
8
  {
9
9
  variants: {
10
10
  variant: {
11
11
  outline: "border-input text-muted-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground border bg-transparent",
12
12
  secondary: "bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/80",
13
- muted: "bg-muted text-muted-foreground [a&]:hover:bg-muted/80 [a&]:hover:text-foreground",
13
+ muted: "bg-muted text-muted-foreground [a&]:hover:bg-accent [a&]:hover:text-foreground",
14
14
  ghost: "text-muted-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground bg-transparent",
15
- info: "bg-blue-100 text-blue-700 dark:bg-blue-900/50 dark:text-blue-300 [a&]:hover:bg-blue-100/80",
16
- warning: "bg-amber-100 text-amber-700 dark:bg-amber-900/50 dark:text-amber-300 [a&]:hover:bg-amber-100/80",
17
- success: "bg-emerald-100 text-emerald-700 dark:bg-emerald-900/50 dark:text-emerald-300 [a&]:hover:bg-emerald-100/80",
18
- destructive: "bg-red-100 text-red-700 dark:bg-red-900/50 dark:text-red-300 [a&]:hover:bg-red-100/80"
15
+ info: "bg-blue-100 text-blue-700 [a&]:hover:bg-blue-100/80",
16
+ warning: "bg-amber-100 text-amber-700 [a&]:hover:bg-amber-100/80",
17
+ success: "bg-emerald-100 text-emerald-700 [a&]:hover:bg-emerald-100/80",
18
+ destructive: "bg-red-100 text-red-700 [a&]:hover:bg-red-100/80"
19
19
  },
20
20
  size: {
21
21
  sm: "px-1.5 py-0.5",
@@ -29,26 +29,26 @@ const m = s(
29
29
  }
30
30
  }
31
31
  );
32
- function x({
32
+ function l({
33
33
  className: r,
34
34
  variant: e,
35
35
  size: t,
36
36
  asChild: a = !1,
37
37
  ...o
38
38
  }) {
39
- const d = a ? g.Root : "span";
40
- return /* @__PURE__ */ n(
41
- d,
39
+ const n = a ? s.Root : "span";
40
+ return /* @__PURE__ */ d(
41
+ n,
42
42
  {
43
43
  "data-slot": "badge",
44
44
  "data-variant": e,
45
45
  "data-size": t,
46
- className: b(m({ variant: e, size: t }), r),
46
+ className: u(i({ variant: e, size: t }), r),
47
47
  ...o
48
48
  }
49
49
  );
50
50
  }
51
51
  export {
52
- x as Badge,
53
- m as badgeVariants
52
+ l as Badge,
53
+ i as badgeVariants
54
54
  };
@@ -3,7 +3,7 @@ import { VariantProps } from 'class-variance-authority';
3
3
  import { ActiveChainOfThoughtState } from '../ai-elements/chain-of-thought-icon';
4
4
  import { Collapsible, CollapsibleContent, CollapsibleTrigger } from '../ui/collapsible';
5
5
  declare const chainOfThoughtVariants: (props?: ({
6
- variant?: "muted" | "outline" | "ghost" | null | undefined;
6
+ variant?: "outline" | "muted" | "ghost" | null | undefined;
7
7
  } & import('class-variance-authority/types').ClassProp) | undefined) => string;
8
8
  export type ChainOfThoughtRootProps = Omit<React.ComponentProps<typeof Collapsible>, "open" | "onOpenChange"> & VariantProps<typeof chainOfThoughtVariants>;
9
9
  /**