@actioneer/ads 0.5.7 → 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 (140) 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 +133 -120
  5. package/components/ai-elements/chain-of-thought.d.ts +1 -1
  6. package/components/ai-elements/chain-of-thought.js +108 -108
  7. package/components/ai-elements/chart.js +16 -14
  8. package/components/ai-elements/inline-citation.js +41 -41
  9. package/components/ai-elements/message.js +4 -4
  10. package/components/ai-elements/queue.js +7 -7
  11. package/components/ai-elements/research-activity.js +114 -114
  12. package/components/ai-elements/shimmer.d.ts +2 -2
  13. package/components/ai-elements/speech-input.js +28 -28
  14. package/components/ai-elements/task-progress.js +26 -16
  15. package/components/ai-elements/task.js +17 -17
  16. package/components/ai-elements/tool.js +6 -6
  17. package/components/ai-elements/transcript.js +6 -5
  18. package/components/ai-elements/voice.js +1 -1
  19. package/components/alert.js +10 -10
  20. package/components/answer-sources.js +1 -1
  21. package/components/answer.js +115 -114
  22. package/components/assistant-ui/action-bar.js +94 -48
  23. package/components/assistant-ui/attachment.js +103 -75
  24. package/components/assistant-ui/badge.d.ts +1 -1
  25. package/components/assistant-ui/badge.js +17 -17
  26. package/components/assistant-ui/chain-of-thought.d.ts +1 -1
  27. package/components/assistant-ui/composer-add-context.js +9 -9
  28. package/components/assistant-ui/composer-deep-research.js +5 -5
  29. package/components/assistant-ui/composer-harness.js +11 -9
  30. package/components/assistant-ui/composer-trigger-popover.js +45 -34
  31. package/components/assistant-ui/composer.js +59 -59
  32. package/components/assistant-ui/error.js +14 -14
  33. package/components/assistant-ui/file.d.ts +1 -1
  34. package/components/assistant-ui/image.d.ts +1 -1
  35. package/components/assistant-ui/image.js +113 -103
  36. package/components/assistant-ui/markdown-text.js +18 -18
  37. package/components/assistant-ui/message.js +46 -45
  38. package/components/assistant-ui/quote.js +1 -1
  39. package/components/assistant-ui/reasoning.d.ts +1 -1
  40. package/components/assistant-ui/reasoning.js +66 -77
  41. package/components/assistant-ui/suggestions.js +4 -4
  42. package/components/assistant-ui/thread.js +22 -22
  43. package/components/assistant-ui/tool-fallback.js +60 -63
  44. package/components/assistant-ui/tool-group.d.ts +1 -1
  45. package/components/assistant-ui/tool-group.js +36 -42
  46. package/components/audio-waveform.js +25 -24
  47. package/components/autocomplete.d.ts +1 -0
  48. package/components/autocomplete.js +45 -43
  49. package/components/avatar.js +24 -24
  50. package/components/badge.d.ts +1 -1
  51. package/components/breadcrumbs.js +2 -2
  52. package/components/button.d.ts +2 -2
  53. package/components/button.js +22 -20
  54. package/components/card.js +8 -8
  55. package/components/carousel.js +105 -104
  56. package/components/chart.js +9 -7
  57. package/components/checkbox.js +74 -38
  58. package/components/chip.d.ts +1 -1
  59. package/components/code-block.js +3 -3
  60. package/components/collapsible.js +67 -23
  61. package/components/connector-card.js +6 -6
  62. package/components/drawer.d.ts +15 -10
  63. package/components/drawer.js +78 -77
  64. package/components/dropdown.d.ts +2 -0
  65. package/components/dropdown.js +88 -79
  66. package/components/empty-state.d.ts +1 -1
  67. package/components/empty-state.js +7 -7
  68. package/components/field.d.ts +4 -0
  69. package/components/field.js +45 -34
  70. package/components/file-dropzone.js +12 -12
  71. package/components/index.d.ts +3 -0
  72. package/components/index.js +584 -558
  73. package/components/input-field.js +51 -46
  74. package/components/input.js +20 -20
  75. package/components/link.js +9 -9
  76. package/components/modal.js +105 -73
  77. package/components/navbar.d.ts +1 -1
  78. package/components/navbar.js +1 -1
  79. package/components/number-field.js +38 -29
  80. package/components/page-header.js +12 -12
  81. package/components/pagination.js +19 -19
  82. package/components/panel.js +2 -2
  83. package/components/pixel-blast-svg.js +3 -3
  84. package/components/pixel-icon.js +0 -1
  85. package/components/popover.d.ts +1 -1
  86. package/components/popover.js +66 -64
  87. package/components/progress-circle.js +36 -32
  88. package/components/progress.js +28 -24
  89. package/components/radio.js +59 -49
  90. package/components/resizable-panel.js +1 -1
  91. package/components/reveal.d.ts +2 -2
  92. package/components/ripple.d.ts +3 -3
  93. package/components/scroll-area.js +17 -16
  94. package/components/segmented.js +26 -26
  95. package/components/select.d.ts +2 -0
  96. package/components/select.js +61 -57
  97. package/components/setting-row.js +45 -42
  98. package/components/sidebar.js +131 -127
  99. package/components/skeleton.js +5 -5
  100. package/components/spinner.d.ts +13 -4
  101. package/components/spinner.js +42 -42
  102. package/components/stepper.js +21 -21
  103. package/components/switch.js +41 -39
  104. package/components/table.d.ts +9 -0
  105. package/components/table.js +370 -247
  106. package/components/tabs.js +149 -137
  107. package/components/toast.js +66 -66
  108. package/components/tooltip.js +2 -2
  109. package/components/tree.js +62 -51
  110. package/components/typography.d.ts +2 -1
  111. package/components/typography.js +33 -32
  112. package/components/ui/button.d.ts +2 -2
  113. package/components/ui/button.js +19 -19
  114. package/components/ui/collapsible.d.ts +1 -5
  115. package/components/ui/dialog.d.ts +3 -3
  116. package/components/ui/dialog.js +95 -58
  117. package/components/ui/tooltip.d.ts +2 -2
  118. package/components/ui/tooltip.js +67 -33
  119. package/components/viz-charts.js +95 -95
  120. package/demo/components/add-to-artifact.js +341 -0
  121. package/demo/lib/artifact-library.js +134 -0
  122. package/fonts/aribau-grotesk-medium.woff2 +0 -0
  123. package/fonts/aribau-grotesk-regular.woff2 +0 -0
  124. package/fonts.css +11 -11
  125. package/hooks/agents-ui/use-agent-audio-visualizer-aura.js +17 -16
  126. package/hooks/agents-ui/use-agent-audio-visualizer-wave.js +21 -20
  127. package/lib/icons.d.ts +4 -0
  128. package/lib/icons.js +103 -102
  129. package/lib/motion.d.ts +42 -39
  130. package/lib/motion.js +112 -52
  131. package/lib/spinner-mark.d.ts +9 -0
  132. package/lib/spinner-mark.js +98 -0
  133. package/llms.txt +52 -18
  134. package/manifest.json +240 -31
  135. package/package.json +1 -1
  136. package/styles.css +143 -124
  137. package/theme.css +90 -93
  138. package/components/ui/collapsible.js +0 -35
  139. package/fonts/aribau-grotesk-500.otf +0 -0
  140. package/fonts/aribau-grotesk-600.woff2 +0 -0
@@ -1,119 +1,123 @@
1
1
  "use client";
2
- import { jsx as r, jsxs as c } from "react/jsx-runtime";
3
- import * as n from "react";
4
- import { User as R, PanelLeft as _ } from "../lib/icons.js";
5
- import { cn as o } from "../lib/cn.js";
6
- import { Tooltip as j } from "./tooltip.js";
7
- import { Avatar as H } from "./avatar.js";
8
- const k = n.createContext({
2
+ import { jsx as e, jsxs as c } from "react/jsx-runtime";
3
+ import * as o from "react";
4
+ import { MotionConfig as R, motion as _ } from "motion/react";
5
+ import { User as j, PanelLeft as H } from "../lib/icons.js";
6
+ import { cn as n } from "../lib/cn.js";
7
+ import { springSidebar as E } from "../lib/motion.js";
8
+ import { Tooltip as I } from "./tooltip.js";
9
+ import { Avatar as L } from "./avatar.js";
10
+ const k = o.createContext({
9
11
  collapsed: !1,
10
12
  toggle: () => {
11
13
  },
12
14
  setCollapsed: () => {
13
15
  }
14
16
  });
15
- function E() {
16
- return n.useContext(k);
17
+ function M() {
18
+ return o.useContext(k);
17
19
  }
18
- const I = n.forwardRef(
20
+ const K = o.forwardRef(
19
21
  ({
20
22
  className: t,
21
- collapsed: e,
23
+ collapsed: r,
22
24
  defaultCollapsed: i = !1,
23
25
  onCollapsedChange: a,
24
26
  keyboardToggle: s = !0,
25
27
  ...d
26
28
  }, l) => {
27
- const [b, x] = n.useState(i), f = e !== void 0, u = f ? e : b, h = n.useCallback(
29
+ const [m, x] = o.useState(i), f = r !== void 0, u = f ? r : m, h = o.useCallback(
28
30
  (p) => {
29
31
  f || x(p), a == null || a(p);
30
32
  },
31
33
  [f, a]
32
- ), g = n.useCallback(
34
+ ), g = o.useCallback(
33
35
  () => h(!u),
34
36
  [u, h]
35
37
  );
36
- n.useEffect(() => {
38
+ o.useEffect(() => {
37
39
  if (!s) return;
38
- const p = (m) => {
39
- (m.metaKey || m.ctrlKey) && m.key.toLowerCase() === "b" && (m.preventDefault(), g());
40
+ const p = (b) => {
41
+ (b.metaKey || b.ctrlKey) && b.key.toLowerCase() === "b" && (b.preventDefault(), g());
40
42
  };
41
43
  return document.addEventListener("keydown", p), () => document.removeEventListener("keydown", p);
42
44
  }, [s, g]);
43
- const v = n.useMemo(
45
+ const v = o.useMemo(
44
46
  () => ({ collapsed: u, toggle: g, setCollapsed: h }),
45
47
  [u, g, h]
46
48
  );
47
- return /* @__PURE__ */ r(k.Provider, { value: v, children: /* @__PURE__ */ r(
48
- "aside",
49
+ return /* @__PURE__ */ e(k.Provider, { value: v, children: /* @__PURE__ */ e(R, { reducedMotion: "user", children: /* @__PURE__ */ e(
50
+ _.aside,
49
51
  {
50
52
  ref: l,
51
53
  "data-collapsed": u ? "true" : "false",
52
- className: o(
54
+ initial: !1,
55
+ animate: { width: u ? 56 : 240 },
56
+ transition: E,
57
+ className: n(
53
58
  "group/sidebar flex h-full shrink-0 flex-col bg-transparent",
54
- u ? "w-(--sidebar-width-sm)" : "w-(--sidebar-width)",
55
59
  t
56
60
  ),
57
61
  ...d
58
62
  }
59
- ) });
63
+ ) }) });
60
64
  }
61
65
  );
62
- I.displayName = "Sidebar";
63
- function S({ children: t }) {
64
- return /* @__PURE__ */ r("kbd", { className: "inline-flex h-4 min-w-4 items-center justify-center rounded bg-background/20 px-1 text-xs leading-none", children: t });
66
+ K.displayName = "Sidebar";
67
+ function w({ children: t }) {
68
+ return /* @__PURE__ */ e("kbd", { className: "inline-flex h-4 min-w-4 items-center justify-center rounded bg-background/20 px-1 text-xs leading-none", children: t });
65
69
  }
66
70
  function z({
67
71
  className: t,
68
- onClick: e,
72
+ onClick: r,
69
73
  tooltipSide: i = "right",
70
74
  ...a
71
75
  }) {
72
- const { collapsed: s, toggle: d } = E();
73
- return /* @__PURE__ */ r(
74
- j,
76
+ const { collapsed: s, toggle: d } = M();
77
+ return /* @__PURE__ */ e(
78
+ I,
75
79
  {
76
80
  side: i,
77
81
  content: /* @__PURE__ */ c("span", { className: "flex items-center gap-1.5", children: [
78
82
  s ? "Expand" : "Collapse",
79
83
  /* @__PURE__ */ c("span", { className: "flex items-center gap-0.5", children: [
80
- /* @__PURE__ */ r(S, { children: "⌘" }),
81
- /* @__PURE__ */ r(S, { children: "B" })
84
+ /* @__PURE__ */ e(w, { children: "⌘" }),
85
+ /* @__PURE__ */ e(w, { children: "B" })
82
86
  ] })
83
87
  ] }),
84
- children: /* @__PURE__ */ r(
88
+ children: /* @__PURE__ */ e(
85
89
  "button",
86
90
  {
87
91
  type: "button",
88
92
  "aria-label": s ? "Expand sidebar" : "Collapse sidebar",
89
93
  "aria-pressed": s,
90
94
  onClick: (l) => {
91
- e == null || e(l), d();
95
+ r == null || r(l), d();
92
96
  },
93
- className: o(
94
- "inline-flex size-(--sidebar-item) shrink-0 items-center justify-center rounded-md border border-transparent text-muted-foreground",
97
+ className: n(
98
+ "inline-flex size-(--sidebar-item) shrink-0 items-center justify-center rounded-sm border border-transparent text-muted-foreground",
95
99
  "transition-colors hover:border-border hover:bg-elevated hover:text-foreground",
96
100
  "outline-none focus-visible:ring-3 focus-visible:ring-ring",
97
101
  "[&_svg]:size-4.5",
98
102
  t
99
103
  ),
100
104
  ...a,
101
- children: /* @__PURE__ */ r(_, {})
105
+ children: /* @__PURE__ */ e(H, {})
102
106
  }
103
107
  )
104
108
  }
105
109
  );
106
110
  }
107
- function G({
111
+ function Y({
108
112
  logo: t,
109
- href: e,
113
+ href: r,
110
114
  label: i = "Home",
111
115
  showTrigger: a = !0,
112
116
  children: s,
113
117
  className: d,
114
118
  ...l
115
119
  }) {
116
- const b = o(
120
+ const m = n(
117
121
  // 20px mark centered in a 32px square — the same box as every other rail icon.
118
122
  // group/brand lets a BrandMark logo play its blip loop on hover.
119
123
  "group/brand flex size-(--sidebar-item) items-center justify-center",
@@ -126,57 +130,57 @@ function G({
126
130
  return /* @__PURE__ */ c(
127
131
  "div",
128
132
  {
129
- className: o(
133
+ className: n(
130
134
  "flex h-(--sidebar-header) shrink-0 items-center justify-between gap-2 px-3",
131
135
  "group-data-[collapsed=true]/sidebar:justify-center group-data-[collapsed=true]/sidebar:px-2",
132
136
  d
133
137
  ),
134
138
  ...l,
135
139
  children: [
136
- e ? /* @__PURE__ */ r("a", { href: e, "aria-label": i, className: b, children: t }) : /* @__PURE__ */ r("span", { className: b, children: t }),
137
- a && /* @__PURE__ */ r("div", { className: "hidden group-data-[collapsed=true]/sidebar:group-hover/sidebar:flex group-data-[collapsed=true]/sidebar:group-focus-within/sidebar:flex", children: /* @__PURE__ */ r(z, { tooltipSide: "right" }) }),
140
+ r ? /* @__PURE__ */ e("a", { href: r, "aria-label": i, className: m, children: t }) : /* @__PURE__ */ e("span", { className: m, children: t }),
141
+ a && /* @__PURE__ */ e("div", { className: "hidden group-data-[collapsed=true]/sidebar:group-hover/sidebar:flex group-data-[collapsed=true]/sidebar:group-focus-within/sidebar:flex", children: /* @__PURE__ */ e(z, { tooltipSide: "right" }) }),
138
142
  /* @__PURE__ */ c("div", { className: "flex items-center gap-1 group-data-[collapsed=true]/sidebar:hidden", children: [
139
- a && /* @__PURE__ */ r(z, { tooltipSide: "bottom" }),
143
+ a && /* @__PURE__ */ e(z, { tooltipSide: "bottom" }),
140
144
  s
141
145
  ] })
142
146
  ]
143
147
  }
144
148
  );
145
149
  }
146
- const L = n.forwardRef(
147
- ({ className: t, ...e }, i) => /* @__PURE__ */ r(
150
+ const A = o.forwardRef(
151
+ ({ className: t, ...r }, i) => /* @__PURE__ */ e(
148
152
  "div",
149
153
  {
150
154
  ref: i,
151
- className: o(
155
+ className: n(
152
156
  "flex h-(--sidebar-header) shrink-0 items-center justify-between gap-2 px-3",
153
157
  "group-data-[collapsed=true]/sidebar:justify-center group-data-[collapsed=true]/sidebar:px-2",
154
158
  t
155
159
  ),
156
- ...e
160
+ ...r
157
161
  }
158
162
  )
159
163
  );
160
- L.displayName = "SidebarHeader";
161
- const K = n.forwardRef(
162
- ({ className: t, ...e }, i) => /* @__PURE__ */ r("nav", { ref: i, className: o("min-h-0 flex-1 space-y-5 overflow-y-auto p-3", t), ...e })
164
+ A.displayName = "SidebarHeader";
165
+ const q = o.forwardRef(
166
+ ({ className: t, ...r }, i) => /* @__PURE__ */ e("nav", { ref: i, className: n("min-h-0 flex-1 space-y-5 overflow-y-auto p-3", t), ...r })
163
167
  );
164
- K.displayName = "SidebarNav";
165
- const A = n.forwardRef(
166
- ({ className: t, label: e, children: i, ...a }, s) => /* @__PURE__ */ c("div", { ref: s, className: t, ...a, children: [
167
- e && /* @__PURE__ */ r("div", { className: "mb-1.5 px-3 text-[length:var(--sidebar-section-label-size)] leading-[var(--text-xs--line-height)] font-normal text-secondary group-data-[collapsed=true]/sidebar:hidden", children: e }),
168
- /* @__PURE__ */ r("div", { className: "flex flex-col gap-0.5", children: i })
168
+ q.displayName = "SidebarNav";
169
+ const B = o.forwardRef(
170
+ ({ className: t, label: r, children: i, ...a }, s) => /* @__PURE__ */ c("div", { ref: s, className: t, ...a, children: [
171
+ r && /* @__PURE__ */ e("div", { className: "mb-1.5 px-3 text-[length:var(--sidebar-section-label-size)] leading-[var(--text-xs--line-height)] font-normal text-secondary group-data-[collapsed=true]/sidebar:hidden", children: r }),
172
+ /* @__PURE__ */ e("div", { className: "flex flex-col gap-0.5", children: i })
169
173
  ] })
170
174
  );
171
- A.displayName = "SidebarSection";
172
- const M = n.forwardRef(
173
- ({ className: t, icon: e, isActive: i, endContent: a, children: s, title: d, ...l }, b) => /* @__PURE__ */ c(
175
+ B.displayName = "SidebarSection";
176
+ const D = o.forwardRef(
177
+ ({ className: t, icon: r, isActive: i, endContent: a, children: s, title: d, ...l }, m) => /* @__PURE__ */ c(
174
178
  "a",
175
179
  {
176
- ref: b,
180
+ ref: m,
177
181
  "aria-current": i ? "page" : void 0,
178
182
  title: d ?? (typeof s == "string" ? s : void 0),
179
- className: o(
183
+ className: n(
180
184
  "flex h-9 items-center gap-2.5 rounded-md px-3 text-[length:var(--sidebar-navigation-text-size)] leading-[var(--text-xs--line-height)] transition-colors",
181
185
  "outline-none focus-visible:ring-3 focus-visible:ring-ring",
182
186
  "[&_svg]:size-4 [&_svg]:shrink-0",
@@ -187,37 +191,37 @@ const M = n.forwardRef(
187
191
  ),
188
192
  ...l,
189
193
  children: [
190
- e,
191
- /* @__PURE__ */ r("span", { className: "min-w-0 flex-1 truncate group-data-[collapsed=true]/sidebar:hidden", children: s }),
192
- a && /* @__PURE__ */ r("span", { className: "shrink-0 group-data-[collapsed=true]/sidebar:hidden", children: a })
194
+ r,
195
+ /* @__PURE__ */ e("span", { className: "min-w-0 flex-1 truncate group-data-[collapsed=true]/sidebar:hidden", children: s }),
196
+ a && /* @__PURE__ */ e("span", { className: "shrink-0 group-data-[collapsed=true]/sidebar:hidden", children: a })
193
197
  ]
194
198
  }
195
199
  )
196
200
  );
197
- M.displayName = "SidebarItem";
198
- const q = n.forwardRef(
199
- ({ className: t, ...e }, i) => /* @__PURE__ */ r(
201
+ D.displayName = "SidebarItem";
202
+ const F = o.forwardRef(
203
+ ({ className: t, ...r }, i) => /* @__PURE__ */ e(
200
204
  "div",
201
205
  {
202
206
  ref: i,
203
- className: o("shrink-0 p-3 group-data-[collapsed=true]/sidebar:px-2", t),
204
- ...e
207
+ className: n("shrink-0 p-3 group-data-[collapsed=true]/sidebar:px-2", t),
208
+ ...r
205
209
  }
206
210
  )
207
211
  );
208
- q.displayName = "SidebarFooter";
209
- const B = n.forwardRef(
210
- ({ className: t, icon: e, children: i, ...a }, s) => /* @__PURE__ */ r("div", { className: "px-3 pb-0.5 group-data-[collapsed=true]/sidebar:px-2", children: /* @__PURE__ */ c(
212
+ F.displayName = "SidebarFooter";
213
+ const W = o.forwardRef(
214
+ ({ className: t, icon: r, children: i, ...a }, s) => /* @__PURE__ */ e("div", { className: "px-3 pb-0.5 group-data-[collapsed=true]/sidebar:px-2", children: /* @__PURE__ */ c(
211
215
  "button",
212
216
  {
213
217
  ref: s,
214
218
  type: "button",
215
- className: o(
219
+ className: n(
216
220
  "flex h-9 w-full items-center justify-start gap-2 rounded-md px-3",
217
221
  "text-[length:var(--sidebar-navigation-text-size)] leading-[var(--text-xs--line-height)] font-normal text-primary",
218
222
  // Reads as a normal nav item: transparent at rest, the shared grey
219
223
  // hover wash on hover (no fill-at-rest, no elevation).
220
- "transition-colors duration-(--duration-fast) ease-out motion-reduce:transition-none",
224
+ "transition-colors duration-150 ease-out motion-reduce:transition-none",
221
225
  "hover:bg-sidebar-accent/60 hover:text-foreground",
222
226
  "outline-none focus-visible:ring-3 focus-visible:ring-ring",
223
227
  "[&_svg]:size-4 [&_svg]:shrink-0",
@@ -226,51 +230,51 @@ const B = n.forwardRef(
226
230
  ),
227
231
  ...a,
228
232
  children: [
229
- e,
230
- /* @__PURE__ */ r("span", { className: "truncate group-data-[collapsed=true]/sidebar:hidden", children: i })
233
+ r,
234
+ /* @__PURE__ */ e("span", { className: "truncate group-data-[collapsed=true]/sidebar:hidden", children: i })
231
235
  ]
232
236
  }
233
237
  ) })
234
238
  );
235
- B.displayName = "SidebarAction";
236
- const D = n.forwardRef(
237
- ({ className: t, label: e, children: i, ...a }, s) => /* @__PURE__ */ c(
239
+ W.displayName = "SidebarAction";
240
+ const $ = o.forwardRef(
241
+ ({ className: t, label: r, children: i, ...a }, s) => /* @__PURE__ */ c(
238
242
  "div",
239
243
  {
240
244
  ref: s,
241
- className: o("group-data-[collapsed=true]/sidebar:hidden", t),
245
+ className: n("group-data-[collapsed=true]/sidebar:hidden", t),
242
246
  ...a,
243
247
  children: [
244
- e && /* @__PURE__ */ r("div", { className: "mb-1.5 px-3 text-[length:var(--sidebar-section-label-size)] leading-[var(--text-xs--line-height)] font-normal text-secondary", children: e }),
245
- /* @__PURE__ */ r("div", { className: "flex flex-col gap-0.5", children: i })
248
+ r && /* @__PURE__ */ e("div", { className: "mb-1.5 px-3 text-[length:var(--sidebar-section-label-size)] leading-[var(--text-xs--line-height)] font-normal text-secondary", children: r }),
249
+ /* @__PURE__ */ e("div", { className: "flex flex-col gap-0.5", children: i })
246
250
  ]
247
251
  }
248
252
  )
249
253
  );
250
- D.displayName = "SidebarHistory";
251
- const F = n.forwardRef(({ className: t, children: e, title: i, action: a, isActive: s, icon: d, ...l }, b) => {
252
- const x = n.useRef(null), f = n.useRef(null), [u, h] = n.useState(0);
253
- n.useLayoutEffect(() => {
254
- const p = x.current, m = f.current;
255
- if (!p || !m) return;
254
+ $.displayName = "SidebarHistory";
255
+ const O = o.forwardRef(({ className: t, children: r, title: i, action: a, isActive: s, icon: d, ...l }, m) => {
256
+ const x = o.useRef(null), f = o.useRef(null), [u, h] = o.useState(0);
257
+ o.useLayoutEffect(() => {
258
+ const p = x.current, b = f.current;
259
+ if (!p || !b) return;
256
260
  const N = () => {
257
- const w = m.scrollWidth - p.clientWidth;
258
- h(w > 0 ? w + (a ? 32 : 0) : 0);
261
+ const S = b.scrollWidth - p.clientWidth;
262
+ h(S > 0 ? S + (a ? 32 : 0) : 0);
259
263
  };
260
264
  N();
261
265
  const y = new ResizeObserver(N);
262
- return y.observe(p), y.observe(m), () => y.disconnect();
263
- }, [e, a]);
266
+ return y.observe(p), y.observe(b), () => y.disconnect();
267
+ }, [r, a]);
264
268
  const g = u > 0, v = Math.max(500, Math.round(u * 18));
265
269
  return /* @__PURE__ */ c(
266
270
  "div",
267
271
  {
268
- className: o(
272
+ className: n(
269
273
  "group/hist relative flex items-center rounded-md transition-colors",
270
274
  s ? "bg-sidebar-accent/60 text-foreground" : "text-muted-foreground hover:bg-sidebar-accent/60 hover:text-foreground"
271
275
  ),
272
276
  children: [
273
- d && /* @__PURE__ */ r(
277
+ d && /* @__PURE__ */ e(
274
278
  "span",
275
279
  {
276
280
  "aria-hidden": !0,
@@ -278,12 +282,12 @@ const F = n.forwardRef(({ className: t, children: e, title: i, action: a, isActi
278
282
  children: d
279
283
  }
280
284
  ),
281
- /* @__PURE__ */ r(
285
+ /* @__PURE__ */ e(
282
286
  "a",
283
287
  {
284
- ref: b,
285
- title: i ?? (typeof e == "string" ? e : void 0),
286
- className: o(
288
+ ref: m,
289
+ title: i ?? (typeof r == "string" ? r : void 0),
290
+ className: n(
287
291
  // Left pad matches a SidebarItem's text column (px-3 + icon size-4 +
288
292
  // gap-2.5 = 2.375rem) so history titles line up under the nav labels.
289
293
  "block min-w-0 flex-1 rounded-md py-1.5 pr-3 ps-(--sidebar-text-indent) text-[length:var(--sidebar-navigation-text-size)] leading-[var(--text-xs--line-height)]",
@@ -291,11 +295,11 @@ const F = n.forwardRef(({ className: t, children: e, title: i, action: a, isActi
291
295
  t
292
296
  ),
293
297
  ...l,
294
- children: /* @__PURE__ */ r(
298
+ children: /* @__PURE__ */ e(
295
299
  "span",
296
300
  {
297
301
  ref: x,
298
- className: o(
302
+ className: n(
299
303
  "block overflow-hidden",
300
304
  // Rest: fade the right edge (no ellipsis). Hover: the title scrolls,
301
305
  // so fade the LEFT edge where it exits; the action backdrop (or the
@@ -303,11 +307,11 @@ const F = n.forwardRef(({ className: t, children: e, title: i, action: a, isActi
303
307
  g && "[mask-image:linear-gradient(to_right,#000_calc(100%-1.5rem),transparent)]",
304
308
  g && "group-hover/hist:[mask-image:linear-gradient(to_right,transparent,#000_1.25rem,#000_100%)]"
305
309
  ),
306
- children: /* @__PURE__ */ r(
310
+ children: /* @__PURE__ */ e(
307
311
  "span",
308
312
  {
309
313
  ref: f,
310
- className: o(
314
+ className: n(
311
315
  "block w-max whitespace-nowrap transition-transform ease-linear",
312
316
  g && "group-hover/hist:[transform:translateX(var(--mq-x))]",
313
317
  "motion-reduce:transition-none motion-reduce:group-hover/hist:[transform:none]"
@@ -316,22 +320,22 @@ const F = n.forwardRef(({ className: t, children: e, title: i, action: a, isActi
316
320
  "--mq-x": `-${u}px`,
317
321
  transitionDuration: `${v}ms`
318
322
  },
319
- children: e
323
+ children: r
320
324
  }
321
325
  )
322
326
  }
323
327
  )
324
328
  }
325
329
  ),
326
- a && /* @__PURE__ */ r(
330
+ a && /* @__PURE__ */ e(
327
331
  "span",
328
332
  {
329
- className: o(
333
+ className: n(
330
334
  // Rounded end matches the row's radius so the backdrop doesn't
331
335
  // square off the highlight's right corners.
332
336
  "absolute inset-y-0 right-0 flex items-center rounded-e-md pl-8 pr-1",
333
337
  "bg-gradient-to-l from-fill from-45% to-transparent",
334
- "opacity-0 transition-opacity duration-(--duration-fast) group-hover/hist:opacity-100",
338
+ "opacity-0 transition-opacity duration-150 group-hover/hist:opacity-100",
335
339
  "pointer-events-none group-hover/hist:pointer-events-auto",
336
340
  "focus-within:pointer-events-auto focus-within:opacity-100"
337
341
  ),
@@ -342,13 +346,13 @@ const F = n.forwardRef(({ className: t, children: e, title: i, action: a, isActi
342
346
  }
343
347
  );
344
348
  });
345
- F.displayName = "SidebarHistoryItem";
346
- const W = n.forwardRef(
347
- ({ className: t, name: e, role: i, src: a, hideAvatar: s, ...d }, l) => /* @__PURE__ */ c(
349
+ O.displayName = "SidebarHistoryItem";
350
+ const P = o.forwardRef(
351
+ ({ className: t, name: r, role: i, src: a, hideAvatar: s, ...d }, l) => /* @__PURE__ */ c(
348
352
  "a",
349
353
  {
350
354
  ref: l,
351
- className: o(
355
+ className: n(
352
356
  "flex items-center gap-2.5 rounded-md p-2 transition-colors hover:bg-sidebar-accent/60",
353
357
  "outline-none focus-visible:ring-3 focus-visible:ring-ring",
354
358
  "group-data-[collapsed=true]/sidebar:mx-auto group-data-[collapsed=true]/sidebar:size-(--sidebar-item) group-data-[collapsed=true]/sidebar:justify-center group-data-[collapsed=true]/sidebar:p-0",
@@ -356,35 +360,35 @@ const W = n.forwardRef(
356
360
  ),
357
361
  ...d,
358
362
  children: [
359
- !s && /* @__PURE__ */ r(H, { size: "sm", name: e, src: a }),
360
- s && /* @__PURE__ */ r(
361
- R,
363
+ !s && /* @__PURE__ */ e(L, { size: "sm", name: r, src: a }),
364
+ s && /* @__PURE__ */ e(
365
+ j,
362
366
  {
363
367
  "aria-hidden": !0,
364
368
  className: "hidden size-4 shrink-0 text-muted-foreground group-data-[collapsed=true]/sidebar:block"
365
369
  }
366
370
  ),
367
371
  /* @__PURE__ */ c("div", { className: "min-w-0 leading-tight group-data-[collapsed=true]/sidebar:hidden", children: [
368
- /* @__PURE__ */ r("div", { className: "truncate text-base leading-[var(--text-base--line-height)] font-normal text-foreground", children: e }),
369
- i && /* @__PURE__ */ r("div", { className: "truncate text-xs leading-[var(--text-xs--line-height)] text-tertiary", children: i })
372
+ /* @__PURE__ */ e("div", { className: "truncate text-base leading-[var(--text-base--line-height)] font-normal text-foreground", children: r }),
373
+ i && /* @__PURE__ */ e("div", { className: "truncate text-xs leading-[var(--text-xs--line-height)] text-tertiary", children: i })
370
374
  ] })
371
375
  ]
372
376
  }
373
377
  )
374
378
  );
375
- W.displayName = "SidebarAccount";
379
+ P.displayName = "SidebarAccount";
376
380
  export {
377
- I as Sidebar,
378
- W as SidebarAccount,
379
- B as SidebarAction,
380
- G as SidebarBrand,
381
- q as SidebarFooter,
382
- L as SidebarHeader,
383
- D as SidebarHistory,
384
- F as SidebarHistoryItem,
385
- M as SidebarItem,
386
- K as SidebarNav,
387
- A as SidebarSection,
381
+ K as Sidebar,
382
+ P as SidebarAccount,
383
+ W as SidebarAction,
384
+ Y as SidebarBrand,
385
+ F as SidebarFooter,
386
+ A as SidebarHeader,
387
+ $ as SidebarHistory,
388
+ O as SidebarHistoryItem,
389
+ D as SidebarItem,
390
+ q as SidebarNav,
391
+ B as SidebarSection,
388
392
  z as SidebarTrigger,
389
- E as useSidebar
393
+ M as useSidebar
390
394
  };
@@ -1,19 +1,19 @@
1
1
  "use client";
2
2
  import { jsx as o } from "react/jsx-runtime";
3
- import * as n from "react";
4
- import { cn as f } from "../lib/cn.js";
5
- const i = n.forwardRef(
3
+ import * as f from "react";
4
+ import { cn as n } from "../lib/cn.js";
5
+ const i = f.forwardRef(
6
6
  ({ className: e, circle: r = !1, ...t }, a) => /* @__PURE__ */ o(
7
7
  "div",
8
8
  {
9
9
  ref: a,
10
10
  "aria-hidden": !0,
11
- className: f(
11
+ className: n(
12
12
  "relative overflow-hidden bg-muted",
13
13
  r ? "rounded-full" : "rounded-md",
14
14
  "after:absolute after:inset-0 after:-translate-x-full",
15
15
  "after:bg-gradient-to-r after:from-transparent after:via-foreground/10 after:to-transparent",
16
- "after:animate-[ads-shimmer_var(--duration-pulse)_infinite]",
16
+ "after:animate-[ads-shimmer_1.5s_infinite]",
17
17
  e
18
18
  ),
19
19
  ...t
@@ -1,11 +1,20 @@
1
1
  import { VariantProps } from 'class-variance-authority';
2
+ import { SPINNER_VARIANTS, SpinnerVariant } from '../lib/spinner-mark';
2
3
  import * as React from "react";
3
- declare const spinnerVariants: (props?: ({
4
- size?: "sm" | "md" | "lg" | null | undefined;
4
+ export { SPINNER_VARIANTS, type SpinnerVariant };
5
+ declare const spinnerStyles: (props?: ({
6
+ size?: "xs" | "sm" | "md" | "lg" | null | undefined;
5
7
  color?: "current" | "primary" | "muted" | null | undefined;
6
8
  } & import('class-variance-authority/types').ClassProp) | undefined) => string;
7
- export interface SpinnerProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "color">, VariantProps<typeof spinnerVariants> {
9
+ export interface SpinnerProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "color">, VariantProps<typeof spinnerStyles> {
10
+ /** The work scope determines the grid choreography. Defaults to action. */
11
+ variant?: SpinnerVariant;
12
+ /** Accessible status text. Defaults to “Loading”. */
8
13
  label?: string;
9
14
  }
15
+ /**
16
+ * A bold 3×3 loading indicator that stays legible in a native 16 px slot.
17
+ * Every variant uses exactly nine squircles and inherits currentColor. Under
18
+ * reduced motion, the grid holds a representative frame instead of moving.
19
+ */
10
20
  export declare const Spinner: React.ForwardRefExoticComponent<SpinnerProps & React.RefAttributes<HTMLDivElement>>;
11
- export {};