@actioneer/ads 0.2.2 → 0.2.4
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/bin/ads-init.mjs +176 -28
- package/components/ai-elements/chain-of-thought.d.ts +26 -19
- package/components/ai-elements/chain-of-thought.js +140 -150
- package/components/ai-elements/index.d.ts +0 -1
- package/components/ai-elements/message.d.ts +9 -4
- package/components/ai-elements/message.js +102 -88
- package/components/ai-elements/task-progress.js +69 -66
- package/components/answer.d.ts +3 -0
- package/components/answer.js +251 -212
- package/components/assistant-ui/composer-harness.js +24 -25
- package/components/assistant-ui/message.js +49 -36
- package/components/assistant-ui/primitives.d.ts +1 -1
- package/components/assistant-ui/thread-context.d.ts +2 -0
- package/components/assistant-ui/thread.js +33 -31
- package/components/chart.d.ts +64 -2
- package/components/chart.js +717 -456
- package/components/command-palette.d.ts +43 -0
- package/components/command-palette.js +146 -0
- package/components/index.d.ts +1 -0
- package/components/index.js +383 -382
- package/components/sidebar.d.ts +4 -1
- package/components/sidebar.js +57 -55
- package/hooks/agents-ui/voice-visualizer-types.js +1 -0
- package/lib/icons.d.ts +12 -0
- package/lib/icons.js +97 -110
- package/lib/motion.js +47 -22
- package/lib/router.js +19 -0
- package/lib/utils.js +5 -0
- package/llms.txt +44 -34
- package/manifest.json +485 -186
- package/package.json +1 -1
- package/styles.css +10 -10
- package/theme.css +9 -9
- package/components/ai-elements/reasoning.d.ts +0 -26
- package/components/ai-elements/reasoning.js +0 -131
package/package.json
CHANGED
package/styles.css
CHANGED
|
@@ -39,20 +39,20 @@
|
|
|
39
39
|
--font-sans: "Aribau Grotesk", ui-sans-serif, system-ui, -apple-system,
|
|
40
40
|
"Segoe UI", Roboto, Helvetica, Arial, sans-serif;
|
|
41
41
|
|
|
42
|
-
/* ---- Type scale ---- base =
|
|
43
|
-
spacing grid is unaffected; only text sizes are anchored to
|
|
42
|
+
/* ---- Type scale ---- base = 14px (0.875rem). Root stays 16px so the
|
|
43
|
+
spacing grid is unaffected; only text sizes are anchored to 14px. */
|
|
44
44
|
/* SIX sizes only — a deliberately small ladder (captions → display).
|
|
45
45
|
Don't reintroduce 2xs/3xl/4xl or in-between steps; if a size feels
|
|
46
46
|
missing, the answer is weight/color, not a new size. */
|
|
47
|
-
--text-xs: 0.
|
|
47
|
+
--text-xs: 0.75rem; /* 12px — captions, secondary text, table cells, keycaps */
|
|
48
48
|
--text-xs--line-height: 1rem;
|
|
49
|
-
/* text-sm is aliased to text-xs (both
|
|
50
|
-
|
|
51
|
-
at
|
|
52
|
-
default 14px, which would
|
|
53
|
-
--text-sm: 0.
|
|
49
|
+
/* text-sm is aliased to text-xs (both 12px). The scale is intentionally
|
|
50
|
+
12 · 14 · 15 · 21 · 26 with no in-between tier — keeping the token
|
|
51
|
+
pointed at 12px stops any stray `text-sm` from falling back to
|
|
52
|
+
Tailwind's default 14px, which would silently read as base. */
|
|
53
|
+
--text-sm: 0.75rem;
|
|
54
54
|
--text-sm--line-height: 1rem;
|
|
55
|
-
--text-base: 0.
|
|
55
|
+
--text-base: 0.875rem; /* 14px — BASE body */
|
|
56
56
|
--text-base--line-height: 1.25rem;
|
|
57
57
|
--text-lg: 0.9375rem; /* 15px — emphasized body, section headings */
|
|
58
58
|
--text-lg--line-height: 1.375rem;
|
|
@@ -470,7 +470,7 @@
|
|
|
470
470
|
background-color: var(--background);
|
|
471
471
|
color: var(--foreground);
|
|
472
472
|
font-family: var(--font-sans);
|
|
473
|
-
font-size: var(--text-base); /*
|
|
473
|
+
font-size: var(--text-base); /* 14px base */
|
|
474
474
|
font-feature-settings: "cv01", "ss01";
|
|
475
475
|
font-synthesis-weight: none;
|
|
476
476
|
}
|
package/theme.css
CHANGED
|
@@ -12,20 +12,20 @@
|
|
|
12
12
|
--font-sans: "Aribau Grotesk", ui-sans-serif, system-ui, -apple-system,
|
|
13
13
|
"Segoe UI", Roboto, Helvetica, Arial, sans-serif;
|
|
14
14
|
|
|
15
|
-
/* ---- Type scale ---- base =
|
|
16
|
-
spacing grid is unaffected; only text sizes are anchored to
|
|
15
|
+
/* ---- Type scale ---- base = 14px (0.875rem). Root stays 16px so the
|
|
16
|
+
spacing grid is unaffected; only text sizes are anchored to 14px. */
|
|
17
17
|
/* SIX sizes only — a deliberately small ladder (captions → display).
|
|
18
18
|
Don't reintroduce 2xs/3xl/4xl or in-between steps; if a size feels
|
|
19
19
|
missing, the answer is weight/color, not a new size. */
|
|
20
|
-
--text-xs: 0.
|
|
20
|
+
--text-xs: 0.75rem; /* 12px — captions, secondary text, table cells, keycaps */
|
|
21
21
|
--text-xs--line-height: 1rem;
|
|
22
|
-
/* text-sm is aliased to text-xs (both
|
|
23
|
-
|
|
24
|
-
at
|
|
25
|
-
default 14px, which would
|
|
26
|
-
--text-sm: 0.
|
|
22
|
+
/* text-sm is aliased to text-xs (both 12px). The scale is intentionally
|
|
23
|
+
12 · 14 · 15 · 21 · 26 with no in-between tier — keeping the token
|
|
24
|
+
pointed at 12px stops any stray `text-sm` from falling back to
|
|
25
|
+
Tailwind's default 14px, which would silently read as base. */
|
|
26
|
+
--text-sm: 0.75rem;
|
|
27
27
|
--text-sm--line-height: 1rem;
|
|
28
|
-
--text-base: 0.
|
|
28
|
+
--text-base: 0.875rem; /* 14px — BASE body */
|
|
29
29
|
--text-base--line-height: 1.25rem;
|
|
30
30
|
--text-lg: 0.9375rem; /* 15px — emphasized body, section headings */
|
|
31
31
|
--text-lg--line-height: 1.375rem;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { Collapsible, CollapsibleContent, CollapsibleTrigger } from '../collapsible';
|
|
2
|
-
import { ComponentProps, ReactNode } from 'react';
|
|
3
|
-
type ReasoningContextValue = {
|
|
4
|
-
isStreaming: boolean;
|
|
5
|
-
isOpen: boolean;
|
|
6
|
-
setIsOpen: (open: boolean) => void;
|
|
7
|
-
duration: number | undefined;
|
|
8
|
-
};
|
|
9
|
-
export declare const useReasoning: () => ReasoningContextValue;
|
|
10
|
-
export type ReasoningProps = ComponentProps<typeof Collapsible> & {
|
|
11
|
-
isStreaming?: boolean;
|
|
12
|
-
open?: boolean;
|
|
13
|
-
defaultOpen?: boolean;
|
|
14
|
-
onOpenChange?: (open: boolean) => void;
|
|
15
|
-
duration?: number;
|
|
16
|
-
};
|
|
17
|
-
export declare const Reasoning: import('react').MemoExoticComponent<({ className, isStreaming, open, defaultOpen, onOpenChange, duration: durationProp, children, ...props }: ReasoningProps) => import("react").JSX.Element>;
|
|
18
|
-
export type ReasoningTriggerProps = ComponentProps<typeof CollapsibleTrigger> & {
|
|
19
|
-
getThinkingMessage?: (isStreaming: boolean, duration?: number) => ReactNode;
|
|
20
|
-
};
|
|
21
|
-
export declare const ReasoningTrigger: import('react').MemoExoticComponent<({ className, children, getThinkingMessage, ...props }: ReasoningTriggerProps) => import("react").JSX.Element>;
|
|
22
|
-
export type ReasoningContentProps = Omit<ComponentProps<typeof CollapsibleContent>, "children"> & {
|
|
23
|
-
children: ReactNode;
|
|
24
|
-
};
|
|
25
|
-
export declare const ReasoningContent: import('react').MemoExoticComponent<({ className, children, ...props }: ReasoningContentProps) => import("react").JSX.Element>;
|
|
26
|
-
export {};
|
|
@@ -1,131 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx as n, jsxs as b, Fragment as y } from "react/jsx-runtime";
|
|
3
|
-
import { Collapsible as D, CollapsibleTrigger as A, CollapsibleContent as E } from "../collapsible.js";
|
|
4
|
-
import { Brain as O, ChevronDown as _ } from "../../lib/icons.js";
|
|
5
|
-
import { cn as p } from "../../lib/cn.js";
|
|
6
|
-
import { createContext as k, memo as g, useState as f, useEffect as N, useRef as M, useCallback as P, useContext as S } from "react";
|
|
7
|
-
function T({
|
|
8
|
-
prop: t,
|
|
9
|
-
defaultProp: e,
|
|
10
|
-
onChange: o
|
|
11
|
-
}) {
|
|
12
|
-
const [s, c] = f(e), a = t !== void 0, u = a ? t : s, i = M(o);
|
|
13
|
-
i.current = o;
|
|
14
|
-
const l = P(
|
|
15
|
-
(r) => {
|
|
16
|
-
var d;
|
|
17
|
-
a || c(r), (d = i.current) == null || d.call(i, r);
|
|
18
|
-
},
|
|
19
|
-
[a]
|
|
20
|
-
);
|
|
21
|
-
return [u, l];
|
|
22
|
-
}
|
|
23
|
-
const w = k(null), j = () => {
|
|
24
|
-
const t = S(w);
|
|
25
|
-
if (!t)
|
|
26
|
-
throw new Error("Reasoning components must be used within Reasoning");
|
|
27
|
-
return t;
|
|
28
|
-
}, z = 1e3, I = 1e3, L = g(
|
|
29
|
-
({
|
|
30
|
-
className: t,
|
|
31
|
-
isStreaming: e = !1,
|
|
32
|
-
open: o,
|
|
33
|
-
defaultOpen: s = !0,
|
|
34
|
-
onOpenChange: c,
|
|
35
|
-
duration: a,
|
|
36
|
-
children: u,
|
|
37
|
-
...i
|
|
38
|
-
}) => {
|
|
39
|
-
const [l, r] = T({
|
|
40
|
-
prop: o,
|
|
41
|
-
defaultProp: s,
|
|
42
|
-
onChange: c
|
|
43
|
-
}), [d, h] = T({
|
|
44
|
-
prop: a,
|
|
45
|
-
defaultProp: void 0
|
|
46
|
-
}), [C, R] = f(!1), [m, x] = f(null);
|
|
47
|
-
return N(() => {
|
|
48
|
-
e ? m === null && x(Date.now()) : m !== null && (h(Math.ceil((Date.now() - m) / I)), x(null));
|
|
49
|
-
}, [e, m, h]), N(() => {
|
|
50
|
-
if (s && !e && l && !C) {
|
|
51
|
-
const v = setTimeout(() => {
|
|
52
|
-
r(!1), R(!0);
|
|
53
|
-
}, z);
|
|
54
|
-
return () => clearTimeout(v);
|
|
55
|
-
}
|
|
56
|
-
}, [e, l, s, r, C]), /* @__PURE__ */ n(
|
|
57
|
-
w.Provider,
|
|
58
|
-
{
|
|
59
|
-
value: { isStreaming: e, isOpen: l, setIsOpen: r, duration: d },
|
|
60
|
-
children: /* @__PURE__ */ n(
|
|
61
|
-
D,
|
|
62
|
-
{
|
|
63
|
-
className: p("mb-4", t),
|
|
64
|
-
onOpenChange: r,
|
|
65
|
-
open: l,
|
|
66
|
-
...i,
|
|
67
|
-
children: u
|
|
68
|
-
}
|
|
69
|
-
)
|
|
70
|
-
}
|
|
71
|
-
);
|
|
72
|
-
}
|
|
73
|
-
), U = (t, e) => t || e === 0 ? /* @__PURE__ */ n("span", { className: "shimmer text-foreground/40", children: "Thinking…" }) : e === void 0 ? /* @__PURE__ */ n("span", { children: "Thought for a few seconds" }) : /* @__PURE__ */ b("span", { children: [
|
|
74
|
-
"Thought for ",
|
|
75
|
-
/* @__PURE__ */ n("span", { className: "tabular-nums", children: e }),
|
|
76
|
-
" seconds"
|
|
77
|
-
] }), B = g(
|
|
78
|
-
({
|
|
79
|
-
className: t,
|
|
80
|
-
children: e,
|
|
81
|
-
getThinkingMessage: o = U,
|
|
82
|
-
...s
|
|
83
|
-
}) => {
|
|
84
|
-
const { isStreaming: c, isOpen: a, duration: u } = j();
|
|
85
|
-
return /* @__PURE__ */ n(
|
|
86
|
-
A,
|
|
87
|
-
{
|
|
88
|
-
className: p(
|
|
89
|
-
"flex w-full items-center gap-2 text-base text-secondary transition-colors hover:text-foreground",
|
|
90
|
-
t
|
|
91
|
-
),
|
|
92
|
-
...s,
|
|
93
|
-
children: e ?? /* @__PURE__ */ b(y, { children: [
|
|
94
|
-
/* @__PURE__ */ n(O, { className: "size-4" }),
|
|
95
|
-
o(c, u),
|
|
96
|
-
/* @__PURE__ */ n(
|
|
97
|
-
_,
|
|
98
|
-
{
|
|
99
|
-
className: p(
|
|
100
|
-
"size-4 transition-transform duration-(--duration-fast) ease-out motion-reduce:transition-none",
|
|
101
|
-
a ? "rotate-180" : "rotate-0"
|
|
102
|
-
)
|
|
103
|
-
}
|
|
104
|
-
)
|
|
105
|
-
] })
|
|
106
|
-
}
|
|
107
|
-
);
|
|
108
|
-
}
|
|
109
|
-
), F = g(
|
|
110
|
-
({ className: t, children: e, ...o }) => /* @__PURE__ */ n(
|
|
111
|
-
E,
|
|
112
|
-
{
|
|
113
|
-
className: p(
|
|
114
|
-
"mt-4 text-base text-secondary outline-none",
|
|
115
|
-
"data-[state=closed]:fade-out-0 data-[state=closed]:slide-out-to-top-2 data-[state=open]:slide-in-from-top-2 data-[state=closed]:animate-out data-[state=open]:animate-in motion-reduce:animate-none",
|
|
116
|
-
t
|
|
117
|
-
),
|
|
118
|
-
...o,
|
|
119
|
-
children: /* @__PURE__ */ n("div", { className: "leading-relaxed whitespace-pre-wrap", children: e })
|
|
120
|
-
}
|
|
121
|
-
)
|
|
122
|
-
);
|
|
123
|
-
L.displayName = "Reasoning";
|
|
124
|
-
B.displayName = "ReasoningTrigger";
|
|
125
|
-
F.displayName = "ReasoningContent";
|
|
126
|
-
export {
|
|
127
|
-
L as Reasoning,
|
|
128
|
-
F as ReasoningContent,
|
|
129
|
-
B as ReasoningTrigger,
|
|
130
|
-
j as useReasoning
|
|
131
|
-
};
|