@actioneer/ads 0.7.0 → 1.0.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.
- package/DESIGN.md +597 -0
- package/components/ai-elements/agent-trace.js +1 -1
- package/components/alert.js +3 -3
- package/components/answer.js +2 -2
- package/components/assistant-ui/action-bar.js +1 -1
- package/components/assistant-ui/attachment.js +12 -12
- package/components/assistant-ui/badge.js +18 -18
- package/components/assistant-ui/composer-harness.js +5 -4
- package/components/assistant-ui/composer-trigger-popover.js +9 -9
- package/components/assistant-ui/composer.js +32 -32
- package/components/assistant-ui/directive-text.js +5 -5
- package/components/assistant-ui/image.js +61 -61
- package/components/assistant-ui/markdown-text.js +7 -7
- package/components/assistant-ui/message-timing.js +1 -1
- package/components/assistant-ui/selection-toolbar.js +7 -7
- package/components/assistant-ui/sources.js +1 -1
- package/components/avatar.d.ts +1 -1
- package/components/avatar.js +35 -35
- package/components/body-page-header.d.ts +1 -1
- package/components/body-page-header.js +1 -1
- package/components/chart.js +1 -1
- package/components/chip.js +8 -8
- package/components/divider.js +25 -25
- package/components/drawer.d.ts +2 -14
- package/components/drawer.js +103 -109
- package/components/field.js +9 -9
- package/components/index.d.ts +1 -0
- package/components/index.js +466 -465
- package/components/infinite-canvas.js +1 -1
- package/components/input.js +21 -19
- package/components/modal.js +26 -26
- package/components/page-body.js +6 -6
- package/components/page-header.js +1 -1
- package/components/pagination.js +1 -1
- package/components/pixel-blast-svg.js +71 -73
- package/components/search-disclosure.d.ts +18 -0
- package/components/search-disclosure.js +106 -0
- package/components/sidebar.js +60 -53
- package/components/table.d.ts +1 -1
- package/components/table.js +73 -74
- package/components/tabs.js +68 -59
- package/components/tree.js +17 -17
- package/components/typography.d.ts +1 -1
- package/components/typography.js +1 -1
- package/components/ui/button.d.ts +1 -1
- package/components/ui/button.js +4 -4
- package/components/ui/dialog.js +23 -23
- package/components/viz-charts.js +36 -36
- package/demo/components/add-to-artifact.js +3 -2
- package/lib/cn.js +7 -7
- package/lib/icons.d.ts +4 -0
- package/lib/icons.js +105 -104
- package/llms.txt +52 -49
- package/manifest.json +258 -235
- package/package.json +2 -1
- package/styles.css +171 -153
- package/theme.css +162 -140
package/components/sidebar.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as r, jsxs as c } from "react/jsx-runtime";
|
|
3
3
|
import * as s from "react";
|
|
4
|
-
import { MotionConfig as z, motion as
|
|
5
|
-
import { User as
|
|
6
|
-
import { cn as
|
|
4
|
+
import { MotionConfig as z, motion as j } from "motion/react";
|
|
5
|
+
import { User as _, PanelLeft as E } from "../lib/icons.js";
|
|
6
|
+
import { cn as n } from "../lib/cn.js";
|
|
7
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";
|
|
@@ -23,7 +23,7 @@ const K = s.forwardRef(
|
|
|
23
23
|
collapsed: e,
|
|
24
24
|
defaultCollapsed: a = !1,
|
|
25
25
|
onCollapsedChange: i,
|
|
26
|
-
animateOnMount:
|
|
26
|
+
animateOnMount: o = !1,
|
|
27
27
|
keyboardToggle: d = !0,
|
|
28
28
|
...l
|
|
29
29
|
}, m) => {
|
|
@@ -48,11 +48,11 @@ const K = s.forwardRef(
|
|
|
48
48
|
[u, h, g]
|
|
49
49
|
);
|
|
50
50
|
return /* @__PURE__ */ r(R.Provider, { value: x, children: /* @__PURE__ */ r(z, { reducedMotion: "user", children: /* @__PURE__ */ r(
|
|
51
|
-
|
|
51
|
+
j.aside,
|
|
52
52
|
{
|
|
53
53
|
ref: m,
|
|
54
54
|
"data-collapsed": u ? "true" : "false",
|
|
55
|
-
initial:
|
|
55
|
+
initial: o ? {
|
|
56
56
|
width: u ? 56 : 240,
|
|
57
57
|
transform: "translate3d(-100%, 0, 0)",
|
|
58
58
|
opacity: 0
|
|
@@ -63,7 +63,7 @@ const K = s.forwardRef(
|
|
|
63
63
|
opacity: 1
|
|
64
64
|
},
|
|
65
65
|
transition: H,
|
|
66
|
-
className:
|
|
66
|
+
className: n(
|
|
67
67
|
"group/sidebar flex h-full shrink-0 flex-col bg-background",
|
|
68
68
|
t
|
|
69
69
|
),
|
|
@@ -82,13 +82,13 @@ function k({
|
|
|
82
82
|
tooltipSide: a = "right",
|
|
83
83
|
...i
|
|
84
84
|
}) {
|
|
85
|
-
const { collapsed:
|
|
85
|
+
const { collapsed: o, toggle: d } = M();
|
|
86
86
|
return /* @__PURE__ */ r(
|
|
87
87
|
I,
|
|
88
88
|
{
|
|
89
89
|
side: a,
|
|
90
90
|
content: /* @__PURE__ */ c("span", { className: "flex items-center gap-1.5", children: [
|
|
91
|
-
|
|
91
|
+
o ? "Expand" : "Collapse",
|
|
92
92
|
/* @__PURE__ */ c("span", { className: "flex items-center gap-0.5", children: [
|
|
93
93
|
/* @__PURE__ */ r(S, { children: "⌘" }),
|
|
94
94
|
/* @__PURE__ */ r(S, { children: "B" })
|
|
@@ -98,12 +98,12 @@ function k({
|
|
|
98
98
|
"button",
|
|
99
99
|
{
|
|
100
100
|
type: "button",
|
|
101
|
-
"aria-label":
|
|
102
|
-
"aria-pressed":
|
|
101
|
+
"aria-label": o ? "Expand sidebar" : "Collapse sidebar",
|
|
102
|
+
"aria-pressed": o,
|
|
103
103
|
onClick: (l) => {
|
|
104
104
|
e == null || e(l), d();
|
|
105
105
|
},
|
|
106
|
-
className:
|
|
106
|
+
className: n(
|
|
107
107
|
"inline-flex size-(--sidebar-item) shrink-0 items-center justify-center rounded-sm border border-transparent text-muted-foreground",
|
|
108
108
|
"transition-colors hover:border-border hover:bg-elevated hover:text-foreground",
|
|
109
109
|
"outline-none focus-visible:ring-3 focus-visible:ring-ring",
|
|
@@ -122,11 +122,11 @@ function Y({
|
|
|
122
122
|
href: e,
|
|
123
123
|
label: a = "Home",
|
|
124
124
|
showTrigger: i = !0,
|
|
125
|
-
children:
|
|
125
|
+
children: o,
|
|
126
126
|
className: d,
|
|
127
127
|
...l
|
|
128
128
|
}) {
|
|
129
|
-
const m =
|
|
129
|
+
const m = n(
|
|
130
130
|
// 20px mark centered in a 32px square — the same box as every other rail icon.
|
|
131
131
|
// group/brand lets a BrandMark logo play its blip loop on hover.
|
|
132
132
|
"group/brand flex size-(--sidebar-item) items-center justify-center",
|
|
@@ -139,7 +139,7 @@ function Y({
|
|
|
139
139
|
return /* @__PURE__ */ c(
|
|
140
140
|
"div",
|
|
141
141
|
{
|
|
142
|
-
className:
|
|
142
|
+
className: n(
|
|
143
143
|
"flex h-(--sidebar-header) shrink-0 items-center justify-between gap-2 px-4",
|
|
144
144
|
"group-data-[collapsed=true]/sidebar:justify-center group-data-[collapsed=true]/sidebar:px-2",
|
|
145
145
|
d
|
|
@@ -150,7 +150,7 @@ function Y({
|
|
|
150
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" }) }),
|
|
151
151
|
/* @__PURE__ */ c("div", { className: "flex items-center gap-1 group-data-[collapsed=true]/sidebar:hidden", children: [
|
|
152
152
|
i && /* @__PURE__ */ r(k, { tooltipSide: "bottom" }),
|
|
153
|
-
|
|
153
|
+
o
|
|
154
154
|
] })
|
|
155
155
|
]
|
|
156
156
|
}
|
|
@@ -161,7 +161,7 @@ const q = s.forwardRef(
|
|
|
161
161
|
"div",
|
|
162
162
|
{
|
|
163
163
|
ref: a,
|
|
164
|
-
className:
|
|
164
|
+
className: n(
|
|
165
165
|
"flex h-(--sidebar-header) shrink-0 items-center justify-between gap-2 px-3",
|
|
166
166
|
"group-data-[collapsed=true]/sidebar:justify-center group-data-[collapsed=true]/sidebar:px-2",
|
|
167
167
|
t
|
|
@@ -172,36 +172,43 @@ const q = s.forwardRef(
|
|
|
172
172
|
);
|
|
173
173
|
q.displayName = "SidebarHeader";
|
|
174
174
|
const A = s.forwardRef(
|
|
175
|
-
({ className: t, ...e }, a) => /* @__PURE__ */ r("nav", { ref: a, className:
|
|
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 })
|
|
176
176
|
);
|
|
177
177
|
A.displayName = "SidebarNav";
|
|
178
178
|
const B = s.forwardRef(
|
|
179
|
-
({ className: t, label: e, children: a, ...i },
|
|
180
|
-
e && /* @__PURE__ */ r("div", { className: "mb-1.5 px-3 text-s leading-
|
|
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 font-normal uppercase leading-4 tracking-wider text-tertiary group-data-[collapsed=true]/sidebar:hidden", children: e }),
|
|
181
181
|
/* @__PURE__ */ r("div", { className: "flex flex-col gap-0.5 group-data-[collapsed=true]/sidebar:gap-2", children: a })
|
|
182
182
|
] })
|
|
183
183
|
);
|
|
184
184
|
B.displayName = "SidebarSection";
|
|
185
185
|
const D = s.forwardRef(
|
|
186
|
-
({ className: t, icon: e, isActive: a, endContent: i, children:
|
|
186
|
+
({ className: t, icon: e, isActive: a, endContent: i, children: o, title: d, ...l }, m) => /* @__PURE__ */ c(
|
|
187
187
|
"a",
|
|
188
188
|
{
|
|
189
189
|
ref: m,
|
|
190
190
|
"aria-current": a ? "page" : void 0,
|
|
191
|
-
title: d ?? (typeof
|
|
192
|
-
className:
|
|
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-
|
|
191
|
+
title: d ?? (typeof o == "string" ? o : void 0),
|
|
192
|
+
className: n(
|
|
193
|
+
"group/sidebar-item 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",
|
|
194
|
+
"transition-[background-color,border-color,color] duration-150 ease-out motion-reduce:transition-none",
|
|
194
195
|
"outline-none focus-visible:ring-3 focus-visible:ring-ring",
|
|
195
|
-
"[&_svg]:size-4 [&_svg]:shrink-0",
|
|
196
196
|
// Collapsed: a centered square (--sidebar-item) so every rail item lines up.
|
|
197
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",
|
|
198
|
-
a ? "
|
|
198
|
+
a ? "bg-sidebar-accent" : "hover:bg-sidebar-accent/60",
|
|
199
199
|
t
|
|
200
200
|
),
|
|
201
201
|
...l,
|
|
202
202
|
children: [
|
|
203
|
-
|
|
204
|
-
|
|
203
|
+
e && /* @__PURE__ */ r(
|
|
204
|
+
"span",
|
|
205
|
+
{
|
|
206
|
+
"aria-hidden": !0,
|
|
207
|
+
className: "flex shrink-0 items-center justify-center transition-transform duration-150 ease-out group-hover/sidebar-item:scale-110 motion-reduce:transition-none motion-reduce:group-hover/sidebar-item:scale-100 [&_svg]:size-4 [&_svg]:shrink-0",
|
|
208
|
+
children: a && s.isValidElement(e) ? s.cloneElement(e, { weight: "fill" }) : e
|
|
209
|
+
}
|
|
210
|
+
),
|
|
211
|
+
/* @__PURE__ */ r("span", { className: "min-w-0 flex-1 truncate group-data-[collapsed=true]/sidebar:hidden", children: o }),
|
|
205
212
|
i && /* @__PURE__ */ r("span", { className: "shrink-0 group-data-[collapsed=true]/sidebar:hidden", children: i })
|
|
206
213
|
]
|
|
207
214
|
}
|
|
@@ -213,21 +220,21 @@ const F = s.forwardRef(
|
|
|
213
220
|
"div",
|
|
214
221
|
{
|
|
215
222
|
ref: a,
|
|
216
|
-
className:
|
|
223
|
+
className: n("shrink-0 p-3 group-data-[collapsed=true]/sidebar:px-2", t),
|
|
217
224
|
...e
|
|
218
225
|
}
|
|
219
226
|
)
|
|
220
227
|
);
|
|
221
228
|
F.displayName = "SidebarFooter";
|
|
222
229
|
const W = s.forwardRef(
|
|
223
|
-
({ className: t, icon: e, children: a, ...i },
|
|
230
|
+
({ 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(
|
|
224
231
|
"button",
|
|
225
232
|
{
|
|
226
|
-
ref:
|
|
233
|
+
ref: o,
|
|
227
234
|
type: "button",
|
|
228
|
-
className:
|
|
235
|
+
className: n(
|
|
229
236
|
"flex h-9 w-full items-center justify-start gap-2 rounded-md px-3",
|
|
230
|
-
"text-m leading-[var(--text-m--line-height)] font-normal text-
|
|
237
|
+
"text-m leading-[var(--text-m--line-height)] font-normal text-wg12",
|
|
231
238
|
// Reads as a normal nav item: transparent at rest, the shared grey
|
|
232
239
|
// hover wash on hover (no fill-at-rest, no elevation).
|
|
233
240
|
"transition-colors duration-150 ease-out motion-reduce:transition-none",
|
|
@@ -247,21 +254,21 @@ const W = s.forwardRef(
|
|
|
247
254
|
);
|
|
248
255
|
W.displayName = "SidebarAction";
|
|
249
256
|
const $ = s.forwardRef(
|
|
250
|
-
({ className: t, label: e, children: a, ...i },
|
|
257
|
+
({ className: t, label: e, children: a, ...i }, o) => /* @__PURE__ */ c(
|
|
251
258
|
"div",
|
|
252
259
|
{
|
|
253
|
-
ref:
|
|
254
|
-
className:
|
|
260
|
+
ref: o,
|
|
261
|
+
className: n("group-data-[collapsed=true]/sidebar:hidden", t),
|
|
255
262
|
...i,
|
|
256
263
|
children: [
|
|
257
|
-
e && /* @__PURE__ */ r("div", { className: "mb-1.5 px-3 text-s leading-[var(--text-s--line-height)] font-medium text-
|
|
264
|
+
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
265
|
/* @__PURE__ */ r("div", { className: "flex flex-col gap-0.5", children: a })
|
|
259
266
|
]
|
|
260
267
|
}
|
|
261
268
|
)
|
|
262
269
|
);
|
|
263
270
|
$.displayName = "SidebarHistory";
|
|
264
|
-
const O = s.forwardRef(({ className: t, children: e, title: a, action: i, isActive:
|
|
271
|
+
const O = s.forwardRef(({ className: t, children: e, title: a, action: i, isActive: o, icon: d, ...l }, m) => {
|
|
265
272
|
const v = s.useRef(null), y = s.useRef(null), [b, u] = s.useState(0);
|
|
266
273
|
s.useLayoutEffect(() => {
|
|
267
274
|
const x = v.current, p = y.current;
|
|
@@ -278,10 +285,10 @@ const O = s.forwardRef(({ className: t, children: e, title: a, action: i, isActi
|
|
|
278
285
|
return /* @__PURE__ */ c(
|
|
279
286
|
"div",
|
|
280
287
|
{
|
|
281
|
-
className:
|
|
288
|
+
className: n(
|
|
282
289
|
"group/hist relative flex items-center rounded-md transition-colors",
|
|
283
|
-
"text-
|
|
284
|
-
|
|
290
|
+
"text-wg12",
|
|
291
|
+
o ? "bg-sidebar-accent/60" : "hover:bg-sidebar-accent/60"
|
|
285
292
|
),
|
|
286
293
|
children: [
|
|
287
294
|
d && /* @__PURE__ */ r(
|
|
@@ -297,7 +304,7 @@ const O = s.forwardRef(({ className: t, children: e, title: a, action: i, isActi
|
|
|
297
304
|
{
|
|
298
305
|
ref: m,
|
|
299
306
|
title: a ?? (typeof e == "string" ? e : void 0),
|
|
300
|
-
className:
|
|
307
|
+
className: n(
|
|
301
308
|
// Left pad matches a SidebarItem's text column (px-3 + icon size-4 +
|
|
302
309
|
// gap-2.5 = 2.375rem) so history titles line up under the nav labels.
|
|
303
310
|
"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",
|
|
@@ -309,19 +316,19 @@ const O = s.forwardRef(({ className: t, children: e, title: a, action: i, isActi
|
|
|
309
316
|
"span",
|
|
310
317
|
{
|
|
311
318
|
ref: v,
|
|
312
|
-
className:
|
|
319
|
+
className: n(
|
|
313
320
|
"block overflow-hidden",
|
|
314
321
|
// Rest: fade the right edge (no ellipsis). Hover: the title scrolls,
|
|
315
322
|
// so fade the LEFT edge where it exits; the action backdrop (or the
|
|
316
323
|
// string's own end) handles the right.
|
|
317
|
-
g && "[mask-image:linear-gradient(to_right
|
|
318
|
-
g && "group-hover/hist:[mask-image:linear-gradient(to_right,transparent
|
|
324
|
+
g && "[mask-image:linear-gradient(to_right,var(--color-wg12)_calc(100%-1.5rem),transparent)]",
|
|
325
|
+
g && "group-hover/hist:[mask-image:linear-gradient(to_right,transparent,var(--color-wg12)_1.25rem,var(--color-wg12)_100%)]"
|
|
319
326
|
),
|
|
320
327
|
children: /* @__PURE__ */ r(
|
|
321
328
|
"span",
|
|
322
329
|
{
|
|
323
330
|
ref: y,
|
|
324
|
-
className:
|
|
331
|
+
className: n(
|
|
325
332
|
"block w-max whitespace-nowrap transition-transform ease-linear",
|
|
326
333
|
g && "group-hover/hist:[transform:translateX(var(--mq-x))]",
|
|
327
334
|
"motion-reduce:transition-none motion-reduce:group-hover/hist:[transform:none]"
|
|
@@ -340,7 +347,7 @@ const O = s.forwardRef(({ className: t, children: e, title: a, action: i, isActi
|
|
|
340
347
|
i && /* @__PURE__ */ r(
|
|
341
348
|
"span",
|
|
342
349
|
{
|
|
343
|
-
className:
|
|
350
|
+
className: n(
|
|
344
351
|
// Rounded end matches the row's radius so the backdrop doesn't
|
|
345
352
|
// square off the highlight's right corners.
|
|
346
353
|
"absolute inset-y-0 right-0 flex items-center rounded-e-md pl-8 pr-1",
|
|
@@ -358,21 +365,21 @@ const O = s.forwardRef(({ className: t, children: e, title: a, action: i, isActi
|
|
|
358
365
|
});
|
|
359
366
|
O.displayName = "SidebarHistoryItem";
|
|
360
367
|
const P = s.forwardRef(
|
|
361
|
-
({ className: t, name: e, role: a, src: i, hideAvatar:
|
|
368
|
+
({ className: t, name: e, role: a, src: i, hideAvatar: o, ...d }, l) => /* @__PURE__ */ c(
|
|
362
369
|
"a",
|
|
363
370
|
{
|
|
364
371
|
ref: l,
|
|
365
|
-
className:
|
|
366
|
-
"flex items-center gap-2.5 rounded-md border border-transparent p-2 transition-colors hover:border-
|
|
372
|
+
className: n(
|
|
373
|
+
"flex items-center gap-2.5 rounded-md border border-transparent p-2 transition-colors hover:border-wg10",
|
|
367
374
|
"outline-none focus-visible:ring-3 focus-visible:ring-ring",
|
|
368
375
|
"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",
|
|
369
376
|
t
|
|
370
377
|
),
|
|
371
378
|
...d,
|
|
372
379
|
children: [
|
|
373
|
-
!
|
|
374
|
-
|
|
375
|
-
|
|
380
|
+
!o && /* @__PURE__ */ r(L, { size: "sm", name: e, src: i }),
|
|
381
|
+
o && /* @__PURE__ */ r(
|
|
382
|
+
_,
|
|
376
383
|
{
|
|
377
384
|
"aria-hidden": !0,
|
|
378
385
|
className: "hidden size-4 shrink-0 text-muted-foreground group-data-[collapsed=true]/sidebar:block"
|
package/components/table.d.ts
CHANGED
|
@@ -32,7 +32,7 @@ export interface TableProps extends Omit<React.TableHTMLAttributes<HTMLTableElem
|
|
|
32
32
|
/**
|
|
33
33
|
* Turns the final `sticky="right"` column into a persistent action surface.
|
|
34
34
|
* Its cells stay on `bg-elevated` while one flat Table-level
|
|
35
|
-
* `shadow-elevation` compatibility hook spans the body below the
|
|
35
|
+
* `shadow-elevation` compatibility hook spans the body below the WG1 header.
|
|
36
36
|
* The matching header cell stays transparent and scrolls normally, so it
|
|
37
37
|
* never becomes a blank sticky surface over the header labels.
|
|
38
38
|
*/
|