@actioneer/ads 0.2.4 → 0.3.1

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 (62) hide show
  1. package/components/ai-elements/chain-of-thought.d.ts +88 -6
  2. package/components/ai-elements/chain-of-thought.js +370 -107
  3. package/components/ai-elements/chart.d.ts +30 -0
  4. package/components/ai-elements/chart.js +303 -0
  5. package/components/ai-elements/index.d.ts +2 -0
  6. package/components/ai-elements/message.d.ts +12 -2
  7. package/components/ai-elements/message.js +133 -100
  8. package/components/ai-elements/research-activity.d.ts +62 -0
  9. package/components/ai-elements/research-activity.js +278 -0
  10. package/components/ai-elements/task.d.ts +7 -3
  11. package/components/ai-elements/task.js +84 -52
  12. package/components/ai-elements/tool.js +39 -35
  13. package/components/ai-elements/voice.d.ts +7 -1
  14. package/components/ai-elements/voice.js +234 -180
  15. package/components/alert.js +28 -16
  16. package/components/answer.d.ts +16 -0
  17. package/components/answer.js +273 -249
  18. package/components/assistant-ui/attachment.js +5 -1
  19. package/components/assistant-ui/composer-deep-research.js +44 -29
  20. package/components/assistant-ui/composer-harness.js +45 -27
  21. package/components/assistant-ui/composer.js +16 -16
  22. package/components/assistant-ui/index.d.ts +0 -1
  23. package/components/assistant-ui/message.d.ts +7 -0
  24. package/components/assistant-ui/message.js +36 -36
  25. package/components/assistant-ui/thread.js +1 -1
  26. package/components/brand-texture.d.ts +37 -0
  27. package/components/brand-texture.js +54 -0
  28. package/components/code-block.d.ts +42 -0
  29. package/components/code-block.js +235 -0
  30. package/components/drawer.d.ts +1 -1
  31. package/components/file-dropzone.d.ts +32 -0
  32. package/components/file-dropzone.js +134 -0
  33. package/components/index.d.ts +10 -0
  34. package/components/index.js +482 -433
  35. package/components/infinite-canvas.d.ts +50 -0
  36. package/components/infinite-canvas.js +215 -0
  37. package/components/page-header.d.ts +22 -0
  38. package/components/page-header.js +52 -0
  39. package/components/resizable-panel.d.ts +29 -0
  40. package/components/resizable-panel.js +102 -0
  41. package/components/reveal.d.ts +36 -0
  42. package/components/reveal.js +35 -0
  43. package/components/scroll-area.d.ts +19 -0
  44. package/components/scroll-area.js +57 -0
  45. package/components/setting-row.d.ts +35 -0
  46. package/components/setting-row.js +86 -0
  47. package/components/sidebar.js +131 -131
  48. package/components/stepper.d.ts +40 -0
  49. package/components/stepper.js +102 -0
  50. package/components/table.js +16 -15
  51. package/components/tabs.js +1 -1
  52. package/lib/icons.d.ts +12 -0
  53. package/lib/icons.js +98 -95
  54. package/lib/motion.d.ts +7 -3
  55. package/lib/motion.js +29 -27
  56. package/llms.txt +123 -28
  57. package/manifest.json +883 -68
  58. package/package.json +2 -2
  59. package/styles.css +179 -30
  60. package/theme.css +29 -17
  61. package/components/assistant-ui/smart-message-text.d.ts +0 -15
  62. package/components/assistant-ui/smart-message-text.js +0 -29
@@ -0,0 +1,50 @@
1
+ import { Edge, Node, NodeTypes, EdgeTypes, OnEdgesChange, OnNodesChange, ReactFlowInstance } from '@xyflow/react';
2
+ import * as React from "react";
3
+ export interface InfiniteCanvasProps<NodeType extends Node = Node, EdgeType extends Edge = Edge> extends Omit<React.HTMLAttributes<HTMLDivElement>, "children"> {
4
+ /** Graph nodes. */
5
+ nodes: NodeType[];
6
+ /** Graph edges. */
7
+ edges: EdgeType[];
8
+ /** Custom node renderers, keyed by `node.type`. */
9
+ nodeTypes?: NodeTypes;
10
+ /** Custom edge renderers, keyed by `edge.type`. */
11
+ edgeTypes?: EdgeTypes;
12
+ onNodesChange?: OnNodesChange<NodeType>;
13
+ onEdgesChange?: OnEdgesChange<EdgeType>;
14
+ onNodeClick?: (event: React.MouseEvent, node: NodeType) => void;
15
+ onPaneClick?: (event: React.MouseEvent) => void;
16
+ onInit?: (instance: ReactFlowInstance<NodeType, EdgeType>) => void;
17
+ /** Read-only canvases still pan/zoom; nodes stop moving and connecting. */
18
+ readOnly?: boolean;
19
+ minZoom?: number;
20
+ maxZoom?: number;
21
+ /** `fitView` padding, as a fraction of the viewport. */
22
+ fitViewPadding?: number;
23
+ /** Controlled snap-to-grid state; omit to let the toggle own it. */
24
+ snapToGrid?: boolean;
25
+ onSnapToGridChange?: (snap: boolean) => void;
26
+ snapGrid?: [number, number];
27
+ /** Show the zoom / fit-to-view cluster. */
28
+ showControls?: boolean;
29
+ /** Show the snap-to-grid toggle inside the cluster. */
30
+ showSnapToGrid?: boolean;
31
+ /** Toolbar slot pinned to the canvas's top-left corner. */
32
+ toolbarStart?: React.ReactNode;
33
+ /** Toolbar slot pinned to the canvas's top-right corner. */
34
+ toolbarEnd?: React.ReactNode;
35
+ }
36
+ /**
37
+ * InfiniteCanvas — a tokenized pan/zoom canvas for node-graph and workflow UIs,
38
+ * built on React Flow (`@xyflow/react`). It owns the reusable canvas chrome:
39
+ * the dotted grid, ADS-inked edges and arrow markers, the zoom / fit-to-view
40
+ * cluster, the optional snap-to-grid toggle, and the two toolbar slots. Node
41
+ * and edge renderers stay with the consumer via `nodeTypes` / `edgeTypes`,
42
+ * composed from the React Flow primitives re-exported below.
43
+ */
44
+ export declare const InfiniteCanvas: (<NodeType extends Node = Node, EdgeType extends Edge = Edge>(props: InfiniteCanvasProps<NodeType, EdgeType> & {
45
+ ref?: React.Ref<HTMLDivElement>;
46
+ }) => React.ReactElement) & {
47
+ displayName?: string;
48
+ };
49
+ export { BaseEdge, EdgeLabelRenderer, Handle, MarkerType, Position, ReactFlowProvider, addEdge, getBezierPath, getSmoothStepPath, getStraightPath, useEdgesState, useNodesState, useReactFlow, } from '@xyflow/react';
50
+ export type { Connection, Edge, EdgeProps, EdgeTypes, Node, NodeProps, NodeTypes, OnEdgesChange, OnNodesChange, ReactFlowInstance, Viewport, } from '@xyflow/react';
@@ -0,0 +1,215 @@
1
+ "use client";
2
+ import { jsx as o, jsxs as b } from "react/jsx-runtime";
3
+ import * as n from "react";
4
+ import { MarkerType as U, ReactFlow as Z, Background as j, BackgroundVariant as H, Panel as h, useReactFlow as K, useStore as V } from "@xyflow/react";
5
+ import { BaseEdge as ko, EdgeLabelRenderer as xo, Handle as Eo, MarkerType as yo, Position as Do, ReactFlowProvider as _o, addEdge as wo, getBezierPath as Io, getSmoothStepPath as Ro, getStraightPath as So, useEdgesState as Ao, useNodesState as Co, useReactFlow as No } from "@xyflow/react";
6
+ import "@xyflow/react/dist/style.css";
7
+ import { cn as W } from "../lib/cn.js";
8
+ import { Minus as q, Plus as J, Maximize as Q, Magnet as X } from "../lib/icons.js";
9
+ import { Button as a } from "./button.js";
10
+ const k = 16, Y = 1.2, $ = [k, k], oo = 1.4, w = 18, eo = 6, to = [8, 4], ro = 11, I = 150, ao = 200, no = 0.28, R = "var(--color-ink-300)";
11
+ function v(e) {
12
+ return typeof window > "u" || !window.matchMedia ? e : window.matchMedia("(prefers-reduced-motion: reduce)").matches ? 0 : e;
13
+ }
14
+ const lo = {
15
+ markerEnd: {
16
+ type: U.ArrowClosed,
17
+ width: w,
18
+ height: w,
19
+ color: R
20
+ },
21
+ style: { stroke: R, strokeWidth: oo },
22
+ labelStyle: { fill: "var(--color-foreground)", fontSize: ro },
23
+ labelBgStyle: { fill: "var(--color-background)" },
24
+ labelBgPadding: to,
25
+ labelBgBorderRadius: eo
26
+ }, io = [
27
+ "relative size-full overflow-hidden bg-background",
28
+ "[--xy-background-color-default:var(--color-background)]",
29
+ "[--xy-edge-stroke-default:var(--color-ink-300)]",
30
+ "[--xy-edge-stroke-selected-default:var(--color-foreground)]",
31
+ "[--xy-edge-label-background-color-default:var(--color-background)]",
32
+ "[--xy-edge-label-color-default:var(--color-foreground)]",
33
+ "[--xy-connectionline-stroke-default:var(--color-ink-300)]",
34
+ "[--xy-handle-background-color-default:var(--color-background)]",
35
+ "[--xy-handle-border-color-default:var(--color-border-strong)]",
36
+ "[--xy-selection-background-color-default:var(--color-muted)]",
37
+ "[--xy-node-color-default:var(--color-foreground)]",
38
+ "[--xy-node-background-color-default:var(--color-card)]",
39
+ "[--xy-node-border-default:var(--color-border)]"
40
+ ].join(" ");
41
+ function S({
42
+ fitViewPadding: e,
43
+ showSnapToGrid: l,
44
+ snapToGrid: t,
45
+ onSnapToGridChange: i
46
+ }) {
47
+ const { zoomIn: s, zoomOut: c, fitView: d } = K(), u = V((f) => f.transform[2]);
48
+ return /* @__PURE__ */ b(
49
+ h,
50
+ {
51
+ position: "bottom-right",
52
+ className: "m-3 flex items-center gap-0.5 rounded-lg bg-elevated p-1 shadow-elevation",
53
+ children: [
54
+ /* @__PURE__ */ o(
55
+ a,
56
+ {
57
+ type: "button",
58
+ size: "icon-xs",
59
+ variant: "ghost",
60
+ "aria-label": "Zoom out",
61
+ onClick: () => void c({ duration: v(I) }),
62
+ children: /* @__PURE__ */ o(q, {})
63
+ }
64
+ ),
65
+ /* @__PURE__ */ b(
66
+ "span",
67
+ {
68
+ className: "min-w-12 text-center text-xs tabular-nums text-muted-foreground",
69
+ "aria-live": "polite",
70
+ children: [
71
+ Math.round(u * 100),
72
+ "%"
73
+ ]
74
+ }
75
+ ),
76
+ /* @__PURE__ */ o(
77
+ a,
78
+ {
79
+ type: "button",
80
+ size: "icon-xs",
81
+ variant: "ghost",
82
+ "aria-label": "Zoom in",
83
+ onClick: () => void s({ duration: v(I) }),
84
+ children: /* @__PURE__ */ o(J, {})
85
+ }
86
+ ),
87
+ /* @__PURE__ */ o(
88
+ a,
89
+ {
90
+ type: "button",
91
+ size: "icon-xs",
92
+ variant: "ghost",
93
+ "aria-label": "Fit to view",
94
+ onClick: () => void d({
95
+ padding: e,
96
+ duration: v(ao)
97
+ }),
98
+ children: /* @__PURE__ */ o(Q, {})
99
+ }
100
+ ),
101
+ l && /* @__PURE__ */ o(
102
+ a,
103
+ {
104
+ type: "button",
105
+ size: "icon-xs",
106
+ variant: t ? "secondary" : "ghost",
107
+ "aria-label": "Snap to grid",
108
+ "aria-pressed": t,
109
+ onClick: () => i(!t),
110
+ children: /* @__PURE__ */ o(X, {})
111
+ }
112
+ )
113
+ ]
114
+ }
115
+ );
116
+ }
117
+ S.displayName = "CanvasControls";
118
+ function so({
119
+ className: e,
120
+ nodes: l,
121
+ edges: t,
122
+ nodeTypes: i,
123
+ edgeTypes: s,
124
+ onNodesChange: c,
125
+ onEdgesChange: d,
126
+ onNodeClick: u,
127
+ onPaneClick: f,
128
+ onInit: A,
129
+ readOnly: g = !1,
130
+ minZoom: C = 0.25,
131
+ maxZoom: N = 1.6,
132
+ fitViewPadding: m = no,
133
+ snapToGrid: x,
134
+ onSnapToGridChange: r,
135
+ snapGrid: z = $,
136
+ showControls: B = !0,
137
+ showSnapToGrid: M = !1,
138
+ toolbarStart: E,
139
+ toolbarEnd: y,
140
+ ...L
141
+ }, O) {
142
+ const [P, F] = n.useState(!1), p = x !== void 0, D = p ? x : P, G = n.useCallback(
143
+ (_) => {
144
+ p || F(_), r == null || r(_);
145
+ },
146
+ [p, r]
147
+ ), T = n.useMemo(
148
+ () => ({ padding: m }),
149
+ [m]
150
+ );
151
+ return /* @__PURE__ */ o("div", { ref: O, className: W(io, e), ...L, children: /* @__PURE__ */ b(
152
+ Z,
153
+ {
154
+ nodes: l,
155
+ edges: t,
156
+ nodeTypes: i,
157
+ edgeTypes: s,
158
+ onNodesChange: c,
159
+ onEdgesChange: d,
160
+ onNodeClick: u,
161
+ onPaneClick: f,
162
+ onInit: A,
163
+ fitView: !0,
164
+ fitViewOptions: T,
165
+ nodesDraggable: !g,
166
+ nodesConnectable: !g,
167
+ snapToGrid: D,
168
+ snapGrid: z,
169
+ minZoom: C,
170
+ maxZoom: N,
171
+ proOptions: { hideAttribution: !0 },
172
+ defaultEdgeOptions: lo,
173
+ children: [
174
+ /* @__PURE__ */ o(
175
+ j,
176
+ {
177
+ variant: H.Dots,
178
+ gap: k,
179
+ size: Y,
180
+ color: "var(--color-border-strong)"
181
+ }
182
+ ),
183
+ E && /* @__PURE__ */ o(h, { position: "top-left", className: "m-3 flex items-center gap-2", children: E }),
184
+ y && /* @__PURE__ */ o(h, { position: "top-right", className: "m-3 flex items-center gap-2", children: y }),
185
+ B && /* @__PURE__ */ o(
186
+ S,
187
+ {
188
+ fitViewPadding: m,
189
+ showSnapToGrid: M && !g,
190
+ snapToGrid: D,
191
+ onSnapToGridChange: G
192
+ }
193
+ )
194
+ ]
195
+ }
196
+ ) });
197
+ }
198
+ const co = n.forwardRef(so);
199
+ co.displayName = "InfiniteCanvas";
200
+ export {
201
+ ko as BaseEdge,
202
+ xo as EdgeLabelRenderer,
203
+ Eo as Handle,
204
+ co as InfiniteCanvas,
205
+ yo as MarkerType,
206
+ Do as Position,
207
+ _o as ReactFlowProvider,
208
+ wo as addEdge,
209
+ Io as getBezierPath,
210
+ Ro as getSmoothStepPath,
211
+ So as getStraightPath,
212
+ Ao as useEdgesState,
213
+ Co as useNodesState,
214
+ No as useReactFlow
215
+ };
@@ -0,0 +1,22 @@
1
+ import * as React from "react";
2
+ export interface PageHeaderProps extends Omit<React.HTMLAttributes<HTMLElement>, "title"> {
3
+ /** One page-level title. */
4
+ title: React.ReactNode;
5
+ /** Optional single supporting line beneath the title. */
6
+ description?: React.ReactNode;
7
+ /**
8
+ * Enables the canonical leading back affordance. Back navigation is always
9
+ * rendered immediately before the title; it never belongs in trailing actions.
10
+ */
11
+ onBack?: () => void;
12
+ /** Accessible label for the icon-only back control. @default "Back" */
13
+ backLabel?: string;
14
+ /** Forward/page actions rendered at the trailing edge. Never pass Back here. */
15
+ actions?: React.ReactNode;
16
+ }
17
+ /**
18
+ * Canonical page title row. When a page has parent navigation, supply onBack:
19
+ * the component anchors an icon-only arrow immediately before the title and
20
+ * keeps trailing space exclusively for forward/page actions.
21
+ */
22
+ export declare const PageHeader: React.ForwardRefExoticComponent<PageHeaderProps & React.RefAttributes<HTMLElement>>;
@@ -0,0 +1,52 @@
1
+ "use client";
2
+ import { jsxs as t, jsx as e } from "react/jsx-runtime";
3
+ import * as c from "react";
4
+ import { ArrowLeft as d } from "../lib/icons.js";
5
+ import { cn as f } from "../lib/cn.js";
6
+ import { Button as h } from "./button.js";
7
+ const x = c.forwardRef(
8
+ ({
9
+ className: s,
10
+ title: m,
11
+ description: r,
12
+ onBack: a,
13
+ backLabel: l = "Back",
14
+ actions: i,
15
+ ...n
16
+ }, o) => /* @__PURE__ */ t(
17
+ "header",
18
+ {
19
+ ref: o,
20
+ className: f(
21
+ "flex min-w-0 items-start justify-between gap-4",
22
+ s
23
+ ),
24
+ ...n,
25
+ children: [
26
+ /* @__PURE__ */ t("div", { className: "flex min-w-0 items-start gap-2", children: [
27
+ a && /* @__PURE__ */ e(
28
+ h,
29
+ {
30
+ type: "button",
31
+ size: "icon-sm",
32
+ variant: "ghost",
33
+ "aria-label": l,
34
+ className: "shrink-0",
35
+ onClick: a,
36
+ children: /* @__PURE__ */ e(d, { "aria-hidden": !0 })
37
+ }
38
+ ),
39
+ /* @__PURE__ */ t("div", { className: "min-w-0", children: [
40
+ /* @__PURE__ */ e("h1", { className: "flex min-h-8 items-center text-xl font-bold tracking-tight text-foreground", children: m }),
41
+ r && /* @__PURE__ */ e("p", { className: "mt-1 max-w-2xl text-xs text-muted-foreground", children: r })
42
+ ] })
43
+ ] }),
44
+ i && /* @__PURE__ */ e("div", { className: "flex shrink-0 items-center gap-2", children: i })
45
+ ]
46
+ }
47
+ )
48
+ );
49
+ x.displayName = "PageHeader";
50
+ export {
51
+ x as PageHeader
52
+ };
@@ -0,0 +1,29 @@
1
+ import * as React from "react";
2
+ /**
3
+ * ResizablePanel — a panel the reader can widen or narrow by dragging its
4
+ * edge. Both the chat side-panel and the sidebar edge-toggle wanted this and
5
+ * hand-rolled it; ADS had no splitter primitive of any kind.
6
+ *
7
+ * The handle is a hit area, not a visual: it stays invisible until hover or
8
+ * focus, then paints a hairline. Dragging is pointer-captured so the drag
9
+ * survives the pointer leaving the handle, and the size is clamped to
10
+ * `min`/`max` rather than letting the panel collapse to nothing.
11
+ *
12
+ * Keyboard: arrow keys nudge, Home/End jump to the bounds — a splitter that
13
+ * only responds to a mouse is unusable for a keyboard reader.
14
+ */
15
+ export interface ResizablePanelProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "onResize"> {
16
+ /** Which edge carries the handle. */
17
+ side?: "start" | "end";
18
+ /** Uncontrolled starting size in px. */
19
+ defaultSize?: number;
20
+ /** Controlled size in px. */
21
+ size?: number;
22
+ minSize?: number;
23
+ maxSize?: number;
24
+ /** Px moved per arrow press. */
25
+ step?: number;
26
+ onResize?: (size: number) => void;
27
+ label?: string;
28
+ }
29
+ export declare const ResizablePanel: React.ForwardRefExoticComponent<ResizablePanelProps & React.RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,102 @@
1
+ "use client";
2
+ import { jsxs as z, jsx as y } from "react/jsx-runtime";
3
+ import * as t from "react";
4
+ import { cn as f } from "../lib/cn.js";
5
+ const H = t.forwardRef(
6
+ ({
7
+ className: k,
8
+ children: v,
9
+ side: a = "end",
10
+ defaultSize: P = 320,
11
+ size: p,
12
+ minSize: o = 200,
13
+ maxSize: s = 640,
14
+ step: h = 16,
15
+ onResize: i,
16
+ label: C = "Resize panel",
17
+ style: D,
18
+ ...x
19
+ }, I) => {
20
+ const [R, A] = t.useState(P), g = p !== void 0, l = g ? p : R, [c, b] = t.useState(!1), u = t.useRef(null);
21
+ t.useImperativeHandle(I, () => u.current);
22
+ const m = t.useCallback(
23
+ (e) => Math.min(s, Math.max(o, e)),
24
+ [s, o]
25
+ ), n = t.useCallback(
26
+ (e) => {
27
+ const r = m(Math.round(e));
28
+ g || A(r), i == null || i(r);
29
+ },
30
+ [m, g, i]
31
+ ), M = (e) => {
32
+ e.preventDefault(), e.currentTarget.setPointerCapture(e.pointerId), b(!0);
33
+ }, N = (e) => {
34
+ if (!c || !u.current) return;
35
+ const r = u.current.getBoundingClientRect();
36
+ n(a === "end" ? e.clientX - r.left : r.right - e.clientX);
37
+ }, w = (e) => {
38
+ var r, d;
39
+ c && ((d = (r = e.currentTarget).releasePointerCapture) == null || d.call(r, e.pointerId), b(!1));
40
+ }, j = (e) => {
41
+ const r = a === "end" ? "ArrowRight" : "ArrowLeft", d = a === "end" ? "ArrowLeft" : "ArrowRight";
42
+ if (e.key === r) n(l + h);
43
+ else if (e.key === d) n(l - h);
44
+ else if (e.key === "Home") n(o);
45
+ else if (e.key === "End") n(s);
46
+ else return;
47
+ e.preventDefault();
48
+ };
49
+ return /* @__PURE__ */ z(
50
+ "div",
51
+ {
52
+ ref: u,
53
+ "data-slot": "resizable-panel",
54
+ "data-dragging": c || void 0,
55
+ className: f("relative shrink-0", k),
56
+ style: { width: l, ...D },
57
+ ...x,
58
+ children: [
59
+ v,
60
+ /* @__PURE__ */ y(
61
+ "div",
62
+ {
63
+ role: "separator",
64
+ "aria-orientation": "vertical",
65
+ "aria-label": C,
66
+ "aria-valuenow": l,
67
+ "aria-valuemin": o,
68
+ "aria-valuemax": s,
69
+ tabIndex: 0,
70
+ onPointerDown: M,
71
+ onPointerMove: N,
72
+ onPointerUp: w,
73
+ onPointerCancel: w,
74
+ onKeyDown: j,
75
+ "data-slot": "resizable-handle",
76
+ className: f(
77
+ "group/resize absolute inset-y-0 z-10 flex w-2 cursor-col-resize touch-none items-stretch justify-center outline-none",
78
+ a === "end" ? "-right-1" : "-left-1"
79
+ ),
80
+ children: /* @__PURE__ */ y(
81
+ "span",
82
+ {
83
+ "aria-hidden": !0,
84
+ className: f(
85
+ "w-px bg-transparent",
86
+ "transition-colors duration-(--duration-fast) ease-out motion-reduce:transition-none",
87
+ "group-hover/resize:bg-border-strong group-focus-visible/resize:bg-ring",
88
+ c && "bg-ring"
89
+ )
90
+ }
91
+ )
92
+ }
93
+ )
94
+ ]
95
+ }
96
+ );
97
+ }
98
+ );
99
+ H.displayName = "ResizablePanel";
100
+ export {
101
+ H as ResizablePanel
102
+ };
@@ -0,0 +1,36 @@
1
+ import { ComponentProps } from 'react';
2
+ /**
3
+ * Reveal — the "data draws itself" entrance. Instead of a skeleton that pulses
4
+ * and then pops into content, the real layout lands instantly and the content
5
+ * arrives in hierarchy: shells rise, labels and values ink in, visualizations
6
+ * draw left to right — each slot offset by a shared stagger step.
7
+ *
8
+ * Pure CSS animations (off the main thread), tokens for easing, and a
9
+ * reduced-motion fallback that keeps only the fade. Durations are deliberate:
10
+ * data drawing is explanatory motion, so the wipe may breathe past the <300ms
11
+ * UI-chrome rule; interactive chrome must never use these classes.
12
+ */
13
+ export type RevealVariant = "ink" | "rise" | "wipe";
14
+ export type RevealGroupProps = ComponentProps<"div"> & {
15
+ /** Stagger unit between order slots, in ms. Defaults to 70. */
16
+ step?: number;
17
+ /** Change this value to replay the whole choreography. */
18
+ replayKey?: string | number;
19
+ };
20
+ /**
21
+ * Orchestrates a reveal choreography: sets the stagger step for every child
22
+ * {@link Reveal} and remounts them when `replayKey` changes so the entrance
23
+ * plays again (e.g. when fresh data arrives).
24
+ */
25
+ export declare const RevealGroup: import('react').MemoExoticComponent<({ step, replayKey, style, children, ...props }: RevealGroupProps) => import("react").JSX.Element>;
26
+ export type RevealProps = ComponentProps<"div"> & {
27
+ /**
28
+ * `rise` for shells/cards (fade + 8px lift), `ink` for text and values
29
+ * (fade + blur settle), `wipe` for data that should draw left to right
30
+ * (charts, segmented bars).
31
+ */
32
+ variant?: RevealVariant;
33
+ /** 0-based slot in the choreography; delay = order × step. */
34
+ order?: number;
35
+ };
36
+ export declare const Reveal: import('react').MemoExoticComponent<({ variant, order, className, style, ...props }: RevealProps) => import("react").JSX.Element>;
@@ -0,0 +1,35 @@
1
+ "use client";
2
+ import { jsx as s } from "react/jsx-runtime";
3
+ import { memo as t, Fragment as v } from "react";
4
+ import { cn as d } from "../lib/cn.js";
5
+ const i = t(
6
+ ({ step: e, replayKey: a, style: l, children: r, ...o }) => /* @__PURE__ */ s(
7
+ "div",
8
+ {
9
+ "data-slot": "reveal-group",
10
+ style: {
11
+ ...e != null ? { "--reveal-step": `${e}ms` } : void 0,
12
+ ...l
13
+ },
14
+ ...o,
15
+ children: /* @__PURE__ */ s(v, { children: r }, a != null ? String(a) : void 0)
16
+ }
17
+ )
18
+ ), m = t(
19
+ ({ variant: e = "rise", order: a = 0, className: l, style: r, ...o }) => /* @__PURE__ */ s(
20
+ "div",
21
+ {
22
+ "data-slot": "reveal",
23
+ "data-variant": e,
24
+ className: d("ads-reveal", `ads-reveal-${e}`, l),
25
+ style: { "--reveal-order": a, ...r },
26
+ ...o
27
+ }
28
+ )
29
+ );
30
+ i.displayName = "RevealGroup";
31
+ m.displayName = "Reveal";
32
+ export {
33
+ m as Reveal,
34
+ i as RevealGroup
35
+ };
@@ -0,0 +1,19 @@
1
+ import { ScrollArea as ScrollAreaPrimitive } from 'radix-ui';
2
+ import * as React from "react";
3
+ /**
4
+ * ScrollArea — a scroll container with a styled, always-consistent scrollbar,
5
+ * instead of the platform's own (which differs per OS and steals layout width
6
+ * on Windows).
7
+ *
8
+ * The thumb is a quiet `fill` bar that only gains contrast on hover, so a long
9
+ * list never reads as chrome-first. Cap the height from the outside
10
+ * (`className="h-72"`); the component provides no height of its own.
11
+ */
12
+ export interface ScrollAreaProps extends React.ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.Root> {
13
+ /** Which axis scrolls. `both` renders a horizontal bar as well. */
14
+ orientation?: "vertical" | "horizontal" | "both";
15
+ viewportClassName?: string;
16
+ }
17
+ export declare const ScrollArea: React.ForwardRefExoticComponent<ScrollAreaProps & React.RefAttributes<HTMLDivElement>>;
18
+ export type ScrollBarProps = React.ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>;
19
+ export declare const ScrollBar: React.ForwardRefExoticComponent<Omit<ScrollAreaPrimitive.ScrollAreaScrollbarProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,57 @@
1
+ "use client";
2
+ import { jsxs as f, jsx as o } from "react/jsx-runtime";
3
+ import * as i from "react";
4
+ import { ScrollArea as e } from "radix-ui";
5
+ import { cn as s } from "../lib/cn.js";
6
+ const m = i.forwardRef(
7
+ ({ className: a, children: l, orientation: r = "vertical", viewportClassName: t, ...n }, d) => /* @__PURE__ */ f(
8
+ e.Root,
9
+ {
10
+ ref: d,
11
+ "data-slot": "scroll-area",
12
+ className: s("relative overflow-hidden border border-border", a),
13
+ ...n,
14
+ children: [
15
+ /* @__PURE__ */ o(
16
+ e.Viewport,
17
+ {
18
+ className: s("size-full rounded-[inherit]", t),
19
+ children: l
20
+ }
21
+ ),
22
+ (r === "vertical" || r === "both") && /* @__PURE__ */ o(c, { orientation: "vertical" }),
23
+ (r === "horizontal" || r === "both") && /* @__PURE__ */ o(c, { orientation: "horizontal" }),
24
+ /* @__PURE__ */ o(e.Corner, {})
25
+ ]
26
+ }
27
+ )
28
+ );
29
+ m.displayName = "ScrollArea";
30
+ const c = i.forwardRef(({ className: a, orientation: l = "vertical", ...r }, t) => /* @__PURE__ */ o(
31
+ e.ScrollAreaScrollbar,
32
+ {
33
+ ref: t,
34
+ orientation: l,
35
+ "data-slot": "scroll-bar",
36
+ className: s(
37
+ "flex touch-none select-none p-0.5",
38
+ "transition-colors duration-(--duration-fast) ease-out motion-reduce:transition-none",
39
+ l === "vertical" && "h-full w-2.5",
40
+ l === "horizontal" && "h-2.5 flex-col",
41
+ a
42
+ ),
43
+ ...r,
44
+ children: /* @__PURE__ */ o(
45
+ e.ScrollAreaThumb,
46
+ {
47
+ "data-slot": "scroll-bar-thumb",
48
+ className: "relative flex-1 rounded-full bg-fill transition-colors duration-(--duration-fast) ease-out hover:bg-border-strong motion-reduce:transition-none"
49
+ }
50
+ )
51
+ }
52
+ ));
53
+ c.displayName = "ScrollBar";
54
+ export {
55
+ m as ScrollArea,
56
+ c as ScrollBar
57
+ };
@@ -0,0 +1,35 @@
1
+ import { VariantProps } from 'class-variance-authority';
2
+ import * as React from "react";
3
+ /**
4
+ * SettingList / SettingRow — the grouped settings stack: one row per setting,
5
+ * each reading leading glyph → what it is → the control that changes it.
6
+ *
7
+ * The rows are separate `bg-card` blocks on a recessed `bg-surface` track, so
8
+ * the group reads by fill and spacing rather than by hairlines (principle 1).
9
+ * A row is a static surface — it stays flat unless `onSelect` makes the whole
10
+ * row actionable, at which point it earns hover and press feedback.
11
+ *
12
+ * The trailing slot takes whatever changes the setting: a `Button`, a
13
+ * `Switch`, a `Badge`, or nothing. The leading slot takes the label — pass a
14
+ * `Select` there when the setting's current value is itself the picker.
15
+ */
16
+ declare const settingRowVariants: (props?: ({
17
+ isPressable?: boolean | null | undefined;
18
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
19
+ export interface SettingRowProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "title" | "onSelect">, Omit<VariantProps<typeof settingRowVariants>, "isPressable"> {
20
+ /** Leading glyph naming the setting's domain. */
21
+ icon?: React.ReactNode;
22
+ /** What the setting is — or the control showing its current value. */
23
+ label: React.ReactNode;
24
+ /** Optional second line qualifying the setting. */
25
+ description?: React.ReactNode;
26
+ /** The control that changes it: Button, Switch, Badge. */
27
+ action?: React.ReactNode;
28
+ /** Makes the whole row actionable; the trailing action still stops the click. */
29
+ onSelect?: () => void;
30
+ }
31
+ export declare const SettingRow: React.ForwardRefExoticComponent<SettingRowProps & React.RefAttributes<HTMLDivElement>>;
32
+ export type SettingListProps = React.HTMLAttributes<HTMLDivElement>;
33
+ /** The recessed track the rows sit on; the gap between them is the divider. */
34
+ export declare const SettingList: React.ForwardRefExoticComponent<SettingListProps & React.RefAttributes<HTMLDivElement>>;
35
+ export { settingRowVariants };