@actioneer/ads 0.6.0 → 0.8.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 (123) hide show
  1. package/DESIGN.md +597 -0
  2. package/components/ai-elements/agent-trace.d.ts +2 -2
  3. package/components/ai-elements/agent-trace.js +164 -105
  4. package/components/ai-elements/chain-of-thought.d.ts +2 -2
  5. package/components/ai-elements/chain-of-thought.js +1 -1
  6. package/components/ai-elements/index.d.ts +0 -5
  7. package/components/ai-elements/inline-citation.js +1 -1
  8. package/components/alert.d.ts +6 -6
  9. package/components/alert.js +89 -53
  10. package/components/answer-sources.d.ts +2 -6
  11. package/components/answer-sources.js +58 -60
  12. package/components/answer.d.ts +5 -0
  13. package/components/answer.js +311 -271
  14. package/components/assistant-ui/action-bar.js +1 -1
  15. package/components/assistant-ui/attachment.js +11 -11
  16. package/components/assistant-ui/badge.js +18 -18
  17. package/components/assistant-ui/composer-harness.js +15 -20
  18. package/components/assistant-ui/composer-trigger-popover.js +9 -9
  19. package/components/assistant-ui/composer.d.ts +3 -1
  20. package/components/assistant-ui/composer.js +148 -144
  21. package/components/assistant-ui/image.js +61 -61
  22. package/components/assistant-ui/index.d.ts +0 -3
  23. package/components/assistant-ui/message-timing.js +1 -1
  24. package/components/assistant-ui/selection-toolbar.js +7 -7
  25. package/components/assistant-ui/thread-context.d.ts +3 -1
  26. package/components/assistant-ui/thread.js +50 -42
  27. package/components/avatar.js +42 -42
  28. package/components/badge.d.ts +5 -6
  29. package/components/badge.js +13 -76
  30. package/components/body-page-header.d.ts +15 -0
  31. package/components/body-page-header.js +24 -0
  32. package/components/brand-loader.d.ts +0 -3
  33. package/components/brand-loader.js +10 -32
  34. package/components/breadcrumbs.d.ts +0 -7
  35. package/components/breadcrumbs.js +54 -71
  36. package/components/button.d.ts +1 -1
  37. package/components/button.js +55 -49
  38. package/components/chart.js +298 -296
  39. package/components/chip.d.ts +13 -1
  40. package/components/chip.js +93 -80
  41. package/components/collection-header.d.ts +17 -0
  42. package/components/collection-header.js +31 -0
  43. package/components/connector-card.d.ts +6 -6
  44. package/components/connector-card.js +31 -32
  45. package/components/date-range-picker.d.ts +2 -1
  46. package/components/date-range-picker.js +158 -122
  47. package/components/divider.js +25 -25
  48. package/components/drawer.d.ts +6 -2
  49. package/components/drawer.js +61 -58
  50. package/components/dropdown.d.ts +1 -2
  51. package/components/dropdown.js +88 -89
  52. package/components/field.js +41 -36
  53. package/components/file-dropzone.js +1 -1
  54. package/components/index.d.ts +4 -4
  55. package/components/index.js +501 -549
  56. package/components/infinite-canvas.js +24 -24
  57. package/components/input-field.d.ts +18 -3
  58. package/components/input-field.js +88 -72
  59. package/components/input.js +32 -29
  60. package/components/modal.d.ts +31 -3
  61. package/components/modal.js +244 -170
  62. package/components/number-field.js +45 -42
  63. package/components/page-body.d.ts +12 -0
  64. package/components/page-body.js +18 -0
  65. package/components/pagination.js +36 -36
  66. package/components/pixel-blast-svg.js +71 -73
  67. package/components/select.d.ts +21 -0
  68. package/components/select.js +189 -148
  69. package/components/setting-row.d.ts +6 -5
  70. package/components/setting-row.js +33 -32
  71. package/components/sidebar.d.ts +2 -0
  72. package/components/sidebar.js +151 -141
  73. package/components/skeleton.js +8 -7
  74. package/components/slider.js +1 -1
  75. package/components/surface-loader.d.ts +11 -0
  76. package/components/surface-loader.js +35 -0
  77. package/components/table.d.ts +16 -10
  78. package/components/table.js +427 -412
  79. package/components/tabs.d.ts +2 -0
  80. package/components/tabs.js +160 -295
  81. package/components/textarea.js +9 -9
  82. package/components/toast.d.ts +1 -1
  83. package/components/toast.js +181 -118
  84. package/components/tree.d.ts +5 -1
  85. package/components/tree.js +54 -49
  86. package/components/typography.d.ts +4 -4
  87. package/components/typography.js +13 -13
  88. package/components/ui/button.d.ts +1 -1
  89. package/components/ui/button.js +4 -4
  90. package/components/ui/dialog.js +25 -25
  91. package/demo/components/add-to-artifact.js +6 -10
  92. package/lib/cn.js +11 -4
  93. package/lib/icons.d.ts +4 -0
  94. package/lib/icons.js +103 -102
  95. package/lib/interactive.d.ts +1 -1
  96. package/llms.txt +132 -188
  97. package/manifest.json +1719 -2831
  98. package/package.json +2 -2
  99. package/styles.css +362 -233
  100. package/theme.css +312 -177
  101. package/components/agent-icon.d.ts +0 -76
  102. package/components/agent-icon.js +0 -265
  103. package/components/ai-elements/queue.d.ts +0 -60
  104. package/components/ai-elements/queue.js +0 -193
  105. package/components/ai-elements/speech-input.d.ts +0 -16
  106. package/components/ai-elements/speech-input.js +0 -151
  107. package/components/ai-elements/task-progress.d.ts +0 -41
  108. package/components/ai-elements/task-progress.js +0 -224
  109. package/components/ai-elements/task.d.ts +0 -39
  110. package/components/ai-elements/task.js +0 -105
  111. package/components/ai-elements/voice.d.ts +0 -90
  112. package/components/ai-elements/voice.js +0 -496
  113. package/components/assistant-ui/follow-up-suggestions.d.ts +0 -11
  114. package/components/assistant-ui/follow-up-suggestions.js +0 -72
  115. package/components/assistant-ui/suggestions.d.ts +0 -7
  116. package/components/assistant-ui/suggestions.js +0 -19
  117. package/components/assistant-ui/voice.d.ts +0 -18
  118. package/components/link.d.ts +0 -14
  119. package/components/link.js +0 -72
  120. package/components/navbar.d.ts +0 -15
  121. package/components/navbar.js +0 -68
  122. package/components/pixel-icon.d.ts +0 -37
  123. package/components/pixel-icon.js +0 -859
@@ -1,76 +0,0 @@
1
- import * as React from "react";
2
- /**
3
- * AgentIcon — the "living agent" creative-icon family (the second special-icon
4
- * tier alongside {@link PixelIcon}). 24 self-contained, dependency-free animated
5
- * marks: a hatched tile field clipped to a silhouette, paired rectangular eyes,
6
- * and four interaction states —
7
- *
8
- * • `default` — a slow breathing settle (idle, gently alive)
9
- * • `thinking` — a cool focus scan crosses the shifting hatch as the eyes search
10
- * • `acting` — a quick speaking size cadence (a.k.a. "speaking")
11
- * • `sleep` — the silhouette floats, desaturates, and closes its eyes
12
- *
13
- * Left uncontrolled it is interactive: hover/focus → `thinking`, click → `acting`
14
- * for 1.5s, then it settles. Pass `state` to drive it externally (an agent's live
15
- * status), which turns the pointer interactions off unless `interactive` is set.
16
- *
17
- * These are EXPRESSIVE marks for unique moments (an agent avatar, a voice/thinking
18
- * surface, an empty state) — not functional UI glyphs. For those use the Phosphor
19
- * registry at `@/lib/icons` (principle 4). The whole thing is one SVG + injected
20
- * CSS keyframes: no OGL/WebGL, no external dependency, safe in ADS and the product.
21
- */
22
- export type AgentIconName = "orb" | "heart" | "soft-square" | "hex" | "spark" | "clover-x" | "ripple" | "bloom" | "sun" | "pulse" | "triangle" | "quad-flower" | "hexagon" | "star" | "stack" | "butterfly" | "octagon" | "heart-drop" | "soft-scallop" | "arch" | "pentagon" | "diamond" | "leaf" | "dome";
23
- export type AgentIconState = "default" | "thinking" | "acting" | "sleep";
24
- /** Named product-safe recolors. Raw palette values stay inside ADS. */
25
- export type AgentIconColorPreset = "field";
26
- interface AgentConfig {
27
- id: AgentIconName;
28
- name: string;
29
- color: string;
30
- eyeColor: string;
31
- eyeY?: number;
32
- shape: string;
33
- }
34
- /** The 24 agent forms. All eyes share the one ink tone (source override). */
35
- export declare const AGENT_ICONS: readonly AgentConfig[];
36
- /** Names in registry order (matches the source's 01–24 numbering). */
37
- export declare const AGENT_ICON_NAMES: AgentIconName[];
38
- export interface AgentIconProps extends Omit<React.HTMLAttributes<HTMLSpanElement>, "children"> {
39
- /** Which of the 24 agent forms to render. */
40
- agent: AgentIconName;
41
- /**
42
- * Drive the state externally (an agent's live status). When set, pointer
43
- * interactions are OFF unless `interactive` is also true.
44
- */
45
- state?: AgentIconState;
46
- /**
47
- * Force interactivity on/off. Defaults to interactive when `state` is
48
- * uncontrolled, and static when `state` is provided.
49
- */
50
- interactive?: boolean;
51
- /** Rendered size in px (square). Defaults to 40. */
52
- size?: number;
53
- /** Number of tiles per side. Defaults to 7; larger display marks can use a denser field. */
54
- tileGridSize?: number;
55
- /** Scale applied to the paired eyes. Defaults to 1. */
56
- eyeScale?: number;
57
- /** Override the paired eye color without changing the hatch palette. */
58
- eyeColor?: string;
59
- /** Play the staggered tile-assembly animation when mounted. Defaults to true. */
60
- animateOnMount?: boolean;
61
- /**
62
- * Override the mark's base hue (any CSS hex). The five-tone hatch palette is
63
- * re-derived from it, so the whole silhouette recolors. Defaults to the
64
- * form's own registry color.
65
- */
66
- color?: string;
67
- /** Product-safe named recolor. `color` wins when both are supplied. */
68
- colorPreset?: AgentIconColorPreset;
69
- /**
70
- * Eyes follow the cursor (the "Field Agent" greeter treatment). Tracks the
71
- * pointer globally; disabled under reduced motion.
72
- */
73
- trackPointer?: boolean;
74
- }
75
- export declare const AgentIcon: React.ForwardRefExoticComponent<AgentIconProps & React.RefAttributes<HTMLSpanElement>>;
76
- export {};
@@ -1,265 +0,0 @@
1
- "use client";
2
- import { jsx as L } from "react/jsx-runtime";
3
- import * as s from "react";
4
- import { cn as ee } from "../lib/cn.js";
5
- const te = {
6
- field: "#4565d5"
7
- };
8
- function b(e, n, c, i = -Math.PI / 2) {
9
- const p = [], t = e * 2;
10
- for (let a = 0; a < t; a += 1) {
11
- const g = a % 2 === 0 ? n : c, h = i + Math.PI * a / e;
12
- p.push(
13
- `${(18 + Math.cos(h) * g).toFixed(2)},${(18 + Math.sin(h) * g).toFixed(2)}`
14
- );
15
- }
16
- return p.join(" ");
17
- }
18
- function y(e, n, c) {
19
- const i = (t, a) => Number.parseInt(t.slice(1), 16) >> a & 255, p = (t) => Math.round(i(e, t) + (i(n, t) - i(e, t)) * c);
20
- return `#${[16, 8, 0].map((t) => p(t).toString(16).padStart(2, "0")).join("")}`;
21
- }
22
- function ae(e) {
23
- return [
24
- y(e, "#16213f", 0.2),
25
- y(e, "#ffffff", 0.04),
26
- y(e, "#ffffff", 0.16),
27
- y(e, "#ffffff", 0.3),
28
- y(e, "#233055", 0.1)
29
- ];
30
- }
31
- const j = [
32
- { spacing: 2.15, strokeWidth: 1.38, phase: 0 },
33
- { spacing: 2.65, strokeWidth: 1.72, phase: 0.38 },
34
- { spacing: 3.1, strokeWidth: 1.78, phase: 0.72 },
35
- { spacing: 3.65, strokeWidth: 2.2, phase: 1.06 }
36
- ];
37
- function ne(e, n, c = 7) {
38
- const i = ae(e.color), p = y(e.color, "#4fe6ff", 0.58), t = Math.max(4, Math.min(12, Math.round(c))), a = 36 / t, g = Math.min(0.18, a * 0.05), h = (t - 1) / 2, $ = Math.max(Math.hypot(h, h), 1), v = [...e.id].reduce((l, r) => l + r.charCodeAt(0), 0), C = i.flatMap(
39
- (l, r) => j.map(
40
- (f, m) => `
41
- <pattern id="${n}-hatch-${r}-${m}" width="${f.spacing}" height="${f.spacing}" patternUnits="userSpaceOnUse" patternTransform="rotate(45) translate(${f.phase} 0)">
42
- <rect width="${f.strokeWidth}" height="${f.spacing}" fill="${l}" />
43
- </pattern>`
44
- )
45
- ).join(""), k = [];
46
- for (let l = 0; l < t; l += 1)
47
- for (let r = 0; r < t; r += 1) {
48
- const f = (r * 3 + l * 5 + v) % i.length, m = (r + l * 2 + v) % j.length, d = Math.hypot(r - h, l - h) / $, w = Math.round(d * 620);
49
- k.push(
50
- `<rect class="agent-avatar__tile" x="${(r * a + g).toFixed(3)}" y="${(l * a + g).toFixed(3)}" width="${(a - g * 2).toFixed(3)}" height="${(a - g * 2).toFixed(3)}" rx="0.18" fill="url(#${n}-hatch-${f}-${m})" style="--agent-tile-delay: ${w}ms" />`
51
- );
52
- }
53
- return `
54
- <defs>
55
- <clipPath id="${n}-shape" clipPathUnits="userSpaceOnUse">${e.shape}</clipPath>
56
- ${C}
57
- <pattern id="${n}-focus-hatch" width="2.3" height="2.3" patternUnits="userSpaceOnUse" patternTransform="rotate(45)">
58
- <rect width="1.46" height="2.3" fill="${p}" />
59
- </pattern>
60
- </defs>
61
- <g class="agent-avatar__field" clip-path="url(#${n}-shape)">${k.join("")}</g>
62
- <rect class="agent-avatar__focus-scan" x="-8" y="1" width="7" height="34" rx="3.5" fill="url(#${n}-focus-hatch)" clip-path="url(#${n}-shape)" aria-hidden="true" />
63
- `;
64
- }
65
- function re(e, n = 1) {
66
- const c = 4 * n, i = 7 * n, t = (e.eyeY ?? 13) + 3.5 - i / 2, a = Math.min(1, c * 0.25), g = 14 - c / 2, h = 22 - c / 2;
67
- return `
68
- <g class="agent-avatar__eyes" fill="${e.eyeColor}" aria-hidden="true">
69
- <rect class="agent-avatar__eye agent-avatar__eye--left" x="${g.toFixed(3)}" y="${t.toFixed(3)}" width="${c.toFixed(3)}" height="${i.toFixed(3)}" rx="${a.toFixed(3)}" />
70
- <rect class="agent-avatar__eye agent-avatar__eye--right" x="${h.toFixed(3)}" y="${t.toFixed(3)}" width="${c.toFixed(3)}" height="${i.toFixed(3)}" rx="${a.toFixed(3)}" />
71
- </g>
72
- `;
73
- }
74
- const E = [
75
- { id: "orb", name: "Orb", color: "#8b66f6", shape: '<circle cx="18" cy="18" r="15.5" />' },
76
- { id: "heart", name: "Heart", color: "#ff4a3d", eyeY: 12.5, shape: '<path d="M18 33 5.3 20.6C-1.3 13.7 3.2 4 11.1 4c3.1 0 5.6 1.7 6.9 4.2C19.3 5.7 21.8 4 24.9 4c7.9 0 12.4 9.7 5.8 16.6Z" />' },
77
- { id: "soft-square", name: "Soft square", color: "#3b94d2", shape: '<rect x="3" y="3" width="30" height="30" rx="8" />' },
78
- { id: "hex", name: "Hex", color: "#f28aaa", shape: '<polygon points="10,3 26,3 34,18 26,33 10,33 2,18" />' },
79
- { id: "spark", name: "Spark", color: "#9669ee", shape: '<path d="M18 1c3 8 9 14 17 17-8 3-14 9-17 17-3-8-9-14-17-17C9 15 15 9 18 1Z" />' },
80
- { id: "clover-x", name: "Clover X", color: "#118a65", shape: '<path d="M18 11C14 3 7 2 4 6c-3 4 0 9 6 12-6 3-9 8-6 12 3 4 10 3 14-5 4 8 11 9 14 5 3-4 0-9-6-12 6-3 9-8 6-12-3-4-10-3-14 5Z" />' },
81
- { id: "ripple", name: "Ripple", color: "#0d8d67", shape: `<polygon points="${b(10, 15.5, 13.8)}" stroke="currentColor" stroke-width="1.8" stroke-linejoin="round" />` },
82
- { id: "bloom", name: "Bloom", color: "#f29ab7", shape: '<circle cx="18" cy="9.5" r="6.8"/><circle cx="25.4" cy="13.8" r="6.8"/><circle cx="25.4" cy="22.2" r="6.8"/><circle cx="18" cy="26.5" r="6.8"/><circle cx="10.6" cy="22.2" r="6.8"/><circle cx="10.6" cy="13.8" r="6.8"/>' },
83
- { id: "sun", name: "Sun", color: "#ffb51b", shape: `<polygon points="${b(10, 16, 12.2)}" />` },
84
- { id: "pulse", name: "Pulse", color: "#ff6d27", shape: `<polygon points="${b(18, 16, 14.2)}" />` },
85
- { id: "triangle", name: "Triangle", color: "#ffb317", eyeY: 14.5, shape: '<path d="M16.2 4.5a2.05 2.05 0 0 1 3.6 0l13.1 24.3A2.15 2.15 0 0 1 31 32H5a2.15 2.15 0 0 1-1.9-3.2Z" />' },
86
- { id: "quad-flower", name: "Quad flower", color: "#3f96d6", shape: '<circle cx="11" cy="11" r="8"/><circle cx="25" cy="11" r="8"/><circle cx="11" cy="25" r="8"/><circle cx="25" cy="25" r="8"/>' },
87
- { id: "hexagon", name: "Hexagon", color: "#3a92d1", shape: '<polygon points="18,2.5 32,10.5 32,25.5 18,33.5 4,25.5 4,10.5" />' },
88
- { id: "star", name: "Star", color: "#ffb91c", eyeY: 14, shape: `<polygon points="${b(5, 16, 7.3)}" />` },
89
- { id: "stack", name: "Stack", color: "#ff4a42", shape: '<rect x="4" y="3" width="28" height="11" rx="5.5"/><rect x="4" y="12.5" width="28" height="11" rx="5.5"/><rect x="4" y="22" width="28" height="11" rx="5.5"/>' },
90
- { id: "butterfly", name: "Butterfly", color: "#ef91af", shape: '<path d="M18 18C18 8 13 3 4 3c0 9 3 14 11 15-8 1-11 6-11 15 9 0 14-5 14-15 0 10 5 15 14 15 0-9-3-14-11-15 8-1 11-6 11-15-9 0-14 5-14 15Z" />' },
91
- { id: "octagon", name: "Octagon", color: "#128862", shape: '<polygon points="11,3 25,3 33,11 33,25 25,33 11,33 3,25 3,11" />' },
92
- { id: "heart-drop", name: "Heart drop", color: "#f38dac", eyeY: 12.5, shape: '<path d="M18 34 5.8 21.4C-.8 14.6 3.1 4 11.2 4c3.2 0 5.6 1.7 6.8 4.3C19.2 5.7 21.6 4 24.8 4c8.1 0 12 10.6 5.4 17.4Z" />' },
93
- { id: "soft-scallop", name: "Soft scallop", color: "#f19bb1", shape: `<polygon points="${b(12, 15.6, 14.4)}" stroke="currentColor" stroke-width="2" stroke-linejoin="round" />` },
94
- { id: "arch", name: "Arch", color: "#0f8c65", shape: '<path d="M5 33V17C5 8.7 10.8 3 18 3s13 5.7 13 14v16Z" />' },
95
- { id: "pentagon", name: "Pentagon", color: "#936af0", eyeY: 13.5, shape: '<polygon points="18,2 33,13 27,33 9,33 3,13" />' },
96
- { id: "diamond", name: "Diamond", color: "#368fd0", shape: '<polygon points="18,2 34,18 18,34 2,18" />' },
97
- { id: "leaf", name: "Leaf", color: "#ff7028", shape: '<path d="M4 32V18C4 10.3 10.3 4 18 4h14v14c0 7.7-6.3 14-14 14Z" />' },
98
- { id: "dome", name: "Dome", color: "#ffb614", shape: '<path d="M4 33V18C4 9.7 10.7 3 19 3h1c7.2 0 13 5.8 13 13v17Z" />' }
99
- ].map((e) => ({ ...e, eyeColor: "#171820" })), de = E.map((e) => e.id), z = "ads-agent-icon-styles", ie = `
100
- .agent-avatar { display: inline-block; flex: none; color: var(--agent-color, #4565d5); line-height: 0; }
101
- .agent-avatar__svg { display: block; width: 100%; height: 100%; overflow: visible; shape-rendering: geometricPrecision; }
102
- .agent-avatar__character,
103
- .agent-avatar__field,
104
- .agent-avatar__eyes,
105
- .agent-avatar__focus-scan { transform-box: fill-box; transform-origin: center; will-change: transform; }
106
- .agent-avatar__focus-scan { opacity: 0; pointer-events: none; }
107
- /* Tiles rest VISIBLE (opacity 1, scale 1 - no base hiding). The tile-assembly
108
- intro is a pure-CSS mount animation: 'both' fill holds the collapsed 0%
109
- frame through its stagger delay, then settles at the visible 100% frame.
110
- If the animation never runs, the tile still shows its natural visible state,
111
- so the mark can never be trapped invisible. */
112
- .agent-avatar__tile { transform-box: fill-box; transform-origin: center; animation: ads-agent-tile-intro 620ms cubic-bezier(0.22, 0.72, 0.24, 1) both; animation-delay: var(--agent-tile-delay, 0ms); }
113
- .agent-avatar[data-agent-animate-on-mount="false"] .agent-avatar__tile { animation: none; opacity: 1; transform: none; }
114
- /* Field Agent pointer tracking: eyes ease toward the cursor; overrides the
115
- state eye animation while the pointer is active. */
116
- .agent-avatar.is-pointer-tracking .agent-avatar__eyes { animation: none !important; transform: translate(var(--agent-pointer-eye-x, 0), var(--agent-pointer-eye-y, 0)); transition: transform 70ms linear; }
117
- .agent-avatar[data-agent-state="default"] .agent-avatar__character { animation: ads-agent-default-breathe 3.6s ease-in-out infinite; animation-delay: var(--agent-delay, 0s); }
118
- .agent-avatar[data-agent-state="thinking"] .agent-avatar__field { animation: ads-agent-thinking-field 2.15s ease-in-out infinite, ads-agent-thinking-color 3.2s ease-in-out infinite; animation-delay: var(--agent-delay, 0s), var(--agent-delay, 0s); }
119
- .agent-avatar[data-agent-state="thinking"] .agent-avatar__eyes { animation: ads-agent-thinking-eyes 1.65s cubic-bezier(0.65, 0, 0.35, 1) infinite; animation-delay: var(--agent-delay, 0s); }
120
- .agent-avatar[data-agent-state="thinking"] .agent-avatar__focus-scan { animation: ads-agent-thinking-scan 2.15s cubic-bezier(0.45, 0, 0.2, 1) infinite; animation-delay: var(--agent-delay, 0s); }
121
- .agent-avatar[data-agent-state="acting"] .agent-avatar__character { animation: ads-agent-acting-size 720ms cubic-bezier(0.33, 1, 0.68, 1) infinite; animation-delay: var(--agent-delay, 0s); }
122
- .agent-avatar[data-agent-state="sleep"] .agent-avatar__character { animation: ads-agent-sleep-float 4.8s ease-in-out infinite; animation-delay: var(--agent-delay, 0s); }
123
- .agent-avatar[data-agent-state="sleep"] .agent-avatar__field { animation: ads-agent-sleep-dim 4.8s ease-in-out infinite; animation-delay: var(--agent-delay, 0s); }
124
- .agent-avatar[data-agent-state="sleep"] .agent-avatar__eyes { animation: ads-agent-sleep-eyes 4.8s ease-in-out infinite; animation-delay: var(--agent-delay, 0s); }
125
- @keyframes ads-agent-default-breathe { 0%, 100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-0.45px) scale(1.018, 0.985); } }
126
- @keyframes ads-agent-tile-intro { 0% { opacity: 0; transform: scale(0); } 100% { opacity: 1; transform: scale(1); } }
127
- @keyframes ads-agent-thinking-field { 0%, 100% { transform: rotate(-1.6deg) scale(0.99); } 50% { transform: rotate(1.6deg) scale(1.025); } }
128
- @keyframes ads-agent-thinking-color { 0%, 100% { filter: hue-rotate(-8deg) saturate(1.08) brightness(1); } 50% { filter: hue-rotate(24deg) saturate(1.48) brightness(1.13); } }
129
- @keyframes ads-agent-thinking-scan { 0% { opacity: 0; transform: translateX(0); } 16% { opacity: 0.22; } 42% { opacity: 0.92; } 72% { opacity: 0.35; } 100% { opacity: 0; transform: translateX(51px); } }
130
- @keyframes ads-agent-thinking-eyes { 0%, 18%, 100% { transform: translateX(-1.15px); } 48%, 68% { transform: translateX(1.15px); } }
131
- @keyframes ads-agent-acting-size { 0%, 100% { transform: scale(1.1); } 28% { transform: scale(1.2); } 48% { transform: scale(1.125); } 72% { transform: scale(1.185); } }
132
- @keyframes ads-agent-sleep-float { 0%, 100% { transform: translateY(0) rotate(-0.6deg); } 50% { transform: translateY(-1.25px) rotate(0.6deg); } }
133
- @keyframes ads-agent-sleep-dim { 0%, 100% { opacity: 0.68; filter: saturate(0.52) brightness(1.04); } 50% { opacity: 0.82; filter: saturate(0.68) brightness(1.1); } }
134
- @keyframes ads-agent-sleep-eyes { 0%, 100% { transform: translateY(1.7px) scaleY(0.18); } 50% { transform: translateY(2px) scaleY(0.14); } }
135
- @keyframes ads-agent-cute-hello { 0%, 100% { transform: translateY(0) rotate(0) scale(1); } 16% { transform: translateY(0.8px) rotate(0) scale(1.05, 0.93); } 38% { transform: translateY(-2.4px) rotate(-4deg) scale(0.96, 1.07); } 56% { transform: translateY(-1.2px) rotate(3deg) scale(1.025, 0.985); } 74% { transform: translateY(0.25px) rotate(-1.2deg) scale(0.99, 1.015); } }
136
- @keyframes ads-agent-cute-blink { 0%, 28%, 46%, 100% { transform: translateY(0) scaleY(1); } 36% { transform: translateY(2.7px) scaleY(0.16); } }
137
- /* Hover greeting: the whole mark gives a quick playful "hello" wave and a
138
- blink (the Field Agent greeter behaviour). Pure CSS on :hover; the
139
- pointer-tracking rule above wins on the eyes when the pointer is active. */
140
- @media (hover: hover) and (pointer: fine) {
141
- .agent-avatar[data-agent-interactive="true"]:hover .agent-avatar__svg { animation: ads-agent-cute-hello 680ms cubic-bezier(0.2, 0.82, 0.24, 1) both; }
142
- .agent-avatar[data-agent-interactive="true"][data-agent-state="default"]:hover .agent-avatar__eyes { animation: ads-agent-cute-blink 680ms ease-in-out both; }
143
- }
144
- @media (prefers-reduced-motion: reduce) {
145
- .agent-avatar__character,
146
- .agent-avatar__field,
147
- .agent-avatar__eyes,
148
- .agent-avatar__focus-scan,
149
- .agent-avatar__tile { animation: none !important; opacity: 1; transform: none; transition: none; }
150
- }
151
- `;
152
- function oe() {
153
- s.useEffect(() => {
154
- if (typeof document > "u" || document.getElementById(z)) return;
155
- const e = document.createElement("style");
156
- e.id = z, e.textContent = ie, document.head.appendChild(e);
157
- }, []);
158
- }
159
- const se = s.forwardRef(
160
- ({
161
- agent: e,
162
- state: n,
163
- interactive: c,
164
- size: i = 40,
165
- tileGridSize: p = 7,
166
- eyeScale: t = 1,
167
- eyeColor: a,
168
- animateOnMount: g = !0,
169
- color: h,
170
- colorPreset: $,
171
- trackPointer: v,
172
- className: C,
173
- style: k,
174
- ...l
175
- }, r) => {
176
- oe();
177
- const f = s.useMemo(
178
- () => E.find((o) => o.id === e) ?? E[0],
179
- [e]
180
- ), m = h ?? ($ ? te[$] : void 0), d = s.useMemo(() => !m && !a ? f : {
181
- ...f,
182
- ...m ? { color: m } : {},
183
- ...a ? { eyeColor: a } : {}
184
- }, [f, m, a]), w = s.useRef(null), B = s.useCallback(
185
- (o) => {
186
- w.current = o, typeof r == "function" ? r(o) : r && (r.current = o);
187
- },
188
- [r]
189
- ), I = s.useId(), F = s.useMemo(
190
- () => `agent-${d.id}-${I.replace(/[^a-zA-Z0-9]/g, "")}`,
191
- [d.id, I]
192
- ), T = n !== void 0, M = c ?? !T, [D, N] = s.useState("default"), Y = s.useRef(void 0), U = T ? n : D, W = s.useMemo(() => `-${([...d.id].reduce((S, A) => S + A.charCodeAt(0), 0) % 9 * 0.11).toFixed(2)}s`, [d.id]), q = s.useMemo(
193
- () => `<g class="agent-avatar__character">${ne(
194
- d,
195
- F,
196
- p
197
- )}${re(d, t)}</g>`,
198
- [t, d, F, p]
199
- );
200
- s.useEffect(() => () => window.clearTimeout(Y.current), []), s.useEffect(() => {
201
- const o = w.current;
202
- if (!v || !o || window.matchMedia("(prefers-reduced-motion: reduce)").matches) return;
203
- const S = 82, A = 1.55, V = 1.05;
204
- let P = 0, H = 0, _ = 0;
205
- const Q = () => {
206
- _ = 0;
207
- const u = o.getBoundingClientRect(), O = P - (u.left + u.width / 2), R = H - (u.top + u.height / 2), x = Math.hypot(O, R), Z = Math.min(x / S, 1), J = x > 0 ? O / x : 0, K = x > 0 ? R / x : 0;
208
- o.style.setProperty("--agent-pointer-eye-x", `${(J * A * Z).toFixed(3)}px`), o.style.setProperty("--agent-pointer-eye-y", `${(K * V * Z).toFixed(3)}px`);
209
- }, X = (u) => {
210
- P = u.clientX, H = u.clientY, o.classList.add("is-pointer-tracking"), _ || (_ = requestAnimationFrame(Q));
211
- };
212
- return window.addEventListener("pointermove", X, { passive: !0 }), () => {
213
- window.removeEventListener("pointermove", X), _ && cancelAnimationFrame(_), o.classList.remove("is-pointer-tracking"), o.style.removeProperty("--agent-pointer-eye-x"), o.style.removeProperty("--agent-pointer-eye-y");
214
- };
215
- }, [v]);
216
- const G = M ? {
217
- onClick: () => {
218
- window.clearTimeout(Y.current), N("acting"), Y.current = window.setTimeout(() => N("default"), 1500);
219
- }
220
- } : {};
221
- return /* @__PURE__ */ L(
222
- "span",
223
- {
224
- ref: B,
225
- className: ee(
226
- "agent-avatar",
227
- M && "cursor-pointer rounded-md outline-none focus-visible:ring-3 focus-visible:ring-ring",
228
- C
229
- ),
230
- "data-agent-icon": d.id,
231
- "data-agent-state": U,
232
- "data-agent-interactive": M ? "true" : "false",
233
- "data-agent-animate-on-mount": g ? "true" : "false",
234
- role: "img",
235
- "aria-label": `${d.name} agent icon`,
236
- tabIndex: M ? 0 : void 0,
237
- style: {
238
- "--agent-color": d.color,
239
- "--agent-delay": W,
240
- width: i,
241
- height: i,
242
- ...k
243
- },
244
- ...G,
245
- ...l,
246
- children: /* @__PURE__ */ L(
247
- "svg",
248
- {
249
- className: "agent-avatar__svg",
250
- viewBox: "0 0 36 36",
251
- focusable: "false",
252
- "aria-hidden": "true",
253
- dangerouslySetInnerHTML: { __html: q }
254
- }
255
- )
256
- }
257
- );
258
- }
259
- );
260
- se.displayName = "AgentIcon";
261
- export {
262
- E as AGENT_ICONS,
263
- de as AGENT_ICON_NAMES,
264
- se as AgentIcon
265
- };
@@ -1,60 +0,0 @@
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;
@@ -1,193 +0,0 @@
1
- "use client";
2
- import { jsx as s, jsxs as n } 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__ */ n(
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-normal text-base text-secondary transition-colors hover:bg-accent",
139
- t
140
- ),
141
- ...o,
142
- children: e
143
- }
144
- ) }), D = ({
145
- count: e,
146
- label: t,
147
- icon: o,
148
- className: r,
149
- ...i
150
- }) => /* @__PURE__ */ n("span", { className: a("flex items-center gap-2", r), ...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 motion-reduce:transition-none"
156
- }
157
- ),
158
- o,
159
- /* @__PURE__ */ n("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
- };
@@ -1,16 +0,0 @@
1
- import { ComponentProps } from 'react';
2
- import { Button } from '../button';
3
- export type SpeechInputProps = Omit<ComponentProps<typeof Button>, "children" | "onError"> & {
4
- /** Fires with each finalized phrase (interim results are ignored). */
5
- onTranscriptionChange?: (text: string) => void;
6
- /**
7
- * Fallback for browsers without the Web Speech API (Firefox / Safari).
8
- * Receives the recorded audio blob and should resolve to the transcribed
9
- * text, which is then passed to `onTranscriptionChange`.
10
- */
11
- onAudioRecorded?: (audioBlob: Blob) => Promise<string>;
12
- /** Fires on permission / recognition failures (e.g. `"not-allowed"`). */
13
- onError?: (error: string) => void;
14
- lang?: string;
15
- };
16
- export declare const SpeechInput: ({ className, onTranscriptionChange, onAudioRecorded, onError, lang, disabled, ...props }: SpeechInputProps) => import("react").JSX.Element;