@actioneer/ads 0.6.0 → 0.8.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 (123) hide show
  1. package/DESIGN.md +597 -0
  2. package/components/ai-elements/agent-trace.d.ts +2 -2
  3. package/components/ai-elements/agent-trace.js +164 -105
  4. package/components/ai-elements/chain-of-thought.d.ts +2 -2
  5. package/components/ai-elements/chain-of-thought.js +1 -1
  6. package/components/ai-elements/index.d.ts +0 -5
  7. package/components/ai-elements/inline-citation.js +1 -1
  8. package/components/alert.d.ts +6 -6
  9. package/components/alert.js +89 -53
  10. package/components/answer-sources.d.ts +2 -6
  11. package/components/answer-sources.js +58 -60
  12. package/components/answer.d.ts +5 -0
  13. package/components/answer.js +311 -271
  14. package/components/assistant-ui/action-bar.js +1 -1
  15. package/components/assistant-ui/attachment.js +11 -11
  16. package/components/assistant-ui/badge.js +18 -18
  17. package/components/assistant-ui/composer-harness.js +15 -20
  18. package/components/assistant-ui/composer-trigger-popover.js +9 -9
  19. package/components/assistant-ui/composer.d.ts +3 -1
  20. package/components/assistant-ui/composer.js +148 -144
  21. package/components/assistant-ui/image.js +61 -61
  22. package/components/assistant-ui/index.d.ts +0 -3
  23. package/components/assistant-ui/message-timing.js +1 -1
  24. package/components/assistant-ui/selection-toolbar.js +7 -7
  25. package/components/assistant-ui/thread-context.d.ts +3 -1
  26. package/components/assistant-ui/thread.js +50 -42
  27. package/components/avatar.js +42 -42
  28. package/components/badge.d.ts +5 -6
  29. package/components/badge.js +13 -76
  30. package/components/body-page-header.d.ts +15 -0
  31. package/components/body-page-header.js +24 -0
  32. package/components/brand-loader.d.ts +0 -3
  33. package/components/brand-loader.js +10 -32
  34. package/components/breadcrumbs.d.ts +0 -7
  35. package/components/breadcrumbs.js +54 -71
  36. package/components/button.d.ts +1 -1
  37. package/components/button.js +55 -49
  38. package/components/chart.js +298 -296
  39. package/components/chip.d.ts +13 -1
  40. package/components/chip.js +93 -80
  41. package/components/collection-header.d.ts +17 -0
  42. package/components/collection-header.js +31 -0
  43. package/components/connector-card.d.ts +6 -6
  44. package/components/connector-card.js +31 -32
  45. package/components/date-range-picker.d.ts +2 -1
  46. package/components/date-range-picker.js +158 -122
  47. package/components/divider.js +25 -25
  48. package/components/drawer.d.ts +6 -2
  49. package/components/drawer.js +61 -58
  50. package/components/dropdown.d.ts +1 -2
  51. package/components/dropdown.js +88 -89
  52. package/components/field.js +41 -36
  53. package/components/file-dropzone.js +1 -1
  54. package/components/index.d.ts +4 -4
  55. package/components/index.js +501 -549
  56. package/components/infinite-canvas.js +24 -24
  57. package/components/input-field.d.ts +18 -3
  58. package/components/input-field.js +88 -72
  59. package/components/input.js +32 -29
  60. package/components/modal.d.ts +31 -3
  61. package/components/modal.js +244 -170
  62. package/components/number-field.js +45 -42
  63. package/components/page-body.d.ts +12 -0
  64. package/components/page-body.js +18 -0
  65. package/components/pagination.js +36 -36
  66. package/components/pixel-blast-svg.js +71 -73
  67. package/components/select.d.ts +21 -0
  68. package/components/select.js +189 -148
  69. package/components/setting-row.d.ts +6 -5
  70. package/components/setting-row.js +33 -32
  71. package/components/sidebar.d.ts +2 -0
  72. package/components/sidebar.js +151 -141
  73. package/components/skeleton.js +8 -7
  74. package/components/slider.js +1 -1
  75. package/components/surface-loader.d.ts +11 -0
  76. package/components/surface-loader.js +35 -0
  77. package/components/table.d.ts +16 -10
  78. package/components/table.js +427 -412
  79. package/components/tabs.d.ts +2 -0
  80. package/components/tabs.js +160 -295
  81. package/components/textarea.js +9 -9
  82. package/components/toast.d.ts +1 -1
  83. package/components/toast.js +181 -118
  84. package/components/tree.d.ts +5 -1
  85. package/components/tree.js +54 -49
  86. package/components/typography.d.ts +4 -4
  87. package/components/typography.js +13 -13
  88. package/components/ui/button.d.ts +1 -1
  89. package/components/ui/button.js +4 -4
  90. package/components/ui/dialog.js +25 -25
  91. package/demo/components/add-to-artifact.js +6 -10
  92. package/lib/cn.js +11 -4
  93. package/lib/icons.d.ts +4 -0
  94. package/lib/icons.js +103 -102
  95. package/lib/interactive.d.ts +1 -1
  96. package/llms.txt +132 -188
  97. package/manifest.json +1719 -2831
  98. package/package.json +2 -2
  99. package/styles.css +362 -233
  100. package/theme.css +312 -177
  101. package/components/agent-icon.d.ts +0 -76
  102. package/components/agent-icon.js +0 -265
  103. package/components/ai-elements/queue.d.ts +0 -60
  104. package/components/ai-elements/queue.js +0 -193
  105. package/components/ai-elements/speech-input.d.ts +0 -16
  106. package/components/ai-elements/speech-input.js +0 -151
  107. package/components/ai-elements/task-progress.d.ts +0 -41
  108. package/components/ai-elements/task-progress.js +0 -224
  109. package/components/ai-elements/task.d.ts +0 -39
  110. package/components/ai-elements/task.js +0 -105
  111. package/components/ai-elements/voice.d.ts +0 -90
  112. package/components/ai-elements/voice.js +0 -496
  113. package/components/assistant-ui/follow-up-suggestions.d.ts +0 -11
  114. package/components/assistant-ui/follow-up-suggestions.js +0 -72
  115. package/components/assistant-ui/suggestions.d.ts +0 -7
  116. package/components/assistant-ui/suggestions.js +0 -19
  117. package/components/assistant-ui/voice.d.ts +0 -18
  118. package/components/link.d.ts +0 -14
  119. package/components/link.js +0 -72
  120. package/components/navbar.d.ts +0 -15
  121. package/components/navbar.js +0 -68
  122. package/components/pixel-icon.d.ts +0 -37
  123. 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";
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
6
  import { cn as n } from "../lib/cn.js";
7
- import { springSidebar as E } from "../lib/motion.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,84 +15,93 @@ 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: o = !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,
55
+ initial: o ? {
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,
57
66
  className: n(
58
- "group/sidebar flex h-full shrink-0 flex-col bg-transparent",
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: o, 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
+ o ? "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": o ? "Expand sidebar" : "Collapse sidebar",
102
+ "aria-pressed": o,
94
103
  onClick: (l) => {
95
- r == null || r(l), d();
104
+ e == null || e(l), d();
96
105
  },
97
106
  className: n(
98
107
  "inline-flex size-(--sidebar-item) shrink-0 items-center justify-center rounded-sm border border-transparent text-muted-foreground",
@@ -101,8 +110,8 @@ function z({
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,10 +119,10 @@ 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: o,
117
126
  className: d,
118
127
  ...l
119
128
  }) {
@@ -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
142
  className: n(
134
- "flex h-(--sidebar-header) shrink-0 items-center justify-between gap-2 px-3",
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
+ o
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,
163
+ ref: a,
155
164
  className: n(
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: n("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 }, o) => /* @__PURE__ */ c("div", { ref: o, 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-on-warm-grey-secondary 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: o, 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),
190
+ "aria-current": a ? "page" : void 0,
191
+ title: d ?? (typeof o == "string" ? o : void 0),
183
192
  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",
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-wg12 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-wg4 bg-card" : "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: o }),
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,
215
+ ref: a,
207
216
  className: n("shrink-0 p-3 group-data-[collapsed=true]/sidebar:px-2", t),
208
- ...r
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 }, o) => /* @__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: o,
218
227
  type: "button",
219
228
  className: n(
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-wg12",
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 }, o) => /* @__PURE__ */ c(
242
251
  "div",
243
252
  {
244
- ref: s,
253
+ ref: o,
245
254
  className: n("group-data-[collapsed=true]/sidebar:hidden", t),
246
- ...a,
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-on-warm-grey-secondary", 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: o, 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
281
  className: n(
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-wg12",
284
+ o ? "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,52 +292,52 @@ 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),
299
+ title: a ?? (typeof e == "string" ? e : void 0),
290
300
  className: n(
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,
311
+ ref: v,
302
312
  className: n(
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
306
316
  // string's own end) handles the right.
307
- g && "[mask-image:linear-gradient(to_right,#000_calc(100%-1.5rem),transparent)]",
308
- g && "group-hover/hist:[mask-image:linear-gradient(to_right,transparent,#000_1.25rem,#000_100%)]"
317
+ g && "[mask-image:linear-gradient(to_right,var(--color-wg12)_calc(100%-1.5rem),transparent)]",
318
+ g && "group-hover/hist:[mask-image:linear-gradient(to_right,transparent,var(--color-wg12)_1.25rem,var(--color-wg12)_100%)]"
309
319
  ),
310
- children: /* @__PURE__ */ e(
320
+ children: /* @__PURE__ */ r(
311
321
  "span",
312
322
  {
313
- ref: f,
323
+ ref: y,
314
324
  className: n(
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
343
  className: n(
@@ -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: o, ...d }, l) => /* @__PURE__ */ c(
352
362
  "a",
353
363
  {
354
364
  ref: l,
355
365
  className: n(
356
- "flex items-center gap-2.5 rounded-md p-2 transition-colors hover:bg-sidebar-accent/60",
366
+ "flex items-center gap-2.5 rounded-md border border-transparent p-2 transition-colors hover:border-wg10",
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
+ !o && /* @__PURE__ */ r(L, { size: "sm", name: e, src: i }),
374
+ o && /* @__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
+ };