@actioneer/ads 1.0.6 → 1.0.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.
- package/DESIGN.md +80 -86
- package/README.md +6 -0
- package/components/ai-elements/chart.js +20 -20
- package/components/ai-elements/inline-citation.js +50 -50
- package/components/ai-elements/message.js +1 -1
- package/components/ai-elements/tool.js +5 -5
- package/components/alert.d.ts +5 -4
- package/components/alert.js +91 -79
- package/components/answer.js +1 -1
- package/components/assistant-ui/action-bar.js +1 -1
- package/components/assistant-ui/attachment.js +68 -49
- package/components/assistant-ui/composer-add-context.js +1 -1
- package/components/assistant-ui/composer-trigger-popover.js +1 -1
- package/components/assistant-ui/composer.js +13 -13
- package/components/assistant-ui/message-timing.js +6 -6
- package/components/assistant-ui/selection-toolbar.js +5 -5
- package/components/assistant-ui/sources.js +15 -15
- package/components/assistant-ui/tooltip-icon-button.js +18 -14
- package/components/audio-waveform.d.ts +21 -8
- package/components/audio-waveform.js +371 -94
- package/components/autocomplete.js +9 -9
- package/components/breadcrumbs.js +32 -38
- package/components/button.js +83 -73
- package/components/card.js +1 -1
- package/components/chart.js +732 -673
- package/components/chip.js +37 -35
- package/components/command-palette.js +12 -12
- package/components/connector-card.d.ts +1 -2
- package/components/connector-card.js +17 -17
- package/components/date-range-picker.js +1 -2
- package/components/drawer.js +9 -10
- package/components/dropdown.js +1 -1
- package/components/empty-state.d.ts +2 -0
- package/components/empty-state.js +17 -15
- package/components/field.js +9 -10
- package/components/file-dropzone.d.ts +6 -3
- package/components/file-dropzone.js +72 -60
- package/components/infinite-canvas.js +9 -9
- package/components/modal.js +1 -1
- package/components/page-body.js +8 -8
- package/components/popover.js +11 -11
- package/components/progress-circle.d.ts +1 -1
- package/components/progress-circle.js +57 -48
- package/components/radio.d.ts +1 -1
- package/components/radio.js +53 -53
- package/components/segmented.d.ts +1 -0
- package/components/segmented.js +34 -36
- package/components/select.js +2 -2
- package/components/selection-action-bar.js +32 -31
- package/components/setting-row.js +10 -10
- package/components/sidebar.js +74 -73
- package/components/slider.js +5 -5
- package/components/stepper.d.ts +1 -1
- package/components/stepper.js +1 -1
- package/components/switch.js +10 -10
- package/components/table.d.ts +17 -5
- package/components/table.js +559 -405
- package/components/tabs.js +41 -35
- package/components/timeline.js +3 -3
- package/components/toast.js +53 -56
- package/components/ui/button.js +4 -4
- package/components/ui/dialog.js +1 -1
- package/components/viz-charts.js +263 -221
- package/examples/README.md +30 -0
- package/examples/agents-screen.tsx +477 -0
- package/examples/settings-screen.tsx +90 -0
- package/examples/workspace-header.tsx +71 -0
- package/lib/icons.d.ts +8 -0
- package/lib/icons.js +171 -118
- package/llms.txt +16 -16
- package/manifest.json +178 -54
- package/package.json +1 -1
- package/styles.css +60 -72
- package/theme.css +55 -63
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as
|
|
2
|
+
import { jsxs as x, jsx as t, Fragment as k } from "react/jsx-runtime";
|
|
3
3
|
import * as r from "react";
|
|
4
4
|
import { cn as d } from "../lib/cn.js";
|
|
5
5
|
const N = r.createContext({
|
|
6
6
|
count: 0
|
|
7
7
|
}), w = r.createContext(0);
|
|
8
|
-
function B(
|
|
9
|
-
let n = (
|
|
8
|
+
function B(a) {
|
|
9
|
+
let n = (a == null ? void 0 : a.parentElement) ?? null;
|
|
10
10
|
for (; n; ) {
|
|
11
11
|
const e = getComputedStyle(n).overflowY;
|
|
12
12
|
if (e === "auto" || e === "scroll") return n;
|
|
@@ -15,29 +15,21 @@ function B(o) {
|
|
|
15
15
|
return null;
|
|
16
16
|
}
|
|
17
17
|
const C = r.forwardRef(
|
|
18
|
-
({
|
|
19
|
-
|
|
20
|
-
children: n,
|
|
21
|
-
sticky: e,
|
|
22
|
-
actions: c,
|
|
23
|
-
center: i,
|
|
24
|
-
meta: f,
|
|
25
|
-
...x
|
|
26
|
-
}, a) => {
|
|
27
|
-
const p = r.Children.toArray(n), b = r.useRef(null), u = r.useCallback(
|
|
18
|
+
({ className: a, children: n, sticky: e, actions: i, center: c, meta: f, ...p }, o) => {
|
|
19
|
+
const h = r.Children.toArray(n), b = r.useRef(null), m = r.useCallback(
|
|
28
20
|
(s) => {
|
|
29
|
-
b.current = s, typeof
|
|
21
|
+
b.current = s, typeof o == "function" ? o(s) : o && (o.current = s);
|
|
30
22
|
},
|
|
31
|
-
[
|
|
32
|
-
), [l,
|
|
23
|
+
[o]
|
|
24
|
+
), [l, g] = r.useState(!1);
|
|
33
25
|
return r.useEffect(() => {
|
|
34
26
|
if (!e) return;
|
|
35
|
-
const s = B(b.current),
|
|
36
|
-
return
|
|
37
|
-
}, [e]), /* @__PURE__ */
|
|
27
|
+
const s = B(b.current), u = s ?? window, v = () => g((s ? s.scrollTop : window.scrollY) > 2);
|
|
28
|
+
return v(), u.addEventListener("scroll", v, { passive: !0 }), () => u.removeEventListener("scroll", v);
|
|
29
|
+
}, [e]), /* @__PURE__ */ x(
|
|
38
30
|
"nav",
|
|
39
31
|
{
|
|
40
|
-
ref:
|
|
32
|
+
ref: m,
|
|
41
33
|
"aria-label": "Breadcrumb",
|
|
42
34
|
"data-stuck": e ? l ? "true" : "false" : void 0,
|
|
43
35
|
className: d(
|
|
@@ -50,29 +42,31 @@ const C = r.forwardRef(
|
|
|
50
42
|
// panel's empty padding).
|
|
51
43
|
e && "before:absolute before:inset-x-0 before:-top-8 before:h-8 before:bg-inherit before:content-['']",
|
|
52
44
|
e && (l ? "border-b border-border" : "border-b border-transparent"),
|
|
53
|
-
|
|
45
|
+
a
|
|
54
46
|
),
|
|
55
|
-
...
|
|
47
|
+
...p,
|
|
56
48
|
children: [
|
|
57
|
-
/* @__PURE__ */
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
49
|
+
/* @__PURE__ */ x("div", { className: "flex min-w-0 shrink items-baseline", children: [
|
|
50
|
+
/* @__PURE__ */ t("ol", { className: "flex min-w-0 shrink items-center gap-1.5 text-base", children: /* @__PURE__ */ t(N.Provider, { value: { count: h.length }, children: h.map((s, u) => /* @__PURE__ */ t(w.Provider, { value: u, children: s }, u)) }) }),
|
|
51
|
+
f && /* @__PURE__ */ t("div", { className: "ml-3 flex shrink-0 items-baseline gap-3 text-s text-tertiary", children: f })
|
|
52
|
+
] }),
|
|
53
|
+
c && /* @__PURE__ */ t("div", { className: "absolute left-1/2 top-1/2 z-50 flex -translate-x-1/2 -translate-y-1/2 items-center", children: c }),
|
|
54
|
+
i && /* @__PURE__ */ t("div", { className: "ml-auto flex shrink-0 items-center gap-2 pl-4", children: i })
|
|
61
55
|
]
|
|
62
56
|
}
|
|
63
57
|
);
|
|
64
58
|
}
|
|
65
59
|
);
|
|
66
60
|
C.displayName = "Breadcrumbs";
|
|
67
|
-
const R = r.forwardRef(({ className:
|
|
68
|
-
const { count:
|
|
69
|
-
|
|
70
|
-
e ? /* @__PURE__ */ t("span", { className: "min-w-0 truncate", children:
|
|
71
|
-
] }),
|
|
61
|
+
const R = r.forwardRef(({ className: a, href: n, isCurrent: e, icon: i, children: c, ...f }, p) => {
|
|
62
|
+
const { count: o } = r.useContext(N), b = r.useContext(w) === o - 1, m = "inline-flex items-center gap-1.5", l = /* @__PURE__ */ x(k, { children: [
|
|
63
|
+
i && /* @__PURE__ */ t("span", { "aria-hidden": !0, className: "flex shrink-0 items-center [&_svg]:size-4", children: i }),
|
|
64
|
+
e ? /* @__PURE__ */ t("span", { className: "min-w-0 truncate", children: c }) : c
|
|
65
|
+
] }), g = e ? /* @__PURE__ */ t(
|
|
72
66
|
"span",
|
|
73
67
|
{
|
|
74
68
|
"aria-current": "page",
|
|
75
|
-
className: d(
|
|
69
|
+
className: d(m, "min-w-0 text-base font-medium text-primary"),
|
|
76
70
|
children: l
|
|
77
71
|
}
|
|
78
72
|
) : n ? /* @__PURE__ */ t(
|
|
@@ -80,25 +74,25 @@ const R = r.forwardRef(({ className: o, href: n, isCurrent: e, icon: c, children
|
|
|
80
74
|
{
|
|
81
75
|
href: n,
|
|
82
76
|
className: d(
|
|
83
|
-
|
|
77
|
+
m,
|
|
84
78
|
"font-normal text-muted-foreground transition-colors hover:text-foreground",
|
|
85
79
|
"outline-none focus-visible:ring-3 focus-visible:ring-ring rounded-sm"
|
|
86
80
|
),
|
|
87
81
|
children: l
|
|
88
82
|
}
|
|
89
|
-
) : /* @__PURE__ */ t("span", { className: d(
|
|
90
|
-
return /* @__PURE__ */
|
|
83
|
+
) : /* @__PURE__ */ t("span", { className: d(m, "text-muted-foreground"), children: l });
|
|
84
|
+
return /* @__PURE__ */ x(
|
|
91
85
|
"li",
|
|
92
86
|
{
|
|
93
|
-
ref:
|
|
87
|
+
ref: p,
|
|
94
88
|
className: d(
|
|
95
89
|
"flex items-center gap-1.5",
|
|
96
90
|
e ? "min-w-0 shrink" : "shrink-0",
|
|
97
|
-
|
|
91
|
+
a
|
|
98
92
|
),
|
|
99
93
|
...f,
|
|
100
94
|
children: [
|
|
101
|
-
|
|
95
|
+
g,
|
|
102
96
|
!b && /* @__PURE__ */ t("span", { "aria-hidden": !0, className: "shrink-0 select-none text-border-strong", children: "/" })
|
|
103
97
|
]
|
|
104
98
|
}
|
package/components/button.js
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import * as
|
|
4
|
-
import { cva as
|
|
5
|
-
import { cn as
|
|
6
|
-
import {
|
|
7
|
-
|
|
2
|
+
import { jsx as o, jsxs as d } from "react/jsx-runtime";
|
|
3
|
+
import * as u from "react";
|
|
4
|
+
import { cva as v } from "class-variance-authority";
|
|
5
|
+
import { cn as i } from "../lib/cn.js";
|
|
6
|
+
import { IconHoverFillContext as f } from "../lib/icons.js";
|
|
7
|
+
import { Spinner as h } from "./spinner.js";
|
|
8
|
+
const x = v(
|
|
8
9
|
[
|
|
9
|
-
"relative inline-flex
|
|
10
|
+
"relative inline-flex items-center justify-center gap-2 whitespace-nowrap",
|
|
10
11
|
"cursor-pointer text-m font-medium select-none",
|
|
11
12
|
"rounded-md border border-transparent",
|
|
12
13
|
"transition-[background,border,color,box-shadow,transform] duration-150 ease-out motion-reduce:transition-none",
|
|
@@ -21,88 +22,97 @@ const f = u(
|
|
|
21
22
|
{
|
|
22
23
|
variants: {
|
|
23
24
|
variant: {
|
|
24
|
-
solid: "bg-action-primary text-action-primary-foreground
|
|
25
|
+
solid: "bg-action-primary text-action-primary-foreground enabled:hover:bg-action-primary-hover enabled:active:bg-action-primary-hover",
|
|
25
26
|
secondary: "border-action-primary bg-transparent text-action-primary-text shadow-none enabled:hover:bg-action-primary-soft enabled:active:bg-action-primary-soft",
|
|
26
27
|
outline: "border-border bg-transparent text-foreground enabled:hover:border-action-primary enabled:hover:bg-action-primary-soft enabled:hover:text-action-primary-text enabled:active:border-action-primary enabled:active:bg-action-primary-soft enabled:active:text-action-primary-text",
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
// Ghost answers hover with a WG12 outline and no fill; the label stays neutral.
|
|
29
|
+
ghost: "bg-transparent text-foreground enabled:hover:border-foreground enabled:active:border-foreground",
|
|
30
|
+
// Link only recolours its label on hover — no fill, no underline.
|
|
31
|
+
link: "bg-transparent text-foreground enabled:hover:text-action-primary-text enabled:active:text-action-primary-text active:scale-none",
|
|
32
|
+
danger: "bg-danger text-danger-foreground enabled:hover:bg-danger/90 enabled:active:bg-danger/90 focus-visible:ring-danger/40"
|
|
30
33
|
},
|
|
31
34
|
size: {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
"icon-
|
|
35
|
+
// Each size has its own height; the 14px Medium label never changes.
|
|
36
|
+
xs: "h-6 rounded-sm px-2 [&_svg]:size-3.5",
|
|
37
|
+
sm: "h-7 rounded-sm px-3 [&_svg]:size-4",
|
|
38
|
+
md: "h-8 rounded-md px-3.5 [&_svg]:size-4",
|
|
39
|
+
lg: "h-10 rounded-md px-5 [&_svg]:size-5",
|
|
40
|
+
icon: "h-8 w-9 rounded-md [&_svg]:size-4",
|
|
41
|
+
"icon-sm": "h-8 w-8 rounded-sm [&_svg]:size-4",
|
|
42
|
+
"icon-xs": "h-8 w-7 rounded-sm [&_svg]:size-4"
|
|
39
43
|
}
|
|
40
44
|
},
|
|
41
45
|
defaultVariants: { variant: "solid", size: "md" }
|
|
42
46
|
}
|
|
43
|
-
),
|
|
47
|
+
), y = {
|
|
44
48
|
solid: "disabled:border-transparent disabled:bg-action-primary disabled:text-action-primary-foreground disabled:shadow-none",
|
|
45
49
|
secondary: "disabled:border-action-primary disabled:bg-transparent disabled:text-action-primary-text disabled:shadow-none",
|
|
46
50
|
outline: "disabled:border-border disabled:bg-transparent disabled:text-foreground disabled:shadow-none",
|
|
47
51
|
ghost: "disabled:border-transparent disabled:bg-transparent disabled:text-foreground disabled:shadow-none",
|
|
48
52
|
link: "disabled:border-transparent disabled:bg-transparent disabled:text-foreground disabled:shadow-none",
|
|
49
53
|
danger: "disabled:border-transparent disabled:bg-danger disabled:text-danger-foreground disabled:shadow-none"
|
|
50
|
-
},
|
|
54
|
+
}, w = u.forwardRef(
|
|
51
55
|
({
|
|
52
|
-
className:
|
|
53
|
-
variant:
|
|
54
|
-
size:
|
|
55
|
-
isLoading:
|
|
56
|
-
startContent:
|
|
57
|
-
endContent:
|
|
58
|
-
fullWidth:
|
|
59
|
-
disabled:
|
|
60
|
-
children:
|
|
61
|
-
...
|
|
62
|
-
},
|
|
63
|
-
"
|
|
64
|
-
{
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
{
|
|
80
|
-
variant: "action",
|
|
81
|
-
size: "sm",
|
|
82
|
-
className: "absolute",
|
|
83
|
-
"aria-hidden": !0
|
|
84
|
-
}
|
|
56
|
+
className: s,
|
|
57
|
+
variant: e,
|
|
58
|
+
size: t,
|
|
59
|
+
isLoading: r = !1,
|
|
60
|
+
startContent: b,
|
|
61
|
+
endContent: l,
|
|
62
|
+
fullWidth: c,
|
|
63
|
+
disabled: n,
|
|
64
|
+
children: g,
|
|
65
|
+
...p
|
|
66
|
+
}, m) => {
|
|
67
|
+
const a = typeof t == "string" && t.startsWith("icon") && (e === "ghost" || e === "outline" || e === "link");
|
|
68
|
+
return /* @__PURE__ */ o(f.Provider, { value: a, children: /* @__PURE__ */ d(
|
|
69
|
+
"button",
|
|
70
|
+
{
|
|
71
|
+
ref: m,
|
|
72
|
+
disabled: n || r,
|
|
73
|
+
"aria-busy": r || void 0,
|
|
74
|
+
"data-loading": r || void 0,
|
|
75
|
+
"data-icon-hover-fill": a || void 0,
|
|
76
|
+
className: i(
|
|
77
|
+
x({ variant: e, size: t }),
|
|
78
|
+
a && "enabled:hover:bg-transparent enabled:active:bg-transparent enabled:hover:text-action-primary enabled:active:text-action-primary",
|
|
79
|
+
a && e === "ghost" && "enabled:hover:border-transparent enabled:active:border-transparent",
|
|
80
|
+
c && "w-full",
|
|
81
|
+
r ? y[e ?? "solid"] : n && "opacity-30",
|
|
82
|
+
s
|
|
85
83
|
),
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
84
|
+
...p,
|
|
85
|
+
children: [
|
|
86
|
+
r && /* @__PURE__ */ o(
|
|
87
|
+
h,
|
|
88
|
+
{
|
|
89
|
+
variant: "action",
|
|
90
|
+
size: "sm",
|
|
91
|
+
className: "absolute",
|
|
92
|
+
"aria-hidden": !0
|
|
93
|
+
}
|
|
94
|
+
),
|
|
95
|
+
/* @__PURE__ */ d(
|
|
96
|
+
"span",
|
|
97
|
+
{
|
|
98
|
+
className: i(
|
|
99
|
+
"inline-flex items-center gap-1.5",
|
|
100
|
+
r && "opacity-0"
|
|
101
|
+
),
|
|
102
|
+
children: [
|
|
103
|
+
b,
|
|
104
|
+
g,
|
|
105
|
+
l
|
|
106
|
+
]
|
|
107
|
+
}
|
|
108
|
+
)
|
|
109
|
+
]
|
|
110
|
+
}
|
|
111
|
+
) });
|
|
112
|
+
}
|
|
103
113
|
);
|
|
104
|
-
|
|
114
|
+
w.displayName = "Button";
|
|
105
115
|
export {
|
|
106
|
-
|
|
107
|
-
|
|
116
|
+
w as Button,
|
|
117
|
+
x as buttonVariants
|
|
108
118
|
};
|
package/components/card.js
CHANGED
|
@@ -6,7 +6,7 @@ const l = d.forwardRef(
|
|
|
6
6
|
({ className: r, isHoverable: a, isPressable: e, children: s, ...n }, i) => {
|
|
7
7
|
const c = o(
|
|
8
8
|
"bg-card text-card-foreground rounded-xl",
|
|
9
|
-
(e || a) && "
|
|
9
|
+
(e || a) && "transition-[box-shadow,transform] duration-150 ease-out motion-reduce:transition-none",
|
|
10
10
|
a && "hover:-translate-y-0.5",
|
|
11
11
|
r
|
|
12
12
|
);
|