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