@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.
Files changed (231) hide show
  1. package/LICENSE +21 -0
  2. package/bin/ads-init.mjs +314 -0
  3. package/components/accordion.d.ts +13 -0
  4. package/components/accordion.js +91 -0
  5. package/components/agents-ui/agent-audio-visualizer-aura.d.ts +11 -0
  6. package/components/agents-ui/agent-audio-visualizer-aura.js +277 -0
  7. package/components/agents-ui/agent-audio-visualizer-wave.d.ts +12 -0
  8. package/components/agents-ui/agent-audio-visualizer-wave.js +203 -0
  9. package/components/agents-ui/react-shader-toy.d.ts +87 -0
  10. package/components/agents-ui/react-shader-toy.js +531 -0
  11. package/components/ai-elements/chain-of-thought.d.ts +30 -0
  12. package/components/ai-elements/chain-of-thought.js +182 -0
  13. package/components/ai-elements/index.d.ts +11 -0
  14. package/components/ai-elements/inline-citation.d.ts +44 -0
  15. package/components/ai-elements/inline-citation.js +314 -0
  16. package/components/ai-elements/message.d.ts +96 -0
  17. package/components/ai-elements/message.js +308 -0
  18. package/components/ai-elements/queue.d.ts +60 -0
  19. package/components/ai-elements/queue.js +193 -0
  20. package/components/ai-elements/reasoning.d.ts +26 -0
  21. package/components/ai-elements/reasoning.js +131 -0
  22. package/components/ai-elements/shimmer.d.ts +25 -0
  23. package/components/ai-elements/shimmer.js +44 -0
  24. package/components/ai-elements/speech-input.d.ts +16 -0
  25. package/components/ai-elements/speech-input.js +151 -0
  26. package/components/ai-elements/task-progress.d.ts +41 -0
  27. package/components/ai-elements/task-progress.js +211 -0
  28. package/components/ai-elements/task.d.ts +35 -0
  29. package/components/ai-elements/task.js +73 -0
  30. package/components/ai-elements/tool.d.ts +53 -0
  31. package/components/ai-elements/tool.js +116 -0
  32. package/components/ai-elements/voice.d.ts +74 -0
  33. package/components/ai-elements/voice.js +875 -0
  34. package/components/alert.d.ts +21 -0
  35. package/components/alert.js +76 -0
  36. package/components/answer.d.ts +984 -0
  37. package/components/answer.js +543 -0
  38. package/components/assistant-ui/action-bar.d.ts +3 -0
  39. package/components/assistant-ui/action-bar.js +57 -0
  40. package/components/assistant-ui/answer-tool-ui.d.ts +5 -0
  41. package/components/assistant-ui/answer-tool-ui.js +42 -0
  42. package/components/assistant-ui/attachment.d.ts +50 -0
  43. package/components/assistant-ui/attachment.js +353 -0
  44. package/components/assistant-ui/badge.d.ts +11 -0
  45. package/components/assistant-ui/badge.js +54 -0
  46. package/components/assistant-ui/branch-picker.d.ts +3 -0
  47. package/components/assistant-ui/branch-picker.js +36 -0
  48. package/components/assistant-ui/chain-of-thought.d.ts +46 -0
  49. package/components/assistant-ui/composer-add-context.d.ts +50 -0
  50. package/components/assistant-ui/composer-add-context.js +209 -0
  51. package/components/assistant-ui/composer-deep-research.d.ts +16 -0
  52. package/components/assistant-ui/composer-deep-research.js +38 -0
  53. package/components/assistant-ui/composer-harness.d.ts +18 -0
  54. package/components/assistant-ui/composer-harness.js +186 -0
  55. package/components/assistant-ui/composer-trigger-popover.d.ts +47 -0
  56. package/components/assistant-ui/composer-trigger-popover.js +147 -0
  57. package/components/assistant-ui/composer.d.ts +8 -0
  58. package/components/assistant-ui/composer.js +276 -0
  59. package/components/assistant-ui/directive-text.d.ts +16 -0
  60. package/components/assistant-ui/directive-text.js +40 -0
  61. package/components/assistant-ui/error.d.ts +6 -0
  62. package/components/assistant-ui/error.js +39 -0
  63. package/components/assistant-ui/file.d.ts +37 -0
  64. package/components/assistant-ui/file.js +159 -0
  65. package/components/assistant-ui/follow-up-suggestions.d.ts +7 -0
  66. package/components/assistant-ui/follow-up-suggestions.js +44 -0
  67. package/components/assistant-ui/image.d.ts +46 -0
  68. package/components/assistant-ui/image.js +351 -0
  69. package/components/assistant-ui/index.d.ts +28 -0
  70. package/components/assistant-ui/markdown-text.d.ts +1 -0
  71. package/components/assistant-ui/markdown-text.js +242 -0
  72. package/components/assistant-ui/message-timing.d.ts +25 -0
  73. package/components/assistant-ui/message-timing.js +56 -0
  74. package/components/assistant-ui/message.d.ts +4 -0
  75. package/components/assistant-ui/message.js +159 -0
  76. package/components/assistant-ui/primitives.d.ts +2 -0
  77. package/components/assistant-ui/quote.d.ts +37 -0
  78. package/components/assistant-ui/quote.js +150 -0
  79. package/components/assistant-ui/reasoning.d.ts +44 -0
  80. package/components/assistant-ui/reasoning.js +261 -0
  81. package/components/assistant-ui/selection-toolbar.d.ts +29 -0
  82. package/components/assistant-ui/selection-toolbar.js +91 -0
  83. package/components/assistant-ui/smart-message-text.d.ts +15 -0
  84. package/components/assistant-ui/smart-message-text.js +29 -0
  85. package/components/assistant-ui/sources.d.ts +17 -0
  86. package/components/assistant-ui/sources.js +121 -0
  87. package/components/assistant-ui/suggestions.d.ts +7 -0
  88. package/components/assistant-ui/suggestions.js +19 -0
  89. package/components/assistant-ui/thread-context.d.ts +37 -0
  90. package/components/assistant-ui/thread-context.js +8 -0
  91. package/components/assistant-ui/thread.d.ts +5 -0
  92. package/components/assistant-ui/thread.js +77 -0
  93. package/components/assistant-ui/tool-fallback.d.ts +36 -0
  94. package/components/assistant-ui/tool-fallback.js +428 -0
  95. package/components/assistant-ui/tool-group.d.ts +33 -0
  96. package/components/assistant-ui/tool-group.js +173 -0
  97. package/components/assistant-ui/tooltip-icon-button.d.ts +7 -0
  98. package/components/assistant-ui/tooltip-icon-button.js +31 -0
  99. package/components/assistant-ui/voice.d.ts +18 -0
  100. package/components/autocomplete.d.ts +18 -0
  101. package/components/autocomplete.js +162 -0
  102. package/components/avatar.d.ts +26 -0
  103. package/components/avatar.js +92 -0
  104. package/components/badge.d.ts +10 -0
  105. package/components/badge.js +83 -0
  106. package/components/brand-loader.d.ts +16 -0
  107. package/components/brand-loader.js +64 -0
  108. package/components/breadcrumbs.d.ts +8 -0
  109. package/components/breadcrumbs.js +58 -0
  110. package/components/button.d.ts +13 -0
  111. package/components/button.js +100 -0
  112. package/components/card.d.ts +19 -0
  113. package/components/card.js +82 -0
  114. package/components/carousel.d.ts +31 -0
  115. package/components/carousel.js +351 -0
  116. package/components/chart.d.ts +165 -0
  117. package/components/chart.js +841 -0
  118. package/components/checkbox.d.ts +13 -0
  119. package/components/checkbox.js +84 -0
  120. package/components/chip.d.ts +13 -0
  121. package/components/chip.js +112 -0
  122. package/components/collapsible.d.ts +5 -0
  123. package/components/collapsible.js +31 -0
  124. package/components/connector-card.d.ts +62 -0
  125. package/components/connector-card.js +154 -0
  126. package/components/divider.d.ts +23 -0
  127. package/components/divider.js +69 -0
  128. package/components/drawer.d.ts +45 -0
  129. package/components/drawer.js +234 -0
  130. package/components/dropdown.d.ts +33 -0
  131. package/components/dropdown.js +198 -0
  132. package/components/empty-state.d.ts +8 -0
  133. package/components/empty-state.js +30 -0
  134. package/components/field.d.ts +20 -0
  135. package/components/field.js +74 -0
  136. package/components/index.d.ts +56 -0
  137. package/components/index.js +444 -0
  138. package/components/input-field.d.ts +22 -0
  139. package/components/input-field.js +91 -0
  140. package/components/input.d.ts +8 -0
  141. package/components/input.js +61 -0
  142. package/components/kbd.d.ts +6 -0
  143. package/components/kbd.js +26 -0
  144. package/components/link.d.ts +14 -0
  145. package/components/link.js +72 -0
  146. package/components/modal.d.ts +18 -0
  147. package/components/modal.js +156 -0
  148. package/components/navbar.d.ts +15 -0
  149. package/components/navbar.js +68 -0
  150. package/components/number-field.d.ts +11 -0
  151. package/components/number-field.js +89 -0
  152. package/components/pagination.d.ts +28 -0
  153. package/components/pagination.js +179 -0
  154. package/components/panel.d.ts +14 -0
  155. package/components/panel.js +71 -0
  156. package/components/pixel-blast-svg.d.ts +22 -0
  157. package/components/pixel-blast-svg.js +154 -0
  158. package/components/popover.d.ts +20 -0
  159. package/components/popover.js +101 -0
  160. package/components/progress-circle.d.ts +11 -0
  161. package/components/progress-circle.js +75 -0
  162. package/components/progress.d.ts +22 -0
  163. package/components/progress.js +66 -0
  164. package/components/radio.d.ts +16 -0
  165. package/components/radio.js +101 -0
  166. package/components/segmented.d.ts +16 -0
  167. package/components/segmented.js +103 -0
  168. package/components/select.d.ts +28 -0
  169. package/components/select.js +180 -0
  170. package/components/selection-action-bar.d.ts +11 -0
  171. package/components/selection-action-bar.js +59 -0
  172. package/components/sidebar.d.ts +118 -0
  173. package/components/sidebar.js +375 -0
  174. package/components/skeleton.d.ts +6 -0
  175. package/components/skeleton.js +26 -0
  176. package/components/slider.d.ts +11 -0
  177. package/components/slider.js +62 -0
  178. package/components/spinner.d.ts +11 -0
  179. package/components/spinner.js +62 -0
  180. package/components/switch.d.ts +7 -0
  181. package/components/switch.js +61 -0
  182. package/components/table.d.ts +59 -0
  183. package/components/table.js +254 -0
  184. package/components/tabs.d.ts +29 -0
  185. package/components/tabs.js +371 -0
  186. package/components/textarea.d.ts +5 -0
  187. package/components/textarea.js +24 -0
  188. package/components/timeline.d.ts +7 -0
  189. package/components/timeline.js +47 -0
  190. package/components/toast.d.ts +74 -0
  191. package/components/toast.js +211 -0
  192. package/components/tooltip.d.ts +11 -0
  193. package/components/tooltip.js +143 -0
  194. package/components/tree.d.ts +42 -0
  195. package/components/tree.js +86 -0
  196. package/components/typography.d.ts +33 -0
  197. package/components/typography.js +65 -0
  198. package/components/ui/avatar.d.ts +11 -0
  199. package/components/ui/avatar.js +56 -0
  200. package/components/ui/button.d.ts +10 -0
  201. package/components/ui/button.js +57 -0
  202. package/components/ui/collapsible.d.ts +5 -0
  203. package/components/ui/collapsible.js +35 -0
  204. package/components/ui/dialog.d.ts +17 -0
  205. package/components/ui/dialog.js +93 -0
  206. package/components/ui/tabs.d.ts +22 -0
  207. package/components/ui/tooltip.d.ts +7 -0
  208. package/components/ui/tooltip.js +56 -0
  209. package/fonts/aribau-grotesk-400.otf +0 -0
  210. package/fonts/aribau-grotesk-700.otf +0 -0
  211. package/fonts.css +21 -0
  212. package/hooks/agents-ui/use-agent-audio-visualizer-aura.d.ts +8 -0
  213. package/hooks/agents-ui/use-agent-audio-visualizer-aura.js +62 -0
  214. package/hooks/agents-ui/use-agent-audio-visualizer-wave.d.ts +7 -0
  215. package/hooks/agents-ui/use-agent-audio-visualizer-wave.js +60 -0
  216. package/hooks/agents-ui/voice-visualizer-types.d.ts +9 -0
  217. package/lib/cn.d.ts +3 -0
  218. package/lib/cn.js +9 -0
  219. package/lib/icons.d.ts +378 -0
  220. package/lib/icons.js +119 -0
  221. package/lib/interactive.d.ts +24 -0
  222. package/lib/interactive.js +36 -0
  223. package/lib/motion.d.ts +58 -0
  224. package/lib/motion.js +70 -0
  225. package/lib/router.d.ts +3 -0
  226. package/lib/utils.d.ts +6 -0
  227. package/llms.txt +537 -0
  228. package/manifest.json +5085 -0
  229. package/package.json +60 -0
  230. package/styles.css +653 -0
  231. package/theme.css +273 -0
@@ -0,0 +1,308 @@
1
+ "use client";
2
+ import { jsx as r, jsxs as f, Fragment as N } from "react/jsx-runtime";
3
+ import * as o from "react";
4
+ import { cva as M } from "class-variance-authority";
5
+ import { cn as l } from "../../lib/cn.js";
6
+ import { Button as p } from "../button.js";
7
+ import { Avatar as w } from "../avatar.js";
8
+ import { Tooltip as x } from "../tooltip.js";
9
+ import { ChevronLeft as B, ChevronRight as R, Paperclip as A, Close as C } from "../../lib/icons.js";
10
+ const z = o.forwardRef(
11
+ ({ className: e, from: t, ...s }, a) => /* @__PURE__ */ r(
12
+ "div",
13
+ {
14
+ ref: a,
15
+ className: l(
16
+ "group flex w-full max-w-[95%] flex-col gap-2",
17
+ t === "user" ? "is-user ml-auto justify-end" : "is-assistant",
18
+ e
19
+ ),
20
+ ...s
21
+ }
22
+ )
23
+ );
24
+ z.displayName = "Message";
25
+ const k = M(
26
+ "flex w-fit max-w-full min-w-0 flex-col gap-2 overflow-hidden text-base",
27
+ {
28
+ variants: {
29
+ variant: {
30
+ // Contained: the user turn reads as a quiet filled bubble; the
31
+ // assistant turn is plain full-width text.
32
+ contained: "group-[.is-user]:ml-auto group-[.is-user]:rounded-xl group-[.is-user]:bg-muted group-[.is-user]:px-4 group-[.is-user]:py-2.5 group-[.is-user]:text-foreground group-[.is-assistant]:text-foreground",
33
+ // Flat: the user turn steps to a recessed tint (no bubble); the
34
+ // assistant turn is full-width plain text — a cleaner, modern look.
35
+ flat: "group-[.is-user]:ml-auto group-[.is-user]:rounded-lg group-[.is-user]:bg-surface group-[.is-user]:px-3 group-[.is-user]:py-2 group-[.is-user]:text-foreground group-[.is-assistant]:text-foreground"
36
+ }
37
+ },
38
+ defaultVariants: { variant: "contained" }
39
+ }
40
+ ), P = o.forwardRef(({ children: e, className: t, variant: s, ...a }, n) => /* @__PURE__ */ r(
41
+ "div",
42
+ {
43
+ ref: n,
44
+ className: l(k({ variant: s }), t),
45
+ ...a,
46
+ children: e
47
+ }
48
+ ));
49
+ P.displayName = "MessageContent";
50
+ const T = o.forwardRef(({ src: e, name: t, className: s, ...a }, n) => /* @__PURE__ */ r(
51
+ w,
52
+ {
53
+ ref: n,
54
+ src: e,
55
+ name: t,
56
+ size: "sm",
57
+ className: l("ring-2 ring-background", s),
58
+ ...a
59
+ }
60
+ ));
61
+ T.displayName = "MessageAvatar";
62
+ const j = l(
63
+ "size-full text-base leading-relaxed text-foreground",
64
+ "[&>*:first-child]:mt-0 [&>*:last-child]:mb-0",
65
+ "[&_p]:my-2",
66
+ "[&_h1]:mt-4 [&_h1]:mb-2 [&_h1]:text-xl [&_h1]:font-bold [&_h1]:tracking-tight",
67
+ "[&_h2]:mt-4 [&_h2]:mb-2 [&_h2]:text-lg [&_h2]:font-bold [&_h2]:tracking-tight",
68
+ "[&_h3]:mt-3 [&_h3]:mb-1 [&_h3]:text-base [&_h3]:font-bold",
69
+ "[&_ul]:my-2 [&_ul]:list-disc [&_ul]:pl-5 [&_ol]:my-2 [&_ol]:list-decimal [&_ol]:pl-5 [&_li]:my-1",
70
+ "[&_a]:font-medium [&_a]:underline [&_a]:underline-offset-2",
71
+ "[&_code]:rounded-xs [&_code]:bg-muted [&_code]:px-1 [&_code]:py-0.5 [&_code]:text-xs [&_code]:tabular-nums",
72
+ "[&_pre]:my-3 [&_pre]:overflow-x-auto [&_pre]:rounded-lg [&_pre]:bg-surface [&_pre]:p-3 [&_pre]:text-xs [&_pre_code]:bg-transparent [&_pre_code]:p-0",
73
+ "[&_table]:my-3 [&_table]:w-full [&_table]:text-xs [&_th]:px-2 [&_th]:py-1.5 [&_th]:text-left [&_th]:font-bold [&_td]:px-2 [&_td]:py-1.5 [&_thead]:text-secondary"
74
+ ), S = o.memo(
75
+ o.forwardRef(
76
+ ({ className: e, children: t, ...s }, a) => /* @__PURE__ */ r("div", { ref: a, className: l(j, e), ...s, children: t })
77
+ ),
78
+ (e, t) => e.children === t.children
79
+ );
80
+ S.displayName = "MessageResponse";
81
+ const V = o.forwardRef(({ className: e, children: t, ...s }, a) => /* @__PURE__ */ r(
82
+ "div",
83
+ {
84
+ ref: a,
85
+ className: l("flex items-center gap-1", e),
86
+ ...s,
87
+ children: t
88
+ }
89
+ ));
90
+ V.displayName = "MessageActions";
91
+ const W = o.forwardRef(
92
+ ({ tooltip: e, children: t, label: s, variant: a = "ghost", size: n = "icon-sm", ...i }, d) => {
93
+ const c = /* @__PURE__ */ f(p, { ref: d, size: n, type: "button", variant: a, ...i, children: [
94
+ t,
95
+ /* @__PURE__ */ r("span", { className: "sr-only", children: s || e })
96
+ ] });
97
+ return e ? /* @__PURE__ */ r(x, { content: e, children: c }) : c;
98
+ }
99
+ );
100
+ W.displayName = "MessageAction";
101
+ const _ = o.createContext(null), m = () => {
102
+ const e = o.useContext(_);
103
+ if (!e)
104
+ throw new Error(
105
+ "MessageBranch components must be used within MessageBranch"
106
+ );
107
+ return e;
108
+ }, E = o.forwardRef(({ defaultBranch: e = 0, onBranchChange: t, className: s, ...a }, n) => {
109
+ const [i, d] = o.useState(e), [c, g] = o.useState([]), h = (u) => {
110
+ d(u), t == null || t(u);
111
+ }, b = () => {
112
+ const u = i > 0 ? i - 1 : c.length - 1;
113
+ h(u);
114
+ }, y = () => {
115
+ const u = i < c.length - 1 ? i + 1 : 0;
116
+ h(u);
117
+ }, v = {
118
+ currentBranch: i,
119
+ totalBranches: c.length,
120
+ goToPrevious: b,
121
+ goToNext: y,
122
+ branches: c,
123
+ setBranches: g
124
+ };
125
+ return /* @__PURE__ */ r(_.Provider, { value: v, children: /* @__PURE__ */ r(
126
+ "div",
127
+ {
128
+ ref: n,
129
+ className: l("grid w-full gap-2 [&>div]:pb-0", s),
130
+ ...a
131
+ }
132
+ ) });
133
+ });
134
+ E.displayName = "MessageBranch";
135
+ const I = ({
136
+ children: e,
137
+ ...t
138
+ }) => {
139
+ const { currentBranch: s, setBranches: a, branches: n } = m(), i = o.Children.toArray(
140
+ e
141
+ );
142
+ return o.useEffect(() => {
143
+ n.length !== i.length && a(i);
144
+ }, [i, n, a]), /* @__PURE__ */ r(N, { children: i.map((d, c) => /* @__PURE__ */ r(
145
+ "div",
146
+ {
147
+ className: l(
148
+ "grid gap-2 overflow-hidden [&>div]:pb-0",
149
+ c === s ? "block" : "hidden"
150
+ ),
151
+ ...t,
152
+ children: d
153
+ },
154
+ d.key
155
+ )) });
156
+ };
157
+ I.displayName = "MessageBranchContent";
158
+ const L = o.forwardRef(({ className: e, from: t, ...s }, a) => {
159
+ const { totalBranches: n } = m();
160
+ return n <= 1 ? null : /* @__PURE__ */ r(
161
+ "div",
162
+ {
163
+ ref: a,
164
+ className: l("inline-flex items-center gap-0.5", e),
165
+ ...s
166
+ }
167
+ );
168
+ });
169
+ L.displayName = "MessageBranchSelector";
170
+ const F = o.forwardRef(({ children: e, ...t }, s) => {
171
+ const { goToPrevious: a, totalBranches: n } = m();
172
+ return /* @__PURE__ */ r(
173
+ p,
174
+ {
175
+ ref: s,
176
+ "aria-label": "Previous branch",
177
+ disabled: n <= 1,
178
+ onClick: a,
179
+ size: "icon-sm",
180
+ type: "button",
181
+ variant: "ghost",
182
+ ...t,
183
+ children: e ?? /* @__PURE__ */ r(B, { className: "size-4", strokeWidth: 2 })
184
+ }
185
+ );
186
+ });
187
+ F.displayName = "MessageBranchPrevious";
188
+ const q = o.forwardRef(({ children: e, ...t }, s) => {
189
+ const { goToNext: a, totalBranches: n } = m();
190
+ return /* @__PURE__ */ r(
191
+ p,
192
+ {
193
+ ref: s,
194
+ "aria-label": "Next branch",
195
+ disabled: n <= 1,
196
+ onClick: a,
197
+ size: "icon-sm",
198
+ type: "button",
199
+ variant: "ghost",
200
+ ...t,
201
+ children: e ?? /* @__PURE__ */ r(R, { className: "size-4", strokeWidth: 2 })
202
+ }
203
+ );
204
+ });
205
+ q.displayName = "MessageBranchNext";
206
+ const D = o.forwardRef(({ className: e, ...t }, s) => {
207
+ const { currentBranch: a, totalBranches: n } = m();
208
+ return /* @__PURE__ */ f(
209
+ "span",
210
+ {
211
+ ref: s,
212
+ className: l(
213
+ "px-1.5 text-xs tabular-nums text-tertiary select-none",
214
+ e
215
+ ),
216
+ ...t,
217
+ children: [
218
+ a + 1,
219
+ " of ",
220
+ n
221
+ ]
222
+ }
223
+ );
224
+ });
225
+ D.displayName = "MessageBranchPage";
226
+ const G = o.forwardRef(({ data: e, className: t, onRemove: s, ...a }, n) => {
227
+ var g;
228
+ const i = e.filename || "", d = !!((g = e.mediaType) != null && g.startsWith("image/") && e.url), c = i || (d ? "Image" : "Attachment");
229
+ return /* @__PURE__ */ f(
230
+ "div",
231
+ {
232
+ ref: n,
233
+ className: l(
234
+ "group/attachment relative size-24 overflow-hidden rounded-lg bg-muted",
235
+ t
236
+ ),
237
+ ...a,
238
+ children: [
239
+ d ? /* @__PURE__ */ r(
240
+ "img",
241
+ {
242
+ alt: c,
243
+ className: "size-full object-cover",
244
+ src: e.url
245
+ }
246
+ ) : /* @__PURE__ */ r(x, { content: c, children: /* @__PURE__ */ r("div", { className: "flex size-full items-center justify-center text-muted-foreground", children: /* @__PURE__ */ r(A, { className: "size-4" }) }) }),
247
+ s && /* @__PURE__ */ r(
248
+ p,
249
+ {
250
+ "aria-label": "Remove attachment",
251
+ className: l(
252
+ "absolute top-1.5 right-1.5 size-6 rounded-full p-0 opacity-0 transition-opacity group-hover/attachment:opacity-100",
253
+ d && "bg-elevated/80 backdrop-blur-sm hover:bg-elevated"
254
+ ),
255
+ onClick: (h) => {
256
+ h.stopPropagation(), s();
257
+ },
258
+ size: "icon-xs",
259
+ type: "button",
260
+ variant: "ghost",
261
+ children: /* @__PURE__ */ r(C, { className: "size-3" })
262
+ }
263
+ )
264
+ ]
265
+ }
266
+ );
267
+ });
268
+ G.displayName = "MessageAttachment";
269
+ const H = o.forwardRef(({ children: e, className: t, ...s }, a) => e ? /* @__PURE__ */ r(
270
+ "div",
271
+ {
272
+ ref: a,
273
+ className: l("ml-auto flex w-fit flex-wrap items-start gap-2", t),
274
+ ...s,
275
+ children: e
276
+ }
277
+ ) : null);
278
+ H.displayName = "MessageAttachments";
279
+ const J = o.forwardRef(({ className: e, children: t, ...s }, a) => /* @__PURE__ */ r(
280
+ "div",
281
+ {
282
+ ref: a,
283
+ className: l(
284
+ "mt-3 flex w-full items-center justify-between gap-4",
285
+ e
286
+ ),
287
+ ...s,
288
+ children: t
289
+ }
290
+ ));
291
+ J.displayName = "MessageToolbar";
292
+ export {
293
+ z as Message,
294
+ W as MessageAction,
295
+ V as MessageActions,
296
+ G as MessageAttachment,
297
+ H as MessageAttachments,
298
+ T as MessageAvatar,
299
+ E as MessageBranch,
300
+ I as MessageBranchContent,
301
+ q as MessageBranchNext,
302
+ D as MessageBranchPage,
303
+ F as MessageBranchPrevious,
304
+ L as MessageBranchSelector,
305
+ P as MessageContent,
306
+ S as MessageResponse,
307
+ J as MessageToolbar
308
+ };
@@ -0,0 +1,60 @@
1
+ import { Button } from '../button';
2
+ import { Collapsible, CollapsibleContent } from '../collapsible';
3
+ import * as React from "react";
4
+ export type QueueMessagePart = {
5
+ type: string;
6
+ text?: string;
7
+ url?: string;
8
+ filename?: string;
9
+ mediaType?: string;
10
+ };
11
+ export type QueueMessage = {
12
+ id: string;
13
+ parts: QueueMessagePart[];
14
+ };
15
+ export type QueueTodo = {
16
+ id: string;
17
+ title: string;
18
+ description?: string;
19
+ status?: "pending" | "completed";
20
+ };
21
+ export type QueueItemProps = React.ComponentProps<"li">;
22
+ export declare const QueueItem: ({ className, ...props }: QueueItemProps) => React.JSX.Element;
23
+ export type QueueItemIndicatorProps = React.ComponentProps<"span"> & {
24
+ completed?: boolean;
25
+ };
26
+ export declare const QueueItemIndicator: ({ completed, className, ...props }: QueueItemIndicatorProps) => React.JSX.Element;
27
+ export type QueueItemContentProps = React.ComponentProps<"span"> & {
28
+ completed?: boolean;
29
+ };
30
+ export declare const QueueItemContent: ({ completed, className, ...props }: QueueItemContentProps) => React.JSX.Element;
31
+ export type QueueItemDescriptionProps = React.ComponentProps<"div"> & {
32
+ completed?: boolean;
33
+ };
34
+ export declare const QueueItemDescription: ({ completed, className, ...props }: QueueItemDescriptionProps) => React.JSX.Element;
35
+ export type QueueItemActionsProps = React.ComponentProps<"div">;
36
+ export declare const QueueItemActions: ({ className, ...props }: QueueItemActionsProps) => React.JSX.Element;
37
+ export type QueueItemActionProps = Omit<React.ComponentProps<typeof Button>, "variant" | "size">;
38
+ export declare const QueueItemAction: ({ className, ...props }: QueueItemActionProps) => React.JSX.Element;
39
+ export type QueueItemAttachmentProps = React.ComponentProps<"div">;
40
+ export declare const QueueItemAttachment: ({ className, ...props }: QueueItemAttachmentProps) => React.JSX.Element;
41
+ export type QueueItemImageProps = React.ComponentProps<"img">;
42
+ export declare const QueueItemImage: ({ className, ...props }: QueueItemImageProps) => React.JSX.Element;
43
+ export type QueueItemFileProps = React.ComponentProps<"span">;
44
+ export declare const QueueItemFile: ({ children, className, ...props }: QueueItemFileProps) => React.JSX.Element;
45
+ export type QueueListProps = React.ComponentProps<"div">;
46
+ export declare const QueueList: ({ children, className, ...props }: QueueListProps) => React.JSX.Element;
47
+ export type QueueSectionProps = React.ComponentProps<typeof Collapsible>;
48
+ export declare const QueueSection: ({ className, defaultOpen, ...props }: QueueSectionProps) => React.JSX.Element;
49
+ export type QueueSectionTriggerProps = React.ComponentProps<"button">;
50
+ export declare const QueueSectionTrigger: ({ children, className, ...props }: QueueSectionTriggerProps) => React.JSX.Element;
51
+ export type QueueSectionLabelProps = React.ComponentProps<"span"> & {
52
+ count?: number;
53
+ label: string;
54
+ icon?: React.ReactNode;
55
+ };
56
+ export declare const QueueSectionLabel: ({ count, label, icon, className, ...props }: QueueSectionLabelProps) => React.JSX.Element;
57
+ export type QueueSectionContentProps = React.ComponentProps<typeof CollapsibleContent>;
58
+ export declare const QueueSectionContent: ({ className, ...props }: QueueSectionContentProps) => React.JSX.Element;
59
+ export type QueueProps = React.ComponentProps<"div">;
60
+ export declare const Queue: ({ className, ...props }: QueueProps) => React.JSX.Element;
@@ -0,0 +1,193 @@
1
+ "use client";
2
+ import { jsx as s, jsxs as r } from "react/jsx-runtime";
3
+ import { cn as a } from "../../lib/cn.js";
4
+ import { Button as c } from "../button.js";
5
+ import { Collapsible as l, CollapsibleContent as u, CollapsibleTrigger as m } from "../collapsible.js";
6
+ import { Paperclip as d, ChevronDown as p } from "../../lib/icons.js";
7
+ const y = ({ className: e, ...t }) => /* @__PURE__ */ s(
8
+ "li",
9
+ {
10
+ className: a(
11
+ "group flex flex-col gap-1 rounded-md px-3 py-1 text-base transition-colors hover:bg-muted",
12
+ e
13
+ ),
14
+ ...t
15
+ }
16
+ ), N = ({
17
+ completed: e = !1,
18
+ className: t,
19
+ ...o
20
+ }) => /* @__PURE__ */ s(
21
+ "span",
22
+ {
23
+ "aria-hidden": !0,
24
+ className: a(
25
+ // ADS status dots are square, not circular (principle 6).
26
+ "mt-0.5 inline-block size-2.5 shrink-0 rounded-dot",
27
+ e ? "bg-success" : "bg-tertiary",
28
+ t
29
+ ),
30
+ ...o
31
+ }
32
+ ), Q = ({
33
+ completed: e = !1,
34
+ className: t,
35
+ ...o
36
+ }) => /* @__PURE__ */ s(
37
+ "span",
38
+ {
39
+ className: a(
40
+ "line-clamp-1 grow break-words",
41
+ e ? "text-tertiary line-through" : "text-secondary",
42
+ t
43
+ ),
44
+ ...o
45
+ }
46
+ ), v = ({
47
+ completed: e = !1,
48
+ className: t,
49
+ ...o
50
+ }) => /* @__PURE__ */ s(
51
+ "div",
52
+ {
53
+ className: a(
54
+ "ml-6 text-xs text-tertiary",
55
+ e && "line-through",
56
+ t
57
+ ),
58
+ ...o
59
+ }
60
+ ), I = ({
61
+ className: e,
62
+ ...t
63
+ }) => /* @__PURE__ */ s("div", { className: a("flex shrink-0 gap-1", e), ...t }), w = ({
64
+ className: e,
65
+ ...t
66
+ }) => /* @__PURE__ */ s(
67
+ c,
68
+ {
69
+ type: "button",
70
+ variant: "ghost",
71
+ size: "icon-xs",
72
+ className: a(
73
+ "size-6 text-tertiary opacity-0 transition-opacity",
74
+ "hover:text-foreground focus-visible:opacity-100 group-hover:opacity-100",
75
+ e
76
+ ),
77
+ ...t
78
+ }
79
+ ), C = ({
80
+ className: e,
81
+ ...t
82
+ }) => /* @__PURE__ */ s("div", { className: a("mt-1 flex flex-wrap gap-2", e), ...t }), k = ({
83
+ className: e,
84
+ ...t
85
+ }) => /* @__PURE__ */ s(
86
+ "img",
87
+ {
88
+ alt: "",
89
+ height: 32,
90
+ width: 32,
91
+ className: a(
92
+ "size-8 rounded-md border border-border object-cover",
93
+ e
94
+ ),
95
+ ...t
96
+ }
97
+ ), z = ({
98
+ children: e,
99
+ className: t,
100
+ ...o
101
+ }) => /* @__PURE__ */ r(
102
+ "span",
103
+ {
104
+ className: a(
105
+ "flex items-center gap-1 rounded-md bg-muted px-2 py-1 text-xs text-secondary",
106
+ t
107
+ ),
108
+ ...o,
109
+ children: [
110
+ /* @__PURE__ */ s(d, { className: "size-3 shrink-0" }),
111
+ /* @__PURE__ */ s("span", { className: "max-w-28 truncate", children: e })
112
+ ]
113
+ }
114
+ ), j = ({
115
+ children: e,
116
+ className: t,
117
+ ...o
118
+ }) => /* @__PURE__ */ s(
119
+ "div",
120
+ {
121
+ className: a("-mb-1 mt-2 max-h-40 overflow-y-auto pr-1", t),
122
+ ...o,
123
+ children: /* @__PURE__ */ s("ul", { children: e })
124
+ }
125
+ ), S = ({
126
+ className: e,
127
+ defaultOpen: t = !0,
128
+ ...o
129
+ }) => /* @__PURE__ */ s(l, { className: a(e), defaultOpen: t, ...o }), A = ({
130
+ children: e,
131
+ className: t,
132
+ ...o
133
+ }) => /* @__PURE__ */ s(m, { asChild: !0, children: /* @__PURE__ */ s(
134
+ "button",
135
+ {
136
+ type: "button",
137
+ className: a(
138
+ "group flex w-full items-center justify-between rounded-md bg-muted px-3 py-2 text-left font-medium text-base text-secondary transition-colors hover:bg-fill",
139
+ t
140
+ ),
141
+ ...o,
142
+ children: e
143
+ }
144
+ ) }), D = ({
145
+ count: e,
146
+ label: t,
147
+ icon: o,
148
+ className: n,
149
+ ...i
150
+ }) => /* @__PURE__ */ r("span", { className: a("flex items-center gap-2", n), ...i, children: [
151
+ /* @__PURE__ */ s(
152
+ p,
153
+ {
154
+ strokeWidth: 2,
155
+ className: "size-4 shrink-0 transition-transform group-data-[state=closed]:-rotate-90"
156
+ }
157
+ ),
158
+ o,
159
+ /* @__PURE__ */ r("span", { children: [
160
+ e,
161
+ " ",
162
+ t
163
+ ] })
164
+ ] }), L = ({
165
+ className: e,
166
+ ...t
167
+ }) => /* @__PURE__ */ s(u, { className: a(e), ...t }), T = ({ className: e, ...t }) => /* @__PURE__ */ s(
168
+ "div",
169
+ {
170
+ className: a(
171
+ "flex flex-col gap-2 rounded-xl bg-card px-3 py-2",
172
+ e
173
+ ),
174
+ ...t
175
+ }
176
+ );
177
+ export {
178
+ T as Queue,
179
+ y as QueueItem,
180
+ w as QueueItemAction,
181
+ I as QueueItemActions,
182
+ C as QueueItemAttachment,
183
+ Q as QueueItemContent,
184
+ v as QueueItemDescription,
185
+ z as QueueItemFile,
186
+ k as QueueItemImage,
187
+ N as QueueItemIndicator,
188
+ j as QueueList,
189
+ S as QueueSection,
190
+ L as QueueSectionContent,
191
+ D as QueueSectionLabel,
192
+ A as QueueSectionTrigger
193
+ };
@@ -0,0 +1,26 @@
1
+ import { Collapsible, CollapsibleContent, CollapsibleTrigger } from '../collapsible';
2
+ import { ComponentProps, ReactNode } from 'react';
3
+ type ReasoningContextValue = {
4
+ isStreaming: boolean;
5
+ isOpen: boolean;
6
+ setIsOpen: (open: boolean) => void;
7
+ duration: number | undefined;
8
+ };
9
+ export declare const useReasoning: () => ReasoningContextValue;
10
+ export type ReasoningProps = ComponentProps<typeof Collapsible> & {
11
+ isStreaming?: boolean;
12
+ open?: boolean;
13
+ defaultOpen?: boolean;
14
+ onOpenChange?: (open: boolean) => void;
15
+ duration?: number;
16
+ };
17
+ export declare const Reasoning: import('react').MemoExoticComponent<({ className, isStreaming, open, defaultOpen, onOpenChange, duration: durationProp, children, ...props }: ReasoningProps) => import("react").JSX.Element>;
18
+ export type ReasoningTriggerProps = ComponentProps<typeof CollapsibleTrigger> & {
19
+ getThinkingMessage?: (isStreaming: boolean, duration?: number) => ReactNode;
20
+ };
21
+ export declare const ReasoningTrigger: import('react').MemoExoticComponent<({ className, children, getThinkingMessage, ...props }: ReasoningTriggerProps) => import("react").JSX.Element>;
22
+ export type ReasoningContentProps = Omit<ComponentProps<typeof CollapsibleContent>, "children"> & {
23
+ children: ReactNode;
24
+ };
25
+ export declare const ReasoningContent: import('react').MemoExoticComponent<({ className, children, ...props }: ReasoningContentProps) => import("react").JSX.Element>;
26
+ export {};