@actioneer/ads 0.5.6 → 0.5.8

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 (149) 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 +135 -121
  5. package/components/ai-elements/chain-of-thought-icon.d.ts +10 -12
  6. package/components/ai-elements/chain-of-thought-icon.js +341 -201
  7. package/components/ai-elements/chain-of-thought.d.ts +2 -2
  8. package/components/ai-elements/chain-of-thought.js +108 -108
  9. package/components/ai-elements/chart.js +16 -14
  10. package/components/ai-elements/inline-citation.js +41 -41
  11. package/components/ai-elements/message.js +4 -4
  12. package/components/ai-elements/queue.js +7 -7
  13. package/components/ai-elements/research-activity.js +114 -114
  14. package/components/ai-elements/shimmer.d.ts +2 -2
  15. package/components/ai-elements/speech-input.js +28 -28
  16. package/components/ai-elements/task-progress.js +26 -16
  17. package/components/ai-elements/task.js +17 -17
  18. package/components/ai-elements/tool.js +6 -6
  19. package/components/ai-elements/transcript.js +6 -5
  20. package/components/ai-elements/voice.js +1 -1
  21. package/components/alert.js +10 -10
  22. package/components/answer-sources.d.ts +42 -0
  23. package/components/answer-sources.js +111 -0
  24. package/components/answer.js +115 -114
  25. package/components/assistant-ui/action-bar.js +94 -48
  26. package/components/assistant-ui/attachment.js +131 -103
  27. package/components/assistant-ui/badge.d.ts +1 -1
  28. package/components/assistant-ui/badge.js +17 -17
  29. package/components/assistant-ui/chain-of-thought.d.ts +1 -1
  30. package/components/assistant-ui/composer-add-context.js +9 -9
  31. package/components/assistant-ui/composer-deep-research.js +5 -5
  32. package/components/assistant-ui/composer-harness.js +12 -9
  33. package/components/assistant-ui/composer-trigger-popover.js +45 -34
  34. package/components/assistant-ui/composer.js +59 -59
  35. package/components/assistant-ui/error.js +14 -14
  36. package/components/assistant-ui/file.d.ts +1 -1
  37. package/components/assistant-ui/image.d.ts +1 -1
  38. package/components/assistant-ui/image.js +113 -103
  39. package/components/assistant-ui/markdown-text.js +18 -18
  40. package/components/assistant-ui/message.js +46 -45
  41. package/components/assistant-ui/quote.js +1 -1
  42. package/components/assistant-ui/reasoning.d.ts +1 -1
  43. package/components/assistant-ui/reasoning.js +66 -77
  44. package/components/assistant-ui/suggestions.js +4 -4
  45. package/components/assistant-ui/thread-context.d.ts +2 -0
  46. package/components/assistant-ui/thread.js +41 -40
  47. package/components/assistant-ui/tool-fallback.js +60 -63
  48. package/components/assistant-ui/tool-group.d.ts +1 -1
  49. package/components/assistant-ui/tool-group.js +36 -42
  50. package/components/audio-waveform.js +25 -24
  51. package/components/autocomplete.d.ts +1 -0
  52. package/components/autocomplete.js +45 -43
  53. package/components/avatar.js +30 -30
  54. package/components/badge.d.ts +1 -1
  55. package/components/breadcrumbs.js +2 -2
  56. package/components/button.d.ts +2 -2
  57. package/components/button.js +22 -20
  58. package/components/card.js +8 -8
  59. package/components/carousel.js +105 -104
  60. package/components/chart.js +9 -7
  61. package/components/checkbox.js +74 -38
  62. package/components/chip.d.ts +1 -1
  63. package/components/code-block.js +3 -3
  64. package/components/collapsible.js +67 -23
  65. package/components/connector-card.js +6 -6
  66. package/components/drawer.d.ts +15 -10
  67. package/components/drawer.js +78 -77
  68. package/components/dropdown.d.ts +3 -1
  69. package/components/dropdown.js +88 -79
  70. package/components/empty-state.d.ts +4 -4
  71. package/components/empty-state.js +7 -7
  72. package/components/field.d.ts +4 -0
  73. package/components/field.js +45 -34
  74. package/components/file-dropzone.js +12 -12
  75. package/components/index.d.ts +4 -0
  76. package/components/index.js +584 -553
  77. package/components/infinite-canvas.js +1 -1
  78. package/components/input-field.js +51 -46
  79. package/components/input.js +20 -20
  80. package/components/link.js +9 -9
  81. package/components/modal.js +105 -73
  82. package/components/navbar.d.ts +1 -1
  83. package/components/navbar.js +1 -1
  84. package/components/number-field.js +38 -29
  85. package/components/page-header.js +12 -12
  86. package/components/pagination.js +19 -19
  87. package/components/panel.js +2 -2
  88. package/components/pixel-blast-svg.js +3 -3
  89. package/components/pixel-icon.d.ts +3 -1
  90. package/components/pixel-icon.js +294 -215
  91. package/components/popover.d.ts +1 -1
  92. package/components/popover.js +66 -64
  93. package/components/progress-circle.js +36 -32
  94. package/components/progress.js +28 -24
  95. package/components/radio.js +59 -49
  96. package/components/resizable-panel.js +1 -1
  97. package/components/reveal.d.ts +2 -2
  98. package/components/ripple.d.ts +3 -3
  99. package/components/scroll-area.js +17 -16
  100. package/components/segmented.d.ts +4 -1
  101. package/components/segmented.js +26 -25
  102. package/components/select.d.ts +2 -0
  103. package/components/select.js +61 -57
  104. package/components/setting-row.js +45 -42
  105. package/components/sidebar.d.ts +2 -2
  106. package/components/sidebar.js +131 -127
  107. package/components/skeleton.js +5 -5
  108. package/components/spinner.d.ts +13 -4
  109. package/components/spinner.js +42 -42
  110. package/components/stepper.js +21 -21
  111. package/components/switch.js +52 -32
  112. package/components/table.d.ts +24 -7
  113. package/components/table.js +457 -220
  114. package/components/tabs.js +149 -137
  115. package/components/textarea.js +1 -2
  116. package/components/toast.js +66 -66
  117. package/components/tooltip.js +2 -2
  118. package/components/tree.js +62 -51
  119. package/components/typography.d.ts +2 -1
  120. package/components/typography.js +33 -32
  121. package/components/ui/button.d.ts +2 -2
  122. package/components/ui/button.js +19 -19
  123. package/components/ui/collapsible.d.ts +1 -5
  124. package/components/ui/dialog.d.ts +3 -3
  125. package/components/ui/dialog.js +95 -58
  126. package/components/ui/tooltip.d.ts +2 -2
  127. package/components/ui/tooltip.js +67 -33
  128. package/components/viz-charts.js +95 -95
  129. package/demo/components/add-to-artifact.js +341 -0
  130. package/demo/lib/artifact-library.js +134 -0
  131. package/fonts/aribau-grotesk-medium.woff2 +0 -0
  132. package/fonts/aribau-grotesk-regular.woff2 +0 -0
  133. package/fonts.css +11 -11
  134. package/hooks/agents-ui/use-agent-audio-visualizer-aura.js +17 -16
  135. package/hooks/agents-ui/use-agent-audio-visualizer-wave.js +21 -20
  136. package/lib/icons.d.ts +12 -0
  137. package/lib/icons.js +107 -104
  138. package/lib/motion.d.ts +42 -39
  139. package/lib/motion.js +112 -52
  140. package/lib/spinner-mark.d.ts +9 -0
  141. package/lib/spinner-mark.js +98 -0
  142. package/llms.txt +69 -26
  143. package/manifest.json +344 -42
  144. package/package.json +1 -1
  145. package/styles.css +175 -161
  146. package/theme.css +104 -128
  147. package/components/ui/collapsible.js +0 -35
  148. package/fonts/aribau-grotesk-500.otf +0 -0
  149. package/fonts/aribau-grotesk-600.woff2 +0 -0
@@ -1,30 +1,31 @@
1
1
  "use client";
2
- import { jsxs as a, jsx as t } from "react/jsx-runtime";
2
+ import { jsxs as r, jsx as t } from "react/jsx-runtime";
3
3
  import { UserMessageAttachments as h } from "./attachment.js";
4
4
  import { AssistantActionBar as T, UserActionBar as x } from "./action-bar.js";
5
- import { BranchPicker as d } from "./branch-picker.js";
5
+ import { BranchPicker as p } from "./branch-picker.js";
6
6
  import { EditComposer as v } from "./composer.js";
7
7
  import { MessageError as b } from "./error.js";
8
8
  import { QuoteBlock as A } from "./quote.js";
9
- import { Reasoning as _, ReasoningRoot as y, ReasoningTrigger as w, ReasoningContent as R, ReasoningText as N } from "./reasoning.js";
10
- import { MarkdownText as C } from "./markdown-text.js";
11
- import { ThreadComponentsContext as p } from "./thread-context.js";
9
+ import { Reasoning as _, ReasoningRoot as y, ReasoningTrigger as w, ReasoningContent as R, ReasoningText as C } from "./reasoning.js";
10
+ import { MarkdownText as N } from "./markdown-text.js";
11
+ import { ThreadComponentsContext as d } from "./thread-context.js";
12
12
  import { ToolFallback as k } from "./tool-fallback.js";
13
13
  import { ToolGroupRoot as B, ToolGroupTrigger as M, ToolGroupContent as G } from "./tool-group.js";
14
14
  import { createDirectiveText as I } from "./directive-text.js";
15
- import { cn as c } from "../../lib/cn.js";
16
- import { At as O, FileText as E, Bolt as P, Table as U } from "../../lib/icons.js";
17
- import { unstable_defaultDirectiveFormatter as F, MessagePrimitive as i, groupPartByType as j, useAuiState as g } from "@assistant-ui/react";
15
+ import { Spinner as O } from "../spinner.js";
16
+ import { cn as l } from "../../lib/cn.js";
17
+ import { At as E, FileText as P, Bolt as U, Table as F } from "../../lib/icons.js";
18
+ import { unstable_defaultDirectiveFormatter as j, MessagePrimitive as i, groupPartByType as z, useAuiState as g } from "@assistant-ui/react";
18
19
  import { useContext as f } from "react";
19
20
  const H = I(
20
- F,
21
+ j,
21
22
  {
22
- iconMap: { table: U, skill: P, file: E },
23
- fallbackIcon: O
23
+ iconMap: { table: F, skill: U, file: P },
24
+ fallbackIcon: E
24
25
  }
25
- ), nt = () => {
26
- const { AssistantMessage: o = q } = f(p), n = g((s) => s.message.role);
27
- return g((s) => s.message.composer.isEditing) ? /* @__PURE__ */ t(v, {}) : n === "user" ? /* @__PURE__ */ t(z, {}) : /* @__PURE__ */ t(o, {});
26
+ ), ct = () => {
27
+ const { AssistantMessage: o = q } = f(d), n = g((s) => s.message.role);
28
+ return g((s) => s.message.composer.isEditing) ? /* @__PURE__ */ t(v, {}) : n === "user" ? /* @__PURE__ */ t(D, {}) : /* @__PURE__ */ t(o, {});
28
29
  }, q = () => {
29
30
  const {
30
31
  AssistantAvatar: o,
@@ -32,14 +33,14 @@ const H = I(
32
33
  ToolGroup: u,
33
34
  ReasoningGroup: s,
34
35
  ChainOfThoughtGroup: m
35
- } = f(p);
36
- return /* @__PURE__ */ a(
36
+ } = f(d);
37
+ return /* @__PURE__ */ r(
37
38
  i.Root,
38
39
  {
39
40
  "data-slot": "aui_assistant-message-root",
40
41
  "data-role": "assistant",
41
- className: c(
42
- "fade-in slide-in-from-bottom-1 animate-in relative -mb-7.5 pb-7.5 duration-(--duration-fast) [contain-intrinsic-size:auto_200px] [content-visibility:auto]",
42
+ className: l(
43
+ "fade-in slide-in-from-bottom-1 animate-in relative -mb-7.5 pb-7.5 duration-150 [contain-intrinsic-size:auto_200px] [content-visibility:auto]",
43
44
  o && "grid grid-cols-[2rem_minmax(0,1fr)] items-start gap-x-2"
44
45
  ),
45
46
  children: [
@@ -51,11 +52,11 @@ const H = I(
51
52
  children: /* @__PURE__ */ t(o, {})
52
53
  }
53
54
  ),
54
- /* @__PURE__ */ a(
55
+ /* @__PURE__ */ r(
55
56
  "div",
56
57
  {
57
58
  "data-slot": "aui_assistant-message-content",
58
- className: c(
59
+ className: l(
59
60
  "text-foreground px-2 leading-relaxed wrap-break-word",
60
61
  o && "col-start-2 row-start-1"
61
62
  ),
@@ -63,17 +64,17 @@ const H = I(
63
64
  /* @__PURE__ */ t(
64
65
  i.GroupedParts,
65
66
  {
66
- groupBy: j({
67
+ groupBy: z({
67
68
  reasoning: ["group-chainOfThought", "group-reasoning"],
68
69
  "tool-call": ["group-chainOfThought", "group-tool"],
69
70
  "standalone-tool-call": []
70
71
  }),
71
- children: ({ part: e, children: r }) => {
72
+ children: ({ part: e, children: a }) => {
72
73
  switch (e.type) {
73
74
  case "group-chainOfThought":
74
- return m ? /* @__PURE__ */ t(m, { group: e, children: r }) : /* @__PURE__ */ t("div", { "data-slot": "aui_chain-of-thought", children: r });
75
+ return m ? /* @__PURE__ */ t(m, { group: e, children: a }) : /* @__PURE__ */ t("div", { "data-slot": "aui_chain-of-thought", children: a });
75
76
  case "group-tool":
76
- return u ? /* @__PURE__ */ t(u, { group: e, children: r }) : /* @__PURE__ */ a(B, { variant: "ghost", children: [
77
+ return u ? /* @__PURE__ */ t(u, { group: e, children: a }) : /* @__PURE__ */ r(B, { variant: "ghost", children: [
77
78
  /* @__PURE__ */ t(
78
79
  M,
79
80
  {
@@ -81,19 +82,19 @@ const H = I(
81
82
  active: e.status.type === "running"
82
83
  }
83
84
  ),
84
- /* @__PURE__ */ t(G, { children: r })
85
+ /* @__PURE__ */ t(G, { children: a })
85
86
  ] });
86
87
  case "group-reasoning": {
87
88
  if (s)
88
- return /* @__PURE__ */ t(s, { group: e, children: r });
89
- const l = e.status.type === "running";
90
- return /* @__PURE__ */ a(y, { streaming: l, children: [
91
- /* @__PURE__ */ t(w, { active: l }),
92
- /* @__PURE__ */ t(R, { "aria-busy": l, children: /* @__PURE__ */ t(N, { children: r }) })
89
+ return /* @__PURE__ */ t(s, { group: e, children: a });
90
+ const c = e.status.type === "running";
91
+ return /* @__PURE__ */ r(y, { streaming: c, children: [
92
+ /* @__PURE__ */ t(w, { active: c }),
93
+ /* @__PURE__ */ t(R, { "aria-busy": c, children: /* @__PURE__ */ t(C, { children: a }) })
93
94
  ] });
94
95
  }
95
96
  case "text":
96
- return /* @__PURE__ */ t(C, {});
97
+ return /* @__PURE__ */ t(N, {});
97
98
  case "reasoning":
98
99
  return /* @__PURE__ */ t(_, { ...e });
99
100
  case "tool-call":
@@ -102,12 +103,12 @@ const H = I(
102
103
  return e.dataRendererUI;
103
104
  case "indicator":
104
105
  return /* @__PURE__ */ t(
105
- "span",
106
+ O,
106
107
  {
107
108
  "data-slot": "aui_assistant-message-indicator",
108
- className: "animate-pulse font-sans",
109
- "aria-label": "Assistant is working",
110
- children: "●"
109
+ variant: "action",
110
+ size: "sm",
111
+ label: "Assistant is working"
111
112
  }
112
113
  );
113
114
  default:
@@ -120,17 +121,17 @@ const H = I(
120
121
  ]
121
122
  }
122
123
  ),
123
- /* @__PURE__ */ a(
124
+ /* @__PURE__ */ r(
124
125
  "div",
125
126
  {
126
127
  "data-slot": "aui_assistant-message-footer",
127
- className: c(
128
+ className: l(
128
129
  "ms-2 flex items-center",
129
130
  "min-h-7.5 pt-1.5",
130
131
  o && "col-start-2 row-start-2"
131
132
  ),
132
133
  children: [
133
- /* @__PURE__ */ t(d, {}),
134
+ /* @__PURE__ */ t(p, {}),
134
135
  /* @__PURE__ */ t(T, {})
135
136
  ]
136
137
  }
@@ -138,14 +139,14 @@ const H = I(
138
139
  ]
139
140
  }
140
141
  );
141
- }, z = () => /* @__PURE__ */ a(
142
+ }, D = () => /* @__PURE__ */ r(
142
143
  i.Root,
143
144
  {
144
145
  "data-slot": "aui_user-message-root",
145
- className: "fade-in slide-in-from-bottom-1 animate-in flex w-full flex-col gap-2 px-2 duration-(--duration-fast) [contain-intrinsic-size:auto_200px] [content-visibility:auto]",
146
+ className: "fade-in slide-in-from-bottom-1 animate-in flex w-full flex-col gap-2 px-2 duration-150 [contain-intrinsic-size:auto_200px] [content-visibility:auto]",
146
147
  "data-role": "user",
147
148
  children: [
148
- /* @__PURE__ */ a("div", { className: "aui-user-message-content-wrapper group/user-request relative min-w-0", children: [
149
+ /* @__PURE__ */ r("div", { className: "aui-user-message-content-wrapper group/user-request relative min-w-0", children: [
149
150
  /* @__PURE__ */ t("div", { className: "aui-user-message-content peer text-foreground text-xl leading-snug wrap-break-word empty:hidden", children: /* @__PURE__ */ t(
150
151
  i.Parts,
151
152
  {
@@ -153,10 +154,10 @@ const H = I(
153
154
  }
154
155
  ) }),
155
156
  /* @__PURE__ */ t(h, {}),
156
- /* @__PURE__ */ t("div", { className: "aui-user-action-bar-wrapper absolute end-0 top-0 opacity-0 transition-opacity duration-(--duration-fast) ease-out peer-empty:hidden group-hover/user-request:opacity-100 group-focus-within/user-request:opacity-100 motion-reduce:transition-none", children: /* @__PURE__ */ t(x, {}) })
157
+ /* @__PURE__ */ t("div", { className: "aui-user-action-bar-wrapper absolute end-0 top-0 opacity-0 transition-opacity duration-150 ease-out peer-empty:hidden group-hover/user-request:opacity-100 group-focus-within/user-request:opacity-100 motion-reduce:transition-none", children: /* @__PURE__ */ t(x, {}) })
157
158
  ] }),
158
159
  /* @__PURE__ */ t(
159
- d,
160
+ p,
160
161
  {
161
162
  "data-slot": "aui_user-branch-picker",
162
163
  className: "-ms-1 justify-start"
@@ -167,6 +168,6 @@ const H = I(
167
168
  );
168
169
  export {
169
170
  q as AssistantMessage,
170
- nt as ThreadMessage,
171
- z as UserMessage
171
+ ct as ThreadMessage,
172
+ D as UserMessage
172
173
  };
@@ -36,7 +36,7 @@ function d({ className: e, ...o }) {
36
36
  {
37
37
  "data-slot": "quote-block-text",
38
38
  className: s(
39
- "text-muted-foreground/80 line-clamp-2 min-w-0 text-sm italic",
39
+ "text-muted-foreground line-clamp-2 min-w-0 text-sm italic",
40
40
  e
41
41
  ),
42
42
  ...o
@@ -2,7 +2,7 @@ import { VariantProps } from 'class-variance-authority';
2
2
  import { ReasoningMessagePartComponent } from '@assistant-ui/react';
3
3
  import { Collapsible, CollapsibleContent, CollapsibleTrigger } from '../ui/collapsible';
4
4
  declare const reasoningVariants: (props?: ({
5
- variant?: "muted" | "outline" | "ghost" | null | undefined;
5
+ variant?: "outline" | "muted" | "ghost" | null | undefined;
6
6
  } & import('class-variance-authority/types').ClassProp) | undefined) => string;
7
7
  export type ReasoningRootProps = Omit<React.ComponentProps<typeof Collapsible>, "open" | "onOpenChange"> & VariantProps<typeof reasoningVariants> & {
8
8
  open?: boolean;
@@ -1,11 +1,11 @@
1
1
  "use client";
2
- import { jsx as o, jsxs as d } from "react/jsx-runtime";
2
+ import { jsx as r, jsxs as d } from "react/jsx-runtime";
3
3
  import { createContext as _, memo as T, useRef as m, useState as E, useLayoutEffect as M, useCallback as G, useContext as w, useEffect as j } from "react";
4
4
  import { cva as D } from "class-variance-authority";
5
5
  import { ChevronDown as F } from "../../lib/icons.js";
6
6
  import { useScrollLock as L, useAuiState as U } from "@assistant-ui/react";
7
7
  import { MarkdownText as V } from "./markdown-text.js";
8
- import { Collapsible as H, CollapsibleTrigger as $, CollapsibleContent as q } from "../ui/collapsible.js";
8
+ import { Collapsible as H, CollapsibleTrigger as $, CollapsibleContent as q } from "../collapsible.js";
9
9
  import { cn as u } from "../../lib/cn.js";
10
10
  import { TraceStateIcon as B } from "../ai-elements/chain-of-thought-icon.js";
11
11
  const J = 200, h = _(!1), K = D("aui-reasoning-root mb-4 w-full", {
@@ -21,48 +21,48 @@ const J = 200, h = _(!1), K = D("aui-reasoning-root mb-4 w-full", {
21
21
  }
22
22
  });
23
23
  function k({
24
- className: r,
25
- variant: t,
26
- open: a,
24
+ className: a,
25
+ variant: n,
26
+ open: o,
27
27
  onOpenChange: e,
28
28
  defaultOpen: i = !1,
29
- streaming: n,
30
- children: c,
29
+ streaming: t,
30
+ children: g,
31
31
  ...l
32
32
  }) {
33
- const s = m(null), f = m(i), [b, z] = E(null), v = L(s, J), g = a !== void 0, R = g ? a : b ?? n ?? f.current, A = n === !0 && R && (g || b === null), y = m(n);
33
+ const s = m(null), f = m(i), [v, z] = E(null), b = L(s, J), c = o !== void 0, R = c ? o : v ?? t ?? f.current, A = t === !0 && R && (c || v === null), N = m(t);
34
34
  M(() => {
35
- y.current !== n && (y.current = n, !g && b === null && v());
36
- }, [n, g, b, v]);
35
+ N.current !== t && (N.current = t, !c && v === null && b());
36
+ }, [t, c, v, b]);
37
37
  const P = G(
38
- (N) => {
39
- v(), g || z(N), e == null || e(N);
38
+ (y) => {
39
+ b(), c || z(y), e == null || e(y);
40
40
  },
41
- [v, g, e]
41
+ [b, c, e]
42
42
  );
43
- return /* @__PURE__ */ o(
43
+ return /* @__PURE__ */ r(
44
44
  H,
45
45
  {
46
46
  ref: s,
47
47
  "data-slot": "reasoning-root",
48
- "data-variant": t,
48
+ "data-variant": n,
49
49
  open: R,
50
50
  onOpenChange: P,
51
51
  className: u(
52
52
  "group/reasoning-root",
53
- K({ variant: t, className: r })
53
+ K({ variant: n, className: a })
54
54
  ),
55
55
  ...l,
56
- children: /* @__PURE__ */ o(h.Provider, { value: A, children: c })
56
+ children: /* @__PURE__ */ r(h.Provider, { value: A, children: g })
57
57
  }
58
58
  );
59
59
  }
60
60
  function x({
61
- side: r = "bottom",
62
- className: t,
63
- ...a
61
+ side: a = "bottom",
62
+ className: n,
63
+ ...o
64
64
  }) {
65
- return r === "top" ? /* @__PURE__ */ o(
65
+ return a === "top" ? /* @__PURE__ */ r(
66
66
  "div",
67
67
  {
68
68
  "data-slot": "reasoning-fade",
@@ -71,12 +71,12 @@ function x({
71
71
  "bg-[linear-gradient(to_bottom,var(--color-background),transparent)]",
72
72
  "group-data-[variant=muted]/reasoning-root:bg-[linear-gradient(to_bottom,hsl(var(--muted)/0.5),transparent)]",
73
73
  "fade-in-0 animate-in",
74
- "duration-(--duration-normal)",
75
- t
74
+ "duration-200",
75
+ n
76
76
  ),
77
- ...a
77
+ ...o
78
78
  }
79
- ) : /* @__PURE__ */ o(
79
+ ) : /* @__PURE__ */ r(
80
80
  "div",
81
81
  {
82
82
  "data-slot": "reasoning-fade",
@@ -85,36 +85,36 @@ function x({
85
85
  "bg-[linear-gradient(to_top,var(--color-background),transparent)]",
86
86
  "group-data-[variant=muted]/reasoning-root:bg-[linear-gradient(to_top,hsl(var(--muted)/0.5),transparent)]",
87
87
  "fade-in-0 animate-in",
88
- "duration-(--duration-normal)",
89
- t
88
+ "duration-200",
89
+ n
90
90
  ),
91
- ...a
91
+ ...o
92
92
  }
93
93
  );
94
94
  }
95
95
  function C({
96
- active: r,
97
- duration: t,
98
- className: a,
96
+ active: a,
97
+ duration: n,
98
+ className: o,
99
99
  ...e
100
100
  }) {
101
- const i = t ? ` (${t}s)` : "";
101
+ const i = n ? ` (${n}s)` : "";
102
102
  return /* @__PURE__ */ d(
103
103
  $,
104
104
  {
105
105
  "data-slot": "reasoning-trigger",
106
106
  className: u(
107
107
  "aui-reasoning-trigger group/trigger text-muted-foreground hover:text-foreground flex max-w-[75%] origin-left items-center gap-2 py-1.5 text-xs transition-[color,scale] active:scale-[0.98]",
108
- a
108
+ o
109
109
  ),
110
110
  ...e,
111
111
  children: [
112
- /* @__PURE__ */ o(
112
+ /* @__PURE__ */ r(
113
113
  B,
114
114
  {
115
115
  "data-slot": "reasoning-trigger-icon",
116
116
  stage: "thinking",
117
- status: r ? "active" : "complete",
117
+ status: a ? "active" : "complete",
118
118
  className: "aui-reasoning-trigger-icon size-4 shrink-0",
119
119
  "aria-hidden": !0
120
120
  }
@@ -129,7 +129,7 @@ function C({
129
129
  "Reasoning",
130
130
  i
131
131
  ] }),
132
- r ? /* @__PURE__ */ d(
132
+ a ? /* @__PURE__ */ d(
133
133
  "span",
134
134
  {
135
135
  "aria-hidden": !0,
@@ -144,13 +144,13 @@ function C({
144
144
  ]
145
145
  }
146
146
  ),
147
- /* @__PURE__ */ o(
147
+ /* @__PURE__ */ r(
148
148
  F,
149
149
  {
150
150
  "data-slot": "reasoning-trigger-chevron",
151
151
  className: u(
152
152
  "aui-reasoning-trigger-chevron mt-0.5 size-4 shrink-0",
153
- "transition-transform duration-(--duration-normal) ease-out motion-reduce:transition-none",
153
+ "transition-transform duration-200 ease-out motion-reduce:transition-none",
154
154
  "group-data-[state=closed]/trigger:-rotate-90",
155
155
  "group-data-[state=open]/trigger:rotate-0"
156
156
  )
@@ -161,9 +161,9 @@ function C({
161
161
  );
162
162
  }
163
163
  function I({
164
- className: r,
165
- children: t,
166
- ...a
164
+ className: a,
165
+ children: n,
166
+ ...o
167
167
  }) {
168
168
  const e = w(h);
169
169
  return /* @__PURE__ */ d(
@@ -174,73 +174,62 @@ function I({
174
174
  "aui-reasoning-content text-muted-foreground relative overflow-hidden text-xs outline-none",
175
175
  "group/collapsible-content",
176
176
  "data-[state=closed]:pointer-events-none",
177
- r
177
+ a
178
178
  ),
179
- ...a,
179
+ ...o,
180
180
  children: [
181
- /* @__PURE__ */ o(x, { side: "top" }),
182
- t,
183
- e ? /* @__PURE__ */ o(x, {}) : null
181
+ /* @__PURE__ */ r(x, { side: "top" }),
182
+ n,
183
+ e ? /* @__PURE__ */ r(x, {}) : null
184
184
  ]
185
185
  }
186
186
  );
187
187
  }
188
188
  function S({
189
- className: r,
190
- children: t,
191
- ...a
189
+ className: a,
190
+ children: n,
191
+ ...o
192
192
  }) {
193
- const e = w(h), i = m(null), n = m(null);
193
+ const e = w(h), i = m(null), t = m(null);
194
194
  return j(() => {
195
195
  if (!e) return;
196
- const c = i.current, l = n.current;
197
- if (!c || !l) return;
196
+ const g = i.current, l = t.current;
197
+ if (!g || !l) return;
198
198
  const s = () => {
199
- c.scrollTop = c.scrollHeight;
199
+ g.scrollTop = g.scrollHeight;
200
200
  };
201
201
  s();
202
202
  const f = new ResizeObserver(s);
203
203
  return f.observe(l), () => f.disconnect();
204
- }, [e]), /* @__PURE__ */ o(
204
+ }, [e]), /* @__PURE__ */ r(
205
205
  "div",
206
206
  {
207
207
  ref: i,
208
208
  "data-slot": "reasoning-text",
209
209
  className: u(
210
210
  "aui-reasoning-text relative z-0 max-h-64 overflow-y-auto ps-6 pt-2 pb-2 leading-relaxed text-pretty",
211
- "transform-gpu transition-[transform,opacity] ease-out",
212
- "motion-reduce:animate-none",
213
- "group-data-[state=open]/collapsible-content:animate-in",
214
- "group-data-[state=closed]/collapsible-content:animate-out",
215
- "group-data-[state=open]/collapsible-content:fade-in-0",
216
- "group-data-[state=closed]/collapsible-content:fade-out-0",
217
- "group-data-[state=open]/collapsible-content:slide-in-from-top-4",
218
- "group-data-[state=closed]/collapsible-content:slide-out-to-top-4",
219
- "group-data-[state=open]/collapsible-content:blur-in-[2px]",
220
- "group-data-[state=closed]/collapsible-content:blur-out-[2px]",
221
- "group-data-[state=open]/collapsible-content:duration-(--duration-normal)",
222
- "group-data-[state=closed]/collapsible-content:duration-(--duration-normal)",
223
- r
211
+ "transform-gpu",
212
+ a
224
213
  ),
225
- ...a,
226
- children: /* @__PURE__ */ o("div", { ref: n, className: "aui-reasoning-text-content space-y-4", children: t })
214
+ ...o,
215
+ children: /* @__PURE__ */ r("div", { ref: t, className: "aui-reasoning-text-content space-y-4", children: n })
227
216
  }
228
217
  );
229
218
  }
230
- const Q = () => /* @__PURE__ */ o(V, {}), W = ({
231
- children: r,
232
- startIndex: t,
233
- endIndex: a
219
+ const Q = () => /* @__PURE__ */ r(V, {}), W = ({
220
+ children: a,
221
+ startIndex: n,
222
+ endIndex: o
234
223
  }) => {
235
224
  const e = U((i) => {
236
225
  var l, s;
237
226
  if (((l = i.message.status) == null ? void 0 : l.type) !== "running") return !1;
238
- const n = i.message.parts.length - 1;
239
- return n < 0 || ((s = i.message.parts[n]) == null ? void 0 : s.type) !== "reasoning" ? !1 : n >= t && n <= a;
227
+ const t = i.message.parts.length - 1;
228
+ return t < 0 || ((s = i.message.parts[t]) == null ? void 0 : s.type) !== "reasoning" ? !1 : t >= n && t <= o;
240
229
  });
241
230
  return /* @__PURE__ */ d(k, { streaming: e, children: [
242
- /* @__PURE__ */ o(C, { active: e }),
243
- /* @__PURE__ */ o(I, { "aria-busy": e, children: /* @__PURE__ */ o(S, { children: r }) })
231
+ /* @__PURE__ */ r(C, { active: e }),
232
+ /* @__PURE__ */ r(I, { "aria-busy": e, children: /* @__PURE__ */ r(S, { children: a }) })
244
233
  ] });
245
234
  }, p = T(
246
235
  Q
@@ -1,9 +1,9 @@
1
1
  "use client";
2
- import { jsx as e, jsxs as r } from "react/jsx-runtime";
3
- import { Button as i } from "../ui/button.js";
2
+ import { jsx as e, jsxs as i } from "react/jsx-runtime";
3
+ import { Button as r } from "../ui/button.js";
4
4
  import { SuggestionPrimitive as t, ThreadPrimitive as o } from "@assistant-ui/react";
5
- const l = () => /* @__PURE__ */ e("div", { className: "aui-thread-welcome-suggestions flex w-full flex-wrap items-center justify-center gap-2 px-4", children: /* @__PURE__ */ e(o.Suggestions, { children: () => /* @__PURE__ */ e(s, {}) }) }), s = () => /* @__PURE__ */ e("div", { className: "aui-thread-welcome-suggestion-display fade-in slide-in-from-bottom-2 animate-in fill-mode-both duration-(--duration-normal)", children: /* @__PURE__ */ e(t.Trigger, { send: !0, asChild: !0, children: /* @__PURE__ */ r(
6
- i,
5
+ const l = () => /* @__PURE__ */ e("div", { className: "aui-thread-welcome-suggestions flex w-full flex-wrap items-center justify-center gap-2 px-4", children: /* @__PURE__ */ e(o.Suggestions, { children: () => /* @__PURE__ */ e(s, {}) }) }), s = () => /* @__PURE__ */ e("div", { className: "aui-thread-welcome-suggestion-display fade-in slide-in-from-bottom-2 animate-in fill-mode-both duration-200", children: /* @__PURE__ */ e(t.Trigger, { send: !0, asChild: !0, children: /* @__PURE__ */ i(
6
+ r,
7
7
  {
8
8
  variant: "ghost",
9
9
  className: "aui-thread-welcome-suggestion text-foreground hover:bg-muted border-border/60 h-auto gap-1.5 rounded-full border px-3.5 py-1.5 text-xs font-normal whitespace-nowrap transition-colors",
@@ -33,6 +33,8 @@ export type ThreadProps = {
33
33
  components?: ThreadComponents | undefined;
34
34
  /** Registers ADS's typed `render_answer` Tool UI. Enabled by default. */
35
35
  isAnswerToolEnabled?: boolean | undefined;
36
+ /** Keep the composer docked to the bottom even before the first message. */
37
+ composerPlacement?: "adaptive" | "bottom" | undefined;
36
38
  };
37
39
  export declare const EMPTY_COMPONENTS: ThreadComponents;
38
40
  export declare const ThreadComponentsContext: import('react').Context<ThreadComponents>;