@actioneer/ads 0.5.8 → 0.5.9
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/avatar.d.ts +1 -0
- package/components/avatar.js +5 -4
- package/components/breadcrumbs.d.ts +2 -0
- package/components/breadcrumbs.js +50 -48
- package/components/chart.d.ts +6 -0
- package/components/chart.js +737 -668
- package/components/drawer.d.ts +3 -1
- package/components/drawer.js +74 -72
- package/components/modal.d.ts +5 -1
- package/components/modal.js +74 -61
- package/components/pixel-icon.d.ts +4 -0
- package/components/pixel-icon.js +210 -163
- package/components/segmented.d.ts +1 -0
- package/components/segmented.js +31 -28
- package/components/select.d.ts +5 -0
- package/components/select.js +177 -132
- package/components/table.d.ts +7 -0
- package/components/table.js +183 -173
- package/demo/components/add-to-artifact.js +129 -107
- package/demo/lib/artifact-library.js +37 -29
- package/demo/lib/artifact-pin-guard.js +12 -0
- package/lib/icons.d.ts +20 -0
- package/lib/icons.js +112 -107
- package/llms.txt +1 -1
- package/manifest.json +20 -7
- package/package.json +1 -1
package/components/avatar.d.ts
CHANGED
package/components/avatar.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as n, jsxs as
|
|
2
|
+
import { jsx as n, jsxs as b } from "react/jsx-runtime";
|
|
3
3
|
import * as f from "react";
|
|
4
4
|
import { cn as i } from "../lib/cn.js";
|
|
5
5
|
const g = {
|
|
6
|
+
xs: "size-5 text-[10px]",
|
|
6
7
|
sm: "size-8 text-xs",
|
|
7
8
|
md: "size-10 text-xs",
|
|
8
9
|
lg: "size-12 text-base",
|
|
@@ -62,21 +63,21 @@ N.displayName = "Avatar";
|
|
|
62
63
|
const y = f.forwardRef(
|
|
63
64
|
({ className: r, max: e, size: t = "md", radius: s = "full", children: o, ...a }, c) => {
|
|
64
65
|
const l = f.Children.toArray(o), d = typeof e == "number" ? l.length - e : 0, p = typeof e == "number" ? l.slice(0, e) : l;
|
|
65
|
-
return /* @__PURE__ */
|
|
66
|
+
return /* @__PURE__ */ b(
|
|
66
67
|
"div",
|
|
67
68
|
{
|
|
68
69
|
ref: c,
|
|
69
70
|
className: i("flex items-center", r),
|
|
70
71
|
...a,
|
|
71
72
|
children: [
|
|
72
|
-
p.map((
|
|
73
|
+
p.map((x, u) => /* @__PURE__ */ n(
|
|
73
74
|
"div",
|
|
74
75
|
{
|
|
75
76
|
className: i(
|
|
76
77
|
"ring-2 ring-background rounded-full",
|
|
77
78
|
u > 0 && "-ml-2"
|
|
78
79
|
),
|
|
79
|
-
children:
|
|
80
|
+
children: x
|
|
80
81
|
},
|
|
81
82
|
u
|
|
82
83
|
)),
|
|
@@ -18,6 +18,8 @@ export interface BreadcrumbsProps extends React.HTMLAttributes<HTMLElement> {
|
|
|
18
18
|
* overflow menu) — they ride along when the trail is sticky.
|
|
19
19
|
*/
|
|
20
20
|
actions?: React.ReactNode;
|
|
21
|
+
/** Controls pinned to the true horizontal center of the trail row. */
|
|
22
|
+
center?: React.ReactNode;
|
|
21
23
|
/**
|
|
22
24
|
* Supporting metadata stitched inline right after the trail (schema name,
|
|
23
25
|
* sync status…). Muted, truncates before the trail does.
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as
|
|
2
|
+
import { jsxs as h, jsx as e, Fragment as B } from "react/jsx-runtime";
|
|
3
3
|
import * as t from "react";
|
|
4
|
-
import { ArrowLeft as
|
|
5
|
-
import { cn as
|
|
6
|
-
const
|
|
4
|
+
import { ArrowLeft as y } from "../lib/icons.js";
|
|
5
|
+
import { cn as c } from "../lib/cn.js";
|
|
6
|
+
const w = t.createContext({
|
|
7
7
|
count: 0
|
|
8
|
-
}),
|
|
8
|
+
}), C = t.createContext(0);
|
|
9
9
|
function R(s) {
|
|
10
10
|
let n = (s == null ? void 0 : s.parentElement) ?? null;
|
|
11
11
|
for (; n; ) {
|
|
@@ -15,35 +15,36 @@ function R(s) {
|
|
|
15
15
|
}
|
|
16
16
|
return null;
|
|
17
17
|
}
|
|
18
|
-
const
|
|
18
|
+
const z = t.forwardRef(
|
|
19
19
|
({
|
|
20
20
|
className: s,
|
|
21
21
|
children: n,
|
|
22
22
|
sticky: r,
|
|
23
|
-
onBack:
|
|
24
|
-
backLabel:
|
|
23
|
+
onBack: u,
|
|
24
|
+
backLabel: x = "Back",
|
|
25
25
|
actions: m,
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
26
|
+
center: f,
|
|
27
|
+
meta: b,
|
|
28
|
+
...v
|
|
29
|
+
}, l) => {
|
|
30
|
+
const a = t.Children.toArray(n), i = t.useRef(null), p = t.useCallback(
|
|
30
31
|
(o) => {
|
|
31
|
-
|
|
32
|
+
i.current = o, typeof l == "function" ? l(o) : l && (l.current = o);
|
|
32
33
|
},
|
|
33
|
-
[
|
|
34
|
-
), [
|
|
34
|
+
[l]
|
|
35
|
+
), [N, k] = t.useState(!1);
|
|
35
36
|
return t.useEffect(() => {
|
|
36
37
|
if (!r) return;
|
|
37
|
-
const o = R(
|
|
38
|
-
return
|
|
39
|
-
}, [r]), /* @__PURE__ */
|
|
38
|
+
const o = R(i.current), d = o ?? window, g = () => k((o ? o.scrollTop : window.scrollY) > 2);
|
|
39
|
+
return g(), d.addEventListener("scroll", g, { passive: !0 }), () => d.removeEventListener("scroll", g);
|
|
40
|
+
}, [r]), /* @__PURE__ */ h(
|
|
40
41
|
"nav",
|
|
41
42
|
{
|
|
42
|
-
ref:
|
|
43
|
+
ref: p,
|
|
43
44
|
"aria-label": "Breadcrumb",
|
|
44
|
-
"data-stuck": r ?
|
|
45
|
-
className:
|
|
46
|
-
"flex w-full items-center",
|
|
45
|
+
"data-stuck": r ? N ? "true" : "false" : void 0,
|
|
46
|
+
className: c(
|
|
47
|
+
"relative flex w-full items-center",
|
|
47
48
|
r && "sticky top-0 z-40 bg-background transition-[border-color] duration-150 ease-out motion-reduce:transition-none",
|
|
48
49
|
// Sticky offsets resolve against the scrollport's PADDING box, so in
|
|
49
50
|
// a padded panel the pinned trail sits below a strip the content
|
|
@@ -51,66 +52,67 @@ const y = t.forwardRef(
|
|
|
51
52
|
// background over that gap (a no-op at rest, where the strip is the
|
|
52
53
|
// panel's empty padding).
|
|
53
54
|
r && "before:absolute before:inset-x-0 before:-top-8 before:h-8 before:bg-inherit before:content-['']",
|
|
54
|
-
r && (
|
|
55
|
+
r && (N ? "border-b border-border" : "border-b border-transparent"),
|
|
55
56
|
s
|
|
56
57
|
),
|
|
57
|
-
...
|
|
58
|
+
...v,
|
|
58
59
|
children: [
|
|
59
|
-
|
|
60
|
+
u && /* @__PURE__ */ e(
|
|
60
61
|
"button",
|
|
61
62
|
{
|
|
62
63
|
type: "button",
|
|
63
|
-
onClick:
|
|
64
|
-
"aria-label":
|
|
65
|
-
className:
|
|
64
|
+
onClick: u,
|
|
65
|
+
"aria-label": x,
|
|
66
|
+
className: c(
|
|
66
67
|
"mr-1 inline-flex size-6 shrink-0 items-center justify-center rounded-sm text-muted-foreground",
|
|
67
68
|
"transition-colors hover:bg-fill hover:text-foreground",
|
|
68
69
|
"outline-none focus-visible:ring-3 focus-visible:ring-ring [&_svg]:size-4"
|
|
69
70
|
),
|
|
70
|
-
children: /* @__PURE__ */ e(
|
|
71
|
+
children: /* @__PURE__ */ e(y, { "aria-hidden": !0 })
|
|
71
72
|
}
|
|
72
73
|
),
|
|
73
|
-
/* @__PURE__ */ e("ol", { className: "flex min-w-0 items-center gap-1.5 text-base", children: /* @__PURE__ */ e(
|
|
74
|
-
|
|
74
|
+
/* @__PURE__ */ e("ol", { className: "flex min-w-0 items-center gap-1.5 text-base", children: /* @__PURE__ */ e(w.Provider, { value: { count: a.length }, children: a.map((o, d) => /* @__PURE__ */ e(C.Provider, { value: d, children: o }, d)) }) }),
|
|
75
|
+
b && /* @__PURE__ */ e("div", { className: "ml-4 flex min-w-0 shrink items-center gap-3 text-xs text-muted-foreground", children: b }),
|
|
76
|
+
f && /* @__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: f }),
|
|
75
77
|
m && /* @__PURE__ */ e("div", { className: "ml-auto flex shrink-0 items-center gap-2 pl-4", children: m })
|
|
76
78
|
]
|
|
77
79
|
}
|
|
78
80
|
);
|
|
79
81
|
}
|
|
80
82
|
);
|
|
81
|
-
|
|
82
|
-
const E = t.forwardRef(({ className: s, href: n, isCurrent: r, icon:
|
|
83
|
-
const { count:
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
] }),
|
|
83
|
+
z.displayName = "Breadcrumbs";
|
|
84
|
+
const E = t.forwardRef(({ className: s, href: n, isCurrent: r, icon: u, children: x, ...m }, f) => {
|
|
85
|
+
const { count: b } = t.useContext(w), l = t.useContext(C) === b - 1, a = "inline-flex items-center gap-1.5", i = /* @__PURE__ */ h(B, { children: [
|
|
86
|
+
u && /* @__PURE__ */ e("span", { "aria-hidden": !0, className: "flex shrink-0 items-center [&_svg]:size-4", children: u }),
|
|
87
|
+
x
|
|
88
|
+
] }), p = r ? /* @__PURE__ */ e(
|
|
87
89
|
"span",
|
|
88
90
|
{
|
|
89
91
|
"aria-current": "page",
|
|
90
|
-
className: a
|
|
91
|
-
children:
|
|
92
|
+
className: c(a, "font-normal text-primary"),
|
|
93
|
+
children: i
|
|
92
94
|
}
|
|
93
95
|
) : n ? /* @__PURE__ */ e(
|
|
94
96
|
"a",
|
|
95
97
|
{
|
|
96
98
|
href: n,
|
|
97
|
-
className:
|
|
98
|
-
|
|
99
|
+
className: c(
|
|
100
|
+
a,
|
|
99
101
|
"font-normal text-muted-foreground transition-colors hover:text-foreground",
|
|
100
102
|
"outline-none focus-visible:ring-3 focus-visible:ring-ring rounded-sm"
|
|
101
103
|
),
|
|
102
|
-
children:
|
|
104
|
+
children: i
|
|
103
105
|
}
|
|
104
|
-
) : /* @__PURE__ */ e("span", { className: a
|
|
105
|
-
return /* @__PURE__ */
|
|
106
|
+
) : /* @__PURE__ */ e("span", { className: c(a, "text-muted-foreground"), children: i });
|
|
107
|
+
return /* @__PURE__ */ h(
|
|
106
108
|
"li",
|
|
107
109
|
{
|
|
108
110
|
ref: f,
|
|
109
|
-
className:
|
|
111
|
+
className: c("flex items-center gap-1.5", s),
|
|
110
112
|
...m,
|
|
111
113
|
children: [
|
|
112
|
-
|
|
113
|
-
!
|
|
114
|
+
p,
|
|
115
|
+
!l && /* @__PURE__ */ e("span", { "aria-hidden": !0, className: "shrink-0 select-none text-border-strong", children: "/" })
|
|
114
116
|
]
|
|
115
117
|
}
|
|
116
118
|
);
|
|
@@ -118,5 +120,5 @@ const E = t.forwardRef(({ className: s, href: n, isCurrent: r, icon: c, children
|
|
|
118
120
|
E.displayName = "BreadcrumbItem";
|
|
119
121
|
export {
|
|
120
122
|
E as BreadcrumbItem,
|
|
121
|
-
|
|
123
|
+
z as Breadcrumbs
|
|
122
124
|
};
|
package/components/chart.d.ts
CHANGED
|
@@ -100,6 +100,8 @@ export interface LineChartProps extends BaseChartProps {
|
|
|
100
100
|
curve?: "linear" | "natural" | "step";
|
|
101
101
|
/** Series keys that render dashed — projections, not observations. */
|
|
102
102
|
forecastKeys?: string[];
|
|
103
|
+
/** When set, only these series keys animate on mount/update. */
|
|
104
|
+
animatedSeriesKeys?: string[];
|
|
103
105
|
/**
|
|
104
106
|
* Print each observation's value above its dot. On by default for a SINGLE
|
|
105
107
|
* series (the reader shouldn't have to hover to read a number that fits);
|
|
@@ -112,6 +114,8 @@ export interface AreaChartProps extends BaseChartProps {
|
|
|
112
114
|
stacked?: boolean;
|
|
113
115
|
/** Series keys that render dashed — projections, not observations. */
|
|
114
116
|
forecastKeys?: string[];
|
|
117
|
+
/** When set, only these series keys animate on mount/update. */
|
|
118
|
+
animatedSeriesKeys?: string[];
|
|
115
119
|
/** Print each observation's value above its dot — see {@link LineChartProps.showValues}. */
|
|
116
120
|
showValues?: boolean;
|
|
117
121
|
}
|
|
@@ -130,6 +134,8 @@ export interface ComboChartProps extends BaseChartProps {
|
|
|
130
134
|
stacked?: boolean;
|
|
131
135
|
/** Line keys that render dashed — projections, not observations. */
|
|
132
136
|
forecastKeys?: string[];
|
|
137
|
+
/** When set, only these series keys animate on mount/update. */
|
|
138
|
+
animatedSeriesKeys?: string[];
|
|
133
139
|
}
|
|
134
140
|
export type ComposedChartProps = ComboChartProps;
|
|
135
141
|
export interface PieChartProps {
|