@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,13 +1,13 @@
1
1
  "use client";
2
- import { jsx as r, jsxs as g } from "react/jsx-runtime";
2
+ import { jsx as i, jsxs as v } from "react/jsx-runtime";
3
3
  import * as a from "react";
4
- import { createPortal as E } from "react-dom";
5
- import { MotionConfig as y, AnimatePresence as p, motion as v } from "motion/react";
4
+ import { createPortal as D } from "react-dom";
5
+ import { MotionConfig as p, AnimatePresence as b, motion as h } from "motion/react";
6
6
  import { Close as R } from "../lib/icons.js";
7
- import { cva as j } from "class-variance-authority";
7
+ import { cva as E } from "class-variance-authority";
8
8
  import { cn as o } from "../lib/cn.js";
9
- import { drawerExitTransition as b, drawerOffset as m, drawerEnterTransition as z, drawerBackdropVariants as F } from "../lib/motion.js";
10
- const N = j(
9
+ import { springSheet as f, drawerOffset as u, drawerBackdropVariants as j } from "../lib/motion.js";
10
+ const z = E(
11
11
  [
12
12
  "relative flex flex-col",
13
13
  "bg-elevated text-foreground",
@@ -43,16 +43,16 @@ const N = j(
43
43
  ],
44
44
  defaultVariants: { side: "right", size: "md" }
45
45
  }
46
- ), A = {
46
+ ), F = {
47
47
  right: "justify-end items-stretch",
48
48
  left: "justify-start items-stretch",
49
49
  bottom: "justify-center items-end"
50
50
  };
51
- function k({
51
+ function N({
52
52
  onClick: t,
53
53
  className: e
54
54
  }) {
55
- return /* @__PURE__ */ r(
55
+ return /* @__PURE__ */ i(
56
56
  "button",
57
57
  {
58
58
  type: "button",
@@ -60,49 +60,49 @@ function k({
60
60
  "aria-label": "Close",
61
61
  className: o(
62
62
  "absolute inline-flex size-8 items-center justify-center",
63
- "rounded-md text-muted-foreground",
64
- "transition-[background,color,transform] duration-(--duration-fast) ease-out hover:bg-muted hover:text-foreground",
65
- "active:scale-(--scale-press)",
63
+ "rounded-sm text-muted-foreground",
64
+ "transition-[background,color,transform] duration-150 ease-out motion-reduce:transition-none hover:bg-muted hover:text-foreground",
65
+ "active:scale-[0.97] motion-reduce:active:scale-100",
66
66
  "outline-none focus-visible:ring-3 focus-visible:ring-ring",
67
67
  "[&_svg]:size-4 [&_svg]:shrink-0",
68
68
  e
69
69
  ),
70
- children: /* @__PURE__ */ r(R, { "aria-hidden": !0 })
70
+ children: /* @__PURE__ */ i(R, { "aria-hidden": !0 })
71
71
  }
72
72
  );
73
73
  }
74
- function G({
74
+ function q({
75
75
  open: t,
76
76
  onOpenChange: e,
77
- side: s,
78
- size: u,
79
- className: w,
80
- children: x
77
+ side: r,
78
+ size: w,
79
+ className: x,
80
+ children: g
81
81
  }) {
82
- const l = s ?? "right", n = a.useRef(null), d = a.useRef(null);
82
+ const l = r ?? "right", n = a.useRef(null), d = a.useRef(null);
83
83
  return a.useEffect(() => {
84
84
  if (!t) return;
85
85
  d.current = document.activeElement;
86
86
  const c = document.body.style.overflow;
87
87
  document.body.style.overflow = "hidden";
88
- const f = (i) => {
89
- i.key === "Escape" && (i.stopPropagation(), e(!1));
88
+ const m = (s) => {
89
+ s.key === "Escape" && (s.stopPropagation(), e(!1));
90
90
  };
91
- document.addEventListener("keydown", f);
92
- const D = requestAnimationFrame(() => {
93
- var i;
94
- (i = n.current) == null || i.focus();
91
+ document.addEventListener("keydown", m);
92
+ const k = requestAnimationFrame(() => {
93
+ var s;
94
+ (s = n.current) == null || s.focus();
95
95
  });
96
96
  return () => {
97
- var i, h;
98
- document.removeEventListener("keydown", f), document.body.style.overflow = c, cancelAnimationFrame(D), (h = (i = d.current) == null ? void 0 : i.focus) == null || h.call(i);
97
+ var s, y;
98
+ document.removeEventListener("keydown", m), document.body.style.overflow = c, cancelAnimationFrame(k), (y = (s = d.current) == null ? void 0 : s.focus) == null || y.call(s);
99
99
  };
100
- }, [t, e]), E(
101
- /* @__PURE__ */ r(y, { reducedMotion: "user", children: /* @__PURE__ */ r(p, { children: t && /* @__PURE__ */ g("div", { className: o("fixed inset-0 z-50 flex", A[l]), children: [
102
- /* @__PURE__ */ r(
103
- v.div,
100
+ }, [t, e]), D(
101
+ /* @__PURE__ */ i(p, { reducedMotion: "user", children: /* @__PURE__ */ i(b, { children: t && /* @__PURE__ */ v("div", { className: o("fixed inset-0 z-50 flex", F[l]), children: [
102
+ /* @__PURE__ */ i(
103
+ h.div,
104
104
  {
105
- variants: F,
105
+ variants: j,
106
106
  initial: "hidden",
107
107
  animate: "visible",
108
108
  exit: "hidden",
@@ -112,26 +112,26 @@ function G({
112
112
  },
113
113
  "backdrop"
114
114
  ),
115
- /* @__PURE__ */ g(
116
- v.div,
115
+ /* @__PURE__ */ v(
116
+ h.div,
117
117
  {
118
118
  ref: n,
119
- initial: m[l],
120
- animate: { transform: "translate3d(0, 0, 0)", transition: z },
121
- exit: { ...m[l], transition: b },
119
+ initial: u[l],
120
+ animate: { transform: "translate3d(0, 0, 0)", opacity: 1, transition: f },
121
+ exit: { ...u[l], transition: f },
122
122
  role: "dialog",
123
123
  "aria-modal": "true",
124
124
  tabIndex: -1,
125
- className: o(N({ side: l, size: u }), "relative outline-none", w),
125
+ className: o(z({ side: l, size: w }), "relative outline-none", x),
126
126
  children: [
127
- /* @__PURE__ */ r(
128
- k,
127
+ /* @__PURE__ */ i(
128
+ N,
129
129
  {
130
130
  onClick: () => e(!1),
131
131
  className: "right-4 top-4"
132
132
  }
133
133
  ),
134
- x
134
+ g
135
135
  ]
136
136
  },
137
137
  "panel"
@@ -140,81 +140,82 @@ function G({
140
140
  document.body
141
141
  );
142
142
  }
143
- function B({
143
+ function A({
144
144
  open: t,
145
145
  onOpenChange: e,
146
- side: s,
147
- size: u,
148
- className: w,
149
- children: x,
146
+ side: r,
147
+ size: w,
148
+ className: x,
149
+ children: g,
150
150
  "aria-label": l
151
151
  }) {
152
- const n = s ?? "right", d = a.useRef(null);
152
+ const n = r ?? "right", d = a.useRef(null);
153
153
  return a.useEffect(() => {
154
154
  if (!t) return;
155
- const c = (f) => {
156
- f.key === "Escape" && e(!1);
155
+ const c = (m) => {
156
+ m.key === "Escape" && e(!1);
157
157
  };
158
158
  return document.addEventListener("keydown", c), () => document.removeEventListener("keydown", c);
159
- }, [t, e]), /* @__PURE__ */ r(y, { reducedMotion: "user", children: /* @__PURE__ */ r(p, { initial: !1, children: t && /* @__PURE__ */ g(
160
- v.aside,
159
+ }, [t, e]), /* @__PURE__ */ i(p, { reducedMotion: "user", children: /* @__PURE__ */ i(b, { initial: !1, children: t && /* @__PURE__ */ v(
160
+ h.aside,
161
161
  {
162
162
  ref: d,
163
- initial: m[n],
164
- animate: { transform: "translate3d(0, 0, 0)", transition: z },
165
- exit: { ...m[n], transition: b },
163
+ initial: u[n],
164
+ animate: { transform: "translate3d(0, 0, 0)", opacity: 1, transition: f },
165
+ exit: { ...u[n], transition: f },
166
166
  role: "complementary",
167
167
  "aria-label": l,
168
168
  className: o(
169
- N({ side: n, size: u }),
169
+ z({ side: n, size: w }),
170
170
  "relative shrink-0 overflow-hidden rounded-lg bg-card shadow-none outline-none",
171
- w
171
+ x
172
172
  ),
173
173
  children: [
174
- /* @__PURE__ */ r(
175
- k,
174
+ /* @__PURE__ */ i(
175
+ N,
176
176
  {
177
177
  onClick: () => e(!1),
178
178
  className: "right-2 top-1"
179
179
  }
180
180
  ),
181
- x
181
+ g
182
182
  ]
183
183
  },
184
184
  "inline-drawer"
185
185
  ) }) });
186
186
  }
187
- const J = B, L = a.forwardRef(({ className: t, ...e }, s) => /* @__PURE__ */ r(
187
+ const S = A, B = a.forwardRef(({ className: t, ...e }, r) => /* @__PURE__ */ i(
188
188
  "div",
189
189
  {
190
- ref: s,
190
+ ref: r,
191
191
  className: o("flex flex-col gap-1 px-6 py-4 pr-14", t),
192
192
  ...e
193
193
  }
194
194
  ));
195
- L.displayName = "DrawerHeader";
196
- const M = a.forwardRef(({ className: t, ...e }, s) => /* @__PURE__ */ r(
195
+ B.displayName = "DrawerHeader";
196
+ const L = a.forwardRef(({ className: t, ...e }, r) => /* @__PURE__ */ i(
197
197
  "h2",
198
198
  {
199
- ref: s,
200
- className: o("text-lg font-semibold text-foreground", t),
199
+ ref: r,
200
+ className: o("text-lg font-medium text-foreground", t),
201
201
  ...e
202
202
  }
203
203
  ));
204
- M.displayName = "DrawerTitle";
205
- const T = a.forwardRef(({ className: t, ...e }, s) => /* @__PURE__ */ r(
204
+ L.displayName = "DrawerTitle";
205
+ const M = a.forwardRef(({ className: t, ...e }, r) => /* @__PURE__ */ i(
206
206
  "div",
207
207
  {
208
- ref: s,
208
+ ref: r,
209
+ tabIndex: 0,
209
210
  className: o("flex-1 overflow-y-auto px-6 py-4 text-xs text-foreground", t),
210
211
  ...e
211
212
  }
212
213
  ));
213
- T.displayName = "DrawerBody";
214
- const V = a.forwardRef(({ className: t, ...e }, s) => /* @__PURE__ */ r(
214
+ M.displayName = "DrawerBody";
215
+ const V = a.forwardRef(({ className: t, ...e }, r) => /* @__PURE__ */ i(
215
216
  "div",
216
217
  {
217
- ref: s,
218
+ ref: r,
218
219
  className: o(
219
220
  "flex items-center justify-end gap-2 px-6 py-4",
220
221
  t
@@ -224,11 +225,11 @@ const V = a.forwardRef(({ className: t, ...e }, s) => /* @__PURE__ */ r(
224
225
  ));
225
226
  V.displayName = "DrawerFooter";
226
227
  export {
227
- B as Drawer,
228
- T as DrawerBody,
228
+ A as Drawer,
229
+ M as DrawerBody,
229
230
  V as DrawerFooter,
230
- L as DrawerHeader,
231
- M as DrawerTitle,
232
- J as InlineDrawer,
233
- G as ModalDrawer
231
+ B as DrawerHeader,
232
+ L as DrawerTitle,
233
+ S as InlineDrawer,
234
+ q as ModalDrawer
234
235
  };
@@ -18,7 +18,7 @@ export interface DropdownContentProps extends React.HTMLAttributes<HTMLDivElemen
18
18
  /** Which side of the trigger the menu opens on. Default below. */
19
19
  side?: "top" | "bottom";
20
20
  sideOffset?: number;
21
- /** Focus the menu surface on open without highlighting its first item. */
21
+ /** Opt in to focusing the first item when the menu opens. */
22
22
  autoFocusFirstItem?: boolean;
23
23
  }
24
24
  export declare function DropdownContent({ className, align, side, sideOffset, autoFocusFirstItem, children, ...props }: DropdownContentProps): React.ReactPortal;
@@ -26,6 +26,8 @@ export interface DropdownItemProps extends Omit<React.HTMLAttributes<HTMLDivElem
26
26
  startContent?: React.ReactNode;
27
27
  danger?: boolean;
28
28
  disabled?: boolean;
29
+ /** Keep focus with a newly opened surface instead of returning to the menu trigger. */
30
+ restoreFocus?: boolean;
29
31
  onSelect?: () => void;
30
32
  }
31
33
  export declare const DropdownItem: React.ForwardRefExoticComponent<DropdownItemProps & React.RefAttributes<HTMLDivElement>>;
@@ -1,31 +1,31 @@
1
1
  "use client";
2
- import { jsxs as C, jsx as w } from "react/jsx-runtime";
3
- import * as c from "react";
2
+ import { jsxs as L, jsx as v } from "react/jsx-runtime";
3
+ import * as s from "react";
4
4
  import { createPortal as I } from "react-dom";
5
5
  import { MotionConfig as P, AnimatePresence as z, motion as O } from "motion/react";
6
- import { cn as D } from "../lib/cn.js";
7
- import { floatVariants as q } from "../lib/motion.js";
6
+ import { cn as y } from "../lib/cn.js";
7
+ import { menuVariants as q } from "../lib/motion.js";
8
8
  import { Ripple as $ } from "./ripple.js";
9
- const k = (r, t) => `${r === "top" ? "bottom" : "top"} ${t === "start" ? "left" : "right"}`, L = c.createContext(null);
10
- function R(r) {
11
- const t = c.useContext(L);
9
+ const C = (r, t) => `${r === "top" ? "bottom" : "top"} ${t === "start" ? "left" : "right"}`, N = s.createContext(null);
10
+ function k(r) {
11
+ const t = s.useContext(N);
12
12
  if (!t)
13
13
  throw new Error(`${r} must be used within a <Dropdown>.`);
14
14
  return t;
15
15
  }
16
16
  function U({ children: r, defaultOpen: t = !1 }) {
17
- const [n, d] = c.useState(t), f = c.useRef(null), p = c.useRef(null);
18
- return /* @__PURE__ */ w(L.Provider, { value: { open: n, setOpen: d, triggerRef: f, contentRef: p }, children: r });
17
+ const [n, u] = s.useState(t), l = s.useRef(null), p = s.useRef(null);
18
+ return /* @__PURE__ */ v(N.Provider, { value: { open: n, setOpen: u, triggerRef: l, contentRef: p }, children: r });
19
19
  }
20
20
  function V({ children: r }) {
21
- const { open: t, setOpen: n, triggerRef: d } = R("DropdownTrigger"), f = r;
22
- return c.cloneElement(f, {
23
- ref: d,
21
+ const { open: t, setOpen: n, triggerRef: u } = k("DropdownTrigger"), l = r;
22
+ return s.cloneElement(l, {
23
+ ref: u,
24
24
  "aria-expanded": t,
25
25
  "aria-haspopup": "menu",
26
26
  onClick: (p) => {
27
- var v, u;
28
- (u = (v = f.props).onClick) == null || u.call(v, p), n(!t);
27
+ var b, a;
28
+ (a = (b = l.props).onClick) == null || a.call(b, p), n(!t);
29
29
  }
30
30
  });
31
31
  }
@@ -33,78 +33,78 @@ function W({
33
33
  className: r,
34
34
  align: t = "start",
35
35
  side: n = "bottom",
36
- sideOffset: d = 6,
37
- autoFocusFirstItem: f = !0,
36
+ sideOffset: u = 6,
37
+ autoFocusFirstItem: l = !1,
38
38
  children: p,
39
- ...v
39
+ ...b
40
40
  }) {
41
- const { open: u, setOpen: b, triggerRef: m, contentRef: a } = R("DropdownContent"), [i, N] = c.useState(null);
42
- c.useLayoutEffect(() => {
43
- if (!u) return;
44
- const s = m.current;
45
- if (!s) return;
41
+ const { open: a, setOpen: h, triggerRef: g, contentRef: c } = k("DropdownContent"), [f, m] = s.useState(null);
42
+ s.useLayoutEffect(() => {
43
+ if (!a) return;
44
+ const i = g.current;
45
+ if (!i) return;
46
46
  const e = () => {
47
- var h, x;
48
- const o = s.getBoundingClientRect(), l = ((h = a.current) == null ? void 0 : h.offsetWidth) ?? 0, g = ((x = a.current) == null ? void 0 : x.offsetHeight) ?? 0, y = t === "end" ? o.right - l : o.left, E = n === "top" ? o.top - g - d : o.bottom + d;
49
- N({ top: E, left: y });
47
+ var x, D;
48
+ const o = i.getBoundingClientRect(), d = ((x = c.current) == null ? void 0 : x.offsetWidth) ?? 0, w = ((D = c.current) == null ? void 0 : D.offsetHeight) ?? 0, E = t === "end" ? o.right - d : o.left, R = n === "top" ? o.top - w - u : o.bottom + u;
49
+ m({ top: R, left: E });
50
50
  };
51
51
  return e(), window.addEventListener("resize", e), window.addEventListener("scroll", e, !0), () => {
52
52
  window.removeEventListener("resize", e), window.removeEventListener("scroll", e, !0);
53
53
  };
54
- }, [u, t, n, d, m, a]), c.useEffect(() => {
55
- if (!u) return;
56
- const s = requestAnimationFrame(() => {
54
+ }, [a, t, n, u, g, c]), s.useEffect(() => {
55
+ if (!a) return;
56
+ const i = requestAnimationFrame(() => {
57
57
  var e, o;
58
- if (f) {
59
- const l = (e = a.current) == null ? void 0 : e.querySelector(
58
+ if (l) {
59
+ const d = (e = c.current) == null ? void 0 : e.querySelector(
60
60
  '[role="menuitem"]:not([aria-disabled="true"])'
61
61
  );
62
- l == null || l.focus();
62
+ d == null || d.focus();
63
63
  } else
64
- (o = a.current) == null || o.focus();
64
+ (o = c.current) == null || o.focus();
65
65
  });
66
- return () => cancelAnimationFrame(s);
67
- }, [u, f, a]), c.useEffect(() => {
68
- if (!u) return;
69
- const s = (e) => {
70
- var l, g;
66
+ return () => cancelAnimationFrame(i);
67
+ }, [a, l, c]), s.useEffect(() => {
68
+ if (!a) return;
69
+ const i = (e) => {
70
+ var d, w;
71
71
  const o = e.target;
72
- (l = a.current) != null && l.contains(o) || (g = m.current) != null && g.contains(o) || b(!1);
72
+ (d = c.current) != null && d.contains(o) || (w = g.current) != null && w.contains(o) || h(!1);
73
73
  };
74
- return document.addEventListener("pointerdown", s), () => document.removeEventListener("pointerdown", s);
75
- }, [u, b, m, a]);
76
- const A = (s) => {
77
- var l, g, y, E, h, x;
74
+ return document.addEventListener("pointerdown", i), () => document.removeEventListener("pointerdown", i);
75
+ }, [a, h, g, c]);
76
+ const A = (i) => {
77
+ var d, w, E, R, x, D;
78
78
  const e = Array.from(
79
- ((l = a.current) == null ? void 0 : l.querySelectorAll(
79
+ ((d = c.current) == null ? void 0 : d.querySelectorAll(
80
80
  '[role="menuitem"]:not([aria-disabled="true"])'
81
81
  )) ?? []
82
82
  );
83
83
  if (e.length === 0) return;
84
84
  const o = e.indexOf(document.activeElement);
85
- switch (s.key) {
85
+ switch (i.key) {
86
86
  case "Escape":
87
- s.preventDefault(), b(!1), (g = m.current) == null || g.focus();
87
+ i.preventDefault(), h(!1), (w = g.current) == null || w.focus();
88
88
  break;
89
89
  case "ArrowDown":
90
- s.preventDefault(), (y = e[o < 0 ? 0 : (o + 1) % e.length]) == null || y.focus();
90
+ i.preventDefault(), (E = e[o < 0 ? 0 : (o + 1) % e.length]) == null || E.focus();
91
91
  break;
92
92
  case "ArrowUp":
93
- s.preventDefault(), (E = e[o < 0 ? e.length - 1 : (o - 1 + e.length) % e.length]) == null || E.focus();
93
+ i.preventDefault(), (R = e[o < 0 ? e.length - 1 : (o - 1 + e.length) % e.length]) == null || R.focus();
94
94
  break;
95
95
  case "Home":
96
- s.preventDefault(), (h = e[0]) == null || h.focus();
96
+ i.preventDefault(), (x = e[0]) == null || x.focus();
97
97
  break;
98
98
  case "End":
99
- s.preventDefault(), (x = e[e.length - 1]) == null || x.focus();
99
+ i.preventDefault(), (D = e[e.length - 1]) == null || D.focus();
100
100
  break;
101
101
  }
102
102
  };
103
103
  return I(
104
- /* @__PURE__ */ w(P, { reducedMotion: "user", children: /* @__PURE__ */ w(z, { children: u && /* @__PURE__ */ C(
104
+ /* @__PURE__ */ v(P, { reducedMotion: "user", children: /* @__PURE__ */ v(z, { children: a && /* @__PURE__ */ L(
105
105
  O.div,
106
106
  {
107
- ref: a,
107
+ ref: c,
108
108
  role: "menu",
109
109
  tabIndex: -1,
110
110
  onKeyDown: A,
@@ -114,19 +114,19 @@ function W({
114
114
  exit: "hidden",
115
115
  style: {
116
116
  position: "fixed",
117
- top: (i == null ? void 0 : i.top) ?? 0,
118
- left: (i == null ? void 0 : i.left) ?? 0,
119
- visibility: i ? "visible" : "hidden",
120
- transformOrigin: k(n, t)
117
+ top: (f == null ? void 0 : f.top) ?? 0,
118
+ left: (f == null ? void 0 : f.left) ?? 0,
119
+ visibility: f ? "visible" : "hidden",
120
+ transformOrigin: C(n, t)
121
121
  },
122
- className: D(
122
+ className: y(
123
123
  "relative z-50 min-w-44 rounded-lg border border-border bg-elevated p-1",
124
124
  "text-foreground shadow-elevation outline-none",
125
125
  r
126
126
  ),
127
- ...v,
127
+ ...b,
128
128
  children: [
129
- /* @__PURE__ */ w($, { origin: k(n, t) }),
129
+ /* @__PURE__ */ v($, { origin: C(n, t) }),
130
130
  p
131
131
  ]
132
132
  }
@@ -134,57 +134,66 @@ function W({
134
134
  document.body
135
135
  );
136
136
  }
137
- const j = c.forwardRef(
138
- ({ className: r, startContent: t, danger: n, disabled: d, onSelect: f, children: p, ...v }, u) => {
139
- const { setOpen: b, triggerRef: m } = R("DropdownItem"), a = () => {
140
- var i;
141
- d || (f == null || f(), b(!1), (i = m.current) == null || i.focus());
137
+ const j = s.forwardRef(
138
+ ({
139
+ className: r,
140
+ startContent: t,
141
+ danger: n,
142
+ disabled: u,
143
+ restoreFocus: l = !0,
144
+ onSelect: p,
145
+ children: b,
146
+ ...a
147
+ }, h) => {
148
+ const { setOpen: g, triggerRef: c } = k("DropdownItem"), f = () => {
149
+ var m;
150
+ u || (p == null || p(), g(!1), l && ((m = c.current) == null || m.focus()));
142
151
  };
143
- return /* @__PURE__ */ C(
152
+ return /* @__PURE__ */ L(
144
153
  "div",
145
154
  {
146
- ref: u,
155
+ ref: h,
147
156
  role: "menuitem",
148
157
  tabIndex: -1,
149
- "aria-disabled": d || void 0,
150
- onClick: a,
151
- onKeyDown: (i) => {
152
- (i.key === "Enter" || i.key === " ") && (i.preventDefault(), a());
158
+ "aria-disabled": u || void 0,
159
+ onClick: f,
160
+ onKeyDown: (m) => {
161
+ (m.key === "Enter" || m.key === " ") && (m.preventDefault(), f());
153
162
  },
154
- className: D(
155
- "flex cursor-default items-center gap-2 rounded-md px-2 py-1.5 text-xs",
156
- "outline-none transition-colors duration-(--duration-fast)",
163
+ className: y(
164
+ "flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-xs",
165
+ "outline-none transition-colors duration-150",
157
166
  "focus-visible:ring-3 focus-visible:ring-ring",
158
167
  n ? "text-danger" : "text-foreground",
159
- d ? "pointer-events-none opacity-50" : D("hover:bg-muted focus:bg-muted", n && "hover:bg-danger/10 focus:bg-danger/10"),
168
+ u ? "pointer-events-none opacity-50" : y("hover:bg-muted focus:bg-muted", n && "hover:bg-danger/10 focus:bg-danger/10"),
160
169
  "[&_svg]:size-4 [&_svg]:shrink-0",
161
170
  r
162
171
  ),
163
- ...v,
172
+ ...a,
164
173
  children: [
165
174
  t,
166
- /* @__PURE__ */ w("span", { className: "flex-1", children: p })
175
+ /* @__PURE__ */ v("span", { className: "flex-1", children: b })
167
176
  ]
168
177
  }
169
178
  );
170
179
  }
171
180
  );
172
181
  j.displayName = "DropdownItem";
173
- const H = c.forwardRef(({ className: r, ...t }, n) => /* @__PURE__ */ w(
182
+ const H = s.forwardRef(({ className: r, ...t }, n) => /* @__PURE__ */ v(
174
183
  "div",
175
184
  {
176
185
  ref: n,
177
186
  role: "separator",
178
- className: D("my-1 h-px bg-border", r),
187
+ className: y("my-1 h-px bg-border", r),
179
188
  ...t
180
189
  }
181
190
  ));
182
191
  H.displayName = "DropdownSeparator";
183
- const K = c.forwardRef(({ className: r, ...t }, n) => /* @__PURE__ */ w(
192
+ const K = s.forwardRef(({ className: r, ...t }, n) => /* @__PURE__ */ v(
184
193
  "div",
185
194
  {
186
195
  ref: n,
187
- className: D(
196
+ className: y(
188
197
  "px-2 py-1.5 text-xs font-normal text-muted-foreground select-none",
189
198
  r
190
199
  ),
@@ -9,7 +9,7 @@ import * as React from "react";
9
9
  *
10
10
  * Pass one or the other; `illustration` wins when both are present. The
11
11
  * built-in illustrations (`EmptyDocuments`, `EmptySearch`, `EmptyConnections`,
12
- * `EmptyInsights`) share one soft language — warm greige cards, a single Sage
12
+ * `EmptyInsights`) share one soft language — neutral-gray cards, a single ink
13
13
  * accent — and re-theme with the system since every fill flows from a token.
14
14
  */
15
15
  export interface EmptyStateProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "title"> {
@@ -30,17 +30,17 @@ export declare function EmptyDocuments({ className }: IllustrationProps): React.
30
30
  export declare namespace EmptyDocuments {
31
31
  var displayName: string;
32
32
  }
33
- /** No results — a list card with a Sage magnifier searching it. */
33
+ /** No results — a list card with an ink magnifier searching it. */
34
34
  export declare function EmptySearch({ className }: IllustrationProps): React.JSX.Element;
35
35
  export declare namespace EmptySearch {
36
36
  var displayName: string;
37
37
  }
38
- /** No connections / data sources — a small node graph, one Sage add-node. */
38
+ /** No connections / data sources — a small node graph, one ink add-node. */
39
39
  export declare function EmptyConnections({ className }: IllustrationProps): React.JSX.Element;
40
40
  export declare namespace EmptyConnections {
41
41
  var displayName: string;
42
42
  }
43
- /** No insights / data yet — rising bars, the tallest in Sage. */
43
+ /** No insights / data yet — rising bars, the tallest in ink. */
44
44
  export declare function EmptyInsights({ className }: IllustrationProps): React.JSX.Element;
45
45
  export declare namespace EmptyInsights {
46
46
  var displayName: string;
@@ -23,7 +23,7 @@ const g = x.forwardRef(
23
23
  "p",
24
24
  {
25
25
  className: s(
26
- l ? "text-lg font-semibold text-foreground" : "font-normal"
26
+ l ? "text-lg font-medium text-foreground" : "font-normal"
27
27
  ),
28
28
  children: n
29
29
  }
@@ -126,7 +126,7 @@ function N({ className: r }) {
126
126
  ] });
127
127
  }
128
128
  N.displayName = "EmptySearch";
129
- function p({ className: r }) {
129
+ function u({ className: r }) {
130
130
  return /* @__PURE__ */ t("svg", { viewBox: "0 0 140 120", role: "img", "aria-hidden": !0, className: s(a, r), children: [
131
131
  /* @__PURE__ */ e(
132
132
  "path",
@@ -153,8 +153,8 @@ function p({ className: r }) {
153
153
  )
154
154
  ] });
155
155
  }
156
- p.displayName = "EmptyConnections";
157
- function u({ className: r }) {
156
+ u.displayName = "EmptyConnections";
157
+ function p({ className: r }) {
158
158
  return /* @__PURE__ */ t("svg", { viewBox: "0 0 140 120", role: "img", "aria-hidden": !0, className: s(a, r), children: [
159
159
  /* @__PURE__ */ e("rect", { x: "34", y: "88", width: "72", height: "3", rx: "1.5", className: "fill-border-strong" }),
160
160
  /* @__PURE__ */ e("rect", { x: "40", y: "64", width: "15", height: "24", rx: "3", className: "fill-muted" }),
@@ -162,11 +162,11 @@ function u({ className: r }) {
162
162
  /* @__PURE__ */ e("rect", { x: "84", y: "34", width: "15", height: "54", rx: "3", className: "fill-brand" })
163
163
  ] });
164
164
  }
165
- u.displayName = "EmptyInsights";
165
+ p.displayName = "EmptyInsights";
166
166
  export {
167
- p as EmptyConnections,
167
+ u as EmptyConnections,
168
168
  y as EmptyDocuments,
169
- u as EmptyInsights,
169
+ p as EmptyInsights,
170
170
  N as EmptySearch,
171
171
  g as EmptyState
172
172
  };