@actioneer/ads 0.5.8 → 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.
Files changed (40) hide show
  1. package/components/assistant-ui/composer-harness.js +12 -10
  2. package/components/avatar.d.ts +1 -0
  3. package/components/avatar.js +5 -4
  4. package/components/breadcrumbs.d.ts +3 -1
  5. package/components/breadcrumbs.js +62 -56
  6. package/components/button.js +11 -11
  7. package/components/card.js +19 -18
  8. package/components/chart.d.ts +6 -0
  9. package/components/chart.js +747 -657
  10. package/components/date-range-picker.d.ts +25 -0
  11. package/components/date-range-picker.js +187 -0
  12. package/components/drawer.d.ts +3 -1
  13. package/components/drawer.js +115 -95
  14. package/components/index.d.ts +1 -0
  15. package/components/index.js +499 -497
  16. package/components/modal.d.ts +5 -1
  17. package/components/modal.js +74 -61
  18. package/components/panel.js +31 -28
  19. package/components/pixel-icon.d.ts +4 -0
  20. package/components/pixel-icon.js +210 -163
  21. package/components/segmented.d.ts +1 -0
  22. package/components/segmented.js +31 -28
  23. package/components/select.d.ts +5 -0
  24. package/components/select.js +177 -132
  25. package/components/table.d.ts +7 -0
  26. package/components/table.js +183 -173
  27. package/components/tabs.js +1 -1
  28. package/components/tree.js +86 -58
  29. package/components/viz-charts.js +186 -183
  30. package/demo/components/add-to-artifact.js +131 -107
  31. package/demo/lib/artifact-library.js +37 -29
  32. package/demo/lib/artifact-pin-guard.js +12 -0
  33. package/fonts.css +2 -0
  34. package/lib/icons.d.ts +20 -0
  35. package/lib/icons.js +112 -107
  36. package/llms.txt +23 -3
  37. package/manifest.json +13774 -14
  38. package/package.json +4 -1
  39. package/styles.css +76 -60
  40. package/theme.css +70 -57
@@ -93,7 +93,7 @@ const O = $("inline-flex", {
93
93
  }
94
94
  },
95
95
  compoundVariants: [
96
- // Track radius follows control size: compact = 4px, standard = 8px.
96
+ // Track radius follows control size: compact = 4px, standard = 6px.
97
97
  { variant: "primary", size: "sm", className: "rounded-sm" },
98
98
  { variant: "primary", size: "md", className: "rounded-md" },
99
99
  { variant: "primary", size: "lg", className: "rounded-md" },
@@ -1,91 +1,119 @@
1
1
  "use client";
2
- import { jsx as e, jsxs as h, Fragment as y } from "react/jsx-runtime";
2
+ import { jsx as e, jsxs as i, Fragment as T } from "react/jsx-runtime";
3
3
  import * as t from "react";
4
- import { MotionConfig as M, AnimatePresence as _, motion as z } from "motion/react";
5
- import { cn as a } from "../lib/cn.js";
6
- import { ChevronRight as D, FileText as S } from "../lib/icons.js";
7
- import { springDisclosure as V } from "../lib/motion.js";
8
- const W = t.forwardRef(({ className: s, ...c }, d) => /* @__PURE__ */ e(
4
+ import { MotionConfig as _, AnimatePresence as $, motion as D } from "motion/react";
5
+ import { cn as d } from "../lib/cn.js";
6
+ import { ChevronRight as V, FileText as W } from "../lib/icons.js";
7
+ import { springDisclosure as q } from "../lib/motion.js";
8
+ const B = t.forwardRef(({ className: f, ...o }, m) => /* @__PURE__ */ e(
9
9
  "div",
10
10
  {
11
- ref: d,
11
+ ref: m,
12
12
  role: "tree",
13
- className: a("flex flex-col gap-0.5 text-xs", s),
14
- ...c
13
+ className: d("flex flex-col gap-0.5 text-xs", f),
14
+ ...o
15
15
  }
16
16
  ));
17
- W.displayName = "Tree";
18
- const q = t.forwardRef(
17
+ B.displayName = "Tree";
18
+ const E = t.forwardRef(
19
19
  ({
20
- className: s,
21
- label: c,
22
- icon: d,
23
- count: p,
24
- endContent: N,
25
- defaultExpanded: w = !1,
26
- expanded: x,
27
- onExpandedChange: f,
28
- href: g,
29
- isActive: o,
30
- onSelect: C,
31
- children: n,
32
- ...I
33
- }, k) => {
34
- const r = t.Children.count(n) > 0, v = x !== void 0, [T, R] = t.useState(w), i = v ? x : T, j = (l) => {
35
- v || R(l), f == null || f(l);
36
- }, m = a(
37
- "flex h-9 w-full items-center gap-2 rounded-md px-2 text-left",
20
+ className: f,
21
+ label: o,
22
+ icon: m,
23
+ count: g,
24
+ endContent: x,
25
+ defaultExpanded: R = !1,
26
+ expanded: v,
27
+ onExpandedChange: u,
28
+ href: y,
29
+ isActive: s,
30
+ onSelect: b,
31
+ children: l,
32
+ ...j
33
+ }, z) => {
34
+ const n = t.Children.count(l) > 0, N = v !== void 0, [F, M] = t.useState(R), r = N ? v : F, w = (c) => {
35
+ N || M(c), u == null || u(c);
36
+ }, a = d(
37
+ "flex h-9 w-full items-center gap-1.5 rounded-md px-2 text-left",
38
38
  "outline-none transition-colors focus-visible:ring-3 focus-visible:ring-ring",
39
39
  "[&_svg]:size-4 [&_svg]:shrink-0",
40
- o ? "bg-fill font-normal text-foreground" : "text-muted-foreground hover:bg-fill/60 hover:text-foreground"
41
- ), u = d ?? (r ? null : /* @__PURE__ */ e(S, { className: "text-tertiary" })), F = o && t.isValidElement(u) ? t.cloneElement(
42
- u,
40
+ s ? "bg-fill font-normal text-foreground" : "text-muted-foreground hover:bg-fill/60 hover:text-foreground"
41
+ ), h = m ?? (n ? null : /* @__PURE__ */ e(W, { className: "text-tertiary" })), C = s && t.isValidElement(h) ? t.cloneElement(
42
+ h,
43
43
  { weight: "fill" }
44
- ) : u, b = /* @__PURE__ */ h(y, { children: [
45
- F,
46
- /* @__PURE__ */ e("span", { className: "min-w-0 flex-1 truncate", children: c }),
47
- N,
48
- r && /* @__PURE__ */ h(y, { children: [
49
- (p ?? t.Children.count(n)) > 0 && /* @__PURE__ */ e("span", { className: "shrink-0 tabular-nums text-xs text-tertiary", children: p ?? t.Children.count(n) }),
44
+ ) : h, k = /* @__PURE__ */ e(
45
+ V,
46
+ {
47
+ className: d(
48
+ "text-muted-foreground transition-transform duration-150 motion-reduce:transition-none",
49
+ r && "rotate-90"
50
+ ),
51
+ strokeWidth: 2
52
+ }
53
+ ), I = (g ?? t.Children.count(l)) > 0 && /* @__PURE__ */ e("span", { className: "shrink-0 tabular-nums text-xs text-tertiary", children: g ?? t.Children.count(l) }), p = /* @__PURE__ */ i(T, { children: [
54
+ C,
55
+ /* @__PURE__ */ e("span", { className: "min-w-0 flex-1 truncate", children: o }),
56
+ x,
57
+ n && /* @__PURE__ */ i(T, { children: [
58
+ I,
59
+ k
60
+ ] })
61
+ ] });
62
+ return /* @__PURE__ */ i("div", { ref: z, role: "treeitem", "aria-expanded": n ? r : void 0, "aria-selected": s, className: f, ...j, children: [
63
+ n && b ? /* @__PURE__ */ i("div", { className: a, children: [
64
+ /* @__PURE__ */ i(
65
+ "button",
66
+ {
67
+ type: "button",
68
+ className: "flex min-w-0 flex-1 items-center gap-1.5 rounded-sm outline-none focus-visible:ring-3 focus-visible:ring-ring",
69
+ onClick: b,
70
+ children: [
71
+ C,
72
+ /* @__PURE__ */ e("span", { className: "min-w-0 flex-1 truncate", children: o })
73
+ ]
74
+ }
75
+ ),
76
+ x,
77
+ I,
50
78
  /* @__PURE__ */ e(
51
- D,
79
+ "button",
52
80
  {
53
- className: a(
54
- "text-muted-foreground transition-transform duration-150 motion-reduce:transition-none",
55
- i && "rotate-90"
56
- ),
57
- strokeWidth: 2
81
+ type: "button",
82
+ "aria-label": `${r ? "Collapse" : "Expand"} ${typeof o == "string" ? o : "tree item"}`,
83
+ "aria-expanded": r,
84
+ className: "inline-flex size-7 shrink-0 items-center justify-center rounded-sm outline-none hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring",
85
+ onClick: () => w(!r),
86
+ children: k
58
87
  }
59
88
  )
60
- ] })
61
- ] });
62
- return /* @__PURE__ */ h("div", { ref: k, role: "treeitem", "aria-expanded": r ? i : void 0, "aria-selected": o, className: s, ...I, children: [
63
- r ? /* @__PURE__ */ e("button", { type: "button", className: m, onClick: () => j(!i), children: b }) : g ? /* @__PURE__ */ e("a", { href: g, className: m, "aria-current": o ? "page" : void 0, children: b }) : /* @__PURE__ */ e("button", { type: "button", className: m, onClick: C, children: b }),
64
- /* @__PURE__ */ e(M, { reducedMotion: "user", children: /* @__PURE__ */ e(_, { initial: !1, children: r && i && /* @__PURE__ */ e(
65
- z.div,
89
+ ] }) : n ? /* @__PURE__ */ e("button", { type: "button", className: a, onClick: () => w(!r), children: p }) : y ? /* @__PURE__ */ e("a", { href: y, className: a, "aria-current": s ? "page" : void 0, children: p }) : /* @__PURE__ */ e("button", { type: "button", className: a, onClick: b, children: p }),
90
+ /* @__PURE__ */ e(_, { reducedMotion: "user", children: /* @__PURE__ */ e($, { initial: !1, children: n && r && /* @__PURE__ */ e(
91
+ D.div,
66
92
  {
67
93
  role: "group",
68
94
  initial: { height: 0, opacity: 0, y: -4 },
69
95
  animate: { height: "auto", opacity: 1, y: 0 },
70
96
  exit: { height: 0, opacity: 0, y: -4 },
71
- transition: V,
97
+ transition: q,
72
98
  className: "ml-4 flex flex-col gap-0.5 overflow-hidden",
73
- children: t.Children.map(n, (l) => /* @__PURE__ */ e(
99
+ children: t.Children.map(l, (c) => /* @__PURE__ */ e(
74
100
  "div",
75
101
  {
76
- className: a(
102
+ className: d(
77
103
  "relative ps-5",
78
104
  // Continuous vertical rail — a straight line (no radius) so it
79
105
  // never breaks between children. The LAST child needs no rail
80
106
  // at all: the elbow's own left border draws its final vertical
81
107
  // segment, so a rail there would poke through the curve.
82
- "before:absolute before:left-0 before:top-0 before:bottom-0 before:border-l before:border-border before:content-['']",
108
+ // Extend through the group's 2px row gap so the shared
109
+ // spine remains visually continuous between elbows.
110
+ "before:absolute before:left-0 before:top-0 before:-bottom-0.5 before:border-l before:border-border before:content-['']",
83
111
  "last:before:hidden",
84
112
  // Rounded elbow branching off the rail to this child. Its own
85
113
  // left border overlaps the rail, so the curve reads cleanly.
86
114
  "after:absolute after:left-0 after:top-0 after:h-4 after:w-4 after:rounded-bl-[9px] after:border-b after:border-l after:border-border after:content-['']"
87
115
  ),
88
- children: l
116
+ children: c
89
117
  }
90
118
  ))
91
119
  }
@@ -93,8 +121,8 @@ const q = t.forwardRef(
93
121
  ] });
94
122
  }
95
123
  );
96
- q.displayName = "TreeItem";
124
+ E.displayName = "TreeItem";
97
125
  export {
98
- W as Tree,
99
- q as TreeItem
126
+ B as Tree,
127
+ E as TreeItem
100
128
  };