@actioneer/ads 0.5.9 → 0.6.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/components/assistant-ui/composer-harness.js +12 -10
- package/components/breadcrumbs.d.ts +1 -1
- package/components/breadcrumbs.js +42 -38
- package/components/button.js +11 -11
- package/components/card.js +19 -18
- package/components/chart.js +406 -385
- package/components/date-range-picker.d.ts +25 -0
- package/components/date-range-picker.js +187 -0
- package/components/drawer.js +110 -92
- package/components/index.d.ts +1 -0
- package/components/index.js +499 -497
- package/components/panel.js +31 -28
- package/components/tabs.js +1 -1
- package/components/tree.js +86 -58
- package/components/viz-charts.js +186 -183
- package/demo/components/add-to-artifact.js +4 -2
- package/fonts.css +2 -0
- package/llms.txt +22 -2
- package/manifest.json +13755 -8
- package/package.json +4 -1
- package/styles.css +76 -60
- package/theme.css +70 -57
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
var c = Object.defineProperty;
|
|
3
3
|
var l = (r, t, o) => t in r ? c(r, t, { enumerable: !0, configurable: !0, writable: !0, value: o }) : r[t] = o;
|
|
4
|
-
var
|
|
5
|
-
import { jsxs as
|
|
4
|
+
var n = (r, t, o) => l(r, typeof t != "symbol" ? t + "" : t, o);
|
|
5
|
+
import { jsxs as p, jsx as e } from "react/jsx-runtime";
|
|
6
6
|
import { useComposerRuntime as d, useComposer as u } from "@assistant-ui/react";
|
|
7
7
|
import "clsx";
|
|
8
8
|
import "tailwind-merge";
|
|
@@ -35,6 +35,8 @@ import "../radio.js";
|
|
|
35
35
|
import "../switch.js";
|
|
36
36
|
import "../number-field.js";
|
|
37
37
|
import "../select.js";
|
|
38
|
+
import "@internationalized/date";
|
|
39
|
+
import "react-aria-components";
|
|
38
40
|
import "../autocomplete.js";
|
|
39
41
|
import "../slider.js";
|
|
40
42
|
import "../segmented.js";
|
|
@@ -129,7 +131,7 @@ const m = "application/x-actioneer-harness", S = [
|
|
|
129
131
|
instructions: "Write a concise executive brief: lead with the decision or insight, use only decision-relevant evidence, and end with the recommended next action."
|
|
130
132
|
}
|
|
131
133
|
];
|
|
132
|
-
function
|
|
134
|
+
function Di() {
|
|
133
135
|
const r = d(), t = u((i) => i.attachments), o = new Set(
|
|
134
136
|
t.filter((i) => i.contentType === m).map((i) => i.name)
|
|
135
137
|
), s = (i) => {
|
|
@@ -137,8 +139,8 @@ function Ai() {
|
|
|
137
139
|
new File([i.instructions], `${i.label}.harness`, { type: m })
|
|
138
140
|
);
|
|
139
141
|
};
|
|
140
|
-
return /* @__PURE__ */
|
|
141
|
-
/* @__PURE__ */ e(v, { children: /* @__PURE__ */
|
|
142
|
+
return /* @__PURE__ */ p(b, { children: [
|
|
143
|
+
/* @__PURE__ */ e(v, { children: /* @__PURE__ */ p(
|
|
142
144
|
"button",
|
|
143
145
|
{
|
|
144
146
|
type: "button",
|
|
@@ -157,7 +159,7 @@ function Ai() {
|
|
|
157
159
|
]
|
|
158
160
|
}
|
|
159
161
|
) }),
|
|
160
|
-
/* @__PURE__ */
|
|
162
|
+
/* @__PURE__ */ p(y, { side: "top", align: "start", className: "w-56", autoFocusFirstItem: !1, children: [
|
|
161
163
|
/* @__PURE__ */ e(x, { children: "Add a harness" }),
|
|
162
164
|
S.map((i) => /* @__PURE__ */ e(
|
|
163
165
|
w,
|
|
@@ -172,9 +174,9 @@ function Ai() {
|
|
|
172
174
|
] })
|
|
173
175
|
] });
|
|
174
176
|
}
|
|
175
|
-
class
|
|
177
|
+
class Ei {
|
|
176
178
|
constructor() {
|
|
177
|
-
|
|
179
|
+
n(this, "accept", m);
|
|
178
180
|
}
|
|
179
181
|
async add(t) {
|
|
180
182
|
return {
|
|
@@ -205,7 +207,7 @@ ${o}
|
|
|
205
207
|
}
|
|
206
208
|
}
|
|
207
209
|
export {
|
|
208
|
-
|
|
210
|
+
Di as ComposerHarness,
|
|
209
211
|
m as HARNESS_MIME,
|
|
210
|
-
|
|
212
|
+
Ei as HarnessAttachmentAdapter
|
|
211
213
|
};
|
|
@@ -22,7 +22,7 @@ export interface BreadcrumbsProps extends React.HTMLAttributes<HTMLElement> {
|
|
|
22
22
|
center?: React.ReactNode;
|
|
23
23
|
/**
|
|
24
24
|
* Supporting metadata stitched inline right after the trail (schema name,
|
|
25
|
-
* sync status…).
|
|
25
|
+
* sync status…). Kept visible while the current trail item truncates first.
|
|
26
26
|
*/
|
|
27
27
|
meta?: React.ReactNode;
|
|
28
28
|
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as
|
|
2
|
+
import { jsxs as g, jsx as e, Fragment as B } from "react/jsx-runtime";
|
|
3
3
|
import * as t from "react";
|
|
4
4
|
import { ArrowLeft as y } from "../lib/icons.js";
|
|
5
5
|
import { cn as c } from "../lib/cn.js";
|
|
6
6
|
const w = t.createContext({
|
|
7
7
|
count: 0
|
|
8
|
-
}),
|
|
9
|
-
function R(
|
|
10
|
-
let n = (
|
|
8
|
+
}), k = t.createContext(0);
|
|
9
|
+
function R(o) {
|
|
10
|
+
let n = (o == null ? void 0 : o.parentElement) ?? null;
|
|
11
11
|
for (; n; ) {
|
|
12
12
|
const r = getComputedStyle(n).overflowY;
|
|
13
13
|
if (r === "auto" || r === "scroll") return n;
|
|
@@ -17,30 +17,30 @@ function R(s) {
|
|
|
17
17
|
}
|
|
18
18
|
const z = t.forwardRef(
|
|
19
19
|
({
|
|
20
|
-
className:
|
|
20
|
+
className: o,
|
|
21
21
|
children: n,
|
|
22
22
|
sticky: r,
|
|
23
23
|
onBack: u,
|
|
24
|
-
backLabel:
|
|
25
|
-
actions:
|
|
26
|
-
center:
|
|
27
|
-
meta:
|
|
24
|
+
backLabel: d = "Back",
|
|
25
|
+
actions: f,
|
|
26
|
+
center: b,
|
|
27
|
+
meta: x,
|
|
28
28
|
...v
|
|
29
|
-
},
|
|
30
|
-
const
|
|
31
|
-
(
|
|
32
|
-
i.current =
|
|
29
|
+
}, a) => {
|
|
30
|
+
const l = t.Children.toArray(n), i = t.useRef(null), h = t.useCallback(
|
|
31
|
+
(s) => {
|
|
32
|
+
i.current = s, typeof a == "function" ? a(s) : a && (a.current = s);
|
|
33
33
|
},
|
|
34
|
-
[
|
|
35
|
-
), [N,
|
|
34
|
+
[a]
|
|
35
|
+
), [N, C] = t.useState(!1);
|
|
36
36
|
return t.useEffect(() => {
|
|
37
37
|
if (!r) return;
|
|
38
|
-
const
|
|
39
|
-
return
|
|
40
|
-
}, [r]), /* @__PURE__ */
|
|
38
|
+
const s = R(i.current), m = s ?? window, p = () => C((s ? s.scrollTop : window.scrollY) > 2);
|
|
39
|
+
return p(), m.addEventListener("scroll", p, { passive: !0 }), () => m.removeEventListener("scroll", p);
|
|
40
|
+
}, [r]), /* @__PURE__ */ g(
|
|
41
41
|
"nav",
|
|
42
42
|
{
|
|
43
|
-
ref:
|
|
43
|
+
ref: h,
|
|
44
44
|
"aria-label": "Breadcrumb",
|
|
45
45
|
"data-stuck": r ? N ? "true" : "false" : void 0,
|
|
46
46
|
className: c(
|
|
@@ -53,7 +53,7 @@ const z = t.forwardRef(
|
|
|
53
53
|
// panel's empty padding).
|
|
54
54
|
r && "before:absolute before:inset-x-0 before:-top-8 before:h-8 before:bg-inherit before:content-['']",
|
|
55
55
|
r && (N ? "border-b border-border" : "border-b border-transparent"),
|
|
56
|
-
|
|
56
|
+
o
|
|
57
57
|
),
|
|
58
58
|
...v,
|
|
59
59
|
children: [
|
|
@@ -62,7 +62,7 @@ const z = t.forwardRef(
|
|
|
62
62
|
{
|
|
63
63
|
type: "button",
|
|
64
64
|
onClick: u,
|
|
65
|
-
"aria-label":
|
|
65
|
+
"aria-label": d,
|
|
66
66
|
className: c(
|
|
67
67
|
"mr-1 inline-flex size-6 shrink-0 items-center justify-center rounded-sm text-muted-foreground",
|
|
68
68
|
"transition-colors hover:bg-fill hover:text-foreground",
|
|
@@ -71,25 +71,25 @@ const z = t.forwardRef(
|
|
|
71
71
|
children: /* @__PURE__ */ e(y, { "aria-hidden": !0 })
|
|
72
72
|
}
|
|
73
73
|
),
|
|
74
|
-
/* @__PURE__ */ e("ol", { className: "flex min-w-0 items-center gap-1.5 text-base", children: /* @__PURE__ */ e(w.Provider, { value: { count:
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
74
|
+
/* @__PURE__ */ e("ol", { className: "flex min-w-0 shrink items-center gap-1.5 text-base", children: /* @__PURE__ */ e(w.Provider, { value: { count: l.length }, children: l.map((s, m) => /* @__PURE__ */ e(k.Provider, { value: m, children: s }, m)) }) }),
|
|
75
|
+
x && /* @__PURE__ */ e("div", { className: "ml-4 flex shrink-0 items-center gap-3 text-xs text-muted-foreground", children: x }),
|
|
76
|
+
b && /* @__PURE__ */ e("div", { className: "absolute left-1/2 top-1/2 z-50 flex -translate-x-1/2 -translate-y-1/2 items-center", children: b }),
|
|
77
|
+
f && /* @__PURE__ */ e("div", { className: "ml-auto flex shrink-0 items-center gap-2 pl-4", children: f })
|
|
78
78
|
]
|
|
79
79
|
}
|
|
80
80
|
);
|
|
81
81
|
}
|
|
82
82
|
);
|
|
83
83
|
z.displayName = "Breadcrumbs";
|
|
84
|
-
const E = t.forwardRef(({ className:
|
|
85
|
-
const { count:
|
|
84
|
+
const E = t.forwardRef(({ className: o, href: n, isCurrent: r, icon: u, children: d, ...f }, b) => {
|
|
85
|
+
const { count: x } = t.useContext(w), a = t.useContext(k) === x - 1, l = "inline-flex items-center gap-1.5", i = /* @__PURE__ */ g(B, { children: [
|
|
86
86
|
u && /* @__PURE__ */ e("span", { "aria-hidden": !0, className: "flex shrink-0 items-center [&_svg]:size-4", children: u }),
|
|
87
|
-
|
|
88
|
-
] }),
|
|
87
|
+
r ? /* @__PURE__ */ e("span", { className: "min-w-0 truncate", children: d }) : d
|
|
88
|
+
] }), h = r ? /* @__PURE__ */ e(
|
|
89
89
|
"span",
|
|
90
90
|
{
|
|
91
91
|
"aria-current": "page",
|
|
92
|
-
className: c(
|
|
92
|
+
className: c(l, "min-w-0 font-normal text-primary"),
|
|
93
93
|
children: i
|
|
94
94
|
}
|
|
95
95
|
) : n ? /* @__PURE__ */ e(
|
|
@@ -97,22 +97,26 @@ const E = t.forwardRef(({ className: s, href: n, isCurrent: r, icon: u, children
|
|
|
97
97
|
{
|
|
98
98
|
href: n,
|
|
99
99
|
className: c(
|
|
100
|
-
|
|
100
|
+
l,
|
|
101
101
|
"font-normal text-muted-foreground transition-colors hover:text-foreground",
|
|
102
102
|
"outline-none focus-visible:ring-3 focus-visible:ring-ring rounded-sm"
|
|
103
103
|
),
|
|
104
104
|
children: i
|
|
105
105
|
}
|
|
106
|
-
) : /* @__PURE__ */ e("span", { className: c(
|
|
107
|
-
return /* @__PURE__ */
|
|
106
|
+
) : /* @__PURE__ */ e("span", { className: c(l, "text-muted-foreground"), children: i });
|
|
107
|
+
return /* @__PURE__ */ g(
|
|
108
108
|
"li",
|
|
109
109
|
{
|
|
110
|
-
ref:
|
|
111
|
-
className: c(
|
|
112
|
-
|
|
110
|
+
ref: b,
|
|
111
|
+
className: c(
|
|
112
|
+
"flex items-center gap-1.5",
|
|
113
|
+
r ? "min-w-0 shrink" : "shrink-0",
|
|
114
|
+
o
|
|
115
|
+
),
|
|
116
|
+
...f,
|
|
113
117
|
children: [
|
|
114
|
-
|
|
115
|
-
!
|
|
118
|
+
h,
|
|
119
|
+
!a && /* @__PURE__ */ e("span", { "aria-hidden": !0, className: "shrink-0 select-none text-border-strong", children: "/" })
|
|
116
120
|
]
|
|
117
121
|
}
|
|
118
122
|
);
|
package/components/button.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsxs as r, jsx as m } from "react/jsx-runtime";
|
|
3
|
-
import * as
|
|
4
|
-
import { cva as
|
|
3
|
+
import * as v from "react";
|
|
4
|
+
import { cva as b } from "class-variance-authority";
|
|
5
5
|
import { cn as n } from "../lib/cn.js";
|
|
6
6
|
import { Spinner as f } from "./spinner.js";
|
|
7
|
-
const p =
|
|
7
|
+
const p = b(
|
|
8
8
|
[
|
|
9
9
|
"relative inline-flex items-center justify-center gap-2 whitespace-nowrap",
|
|
10
10
|
"font-normal select-none",
|
|
@@ -21,7 +21,7 @@ const p = v(
|
|
|
21
21
|
{
|
|
22
22
|
variants: {
|
|
23
23
|
variant: {
|
|
24
|
-
solid: "bg-
|
|
24
|
+
solid: "bg-action-primary text-action-primary-foreground shadow-[var(--inner-glow-cta)] hover:bg-action-primary-hover",
|
|
25
25
|
secondary: "bg-fill text-fill-foreground shadow-[var(--inner-glow-fill)] hover:bg-muted",
|
|
26
26
|
outline: "border-border bg-transparent text-foreground hover:border-border-strong hover:bg-muted",
|
|
27
27
|
ghost: "bg-transparent text-foreground hover:bg-muted",
|
|
@@ -41,7 +41,7 @@ const p = v(
|
|
|
41
41
|
},
|
|
42
42
|
defaultVariants: { variant: "solid", size: "md" }
|
|
43
43
|
}
|
|
44
|
-
), x =
|
|
44
|
+
), x = v.forwardRef(
|
|
45
45
|
({
|
|
46
46
|
className: o,
|
|
47
47
|
variant: t,
|
|
@@ -51,12 +51,12 @@ const p = v(
|
|
|
51
51
|
endContent: a,
|
|
52
52
|
fullWidth: d,
|
|
53
53
|
disabled: l,
|
|
54
|
-
children:
|
|
55
|
-
...
|
|
56
|
-
},
|
|
54
|
+
children: c,
|
|
55
|
+
...g
|
|
56
|
+
}, u) => /* @__PURE__ */ r(
|
|
57
57
|
"button",
|
|
58
58
|
{
|
|
59
|
-
ref:
|
|
59
|
+
ref: u,
|
|
60
60
|
disabled: l || e,
|
|
61
61
|
"aria-busy": e || void 0,
|
|
62
62
|
className: n(
|
|
@@ -66,7 +66,7 @@ const p = v(
|
|
|
66
66
|
e ? "opacity-100" : "disabled:opacity-50",
|
|
67
67
|
o
|
|
68
68
|
),
|
|
69
|
-
...
|
|
69
|
+
...g,
|
|
70
70
|
children: [
|
|
71
71
|
e && /* @__PURE__ */ m(
|
|
72
72
|
f,
|
|
@@ -86,7 +86,7 @@ const p = v(
|
|
|
86
86
|
),
|
|
87
87
|
children: [
|
|
88
88
|
i,
|
|
89
|
-
|
|
89
|
+
c,
|
|
90
90
|
a
|
|
91
91
|
]
|
|
92
92
|
}
|
package/components/card.js
CHANGED
|
@@ -3,18 +3,19 @@ import { jsx as t } from "react/jsx-runtime";
|
|
|
3
3
|
import * as d from "react";
|
|
4
4
|
import { cn as o } from "../lib/cn.js";
|
|
5
5
|
const l = d.forwardRef(
|
|
6
|
-
({ className: r, isHoverable:
|
|
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
|
-
(
|
|
10
|
-
|
|
9
|
+
(e || a) && "shadow-elevation transition-[box-shadow,transform] duration-150 ease-out motion-reduce:transition-none",
|
|
10
|
+
a && "hover:-translate-y-0.5",
|
|
11
11
|
r
|
|
12
12
|
);
|
|
13
|
-
return
|
|
13
|
+
return e ? /* @__PURE__ */ t(
|
|
14
14
|
"button",
|
|
15
15
|
{
|
|
16
16
|
ref: i,
|
|
17
17
|
type: "button",
|
|
18
|
+
"data-slot": "card",
|
|
18
19
|
className: o(
|
|
19
20
|
c,
|
|
20
21
|
"w-full text-left cursor-pointer",
|
|
@@ -24,50 +25,50 @@ const l = d.forwardRef(
|
|
|
24
25
|
...n,
|
|
25
26
|
children: s
|
|
26
27
|
}
|
|
27
|
-
) : /* @__PURE__ */ t("div", { ref: i, className: c, ...n, children: s });
|
|
28
|
+
) : /* @__PURE__ */ t("div", { ref: i, "data-slot": "card", className: c, ...n, children: s });
|
|
28
29
|
}
|
|
29
30
|
);
|
|
30
31
|
l.displayName = "Card";
|
|
31
|
-
const f = d.forwardRef(({ className: r, ...
|
|
32
|
+
const f = d.forwardRef(({ className: r, ...a }, e) => /* @__PURE__ */ t(
|
|
32
33
|
"div",
|
|
33
34
|
{
|
|
34
|
-
ref:
|
|
35
|
+
ref: e,
|
|
35
36
|
className: o("flex flex-col gap-1 px-5 pt-5", r),
|
|
36
|
-
...
|
|
37
|
+
...a
|
|
37
38
|
}
|
|
38
39
|
));
|
|
39
40
|
f.displayName = "CardHeader";
|
|
40
|
-
const m = d.forwardRef(({ className: r, ...
|
|
41
|
+
const m = d.forwardRef(({ className: r, ...a }, e) => /* @__PURE__ */ t(
|
|
41
42
|
"h3",
|
|
42
43
|
{
|
|
43
|
-
ref:
|
|
44
|
+
ref: e,
|
|
44
45
|
className: o("text-base font-medium leading-none", r),
|
|
45
|
-
...
|
|
46
|
+
...a
|
|
46
47
|
}
|
|
47
48
|
));
|
|
48
49
|
m.displayName = "CardTitle";
|
|
49
|
-
const p = d.forwardRef(({ className: r, ...
|
|
50
|
+
const p = d.forwardRef(({ className: r, ...a }, e) => /* @__PURE__ */ t(
|
|
50
51
|
"p",
|
|
51
52
|
{
|
|
52
|
-
ref:
|
|
53
|
+
ref: e,
|
|
53
54
|
className: o("text-xs text-muted-foreground", r),
|
|
54
|
-
...
|
|
55
|
+
...a
|
|
55
56
|
}
|
|
56
57
|
));
|
|
57
58
|
p.displayName = "CardDescription";
|
|
58
|
-
const u = d.forwardRef(({ className: r, ...
|
|
59
|
+
const u = d.forwardRef(({ className: r, ...a }, e) => /* @__PURE__ */ t("div", { ref: e, className: o("px-5 py-4", r), ...a }));
|
|
59
60
|
u.displayName = "CardBody";
|
|
60
61
|
const x = d.forwardRef(
|
|
61
|
-
({ className: r, withBorder:
|
|
62
|
+
({ className: r, withBorder: a, ...e }, s) => /* @__PURE__ */ t(
|
|
62
63
|
"div",
|
|
63
64
|
{
|
|
64
65
|
ref: s,
|
|
65
66
|
className: o(
|
|
66
67
|
"flex items-center px-5 pb-5 pt-4",
|
|
67
|
-
|
|
68
|
+
a && "border-t border-border",
|
|
68
69
|
r
|
|
69
70
|
),
|
|
70
|
-
...
|
|
71
|
+
...e
|
|
71
72
|
}
|
|
72
73
|
)
|
|
73
74
|
);
|