@actioneer/ads 0.2.3 → 0.3.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 (70) hide show
  1. package/components/ai-elements/chain-of-thought.d.ts +88 -19
  2. package/components/ai-elements/chain-of-thought.js +358 -149
  3. package/components/ai-elements/chart.d.ts +30 -0
  4. package/components/ai-elements/chart.js +303 -0
  5. package/components/ai-elements/index.d.ts +2 -1
  6. package/components/ai-elements/message.d.ts +19 -4
  7. package/components/ai-elements/message.js +177 -130
  8. package/components/ai-elements/research-activity.d.ts +45 -0
  9. package/components/ai-elements/research-activity.js +260 -0
  10. package/components/ai-elements/task-progress.js +69 -66
  11. package/components/ai-elements/tool.js +42 -38
  12. package/components/answer.d.ts +19 -0
  13. package/components/answer.js +363 -300
  14. package/components/assistant-ui/attachment.js +5 -1
  15. package/components/assistant-ui/composer-deep-research.js +44 -29
  16. package/components/assistant-ui/composer-harness.js +55 -38
  17. package/components/assistant-ui/composer.js +16 -16
  18. package/components/assistant-ui/index.d.ts +0 -1
  19. package/components/assistant-ui/message.d.ts +7 -0
  20. package/components/assistant-ui/message.js +64 -51
  21. package/components/assistant-ui/primitives.d.ts +1 -1
  22. package/components/assistant-ui/thread-context.d.ts +2 -0
  23. package/components/assistant-ui/thread.js +34 -32
  24. package/components/brand-texture.d.ts +37 -0
  25. package/components/brand-texture.js +54 -0
  26. package/components/chart.d.ts +64 -2
  27. package/components/chart.js +717 -456
  28. package/components/code-block.d.ts +36 -0
  29. package/components/code-block.js +136 -0
  30. package/components/command-palette.d.ts +43 -0
  31. package/components/command-palette.js +146 -0
  32. package/components/drawer.d.ts +1 -1
  33. package/components/file-dropzone.d.ts +32 -0
  34. package/components/file-dropzone.js +134 -0
  35. package/components/index.d.ts +11 -0
  36. package/components/index.js +480 -430
  37. package/components/infinite-canvas.d.ts +50 -0
  38. package/components/infinite-canvas.js +215 -0
  39. package/components/page-header.d.ts +22 -0
  40. package/components/page-header.js +52 -0
  41. package/components/resizable-panel.d.ts +29 -0
  42. package/components/resizable-panel.js +102 -0
  43. package/components/reveal.d.ts +36 -0
  44. package/components/reveal.js +35 -0
  45. package/components/scroll-area.d.ts +19 -0
  46. package/components/scroll-area.js +57 -0
  47. package/components/setting-row.d.ts +35 -0
  48. package/components/setting-row.js +86 -0
  49. package/components/sidebar.d.ts +4 -1
  50. package/components/sidebar.js +134 -132
  51. package/components/stepper.d.ts +32 -0
  52. package/components/stepper.js +113 -0
  53. package/components/table.js +16 -15
  54. package/components/tabs.js +1 -1
  55. package/hooks/agents-ui/voice-visualizer-types.js +1 -0
  56. package/lib/icons.d.ts +24 -0
  57. package/lib/icons.js +100 -110
  58. package/lib/motion.d.ts +5 -3
  59. package/lib/motion.js +46 -20
  60. package/lib/router.js +19 -0
  61. package/lib/utils.js +5 -0
  62. package/llms.txt +143 -39
  63. package/manifest.json +1232 -100
  64. package/package.json +2 -2
  65. package/styles.css +71 -28
  66. package/theme.css +19 -15
  67. package/components/ai-elements/reasoning.d.ts +0 -26
  68. package/components/ai-elements/reasoning.js +0 -131
  69. package/components/assistant-ui/smart-message-text.d.ts +0 -15
  70. package/components/assistant-ui/smart-message-text.js +0 -29
@@ -1,29 +1,31 @@
1
1
  "use client";
2
2
  import { jsxs as l, jsx as o } from "react/jsx-runtime";
3
- import { Composer as d } from "./composer.js";
3
+ import { Composer as m } from "./composer.js";
4
4
  import { ComposerPlaceholdersProvider as z } from "./composer.js";
5
- import { RenderAnswerToolUI as s } from "./answer-tool-ui.js";
6
- import { ThreadFollowupSuggestions as c } from "./follow-up-suggestions.js";
7
- import { ThreadMessage as f } from "./message.js";
8
- import { SelectionToolbar as u } from "./selection-toolbar.js";
9
- import { ThreadSuggestions as h } from "./suggestions.js";
10
- import { isNewChatView as a, ThreadComponentsContext as m, EMPTY_COMPONENTS as p } from "./thread-context.js";
11
- import { TooltipIconButton as x } from "./tooltip-icon-button.js";
12
- import { cn as b } from "../../lib/cn.js";
13
- import { useAuiState as w, ThreadPrimitive as e, AuiIf as n } from "@assistant-ui/react";
14
- import { ArrowDown as g } from "../../lib/icons.js";
15
- import { useContext as v } from "react";
5
+ import { RenderAnswerToolUI as c } from "./answer-tool-ui.js";
6
+ import { ThreadFollowupSuggestions as f } from "./follow-up-suggestions.js";
7
+ import { ThreadMessage as u } from "./message.js";
8
+ import { SelectionToolbar as h } from "./selection-toolbar.js";
9
+ import { ThreadSuggestions as p } from "./suggestions.js";
10
+ import { isNewChatView as a, ThreadComponentsContext as s, EMPTY_COMPONENTS as x } from "./thread-context.js";
11
+ import { TooltipIconButton as b } from "./tooltip-icon-button.js";
12
+ import { cn as w } from "../../lib/cn.js";
13
+ import { useAuiState as g, ThreadPrimitive as e, AuiIf as d } from "@assistant-ui/react";
14
+ import { ArrowDown as v } from "../../lib/icons.js";
15
+ import { useContext as T } from "react";
16
16
  const F = ({
17
- components: r = p,
17
+ components: r = x,
18
18
  isAnswerToolEnabled: i = !0
19
19
  }) => {
20
- const t = w(a);
21
- return /* @__PURE__ */ l(m.Provider, { value: r, children: [
22
- i && /* @__PURE__ */ o(s, {}),
23
- /* @__PURE__ */ o(T, { isEmpty: t })
20
+ const t = g(a);
21
+ return /* @__PURE__ */ l(s.Provider, { value: r, children: [
22
+ i && /* @__PURE__ */ o(c, {}),
23
+ /* @__PURE__ */ o(N, { isEmpty: t })
24
24
  ] });
25
- }, T = ({ isEmpty: r }) => {
26
- const { Welcome: i = y } = v(m);
25
+ }, N = ({ isEmpty: r }) => {
26
+ const { Welcome: i = k, ComposerDock: t } = T(
27
+ s
28
+ );
27
29
  return /* @__PURE__ */ l(e.Root, { className: "aui-root aui-thread-root bg-background @container flex h-full flex-col", children: [
28
30
  /* @__PURE__ */ o(
29
31
  e.Viewport,
@@ -32,45 +34,45 @@ const F = ({
32
34
  "data-slot": "aui_thread-viewport",
33
35
  className: "relative flex flex-1 flex-col overflow-x-auto overflow-y-scroll scroll-smooth",
34
36
  children: /* @__PURE__ */ l("div", { className: "mx-auto flex w-full max-w-(--thread-max-width) flex-1 flex-col px-4 pt-4", children: [
35
- /* @__PURE__ */ o(n, { condition: a, children: /* @__PURE__ */ o("div", { className: "flex flex-1 flex-col items-center justify-end", children: /* @__PURE__ */ o(i, {}) }) }),
37
+ /* @__PURE__ */ o(d, { condition: a, children: /* @__PURE__ */ o("div", { className: "flex flex-1 flex-col items-center justify-end", children: /* @__PURE__ */ o(i, {}) }) }),
36
38
  /* @__PURE__ */ o(
37
39
  "div",
38
40
  {
39
41
  "data-slot": "aui_message-group",
40
- className: "mb-14 flex flex-col gap-y-6 empty:hidden",
41
- children: /* @__PURE__ */ o(e.Messages, { children: () => /* @__PURE__ */ o(f, {}) })
42
+ className: "mb-14 flex flex-col gap-y-8 empty:hidden",
43
+ children: /* @__PURE__ */ o(e.Messages, { children: () => /* @__PURE__ */ o(u, {}) })
42
44
  }
43
45
  ),
44
46
  /* @__PURE__ */ l(
45
47
  e.ViewportFooter,
46
48
  {
47
- className: b(
49
+ className: w(
48
50
  "aui-thread-viewport-footer bg-background flex flex-col gap-4 overflow-visible pb-4 md:pb-6",
49
51
  r && "flex-1",
50
52
  !r && "sticky bottom-0 mt-auto rounded-t-(--composer-radius)"
51
53
  ),
52
54
  children: [
53
- /* @__PURE__ */ o(N, {}),
54
- /* @__PURE__ */ o(c, {}),
55
- /* @__PURE__ */ o(d, {}),
56
- /* @__PURE__ */ o(n, { condition: (t) => a(t) && t.composer.isEmpty, children: /* @__PURE__ */ o(h, {}) })
55
+ /* @__PURE__ */ o(C, {}),
56
+ /* @__PURE__ */ o(f, {}),
57
+ t ? /* @__PURE__ */ o(t, { children: /* @__PURE__ */ o(m, {}) }) : /* @__PURE__ */ o(m, {}),
58
+ /* @__PURE__ */ o(d, { condition: (n) => a(n) && n.composer.isEmpty, children: /* @__PURE__ */ o(p, {}) })
57
59
  ]
58
60
  }
59
61
  )
60
62
  ] })
61
63
  }
62
64
  ),
63
- /* @__PURE__ */ o(u, {})
65
+ /* @__PURE__ */ o(h, {})
64
66
  ] });
65
- }, N = () => /* @__PURE__ */ o(e.ScrollToBottom, { asChild: !0, children: /* @__PURE__ */ o(
66
- x,
67
+ }, C = () => /* @__PURE__ */ o(e.ScrollToBottom, { asChild: !0, children: /* @__PURE__ */ o(
68
+ b,
67
69
  {
68
70
  tooltip: "Scroll to bottom",
69
71
  variant: "outline",
70
72
  className: "aui-thread-scroll-to-bottom dark:border-border dark:bg-background dark:hover:bg-accent absolute -top-12 z-10 self-center rounded-full p-4 disabled:invisible",
71
- children: /* @__PURE__ */ o(g, {})
73
+ children: /* @__PURE__ */ o(v, {})
72
74
  }
73
- ) }), y = () => /* @__PURE__ */ o("div", { className: "aui-thread-welcome-root mb-6 flex flex-col items-center px-4 text-center", children: /* @__PURE__ */ o("h1", { className: "aui-thread-welcome-message-inner fade-in slide-in-from-bottom-1 animate-in fill-mode-both text-xl font-semibold duration-(--duration-normal)", children: "How can I help you today?" }) });
75
+ ) }), k = () => /* @__PURE__ */ o("div", { className: "aui-thread-welcome-root mb-6 flex flex-col items-center px-4 text-center", children: /* @__PURE__ */ o("h1", { className: "aui-thread-welcome-message-inner fade-in slide-in-from-bottom-1 animate-in fill-mode-both text-xl font-semibold duration-(--duration-normal)", children: "How can I help you today?" }) });
74
76
  export {
75
77
  z as ComposerPlaceholdersProvider,
76
78
  F as Thread
@@ -0,0 +1,37 @@
1
+ import * as React from "react";
2
+ /**
3
+ * BrandTexture — the ambient halftone canvas behind welcome and hero
4
+ * surfaces: the growth-mark's triangle cells drifting as a quiet ink wash.
5
+ * It mounts with a radial bloom (centre → corners) and exits with a cloud
6
+ * lift (`lifted`): the field dissolves bottom-up while drifting upward, like
7
+ * cloud cover breaking. The layer is decorative — `aria-hidden`,
8
+ * `pointer-events-none`, absolutely positioned over a `relative` parent —
9
+ * and its rest opacity flows from `--chat-texture-opacity`.
10
+ *
11
+ * The WebGL canvas stays pixel-capped and pauses when hidden
12
+ * (PixelBlastSVG); pass `paused` to stop the clock explicitly — set it a
13
+ * beat AFTER `lifted` so the cloud stays alive while it rises. Reveal and
14
+ * lift respect reduced motion (fade only).
15
+ */
16
+ /** The tuned shader field itself — full-bleed, no wash chrome. */
17
+ export declare function BrandTextureField({ paused, speed, className, }: {
18
+ paused?: boolean;
19
+ /** Shader clock multiplier; 1.5 is the house drift. */
20
+ speed?: number;
21
+ className?: string;
22
+ }): React.JSX.Element;
23
+ export declare namespace BrandTextureField {
24
+ var displayName: string;
25
+ }
26
+ export interface BrandTextureProps extends React.HTMLAttributes<HTMLDivElement> {
27
+ /** Stops the shader clock (the canvas keeps its last frame). */
28
+ paused?: boolean;
29
+ /** Plays the cloud-lift exit — dissolve bottom→top, drift up, fade. */
30
+ lifted?: boolean;
31
+ /** Shader clock multiplier; 1.5 is the house drift. */
32
+ speed?: number;
33
+ }
34
+ export declare const BrandTexture: {
35
+ ({ paused, lifted, speed, className, ...props }: BrandTextureProps): React.JSX.Element;
36
+ displayName: string;
37
+ };
@@ -0,0 +1,54 @@
1
+ "use client";
2
+ import { jsx as e } from "react/jsx-runtime";
3
+ import { cn as i } from "../lib/cn.js";
4
+ import { PixelBlastSVG as s } from "./pixel-blast-svg.js";
5
+ function l({
6
+ paused: t = !1,
7
+ speed: a = 1.5,
8
+ className: r
9
+ }) {
10
+ return /* @__PURE__ */ e("div", { className: i("size-full bg-background", r), children: /* @__PURE__ */ e(
11
+ s,
12
+ {
13
+ variant: "custom",
14
+ color: "var(--color-ink-950)",
15
+ pixelSize: 4,
16
+ speed: a,
17
+ patternScale: 3,
18
+ patternDensity: 1.8,
19
+ pixelSizeJitter: 0.5,
20
+ enableRipples: !1,
21
+ liquid: !1,
22
+ toneAmount: 0,
23
+ edgeFade: 0.25,
24
+ transparent: !0,
25
+ paused: t
26
+ }
27
+ ) });
28
+ }
29
+ const o = ({
30
+ paused: t,
31
+ lifted: a,
32
+ speed: r = 1.5,
33
+ className: n,
34
+ ...d
35
+ }) => /* @__PURE__ */ e(
36
+ "div",
37
+ {
38
+ "aria-hidden": !0,
39
+ "data-slot": "brand-texture",
40
+ className: i(
41
+ "ads-texture-reveal ads-texture-lift pointer-events-none absolute inset-0 overflow-hidden",
42
+ a ? "ads-texture-lifted opacity-0" : "opacity-(--chat-texture-opacity)",
43
+ n
44
+ ),
45
+ ...d,
46
+ children: /* @__PURE__ */ e("div", { className: "h-full w-full", children: /* @__PURE__ */ e(l, { paused: t, speed: r }) })
47
+ }
48
+ );
49
+ o.displayName = "BrandTexture";
50
+ l.displayName = "BrandTextureField";
51
+ export {
52
+ o as BrandTexture,
53
+ l as BrandTextureField
54
+ };
@@ -2,6 +2,41 @@ import * as React from "react";
2
2
  /** One row of chart data. Gaps (null/undefined) render as breaks in the series. */
3
3
  export type ChartDatum = Record<string, string | number | null | undefined>;
4
4
  export type ChartColor = "primary" | "success" | "warning" | "danger" | "info";
5
+ /** Bounded Recharts domain surface — enough for fixed and data-driven axes. */
6
+ export type ChartAxisDomain = [string | number, string | number];
7
+ export type ChartTickFormatter = (value: string | number) => string | number;
8
+ export type ChartXScale = "category" | "time";
9
+ export interface ChartTooltipItem {
10
+ key: string | number;
11
+ name: string | number;
12
+ value: unknown;
13
+ color?: string;
14
+ /** Original row supplied to the chart. */
15
+ datum?: ChartDatum;
16
+ }
17
+ export interface ChartTooltipContext {
18
+ active: boolean;
19
+ label?: string | number;
20
+ items: ChartTooltipItem[];
21
+ formatValue: (value: number) => string;
22
+ }
23
+ /** Return custom tooltip content, or pass `false` to disable tooltips. */
24
+ export type ChartTooltipRenderer = (context: ChartTooltipContext) => React.ReactNode;
25
+ export interface FunnelLabelContext {
26
+ datum: ChartDatum;
27
+ index: number;
28
+ name: string;
29
+ value: number;
30
+ conversionFromFirst: number;
31
+ conversionFromPrevious: number;
32
+ dropOffFromPrevious: number;
33
+ x: number;
34
+ y: number;
35
+ width: number;
36
+ height: number;
37
+ formatValue: (value: number) => string;
38
+ }
39
+ export type FunnelLabelRenderer = (context: FunnelLabelContext) => React.ReactNode;
5
40
  export type ChartAnnotation = {
6
41
  /** A goal / threshold line. `axis: "y"` (default) draws horizontal at a value; `axis: "x"` marks an event at a category. */
7
42
  kind: "line";
@@ -48,6 +83,16 @@ interface BaseChartProps {
48
83
  legend?: boolean;
49
84
  showYAxis?: boolean;
50
85
  formatValue?: (value: number) => string;
86
+ /** Numeric/time x-axis scale. Time data must use numeric timestamps. */
87
+ xScale?: ChartXScale;
88
+ /** Explicit screen-axis domains; e.g. `yDomain={[0, 100]}`. */
89
+ xDomain?: ChartAxisDomain;
90
+ yDomain?: ChartAxisDomain;
91
+ xTickFormatter?: ChartTickFormatter;
92
+ yTickFormatter?: ChartTickFormatter;
93
+ /** Width reserved for the y axis (useful for long horizontal-bar labels). */
94
+ yAxisWidth?: number;
95
+ tooltip?: ChartTooltipRenderer | false;
51
96
  className?: string;
52
97
  }
53
98
  export interface LineChartProps extends BaseChartProps {
@@ -63,6 +108,8 @@ export interface AreaChartProps extends BaseChartProps {
63
108
  }
64
109
  export interface BarChartProps extends BaseChartProps {
65
110
  stacked?: boolean;
111
+ /** Visual bar direction: vertical columns (default) or horizontal bars. */
112
+ layout?: "vertical" | "horizontal";
66
113
  }
67
114
  export interface ComboChartProps extends BaseChartProps {
68
115
  /** Series keys drawn as lines; the rest draw as bars. */
@@ -89,9 +136,10 @@ export interface PieChartProps {
89
136
  height?: number;
90
137
  legend?: boolean;
91
138
  formatValue?: (value: number) => string;
139
+ tooltip?: ChartTooltipRenderer | false;
92
140
  className?: string;
93
141
  }
94
- export type RadarChartProps = Omit<BaseChartProps, "annotations" | "grid" | "showYAxis"> & {
142
+ export type RadarChartProps = Omit<BaseChartProps, "annotations" | "grid" | "showYAxis" | "xScale" | "xDomain" | "yDomain" | "xTickFormatter" | "yTickFormatter" | "yAxisWidth"> & {
95
143
  /** Maximum ring value. Defaults to the largest value in the provided series. */
96
144
  maxValue?: number;
97
145
  };
@@ -107,6 +155,7 @@ export interface RadialBarChartProps {
107
155
  height?: number;
108
156
  legend?: boolean;
109
157
  formatValue?: (value: number) => string;
158
+ tooltip?: ChartTooltipRenderer | false;
110
159
  className?: string;
111
160
  }
112
161
  export interface TreemapDatum {
@@ -121,6 +170,7 @@ export interface TreemapChartProps {
121
170
  valueKey: string;
122
171
  height?: number;
123
172
  formatValue?: (value: number) => string;
173
+ tooltip?: ChartTooltipRenderer | false;
124
174
  className?: string;
125
175
  }
126
176
  export interface ScatterChartProps {
@@ -136,6 +186,13 @@ export interface ScatterChartProps {
136
186
  grid?: boolean;
137
187
  showYAxis?: boolean;
138
188
  formatValue?: (value: number) => string;
189
+ xScale?: Exclude<ChartXScale, "category"> | "number";
190
+ xDomain?: ChartAxisDomain;
191
+ yDomain?: ChartAxisDomain;
192
+ xTickFormatter?: ChartTickFormatter;
193
+ yTickFormatter?: ChartTickFormatter;
194
+ yAxisWidth?: number;
195
+ tooltip?: ChartTooltipRenderer | false;
139
196
  className?: string;
140
197
  }
141
198
  export interface FunnelChartProps {
@@ -146,6 +203,11 @@ export interface FunnelChartProps {
146
203
  valueKey: string;
147
204
  height?: number;
148
205
  formatValue?: (value: number) => string;
206
+ /** Custom data-bearing stage label, or false to hide labels. */
207
+ label?: FunnelLabelRenderer | false;
208
+ /** Space reserved on the right for the label channel. */
209
+ labelWidth?: number;
210
+ tooltip?: ChartTooltipRenderer | false;
149
211
  className?: string;
150
212
  }
151
213
  export declare const LineChart: React.ForwardRefExoticComponent<LineChartProps & React.RefAttributes<HTMLDivElement>>;
@@ -155,7 +217,7 @@ export declare const ComboChart: React.ForwardRefExoticComponent<ComboChartProps
155
217
  export declare const ComposedChart: React.ForwardRefExoticComponent<ComboChartProps & React.RefAttributes<HTMLDivElement>>;
156
218
  export declare const ScatterChart: React.ForwardRefExoticComponent<ScatterChartProps & React.RefAttributes<HTMLDivElement>>;
157
219
  export declare const PieChart: React.ForwardRefExoticComponent<PieChartProps & React.RefAttributes<HTMLDivElement>>;
158
- export declare const RadarChart: React.ForwardRefExoticComponent<Omit<BaseChartProps, "grid" | "annotations" | "showYAxis"> & {
220
+ export declare const RadarChart: React.ForwardRefExoticComponent<Omit<BaseChartProps, "grid" | "annotations" | "showYAxis" | "xScale" | "xDomain" | "yDomain" | "xTickFormatter" | "yTickFormatter" | "yAxisWidth"> & {
159
221
  /** Maximum ring value. Defaults to the largest value in the provided series. */
160
222
  maxValue?: number;
161
223
  } & React.RefAttributes<HTMLDivElement>>;