@actioneer/ads 0.5.4 → 0.5.6

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 (93) hide show
  1. package/components/accordion.js +15 -15
  2. package/components/agent-icon.d.ts +64 -0
  3. package/components/agent-icon.js +251 -0
  4. package/components/ai-elements/agent-trace.d.ts +8 -1
  5. package/components/ai-elements/agent-trace.js +164 -129
  6. package/components/ai-elements/chain-of-thought-icon.d.ts +42 -0
  7. package/components/ai-elements/chain-of-thought-icon.js +283 -0
  8. package/components/ai-elements/chain-of-thought.js +7 -7
  9. package/components/ai-elements/chart.js +38 -35
  10. package/components/ai-elements/index.d.ts +1 -0
  11. package/components/ai-elements/inline-citation.js +40 -40
  12. package/components/ai-elements/message.js +5 -5
  13. package/components/ai-elements/queue.js +1 -1
  14. package/components/ai-elements/research-activity.d.ts +2 -0
  15. package/components/ai-elements/research-activity.js +79 -81
  16. package/components/ai-elements/task-progress.js +2 -2
  17. package/components/ai-elements/tool.d.ts +4 -2
  18. package/components/ai-elements/tool.js +74 -54
  19. package/components/ai-elements/transcript.js +1 -1
  20. package/components/alert.js +1 -1
  21. package/components/answer.d.ts +2644 -311
  22. package/components/answer.js +1776 -371
  23. package/components/assistant-ui/answer-tool-ui.js +27 -28
  24. package/components/assistant-ui/chain-of-thought.d.ts +7 -2
  25. package/components/assistant-ui/composer-harness.js +20 -16
  26. package/components/assistant-ui/follow-up-suggestions.d.ts +5 -1
  27. package/components/assistant-ui/follow-up-suggestions.js +47 -19
  28. package/components/assistant-ui/reasoning.js +35 -31
  29. package/components/assistant-ui/tool-fallback.js +125 -122
  30. package/components/assistant-ui/tool-group.d.ts +3 -1
  31. package/components/assistant-ui/tool-group.js +48 -43
  32. package/components/audio-waveform.js +14 -14
  33. package/components/autocomplete.js +52 -48
  34. package/components/avatar.js +58 -44
  35. package/components/badge.js +3 -3
  36. package/components/brand-texture.js +1 -1
  37. package/components/breadcrumbs.d.ts +27 -1
  38. package/components/breadcrumbs.js +94 -42
  39. package/components/button.js +15 -15
  40. package/components/carousel.js +10 -10
  41. package/components/chart.js +77 -77
  42. package/components/chip.js +3 -3
  43. package/components/code-block.d.ts +39 -17
  44. package/components/code-block.js +153 -104
  45. package/components/command-palette.js +27 -25
  46. package/components/connector-card.js +2 -2
  47. package/components/dropdown.js +65 -61
  48. package/components/empty-state.js +15 -15
  49. package/components/field.js +16 -16
  50. package/components/index.d.ts +4 -0
  51. package/components/index.js +525 -478
  52. package/components/infinite-canvas.js +60 -60
  53. package/components/kbd.js +6 -6
  54. package/components/link.js +6 -6
  55. package/components/modal.js +22 -20
  56. package/components/page-header.js +1 -1
  57. package/components/pagination.js +22 -22
  58. package/components/pixel-blast-svg.js +1 -1
  59. package/components/pixel-icon.d.ts +31 -0
  60. package/components/pixel-icon.js +733 -0
  61. package/components/popover.js +46 -42
  62. package/components/ripple.d.ts +29 -0
  63. package/components/ripple.js +17 -0
  64. package/components/segmented.js +24 -23
  65. package/components/select.js +71 -67
  66. package/components/selection-action-bar.js +22 -22
  67. package/components/sidebar.d.ts +11 -3
  68. package/components/sidebar.js +161 -148
  69. package/components/stepper.d.ts +2 -0
  70. package/components/stepper.js +80 -43
  71. package/components/table.d.ts +7 -0
  72. package/components/table.js +223 -155
  73. package/components/tabs.d.ts +3 -1
  74. package/components/tabs.js +165 -144
  75. package/components/textarea.js +10 -8
  76. package/components/toast.js +48 -46
  77. package/components/tooltip.js +61 -59
  78. package/components/tree.js +44 -41
  79. package/components/typography.d.ts +1 -1
  80. package/components/typography.js +25 -25
  81. package/components/viz-charts.js +133 -133
  82. package/fonts/aribau-grotesk-500.otf +0 -0
  83. package/fonts/aribau-grotesk-600.woff2 +0 -0
  84. package/fonts.css +6 -4
  85. package/lib/icons.d.ts +411 -402
  86. package/lib/icons.js +109 -107
  87. package/llms.txt +98 -8
  88. package/manifest.json +1012 -96
  89. package/package.json +5 -5
  90. package/styles.css +206 -81
  91. package/theme.css +200 -77
  92. package/fonts/aribau-grotesk-400.otf +0 -0
  93. package/fonts/aribau-grotesk-700.otf +0 -0
@@ -1,29 +1,29 @@
1
1
  "use client";
2
- import { jsxs as m, jsx as r } from "react/jsx-runtime";
3
- import * as c from "react";
4
- import { cva as C } from "class-variance-authority";
5
- import { Button as R } from "./button.js";
6
- import { Check as E, Copy as S } from "../lib/icons.js";
7
- import { cn as k } from "../lib/cn.js";
8
- const j = C(
2
+ import { jsxs as v, jsx as o } from "react/jsx-runtime";
3
+ import * as s from "react";
4
+ import { cva as _ } from "class-variance-authority";
5
+ import { Button as L } from "./button.js";
6
+ import { Code as q, Check as I, Copy as Z } from "../lib/icons.js";
7
+ import { cn as u } from "../lib/cn.js";
8
+ const G = _(
9
9
  // `flex flex-col` so a height cap from the consumer squeezes the <pre>
10
10
  // rather than clipping it — the pre is the scroll container, not this.
11
11
  "group/code-block relative flex w-full flex-col overflow-hidden rounded-lg text-xs",
12
12
  {
13
13
  variants: {
14
14
  variant: {
15
- /** Recessed fill — the default, for code sitting on a card or panel. */
16
- soft: "bg-muted",
17
- /** No fill, for code already inside a filled or tinted surface. */
15
+ /** Outlined toolbar + white outlined source surface — both unfilled. */
16
+ soft: "bg-transparent",
17
+ /** Keeps the toolbar stroke but drops the source fill/outer stroke. */
18
18
  plain: "bg-transparent"
19
19
  }
20
20
  },
21
21
  defaultVariants: { variant: "soft" }
22
22
  }
23
- ), f = '"(?:[^"\\\\\\n]|\\\\.)*"', h = "'(?:[^'\\\\\\n]|\\\\.)*'", T = {
23
+ ), b = '"(?:[^"\\\\\\n]|\\\\.)*"', y = "'(?:[^'\\\\\\n]|\\\\.)*'", Q = {
24
24
  sql: [
25
25
  { kind: "comment", re: /--[^\n]*/y },
26
- { kind: "string", re: new RegExp(h, "y") },
26
+ { kind: "string", re: new RegExp(y, "y") },
27
27
  {
28
28
  kind: "keyword",
29
29
  re: /\b(select|from|where|create|table|index|concurrently|on|and|or|not|null|group|by|order|limit|offset|insert|into|values|update|set|delete|join|left|right|inner|outer|full|as|distinct|case|when|then|else|end|with|union|all|desc|asc|true|false|count|sum|avg|min|max|having)\b/iy
@@ -32,35 +32,37 @@ const j = C(
32
32
  { kind: "punct", re: /[(),;]/y }
33
33
  ],
34
34
  json: [
35
- { kind: "string", re: new RegExp(f, "y") },
35
+ { kind: "string", re: new RegExp(b, "y") },
36
36
  { kind: "keyword", re: /\b(?:true|false|null)\b/y },
37
37
  { kind: "number", re: /-?\b\d+(?:\.\d+)?(?:[eE][+-]?\d+)?\b/y },
38
38
  { kind: "punct", re: /[{}[\],:]/y }
39
39
  ],
40
40
  yaml: [
41
41
  { kind: "comment", re: /#[^\n]*/y },
42
- { kind: "string", re: new RegExp(`${f}|${h}`, "y") },
42
+ { kind: "string", re: new RegExp(`${b}|${y}`, "y") },
43
43
  { kind: "keyword", re: /\b(?:true|false|null|yes|no)\b/y },
44
44
  { kind: "number", re: /\b\d+(?:\.\d+)?\b/y },
45
45
  { kind: "punct", re: /[-:]/y }
46
46
  ],
47
47
  bash: [
48
48
  { kind: "comment", re: /#[^\n]*/y },
49
- { kind: "string", re: new RegExp(`${f}|${h}`, "y") },
49
+ { kind: "string", re: new RegExp(`${b}|${y}`, "y") },
50
50
  { kind: "keyword", re: /--?[A-Za-z][\w-]*/y },
51
51
  { kind: "number", re: /\b\d+\b/y }
52
52
  ],
53
53
  ts: [
54
54
  { kind: "comment", re: /\/\/[^\n]*|\/\*[\s\S]*?\*\//y },
55
- { kind: "string", re: new RegExp(`${f}|${h}|\`(?:[^\`\\\\]|\\\\.)*\``, "y") },
55
+ { kind: "string", re: new RegExp(`${b}|${y}|\`(?:[^\`\\\\]|\\\\.)*\``, "y") },
56
+ { kind: "tag", re: /<\/?[A-Za-z][\w.-]*/y },
56
57
  {
57
58
  kind: "keyword",
58
59
  re: /\b(?:const|let|var|function|return|if|else|for|while|import|from|export|default|new|class|extends|implements|async|await|type|interface|enum|public|private|readonly|true|false|null|undefined|this)\b/y
59
60
  },
61
+ { kind: "function", re: /\b[A-Za-z_$][\w$]*(?=\s*\()/y },
60
62
  { kind: "number", re: /\b\d+(?:\.\d+)?\b/y },
61
- { kind: "punct", re: /[{}[\]();,:]/y }
63
+ { kind: "punct", re: /[{}[\]();,:<>/=]/y }
62
64
  ]
63
- }, A = {
65
+ }, V = {
64
66
  sql: "sql",
65
67
  json: "json",
66
68
  yaml: "yaml",
@@ -75,152 +77,199 @@ const j = C(
75
77
  jsx: "ts",
76
78
  javascript: "ts",
77
79
  typescript: "ts"
78
- }, $ = {
80
+ }, D = {
79
81
  comment: "text-tertiary",
80
- string: "text-success-700",
81
- number: "text-info-700",
82
- keyword: "font-bold text-foreground",
82
+ string: "text-foreground",
83
+ number: "text-foreground",
84
+ keyword: "font-semibold text-foreground",
85
+ function: "font-medium text-foreground",
86
+ tag: "font-medium text-foreground",
83
87
  punct: "text-tertiary"
84
88
  };
85
- function B(s, t) {
86
- const e = [];
87
- let n = "", o = 0;
88
- for (; o < s.length; ) {
89
+ function F(a, t) {
90
+ const n = [];
91
+ let e = "", r = 0;
92
+ for (; r < a.length; ) {
89
93
  let i = null;
90
- for (const { kind: y, re: u } of t) {
91
- u.lastIndex = o;
92
- const l = u.exec(s);
93
- if (l && l.index === o && l[0].length > 0) {
94
- i = { text: l[0], kind: y };
94
+ for (const { kind: g, re: m } of t) {
95
+ m.lastIndex = r;
96
+ const l = m.exec(a);
97
+ if (l && l.index === r && l[0].length > 0) {
98
+ i = { text: l[0], kind: g };
95
99
  break;
96
100
  }
97
101
  }
98
- i ? (n && (e.push({ text: n }), n = ""), e.push(i), o += i.text.length) : (n += s[o], o += 1);
102
+ i ? (e && (n.push({ text: e }), e = ""), n.push(i), r += i.text.length) : (e += a[r], r += 1);
99
103
  }
100
- return n && e.push({ text: n }), e;
104
+ return e && n.push({ text: e }), n;
101
105
  }
102
- function z(s) {
106
+ function H(a) {
103
107
  const t = [[]];
104
- for (const e of s)
105
- e.text.split(`
106
- `).forEach((o, i) => {
107
- i > 0 && t.push([]), o && t[t.length - 1].push({ ...e, text: o });
108
+ for (const n of a)
109
+ n.text.split(`
110
+ `).forEach((r, i) => {
111
+ i > 0 && t.push([]), r && t[t.length - 1].push({ ...n, text: r });
108
112
  });
109
113
  return t;
110
114
  }
111
- function g(s) {
112
- return s.map(
113
- (t, e) => t.kind ? /* @__PURE__ */ r("span", { className: $[t.kind], children: t.text }, e) : /* @__PURE__ */ r(c.Fragment, { children: t.text }, e)
115
+ function K(a) {
116
+ return a.map(
117
+ (t, n) => t.kind ? /* @__PURE__ */ o("span", { className: D[t.kind], children: t.text }, n) : /* @__PURE__ */ o(s.Fragment, { children: t.text }, n)
114
118
  );
115
119
  }
116
- function M(s = 2e3) {
117
- const [t, e] = c.useState(!1), n = c.useRef(null);
118
- c.useEffect(
120
+ function O(a = 2e3) {
121
+ const [t, n] = s.useState(!1), e = s.useRef(null);
122
+ s.useEffect(
119
123
  () => () => {
120
- n.current !== null && window.clearTimeout(n.current);
124
+ e.current !== null && window.clearTimeout(e.current);
121
125
  },
122
126
  []
123
127
  );
124
- const o = c.useCallback(
128
+ const r = s.useCallback(
125
129
  (i) => {
126
130
  !i || typeof navigator > "u" || !navigator.clipboard || navigator.clipboard.writeText(i).then(
127
131
  () => {
128
- e(!0), n.current !== null && window.clearTimeout(n.current), n.current = window.setTimeout(
129
- () => e(!1),
130
- s
132
+ n(!0), e.current !== null && window.clearTimeout(e.current), e.current = window.setTimeout(
133
+ () => n(!1),
134
+ a
131
135
  );
132
136
  },
133
137
  () => {
134
138
  }
135
139
  );
136
140
  },
137
- [s]
141
+ [a]
138
142
  );
139
- return { isCopied: t, copy: o };
143
+ return { isCopied: t, copy: r };
140
144
  }
141
- const _ = c.forwardRef(
145
+ const J = s.forwardRef(
142
146
  ({
143
- className: s,
144
- code: t,
147
+ className: a,
148
+ children: t,
149
+ code: n,
145
150
  language: e,
146
- filename: n,
147
- variant: o,
148
- isCopyable: i = !0,
149
- showLineNumbers: y = !1,
150
- copyLabel: u = "Copy code",
151
- ...l
152
- }, v) => {
153
- const { isCopied: x, copy: N } = M(), b = !!(n || e), w = c.useMemo(() => {
154
- const d = e ? T[A[e.toLowerCase()]] : void 0, a = t.replace(/\n$/, "");
155
- return z(d ? B(a, d) : [{ text: a }]);
156
- }, [t, e]), p = i ? /* @__PURE__ */ r(
157
- R,
151
+ filename: r,
152
+ variant: i,
153
+ isCopyable: g = !0,
154
+ hideLineNumbers: m = !1,
155
+ showLineNumbers: l,
156
+ highlightedLinesNumbers: C,
157
+ addedLinesNumbers: N,
158
+ removedLinesNumbers: R,
159
+ copyLabel: E = "Copy code",
160
+ ...j
161
+ }, A) => {
162
+ const { isCopied: x, copy: $ } = O(), k = t ?? n ?? "", w = !!r, S = l ?? !m, z = s.useMemo(
163
+ () => new Set(C ?? []),
164
+ [C]
165
+ ), M = s.useMemo(
166
+ () => new Set(N ?? []),
167
+ [N]
168
+ ), T = s.useMemo(
169
+ () => new Set(R ?? []),
170
+ [R]
171
+ ), B = s.useMemo(() => {
172
+ const f = e ? Q[V[e.toLowerCase()]] : void 0, h = k.replace(/\n$/, "");
173
+ return H(f ? F(h, f) : [{ text: h }]);
174
+ }, [k, e]), p = g ? /* @__PURE__ */ o(
175
+ L,
158
176
  {
159
177
  type: "button",
160
178
  variant: "ghost",
161
179
  size: "icon-xs",
162
- "aria-label": u,
163
- onClick: () => N(t),
164
- children: x ? /* @__PURE__ */ r(E, { "aria-hidden": !0, className: "text-success" }) : /* @__PURE__ */ r(S, { "aria-hidden": !0 })
180
+ "aria-label": x ? "Copied" : E,
181
+ onClick: () => $(k),
182
+ children: x ? /* @__PURE__ */ o(I, { "aria-hidden": !0, className: "text-foreground" }) : /* @__PURE__ */ o(Z, { "aria-hidden": !0 })
165
183
  }
166
184
  ) : null;
167
- return /* @__PURE__ */ m(
185
+ return /* @__PURE__ */ v(
168
186
  "div",
169
187
  {
170
- ref: v,
188
+ ref: A,
171
189
  "data-slot": "code-block",
172
- className: k(j({ variant: o }), s),
173
- ...l,
190
+ "data-variant": i ?? "soft",
191
+ className: u(G({ variant: i }), a),
192
+ ...j,
174
193
  children: [
175
- /* @__PURE__ */ r("span", { "aria-live": "polite", className: "sr-only", children: x ? "Copied to clipboard" : "" }),
176
- b && /* @__PURE__ */ m(
194
+ /* @__PURE__ */ o("span", { "aria-live": "polite", className: "sr-only", children: x ? "Copied to clipboard" : "" }),
195
+ w && /* @__PURE__ */ v(
177
196
  "div",
178
197
  {
179
198
  "data-slot": "code-block-header",
180
- className: "flex items-center gap-2 px-3 py-1.5 text-tertiary",
199
+ className: "flex min-h-10 items-center gap-2 rounded-t-lg border border-border px-4 py-2 text-tertiary",
181
200
  children: [
182
- n && /* @__PURE__ */ r("span", { className: "min-w-0 truncate font-medium text-secondary", children: n }),
183
- e && /* @__PURE__ */ r("span", { className: "shrink-0 font-mono text-[11px] uppercase", children: e }),
184
- p && /* @__PURE__ */ r("span", { className: "ml-auto shrink-0", children: p })
201
+ /* @__PURE__ */ o(q, { "aria-hidden": !0, className: "size-4 shrink-0" }),
202
+ /* @__PURE__ */ o("span", { className: "min-w-0 truncate font-normal text-secondary", children: r }),
203
+ p && /* @__PURE__ */ o("span", { className: "ml-auto shrink-0", children: p })
185
204
  ]
186
205
  }
187
206
  ),
188
- !b && p && /* @__PURE__ */ r(
207
+ !w && p && /* @__PURE__ */ o(
189
208
  "span",
190
209
  {
191
- className: k(
192
- "absolute top-1.5 right-1.5 z-10 opacity-0 transition-opacity duration-(--duration-fast) ease-out",
210
+ className: u(
211
+ "absolute top-2 right-2 z-10 opacity-0 transition-opacity duration-(--duration-fast) ease-out",
193
212
  "group-hover/code-block:opacity-100 focus-within:opacity-100",
194
213
  "motion-reduce:transition-none"
195
214
  ),
196
215
  children: p
197
216
  }
198
217
  ),
199
- /* @__PURE__ */ r(
218
+ /* @__PURE__ */ o(
200
219
  "pre",
201
220
  {
202
221
  "data-slot": "code-block-content",
203
- className: k(
222
+ className: u(
204
223
  // min-h-0 lets this shrink inside the flex column; without it a
205
224
  // capped block clips its overflow instead of scrolling to it.
206
- "min-h-0 overflow-auto px-3 leading-relaxed text-foreground tabular-nums",
207
- b ? "pb-3" : "py-3"
225
+ "min-h-0 overflow-auto bg-card leading-relaxed text-foreground tabular-nums",
226
+ w ? "rounded-b-lg border-x border-b border-border py-3" : "rounded-lg border border-border py-4",
227
+ i === "plain" && "border-transparent bg-transparent"
208
228
  ),
209
- children: /* @__PURE__ */ r("code", { className: "font-mono", children: y ? w.map((d, a) => /* @__PURE__ */ m("span", { className: "grid grid-cols-[2ch_1fr] gap-3", children: [
210
- /* @__PURE__ */ r(
211
- "span",
212
- {
213
- "aria-hidden": !0,
214
- className: "select-none text-right text-tertiary",
215
- children: a + 1
216
- }
217
- ),
218
- /* @__PURE__ */ r("span", { children: g(d) })
219
- ] }, a)) : w.map((d, a) => /* @__PURE__ */ m(c.Fragment, { children: [
220
- a > 0 && `
221
- `,
222
- g(d)
223
- ] }, a)) })
229
+ children: /* @__PURE__ */ o(
230
+ "code",
231
+ {
232
+ "data-slot": "code-block-code",
233
+ className: "block w-max min-w-full font-mono",
234
+ "data-language": e,
235
+ children: B.map((f, h) => {
236
+ const c = h + 1, d = M.has(c) ? "added" : T.has(c) ? "removed" : z.has(c) ? "highlighted" : void 0;
237
+ return /* @__PURE__ */ v(
238
+ "span",
239
+ {
240
+ "data-slot": "code-block-line",
241
+ "data-line": c,
242
+ "data-line-state": d,
243
+ className: u(
244
+ "grid min-h-5 min-w-full px-4",
245
+ S ? "grid-cols-[3ch_minmax(0,1fr)] gap-3" : "grid-cols-[minmax(0,1fr)]",
246
+ d === "highlighted" && "bg-info-50",
247
+ d === "added" && "bg-fill font-medium",
248
+ d === "removed" && "bg-danger-50"
249
+ ),
250
+ children: [
251
+ S && /* @__PURE__ */ o(
252
+ "span",
253
+ {
254
+ "aria-hidden": !0,
255
+ "data-slot": "code-block-line-number",
256
+ className: u(
257
+ "select-none text-right text-tertiary",
258
+ d === "highlighted" && "text-info-700",
259
+ d === "added" && "font-semibold text-foreground",
260
+ d === "removed" && "text-danger-700"
261
+ ),
262
+ children: c
263
+ }
264
+ ),
265
+ /* @__PURE__ */ o("span", { children: K(f) })
266
+ ]
267
+ },
268
+ c
269
+ );
270
+ })
271
+ }
272
+ )
224
273
  }
225
274
  )
226
275
  ]
@@ -228,8 +277,8 @@ const _ = c.forwardRef(
228
277
  );
229
278
  }
230
279
  );
231
- _.displayName = "CodeBlock";
280
+ J.displayName = "CodeBlock";
232
281
  export {
233
- _ as CodeBlock,
234
- j as codeBlockVariants
282
+ J as CodeBlock,
283
+ G as codeBlockVariants
235
284
  };
@@ -1,22 +1,23 @@
1
1
  "use client";
2
- import { jsxs as d, jsx as s } from "react/jsx-runtime";
2
+ import { jsxs as d, jsx as a } from "react/jsx-runtime";
3
3
  import * as o from "react";
4
4
  import { createPortal as S } from "react-dom";
5
5
  import { Search as q } from "../lib/icons.js";
6
6
  import { cn as k } from "../lib/cn.js";
7
- const C = (a, i) => `${a.label} ${a.keywords ?? ""}`.toLowerCase().includes(i);
8
- function _({
9
- open: a,
7
+ import { Ripple as C } from "./ripple.js";
8
+ const F = (s, i) => `${s.label} ${s.keywords ?? ""}`.toLowerCase().includes(i);
9
+ function L({
10
+ open: s,
10
11
  onOpenChange: i,
11
12
  items: p,
12
13
  onSelect: R,
13
14
  placeholder: $ = "Search…",
14
15
  emptyLabel: A = "No results",
15
16
  "aria-label": D = "Global search",
16
- filter: h = C,
17
+ filter: h = F,
17
18
  className: E
18
19
  }) {
19
- const f = o.useId(), v = o.useRef(null), y = o.useRef(null), g = o.useRef(null), [m, b] = o.useState(""), [c, x] = o.useState(0), n = o.useMemo(() => {
20
+ const f = o.useId(), v = o.useRef(null), g = o.useRef(null), y = o.useRef(null), [m, b] = o.useState(""), [c, x] = o.useState(0), n = o.useMemo(() => {
20
21
  const e = m.trim().toLowerCase();
21
22
  return e ? p.filter((r) => h(r, e)) : [...p];
22
23
  }, [p, m, h]), M = o.useMemo(() => {
@@ -27,9 +28,9 @@ function _({
27
28
  }, [n]), u = n[c];
28
29
  o.useEffect(() => {
29
30
  x(0);
30
- }, [m, a]), o.useEffect(() => {
31
- if (!a) return;
32
- g.current = document.activeElement, b("");
31
+ }, [m, s]), o.useEffect(() => {
32
+ if (!s) return;
33
+ y.current = document.activeElement, b("");
33
34
  const e = document.body.style.overflow;
34
35
  document.body.style.overflow = "hidden";
35
36
  const r = requestAnimationFrame(() => {
@@ -38,20 +39,20 @@ function _({
38
39
  });
39
40
  return () => {
40
41
  var t, l;
41
- document.body.style.overflow = e, cancelAnimationFrame(r), (l = (t = g.current) == null ? void 0 : t.focus) == null || l.call(t);
42
+ document.body.style.overflow = e, cancelAnimationFrame(r), (l = (t = y.current) == null ? void 0 : t.focus) == null || l.call(t);
42
43
  };
43
- }, [a]), o.useEffect(() => {
44
+ }, [s]), o.useEffect(() => {
44
45
  var e, r;
45
- !a || !u || (r = (e = y.current) == null ? void 0 : e.querySelector(`[data-index="${c}"]`)) == null || r.scrollIntoView({ block: "nearest" });
46
- }, [a, u, c]);
46
+ !s || !u || (r = (e = g.current) == null ? void 0 : e.querySelector(`[data-index="${c}"]`)) == null || r.scrollIntoView({ block: "nearest" });
47
+ }, [s, u, c]);
47
48
  const w = (e) => {
48
49
  i(!1), R(e);
49
50
  }, I = (e) => {
50
51
  e.key === "Escape" ? (e.preventDefault(), i(!1)) : e.key === "ArrowDown" ? (e.preventDefault(), x((r) => Math.min(r + 1, n.length - 1))) : e.key === "ArrowUp" ? (e.preventDefault(), x((r) => Math.max(r - 1, 0))) : e.key === "Enter" && u && (e.preventDefault(), w(u));
51
52
  };
52
- return a ? S(
53
+ return s ? S(
53
54
  /* @__PURE__ */ d("div", { className: "fixed inset-0 z-50 flex items-start justify-center px-4 pt-[15vh]", children: [
54
- /* @__PURE__ */ s(
55
+ /* @__PURE__ */ a(
55
56
  "div",
56
57
  {
57
58
  "aria-hidden": !0,
@@ -72,9 +73,10 @@ function _({
72
73
  ),
73
74
  onKeyDown: I,
74
75
  children: [
76
+ /* @__PURE__ */ a(C, { origin: "top" }),
75
77
  /* @__PURE__ */ d("div", { className: "flex items-center gap-2.5 px-4 py-3", children: [
76
- /* @__PURE__ */ s(q, { "aria-hidden": !0, className: "size-4 shrink-0 text-muted-foreground" }),
77
- /* @__PURE__ */ s(
78
+ /* @__PURE__ */ a(q, { "aria-hidden": !0, className: "size-4 shrink-0 text-muted-foreground" }),
79
+ /* @__PURE__ */ a(
78
80
  "input",
79
81
  {
80
82
  ref: v,
@@ -90,16 +92,16 @@ function _({
90
92
  }
91
93
  )
92
94
  ] }),
93
- /* @__PURE__ */ s(
95
+ /* @__PURE__ */ a(
94
96
  "div",
95
97
  {
96
- ref: y,
98
+ ref: g,
97
99
  id: f,
98
100
  role: "listbox",
99
101
  "aria-label": "Results",
100
102
  className: "max-h-80 overflow-y-auto p-1.5 pt-0",
101
- children: n.length === 0 ? /* @__PURE__ */ s("p", { className: "px-2.5 py-6 text-center text-xs text-muted-foreground", children: A }) : M.map(({ group: e, items: r }) => /* @__PURE__ */ d("div", { role: "group", "aria-label": e, children: [
102
- e && /* @__PURE__ */ s("div", { className: "px-2.5 pb-1 pt-2.5 text-xs font-medium text-muted-foreground select-none", children: e }),
103
+ children: n.length === 0 ? /* @__PURE__ */ a("p", { className: "px-2.5 py-6 text-center text-xs text-muted-foreground", children: A }) : M.map(({ group: e, items: r }) => /* @__PURE__ */ d("div", { role: "group", "aria-label": e, children: [
104
+ e && /* @__PURE__ */ a("div", { className: "px-2.5 pb-1 pt-2.5 text-xs font-normal text-muted-foreground select-none", children: e }),
103
105
  r.map((t) => {
104
106
  const l = n.indexOf(t), N = l === c;
105
107
  return /* @__PURE__ */ d(
@@ -116,7 +118,7 @@ function _({
116
118
  N ? "bg-fill text-foreground" : "text-secondary"
117
119
  ),
118
120
  children: [
119
- t.icon && /* @__PURE__ */ s(
121
+ t.icon && /* @__PURE__ */ a(
120
122
  "span",
121
123
  {
122
124
  "aria-hidden": !0,
@@ -124,8 +126,8 @@ function _({
124
126
  children: t.icon
125
127
  }
126
128
  ),
127
- /* @__PURE__ */ s("span", { className: "min-w-0 flex-1 truncate", children: t.label }),
128
- t.hint && /* @__PURE__ */ s("span", { className: "shrink-0 text-xs text-tertiary", children: t.hint })
129
+ /* @__PURE__ */ a("span", { className: "min-w-0 flex-1 truncate", children: t.label }),
130
+ t.hint && /* @__PURE__ */ a("span", { className: "shrink-0 text-xs text-tertiary", children: t.hint })
129
131
  ]
130
132
  },
131
133
  t.id
@@ -142,5 +144,5 @@ function _({
142
144
  ) : null;
143
145
  }
144
146
  export {
145
- _ as CommandPalette
147
+ L as CommandPalette
146
148
  };
@@ -95,7 +95,7 @@ const v = h.forwardRef(
95
95
  ] }),
96
96
  /* @__PURE__ */ t(N, { strip: e.strip })
97
97
  ] }),
98
- /* @__PURE__ */ r("div", { className: "flex items-center justify-between gap-3 rounded-b-xl bg-muted px-[var(--card-padding)] py-3", children: [
98
+ /* @__PURE__ */ r("div", { className: "flex items-center justify-between gap-3 rounded-b-xl bg-ink-100 px-[var(--card-padding)] py-3", children: [
99
99
  /* @__PURE__ */ t(
100
100
  "span",
101
101
  {
@@ -110,7 +110,7 @@ const v = h.forwardRef(
110
110
  "span",
111
111
  {
112
112
  className: o(
113
- "inline-flex shrink-0 items-center gap-0.5 text-xs font-medium",
113
+ "inline-flex shrink-0 items-center gap-0.5 text-xs font-normal",
114
114
  f ? "text-danger" : "text-foreground"
115
115
  ),
116
116
  children: [