@devalok/shilp-sutra 0.52.0 → 0.53.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 (41) hide show
  1. package/MIGRATION.md +6 -0
  2. package/dist/_chunks/motion-provider.js +7 -6
  3. package/dist/_chunks/motion-provider.js.map +1 -1
  4. package/dist/_chunks/success.js +53 -53
  5. package/dist/ai/command-bar.js +158 -158
  6. package/dist/ai/command-bar.js.map +1 -1
  7. package/dist/ai/conversation.js +5 -5
  8. package/dist/composed/command-palette.js +17 -17
  9. package/dist/composed/command-palette.js.map +1 -1
  10. package/dist/composed/priority-indicator.d.ts +15 -6
  11. package/dist/composed/priority-indicator.d.ts.map +1 -1
  12. package/dist/composed/priority-indicator.js +37 -88
  13. package/dist/composed/priority-indicator.js.map +1 -1
  14. package/dist/composed/schedule-view.d.ts +17 -2
  15. package/dist/composed/schedule-view.d.ts.map +1 -1
  16. package/dist/composed/schedule-view.js +163 -64
  17. package/dist/composed/schedule-view.js.map +1 -1
  18. package/dist/motion/motion-provider.d.ts.map +1 -1
  19. package/dist/shell/bottom-navbar.d.ts +32 -6
  20. package/dist/shell/bottom-navbar.d.ts.map +1 -1
  21. package/dist/shell/bottom-navbar.js +156 -129
  22. package/dist/shell/bottom-navbar.js.map +1 -1
  23. package/dist/tokens/primitives.css +6 -2
  24. package/dist/tokens/utilities.css +6 -0
  25. package/dist/ui/autocomplete.d.ts +34 -32
  26. package/dist/ui/autocomplete.d.ts.map +1 -1
  27. package/dist/ui/autocomplete.js +115 -110
  28. package/dist/ui/autocomplete.js.map +1 -1
  29. package/dist/ui/combobox.js +4 -4
  30. package/dist/ui/index.js +30 -30
  31. package/dist/ui/search-input.js +4 -4
  32. package/dist/ui/sidebar.js +7 -7
  33. package/docs/components/composed/priority-indicator.md +22 -11
  34. package/docs/components/composed/schedule-view.md +20 -5
  35. package/docs/components/shell/bottom-navbar.md +24 -5
  36. package/docs/components/ui/autocomplete.md +26 -10
  37. package/llms.txt +1 -1
  38. package/mcp-manifest.json +179 -26
  39. package/package.json +1 -1
  40. package/skill/SKILL.md +1 -1
  41. package/skill/references/components.md +1 -1
@@ -3,21 +3,21 @@ import { IconProvider as e } from "../ui/icon-context.js";
3
3
  import { springs as t, tweens as n } from "../ui/lib/motion.js";
4
4
  import { cn as r } from "../ui/lib/utils.js";
5
5
  import { Icon as i } from "../ui/icon.js";
6
- import { normalizeIcon as a } from "../_chunks/normalize-icon.js";
7
- import { Dialog as o, DialogContentRaw as s, DialogDescription as ee, DialogOverlay as te, DialogPortal as ne, DialogTitle as re } from "../ui/dialog.js";
8
- import { VisuallyHidden as ie } from "../ui/visually-hidden.js";
9
- import { useMotion as c } from "../_chunks/motion-provider.js";
10
- import { getIsMac as ae, getModifierDisplay as oe, matchesKeybinding as se } from "../_chunks/keybinding.js";
11
- import * as l from "react";
12
- import { Fragment as u, jsx as d, jsxs as f } from "react/jsx-runtime";
13
- import { IconArrowDown as ce, IconArrowUp as le, IconCornerDownLeft as ue, IconLoader2 as de, IconSearch as fe, IconX as pe } from "@tabler/icons-react";
14
- import { AnimatePresence as p, motion as m } from "framer-motion";
6
+ import { useMotion as a } from "../_chunks/motion-provider.js";
7
+ import { normalizeIcon as o } from "../_chunks/normalize-icon.js";
8
+ import { Dialog as s, DialogContentRaw as ee, DialogDescription as te, DialogOverlay as ne, DialogPortal as re, DialogTitle as ie } from "../ui/dialog.js";
9
+ import { VisuallyHidden as ae } from "../ui/visually-hidden.js";
10
+ import { getIsMac as oe, getModifierDisplay as se, matchesKeybinding as ce } from "../_chunks/keybinding.js";
11
+ import * as c from "react";
12
+ import { Fragment as l, jsx as u, jsxs as d } from "react/jsx-runtime";
13
+ import { IconArrowDown as le, IconArrowUp as ue, IconCornerDownLeft as de, IconLoader2 as fe, IconSearch as pe, IconX as me } from "@tabler/icons-react";
14
+ import { AnimatePresence as f, motion as p } from "framer-motion";
15
15
  //#region src/ai/command-bar.tsx
16
- function me({ active: e, rounded: t, reducedMotion: n, children: i }) {
17
- return e ? n ? /* @__PURE__ */ d("div", {
16
+ function he({ active: e, rounded: t, reducedMotion: n, children: i }) {
17
+ return e ? n ? /* @__PURE__ */ u("div", {
18
18
  className: r("p-[1.5px] bg-accent-9", t),
19
19
  children: i
20
- }) : /* @__PURE__ */ d(m.div, {
20
+ }) : /* @__PURE__ */ u(p.div, {
21
21
  className: r("relative p-[1.5px]", t),
22
22
  style: {
23
23
  background: "linear-gradient(var(--gradient-angle, 0deg), #D33163, #9B5DE5, #C850C0, #D33163)",
@@ -34,32 +34,32 @@ function me({ active: e, rounded: t, reducedMotion: n, children: i }) {
34
34
  ease: "linear"
35
35
  } },
36
36
  children: i
37
- }) : /* @__PURE__ */ d(u, { children: i });
37
+ }) : /* @__PURE__ */ u(l, { children: i });
38
38
  }
39
- function he(e) {
39
+ function ge(e) {
40
40
  return e.filterValue ? e.filterValue : typeof e.label == "string" ? e.label : "";
41
41
  }
42
- function ge(e) {
42
+ function _e(e) {
43
43
  return typeof e.description == "string" ? e.description : "";
44
44
  }
45
- function _e({ placeholders: e, interval: t, paused: r }) {
46
- let [i, a] = l.useState(0), { reducedMotion: o } = c();
47
- return l.useEffect(() => {
45
+ function ve({ placeholders: e, interval: t, paused: r }) {
46
+ let [i, o] = c.useState(0), { reducedMotion: s } = a();
47
+ return c.useEffect(() => {
48
48
  if (r || e.length <= 1) return;
49
49
  let n = setInterval(() => {
50
- a((t) => (t + 1) % e.length);
50
+ o((t) => (t + 1) % e.length);
51
51
  }, t);
52
52
  return () => clearInterval(n);
53
53
  }, [
54
54
  r,
55
55
  e.length,
56
56
  t
57
- ]), o ? /* @__PURE__ */ d("span", {
57
+ ]), s ? /* @__PURE__ */ u("span", {
58
58
  className: "pointer-events-none absolute text-surface-fg-subtle",
59
59
  children: e[i]
60
- }) : /* @__PURE__ */ d(p, {
60
+ }) : /* @__PURE__ */ u(f, {
61
61
  mode: "wait",
62
- children: /* @__PURE__ */ d(m.span, {
62
+ children: /* @__PURE__ */ u(p.span, {
63
63
  initial: {
64
64
  opacity: 0,
65
65
  y: -4
@@ -78,78 +78,78 @@ function _e({ placeholders: e, interval: t, paused: r }) {
78
78
  }, e[i])
79
79
  });
80
80
  }
81
- var h = l.forwardRef(function({ onSubmit: u, state: h = "idle", groups: g = [], onSearch: _, emptyMessage: ve = "No results found.", emptyState: ye, variant: v = "hero", placeholder: y = "Ask anything...", placeholderInterval: be = 5e3, greeting: b, hints: x, agentName: xe, agentIcon: Se, open: Ce, defaultOpen: we, onOpenChange: Te, keybinding: S = "mod+j", disabled: C = !1, maxHeight: w = "320px", children: T, className: E, ...D }, O) {
82
- let k = Ce !== void 0, [Ee, De] = l.useState(we ?? !1), A = k ? Ce : Ee, j = l.useRef(A);
83
- j.current = A;
84
- let M = l.useCallback((e) => {
85
- let t = typeof e == "function" ? e(j.current) : e;
86
- k || De(t), Te?.(t);
87
- }, [k, Te]), [N, P] = l.useState(""), [F, I] = l.useState(-1), [L, Oe] = l.useState(""), [R, ke] = l.useState(!1), [z, Ae] = l.useState(!1), B = l.useRef(null), je = l.useRef(null), V = l.useId(), Me = `command-bar-listbox-${V}`, { reducedMotion: H } = c(), U = { duration: 0 }, Ne = l.useMemo(() => ae(), []), W = l.useMemo(() => Array.isArray(y) ? y : [y], [y]), G = g.length > 0, K = l.useMemo(() => {
81
+ var m = c.forwardRef(function({ onSubmit: l, state: m = "idle", groups: h = [], onSearch: ye, emptyMessage: be = "No results found.", emptyState: xe, variant: g = "hero", placeholder: _ = "Ask anything...", placeholderInterval: Se = 5e3, greeting: v, hints: y, agentName: b, agentIcon: Ce, open: x, defaultOpen: we, onOpenChange: S, keybinding: C = "mod+j", disabled: w = !1, maxHeight: T = "320px", children: E, className: D, ...O }, k) {
82
+ let A = x !== void 0, [Te, Ee] = c.useState(we ?? !1), j = A ? x : Te, M = c.useRef(j);
83
+ M.current = j;
84
+ let N = c.useCallback((e) => {
85
+ let t = typeof e == "function" ? e(M.current) : e;
86
+ A || Ee(t), S?.(t);
87
+ }, [A, S]), [P, F] = c.useState(""), [I, L] = c.useState(-1), [De, Oe] = c.useState(""), [R, ke] = c.useState(!1), [z, Ae] = c.useState(!1), B = c.useRef(null), je = c.useRef(null), V = c.useId(), Me = `command-bar-listbox-${V}`, { reducedMotion: H } = a(), U = { duration: 0 }, Ne = c.useMemo(() => oe(), []), W = c.useMemo(() => Array.isArray(_) ? _ : [_], [_]), G = h.length > 0, K = c.useMemo(() => {
88
88
  if (!G) return [];
89
- if (!N.trim()) return g;
90
- let e = N.toLowerCase();
91
- return g.map((t) => ({
89
+ if (!P.trim()) return h;
90
+ let e = P.toLowerCase();
91
+ return h.map((t) => ({
92
92
  ...t,
93
- items: t.items.filter((t) => he(t).toLowerCase().includes(e) || ge(t).toLowerCase().includes(e))
93
+ items: t.items.filter((t) => ge(t).toLowerCase().includes(e) || _e(t).toLowerCase().includes(e))
94
94
  })).filter((e) => e.items.length > 0);
95
95
  }, [
96
- g,
97
- N,
96
+ h,
97
+ P,
98
98
  G
99
- ]), q = l.useMemo(() => K.flatMap((e) => e.items), [K]), Pe = l.useMemo(() => {
99
+ ]), q = c.useMemo(() => K.flatMap((e) => e.items), [K]), Pe = c.useMemo(() => {
100
100
  let e = /* @__PURE__ */ new Map(), t = 0;
101
101
  for (let n of K) for (let r of n.items) e.set(r.id, t++);
102
102
  return e;
103
- }, [K]), Fe = typeof w == "number" ? `${w}px` : w;
104
- l.useEffect(() => {
105
- if (v !== "floating" || S === !1) return;
106
- let e = Array.isArray(S) ? S : [S];
103
+ }, [K]), Fe = typeof T == "number" ? `${T}px` : T;
104
+ c.useEffect(() => {
105
+ if (g !== "floating" || C === !1) return;
106
+ let e = Array.isArray(C) ? C : [C];
107
107
  function t(t) {
108
- for (let n of e) if (se(t, n)) {
109
- t.preventDefault(), M((e) => !e);
108
+ for (let n of e) if (ce(t, n)) {
109
+ t.preventDefault(), N((e) => !e);
110
110
  return;
111
111
  }
112
112
  }
113
113
  return document.addEventListener("keydown", t), () => document.removeEventListener("keydown", t);
114
114
  }, [
115
- v,
116
- S,
117
- M
118
- ]), l.useEffect(() => {
119
- v === "floating" && A && (P(""), I(-1), requestAnimationFrame(() => {
115
+ g,
116
+ C,
117
+ N
118
+ ]), c.useEffect(() => {
119
+ g === "floating" && j && (F(""), L(-1), requestAnimationFrame(() => {
120
120
  B.current?.focus();
121
121
  }));
122
- }, [v, A]), l.useEffect(() => {
123
- F < 0 || (je.current?.querySelector(`[data-command-index="${F}"]`))?.scrollIntoView({ block: "nearest" });
124
- }, [F]);
122
+ }, [g, j]), c.useEffect(() => {
123
+ I < 0 || (je.current?.querySelector(`[data-command-index="${I}"]`))?.scrollIntoView({ block: "nearest" });
124
+ }, [I]);
125
125
  let Ie = (e) => {
126
- P(e), I(G && e.trim() ? 0 : -1), _?.(e);
127
- }, Le = l.useCallback(() => {
128
- !N.trim() || C || (Oe(N), u?.(N));
126
+ F(e), L(G && e.trim() ? 0 : -1), ye?.(e);
127
+ }, Le = c.useCallback(() => {
128
+ !P.trim() || w || (Oe(P), l?.(P));
129
129
  }, [
130
- N,
131
- C,
132
- u
130
+ P,
131
+ w,
132
+ l
133
133
  ]), Re = (e) => {
134
134
  switch (e.key) {
135
135
  case "ArrowDown":
136
136
  if (!G || q.length === 0) return;
137
- e.preventDefault(), I((e) => e < q.length - 1 ? e + 1 : 0);
137
+ e.preventDefault(), L((e) => e < q.length - 1 ? e + 1 : 0);
138
138
  break;
139
139
  case "ArrowUp":
140
- G && q.length > 0 ? (e.preventDefault(), I((e) => e > 0 ? e - 1 : q.length - 1)) : !G && !N && L && (e.preventDefault(), P(L));
140
+ G && q.length > 0 ? (e.preventDefault(), L((e) => e > 0 ? e - 1 : q.length - 1)) : !G && !P && De && (e.preventDefault(), F(De));
141
141
  break;
142
142
  case "Enter":
143
- e.preventDefault(), e.metaKey || e.ctrlKey ? Le() : G && F >= 0 && q[F] ? (q[F].onSelect(), v === "floating" && M(!1)) : Le();
143
+ e.preventDefault(), e.metaKey || e.ctrlKey ? Le() : G && I >= 0 && q[I] ? (q[I].onSelect(), g === "floating" && N(!1)) : Le();
144
144
  break;
145
145
  case "Escape":
146
- e.preventDefault(), h === "responded" ? P("") : v === "floating" ? M(!1) : B.current?.blur();
146
+ e.preventDefault(), m === "responded" ? F("") : g === "floating" ? N(!1) : B.current?.blur();
147
147
  break;
148
148
  }
149
149
  }, ze = () => {
150
- P(""), I(-1), B.current?.focus();
150
+ F(""), L(-1), B.current?.focus();
151
151
  };
152
- l.useEffect(() => {
152
+ c.useEffect(() => {
153
153
  if (z) {
154
154
  let e = setTimeout(() => Ae(!1), 500);
155
155
  return () => clearTimeout(e);
@@ -159,95 +159,95 @@ var h = l.forwardRef(function({ onSubmit: u, state: h = "idle", groups: g = [],
159
159
  opacity: 1,
160
160
  scale: 1,
161
161
  y: 0
162
- } : void 0, X = v === "inline", Z = h === "processing", Be = h === "responded", Q = () => /* @__PURE__ */ d(me, {
162
+ } : void 0, X = g === "inline", Z = m === "processing", Be = m === "responded", Q = () => /* @__PURE__ */ u(he, {
163
163
  active: Z,
164
164
  rounded: X ? "rounded-control" : "rounded-surface",
165
165
  reducedMotion: H,
166
- children: /* @__PURE__ */ f("div", {
166
+ children: /* @__PURE__ */ d("div", {
167
167
  className: r("flex items-center gap-ds-04 border bg-surface-overlay transition-colors transition-shadow duration-fast-02 ease-productive-standard", X ? "rounded-control px-ds-04" : "rounded-surface px-ds-05", Z ? "border-transparent" : "border-surface-border-strong", R && !Z && "border-accent-7 shadow-ring", z && "animate-shake"),
168
168
  children: [
169
- /* @__PURE__ */ d(i, {
170
- icon: fe,
169
+ /* @__PURE__ */ u(i, {
170
+ icon: pe,
171
171
  size: X ? "xs" : "sm",
172
172
  stroke: "light",
173
173
  className: r("shrink-0 transition-colors duration-fast-02 ease-productive-standard", R ? "text-accent-9" : "text-surface-fg-subtle")
174
174
  }),
175
- /* @__PURE__ */ f("div", {
175
+ /* @__PURE__ */ d("div", {
176
176
  className: "relative flex flex-1 items-center",
177
- children: [!N && !R && W.length > 1 && /* @__PURE__ */ d(_e, {
177
+ children: [!P && !R && W.length > 1 && /* @__PURE__ */ u(ve, {
178
178
  placeholders: W,
179
- interval: be,
180
- paused: R || !!N
181
- }), /* @__PURE__ */ d("input", {
179
+ interval: Se,
180
+ paused: R || !!P
181
+ }), /* @__PURE__ */ u("input", {
182
182
  ref: B,
183
- value: N,
183
+ value: P,
184
184
  onChange: (e) => Ie(e.target.value),
185
185
  onFocus: () => ke(!0),
186
186
  onBlur: () => ke(!1),
187
187
  onKeyDown: Re,
188
188
  placeholder: W.length === 1 || R ? W[0] : "",
189
189
  readOnly: Z,
190
- disabled: C,
190
+ disabled: w,
191
191
  role: "combobox",
192
192
  "aria-expanded": G && q.length > 0,
193
193
  "aria-controls": G ? Me : void 0,
194
- "aria-activedescendant": G && F >= 0 && q[F] ? `command-bar-item-${V}-${q[F].id}` : void 0,
194
+ "aria-activedescendant": G && I >= 0 && q[I] ? `command-bar-item-${V}-${q[I].id}` : void 0,
195
195
  "aria-autocomplete": G ? "list" : void 0,
196
- "aria-label": xe ? `Ask ${xe}` : "AI Command Bar",
197
- className: r("flex-1 bg-transparent text-surface-fg outline-hidden", "placeholder:text-surface-fg-subtle", X ? "h-9 text-body-sm" : "h-12 text-body-lg", Z && "cursor-wait", C && "cursor-not-allowed opacity-50"),
196
+ "aria-label": b ? `Ask ${b}` : "AI Command Bar",
197
+ className: r("flex-1 bg-transparent text-surface-fg outline-hidden", "placeholder:text-surface-fg-subtle", X ? "h-9 text-body-sm" : "h-12 text-body-lg", Z && "cursor-wait", w && "cursor-not-allowed opacity-50"),
198
198
  autoComplete: "off",
199
199
  autoCorrect: "off",
200
200
  spellCheck: !1
201
201
  })]
202
202
  }),
203
- Z ? /* @__PURE__ */ d("span", {
203
+ Z ? /* @__PURE__ */ u("span", {
204
204
  "data-testid": "command-bar-spinner",
205
205
  className: "shrink-0",
206
- children: /* @__PURE__ */ d(i, {
207
- icon: de,
206
+ children: /* @__PURE__ */ u(i, {
207
+ icon: fe,
208
208
  size: X ? "xs" : "sm",
209
209
  stroke: "light",
210
210
  animate: "spin",
211
211
  className: "text-accent-9"
212
212
  })
213
- }) : Be ? /* @__PURE__ */ d("button", {
213
+ }) : Be ? /* @__PURE__ */ u("button", {
214
214
  type: "button",
215
215
  onClick: ze,
216
216
  className: "shrink-0 rounded-control-inner p-ds-01 text-surface-fg-subtle transition-colors duration-fast-01 hover:bg-surface-raised-hover hover:text-surface-fg-muted focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-accent-9",
217
217
  "aria-label": "Clear",
218
218
  title: "Clear",
219
- children: /* @__PURE__ */ d(i, {
220
- icon: pe,
219
+ children: /* @__PURE__ */ u(i, {
220
+ icon: me,
221
221
  size: X ? "xs" : "sm",
222
222
  stroke: "light"
223
223
  })
224
- }) : v === "hero" ? /* @__PURE__ */ d(p, { children: !R && /* @__PURE__ */ f(m.kbd, {
224
+ }) : g === "hero" ? /* @__PURE__ */ u(f, { children: !R && /* @__PURE__ */ d(p.kbd, {
225
225
  initial: Y ?? { opacity: 0 },
226
226
  animate: { opacity: 1 },
227
227
  exit: H ? void 0 : { opacity: 0 },
228
228
  transition: J,
229
229
  className: "hidden shrink-0 select-none rounded-control border border-card-strong bg-surface-raised px-ds-02b py-ds-01 text-body-sm font-medium text-surface-fg-subtle shadow-kbd sm:inline-flex",
230
- children: [oe(Ne), "J"]
230
+ children: [se(Ne), "J"]
231
231
  }) }) : null
232
232
  ]
233
233
  })
234
- }), $ = () => !G || !(q.length > 0 || N.trim() && K.length === 0) && !N.trim() ? null : /* @__PURE__ */ f("div", {
234
+ }), $ = () => !G || !(q.length > 0 || P.trim() && K.length === 0) && !P.trim() ? null : /* @__PURE__ */ d("div", {
235
235
  ref: je,
236
236
  id: Me,
237
237
  role: "listbox",
238
238
  "aria-label": "Command results",
239
239
  className: "overflow-y-auto px-ds-03 py-ds-03",
240
240
  style: { maxHeight: Fe },
241
- children: [K.length === 0 && N.trim() && /* @__PURE__ */ d(m.div, {
241
+ children: [K.length === 0 && P.trim() && /* @__PURE__ */ u(p.div, {
242
242
  initial: Y ?? { opacity: 0 },
243
243
  animate: { opacity: 1 },
244
244
  transition: J,
245
245
  className: "flex items-center justify-center py-ds-07",
246
- children: ye ?? /* @__PURE__ */ d("p", {
246
+ children: xe ?? /* @__PURE__ */ u("p", {
247
247
  className: "text-body-md text-surface-fg-subtle",
248
- children: ve
248
+ children: be
249
249
  })
250
- }), K.map((o, s) => /* @__PURE__ */ f(m.div, {
250
+ }), K.map((a, s) => /* @__PURE__ */ d(p.div, {
251
251
  initial: Y ?? { opacity: 0 },
252
252
  animate: { opacity: 1 },
253
253
  transition: H ? U : {
@@ -255,20 +255,20 @@ var h = l.forwardRef(function({ onSubmit: u, state: h = "idle", groups: g = [],
255
255
  delay: s * .06
256
256
  },
257
257
  className: "mb-ds-02",
258
- children: [/* @__PURE__ */ d("div", {
258
+ children: [/* @__PURE__ */ u("div", {
259
259
  className: "px-ds-03 pb-ds-02 pt-ds-03",
260
- children: /* @__PURE__ */ d("span", {
260
+ children: /* @__PURE__ */ u("span", {
261
261
  className: "text-label-xs font-semibold uppercase tracking-wider text-surface-fg-subtle",
262
- children: o.label
262
+ children: a.label
263
263
  })
264
- }), o.items.map((n) => {
265
- let o = Pe.get(n.id) ?? 0, s = o === F;
266
- return /* @__PURE__ */ f(m.button, {
264
+ }), a.items.map((n) => {
265
+ let a = Pe.get(n.id) ?? 0, s = a === I;
266
+ return /* @__PURE__ */ d(p.button, {
267
267
  id: `command-bar-item-${V}-${n.id}`,
268
268
  type: "button",
269
269
  role: "option",
270
270
  "aria-selected": s,
271
- "data-command-index": o,
271
+ "data-command-index": a,
272
272
  initial: Y ?? {
273
273
  opacity: 0,
274
274
  y: 4
@@ -279,40 +279,40 @@ var h = l.forwardRef(function({ onSubmit: u, state: h = "idle", groups: g = [],
279
279
  },
280
280
  transition: H ? U : {
281
281
  ...t.snappy,
282
- delay: o * .03
282
+ delay: a * .03
283
283
  },
284
284
  onClick: () => {
285
- n.onSelect(), v === "floating" && M(!1);
285
+ n.onSelect(), g === "floating" && N(!1);
286
286
  },
287
- onMouseEnter: () => I(o),
287
+ onMouseEnter: () => L(a),
288
288
  className: r("flex w-full items-center gap-ds-04 rounded-surface px-ds-03 py-ds-03 text-left transition-[color,background-color] duration-fast-02 ease-productive-standard", s ? "bg-surface-raised-hover text-surface-fg" : "text-surface-fg-muted hover:bg-surface-raised"),
289
289
  children: [
290
- n.icon && /* @__PURE__ */ d("span", {
290
+ n.icon && /* @__PURE__ */ u("span", {
291
291
  className: r("[&>svg]:h-ico-sm [&>svg]:w-ico-sm shrink-0 transition-colors duration-fast-02 ease-productive-standard", s ? "text-accent-11" : "text-surface-fg-subtle"),
292
292
  "aria-hidden": "true",
293
- children: /* @__PURE__ */ d(e, {
293
+ children: /* @__PURE__ */ u(e, {
294
294
  size: "sm",
295
- children: a(n.icon)
295
+ children: o(n.icon)
296
296
  })
297
297
  }),
298
- /* @__PURE__ */ f("div", {
298
+ /* @__PURE__ */ d("div", {
299
299
  className: "flex flex-1 flex-col",
300
- children: [/* @__PURE__ */ d("span", {
300
+ children: [/* @__PURE__ */ u("span", {
301
301
  className: "text-body-md",
302
- children: n.renderLabel ? n.renderLabel(N) : n.label
303
- }), n.description && /* @__PURE__ */ d("span", {
302
+ children: n.renderLabel ? n.renderLabel(P) : n.label
303
+ }), n.description && /* @__PURE__ */ u("span", {
304
304
  className: "text-body-sm text-surface-fg-subtle",
305
305
  children: n.description
306
306
  })]
307
307
  }),
308
- /* @__PURE__ */ d(p, { children: s && /* @__PURE__ */ d(m.span, {
308
+ /* @__PURE__ */ u(f, { children: s && /* @__PURE__ */ u(p.span, {
309
309
  initial: H ? void 0 : { opacity: 0 },
310
310
  animate: { opacity: 1 },
311
311
  exit: H ? void 0 : { opacity: 0 },
312
312
  transition: J,
313
313
  className: "inline-flex shrink-0",
314
- children: /* @__PURE__ */ d(i, {
315
- icon: ue,
314
+ children: /* @__PURE__ */ u(i, {
315
+ icon: de,
316
316
  size: "sm",
317
317
  stroke: "light",
318
318
  className: "text-surface-fg-subtle"
@@ -321,119 +321,119 @@ var h = l.forwardRef(function({ onSubmit: u, state: h = "idle", groups: g = [],
321
321
  ]
322
322
  }, n.id);
323
323
  })]
324
- }, o.label))]
324
+ }, a.label))]
325
325
  });
326
- return v === "hero" ? /* @__PURE__ */ f("div", {
327
- ref: O,
326
+ return g === "hero" ? /* @__PURE__ */ d("div", {
327
+ ref: k,
328
328
  role: "search",
329
- className: r("bg-surface-raised rounded-overlay-lg shadow-raised p-ds-07", E),
330
- ...D,
329
+ className: r("bg-surface-raised rounded-overlay-lg shadow-raised p-ds-07", D),
330
+ ...O,
331
331
  children: [
332
- b && /* @__PURE__ */ d("p", {
332
+ v && /* @__PURE__ */ u("p", {
333
333
  className: "text-heading-xs text-surface-fg-muted mb-ds-04",
334
- children: b
334
+ children: v
335
335
  }),
336
336
  Q(),
337
337
  $(),
338
- x && x.length > 0 && /* @__PURE__ */ d("div", {
338
+ y && y.length > 0 && /* @__PURE__ */ u("div", {
339
339
  className: "mt-ds-04 flex flex-wrap gap-ds-02b",
340
- children: x.map((e) => /* @__PURE__ */ d("button", {
340
+ children: y.map((e) => /* @__PURE__ */ u("button", {
341
341
  type: "button",
342
342
  onClick: () => {
343
- P(e), _?.(e), B.current?.focus();
343
+ F(e), ye?.(e), B.current?.focus();
344
344
  },
345
345
  className: "rounded-control border border-card-strong bg-surface-overlay px-ds-03 py-ds-01 text-body-sm text-surface-fg-subtle transition-colors duration-fast-02 ease-productive-standard hover:bg-surface-raised-hover hover:text-surface-fg-muted",
346
346
  children: e
347
347
  }, e))
348
348
  }),
349
- T && /* @__PURE__ */ d("div", {
349
+ E && /* @__PURE__ */ u("div", {
350
350
  className: "mt-ds-05",
351
- children: T
351
+ children: E
352
352
  })
353
353
  ]
354
- }) : v === "inline" ? /* @__PURE__ */ f("div", {
355
- ref: O,
354
+ }) : g === "inline" ? /* @__PURE__ */ d("div", {
355
+ ref: k,
356
356
  role: "search",
357
- className: r("w-full", E),
358
- ...D,
357
+ className: r("w-full", D),
358
+ ...O,
359
359
  children: [
360
360
  Q(),
361
361
  $(),
362
- T && /* @__PURE__ */ d("div", {
362
+ E && /* @__PURE__ */ u("div", {
363
363
  className: "mt-ds-03",
364
- children: T
364
+ children: E
365
365
  })
366
366
  ]
367
- }) : /* @__PURE__ */ d(o, {
368
- open: A,
367
+ }) : /* @__PURE__ */ u(s, {
368
+ open: j,
369
369
  onOpenChange: (e) => {
370
- M(e);
370
+ N(e);
371
371
  },
372
- children: /* @__PURE__ */ f(ne, { children: [/* @__PURE__ */ d(te, { className: "fixed inset-0 z-overlay bg-overlay data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0" }), /* @__PURE__ */ f(s, {
373
- ref: O,
374
- ...D,
375
- className: r("fixed left-1/2 top-[20%] z-modal w-full max-w-[560px] -translate-x-1/2", "overflow-hidden rounded-overlay-lg bg-surface-overlay shadow-overlay", "duration-moderate-02 data-[state=open]:animate-in data-[state=closed]:animate-out", "data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0", "data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95", "data-[state=closed]:slide-out-to-left-1/2 data-[state=open]:slide-in-from-left-1/2", "data-[state=closed]:slide-out-to-top-2 data-[state=open]:slide-in-from-top-2", E),
372
+ children: /* @__PURE__ */ d(re, { children: [/* @__PURE__ */ u(ne, { className: "fixed inset-0 z-overlay bg-overlay data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0" }), /* @__PURE__ */ d(ee, {
373
+ ref: k,
374
+ ...O,
375
+ className: r("fixed left-1/2 top-[20%] z-modal w-full max-w-[560px] -translate-x-1/2", "overflow-hidden rounded-overlay-lg bg-surface-overlay shadow-overlay", "duration-moderate-02 data-[state=open]:animate-in data-[state=closed]:animate-out", "data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0", "data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95", "data-[state=closed]:slide-out-to-left-1/2 data-[state=open]:slide-in-from-left-1/2", "data-[state=closed]:slide-out-to-top-2 data-[state=open]:slide-in-from-top-2", D),
376
376
  children: [
377
- /* @__PURE__ */ f(ie, { children: [/* @__PURE__ */ d(re, { children: "AI Command Bar" }), /* @__PURE__ */ d(ee, { children: "Search commands or ask a question" })] }),
378
- /* @__PURE__ */ d("div", {
377
+ /* @__PURE__ */ d(ae, { children: [/* @__PURE__ */ u(ie, { children: "AI Command Bar" }), /* @__PURE__ */ u(te, { children: "Search commands or ask a question" })] }),
378
+ /* @__PURE__ */ u("div", {
379
379
  className: "p-ds-04",
380
380
  children: Q()
381
381
  }),
382
382
  $(),
383
- T && /* @__PURE__ */ d("div", {
383
+ E && /* @__PURE__ */ u("div", {
384
384
  className: "border-t border-surface-border-strong p-ds-04",
385
- children: T
385
+ children: E
386
386
  }),
387
- /* @__PURE__ */ f(m.div, {
387
+ /* @__PURE__ */ d(p.div, {
388
388
  initial: Y ?? { opacity: 0 },
389
389
  animate: { opacity: 1 },
390
390
  transition: J,
391
391
  className: "flex items-center gap-ds-05 border-t border-surface-border-strong px-ds-05 py-ds-03",
392
392
  children: [
393
- G && /* @__PURE__ */ f("div", {
393
+ G && /* @__PURE__ */ d("div", {
394
394
  className: "flex items-center gap-ds-02b",
395
- children: [/* @__PURE__ */ f("div", {
395
+ children: [/* @__PURE__ */ d("div", {
396
396
  className: "flex items-center gap-ds-01",
397
- children: [/* @__PURE__ */ d("kbd", {
397
+ children: [/* @__PURE__ */ u("kbd", {
398
398
  className: "inline-flex h-ico-md w-ico-md items-center justify-center rounded border border-card-strong bg-surface-raised shadow-kbd",
399
- children: /* @__PURE__ */ d(i, {
400
- icon: le,
399
+ children: /* @__PURE__ */ u(i, {
400
+ icon: ue,
401
401
  size: "xs",
402
402
  className: "text-surface-fg-subtle"
403
403
  })
404
- }), /* @__PURE__ */ d("kbd", {
404
+ }), /* @__PURE__ */ u("kbd", {
405
405
  className: "inline-flex h-ico-md w-ico-md items-center justify-center rounded border border-card-strong bg-surface-raised shadow-kbd",
406
- children: /* @__PURE__ */ d(i, {
407
- icon: ce,
406
+ children: /* @__PURE__ */ u(i, {
407
+ icon: le,
408
408
  size: "xs",
409
409
  className: "text-surface-fg-subtle"
410
410
  })
411
411
  })]
412
- }), /* @__PURE__ */ d("span", {
412
+ }), /* @__PURE__ */ u("span", {
413
413
  className: "text-caption text-surface-fg-subtle",
414
414
  children: "Navigate"
415
415
  })]
416
416
  }),
417
- /* @__PURE__ */ f("div", {
417
+ /* @__PURE__ */ d("div", {
418
418
  className: "flex items-center gap-ds-02b",
419
- children: [/* @__PURE__ */ d("kbd", {
419
+ children: [/* @__PURE__ */ u("kbd", {
420
420
  className: "inline-flex h-[20px] items-center justify-center rounded-control border border-card-strong bg-surface-raised px-ds-02b shadow-kbd",
421
- children: /* @__PURE__ */ d(i, {
422
- icon: ue,
421
+ children: /* @__PURE__ */ u(i, {
422
+ icon: de,
423
423
  size: "xs",
424
424
  className: "text-surface-fg-subtle"
425
425
  })
426
- }), /* @__PURE__ */ d("span", {
426
+ }), /* @__PURE__ */ u("span", {
427
427
  className: "text-caption text-surface-fg-subtle",
428
428
  children: "Submit"
429
429
  })]
430
430
  }),
431
- /* @__PURE__ */ f("div", {
431
+ /* @__PURE__ */ d("div", {
432
432
  className: "flex items-center gap-ds-02b",
433
- children: [/* @__PURE__ */ d("kbd", {
433
+ children: [/* @__PURE__ */ u("kbd", {
434
434
  className: "inline-flex h-[20px] items-center justify-center rounded-control border border-card-strong bg-surface-raised px-ds-02b text-caption font-medium text-surface-fg-subtle shadow-kbd",
435
435
  children: "Esc"
436
- }), /* @__PURE__ */ d("span", {
436
+ }), /* @__PURE__ */ u("span", {
437
437
  className: "text-caption text-surface-fg-subtle",
438
438
  children: "Close"
439
439
  })]
@@ -444,6 +444,6 @@ var h = l.forwardRef(function({ onSubmit: u, state: h = "idle", groups: g = [],
444
444
  })] })
445
445
  });
446
446
  });
447
- h.displayName = "CommandBar";
447
+ m.displayName = "CommandBar";
448
448
  //#endregion
449
- export { h as CommandBar };
449
+ export { m as CommandBar };