@actioneer/ads 0.5.5 → 0.5.7
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/agent-icon.js +3 -2
- package/components/ai-elements/chain-of-thought-icon.d.ts +10 -12
- package/components/ai-elements/chain-of-thought-icon.js +341 -201
- package/components/ai-elements/chain-of-thought.d.ts +1 -1
- package/components/answer-sources.d.ts +42 -0
- package/components/answer-sources.js +111 -0
- package/components/answer.d.ts +1 -0
- package/components/answer.js +665 -671
- package/components/assistant-ui/answer-tool-ui.js +11 -7
- package/components/assistant-ui/attachment.js +39 -39
- package/components/assistant-ui/composer-harness.js +5 -4
- package/components/assistant-ui/follow-up-suggestions.d.ts +5 -1
- package/components/assistant-ui/follow-up-suggestions.js +47 -19
- package/components/assistant-ui/thread-context.d.ts +2 -0
- package/components/assistant-ui/thread.js +41 -40
- package/components/avatar.js +14 -14
- package/components/dropdown.d.ts +1 -1
- package/components/dropdown.js +1 -1
- package/components/empty-state.d.ts +4 -4
- package/components/field.js +16 -16
- package/components/index.d.ts +1 -0
- package/components/index.js +414 -408
- package/components/infinite-canvas.js +1 -1
- package/components/pixel-icon.d.ts +3 -1
- package/components/pixel-icon.js +294 -214
- package/components/segmented.d.ts +4 -1
- package/components/segmented.js +9 -8
- package/components/sidebar.d.ts +2 -2
- package/components/switch.js +22 -4
- package/components/table.d.ts +15 -7
- package/components/table.js +313 -199
- package/components/textarea.js +1 -2
- package/components/tooltip.js +1 -1
- package/components/ui/tooltip.js +5 -5
- package/lib/icons.d.ts +8 -0
- package/lib/icons.js +103 -101
- package/llms.txt +18 -7
- package/manifest.json +125 -13
- package/package.json +1 -1
- package/styles.css +42 -47
- package/theme.css +24 -45
|
@@ -116,7 +116,7 @@ export declare const ChainOfThoughtEvidenceTable: import('react').MemoExoticComp
|
|
|
116
116
|
export type ChainOfThoughtMetricsProps = ComponentProps<"div">;
|
|
117
117
|
/** The stat readout on one recessed fill — the warm greige muted surface
|
|
118
118
|
* groups the metrics into a single contained block (principle 1: delineate
|
|
119
|
-
* with fill, never a stroke; a
|
|
119
|
+
* with fill, never a stroke; a tinted fill was tried and reverted — the
|
|
120
120
|
* neutral fill keeps the semantic value colors as the only color). One
|
|
121
121
|
* metric per ROW, receipt-style: label leading, value trailing, so the
|
|
122
122
|
* figures align on the right edge and scan vertically. */
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { DrawerProps } from './drawer';
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
export interface AnswerSourcesProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
/** Total referenced nodes represented by the source chips. */
|
|
5
|
+
count: number;
|
|
6
|
+
/** Label before the count. Defaults to “Sources”. */
|
|
7
|
+
label?: string;
|
|
8
|
+
}
|
|
9
|
+
/** Compact source strip placed immediately before an answer's follow-ups. */
|
|
10
|
+
export declare const AnswerSources: React.ForwardRefExoticComponent<AnswerSourcesProps & React.RefAttributes<HTMLDivElement>>;
|
|
11
|
+
export interface AnswerSourceChipProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "children"> {
|
|
12
|
+
/** Connector/source mark shown before the label. */
|
|
13
|
+
icon?: React.ReactNode;
|
|
14
|
+
/** Number of references represented by this chip. Hidden when one. */
|
|
15
|
+
count?: number;
|
|
16
|
+
children: React.ReactNode;
|
|
17
|
+
}
|
|
18
|
+
/** Blue connector chip that opens its referenced nodes in the inspector. */
|
|
19
|
+
export declare const AnswerSourceChip: React.ForwardRefExoticComponent<AnswerSourceChipProps & React.RefAttributes<HTMLButtonElement>>;
|
|
20
|
+
export interface AnswerSourceInspectorProps extends Omit<DrawerProps, "children"> {
|
|
21
|
+
/** Supporting count/context line beneath the title. */
|
|
22
|
+
description?: React.ReactNode;
|
|
23
|
+
/** Panel title. Defaults to “Answer sources”. */
|
|
24
|
+
title?: React.ReactNode;
|
|
25
|
+
children: React.ReactNode;
|
|
26
|
+
}
|
|
27
|
+
/** Shell-level white source panel rendered beside the answer, never over it. */
|
|
28
|
+
export declare function AnswerSourceInspector({ title, description, className, children, ...props }: AnswerSourceInspectorProps): React.JSX.Element;
|
|
29
|
+
export interface AnswerSourceItemProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "children" | "name"> {
|
|
30
|
+
/** Referenced node/table name. */
|
|
31
|
+
name: React.ReactNode;
|
|
32
|
+
/** Connector, warehouse, or parent source. */
|
|
33
|
+
source?: React.ReactNode;
|
|
34
|
+
/** Why this node was referenced or its current read state. */
|
|
35
|
+
description?: React.ReactNode;
|
|
36
|
+
/** Optional semantic status badge. */
|
|
37
|
+
status?: React.ReactNode;
|
|
38
|
+
/** Leading node glyph. Defaults to a table icon. */
|
|
39
|
+
icon?: React.ReactNode;
|
|
40
|
+
}
|
|
41
|
+
/** Outlined referenced-node row used inside AnswerSourceInspector. */
|
|
42
|
+
export declare const AnswerSourceItem: React.ForwardRefExoticComponent<AnswerSourceItemProps & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs as s, jsx as r } from "react/jsx-runtime";
|
|
3
|
+
import * as c from "react";
|
|
4
|
+
import { ExternalLink as p, Table as f } from "../lib/icons.js";
|
|
5
|
+
import { cn as o } from "../lib/cn.js";
|
|
6
|
+
import { Button as u } from "./button.js";
|
|
7
|
+
import { Drawer as x, DrawerHeader as h, DrawerTitle as g, DrawerBody as N } from "./drawer.js";
|
|
8
|
+
const w = c.forwardRef(({ count: n, label: e = "Sources", className: a, children: t, ...i }, l) => /* @__PURE__ */ s(
|
|
9
|
+
"div",
|
|
10
|
+
{
|
|
11
|
+
ref: l,
|
|
12
|
+
className: o("flex flex-wrap items-center gap-2", a),
|
|
13
|
+
...i,
|
|
14
|
+
children: [
|
|
15
|
+
/* @__PURE__ */ s("span", { className: "text-xs font-normal uppercase tracking-wide text-tertiary", children: [
|
|
16
|
+
e,
|
|
17
|
+
" · ",
|
|
18
|
+
n
|
|
19
|
+
] }),
|
|
20
|
+
t
|
|
21
|
+
]
|
|
22
|
+
}
|
|
23
|
+
));
|
|
24
|
+
w.displayName = "AnswerSources";
|
|
25
|
+
const b = c.forwardRef(({ icon: n, count: e, className: a, children: t, ...i }, l) => /* @__PURE__ */ s(
|
|
26
|
+
u,
|
|
27
|
+
{
|
|
28
|
+
ref: l,
|
|
29
|
+
type: "button",
|
|
30
|
+
size: "xs",
|
|
31
|
+
variant: "ghost",
|
|
32
|
+
className: o(
|
|
33
|
+
"h-auto gap-1.5 rounded-full bg-info-50 px-2 py-0.5 text-xs text-info-700 hover:bg-info-100 focus-visible:ring-info/40",
|
|
34
|
+
a
|
|
35
|
+
),
|
|
36
|
+
...i,
|
|
37
|
+
children: [
|
|
38
|
+
n,
|
|
39
|
+
t,
|
|
40
|
+
e != null && e > 1 && /* @__PURE__ */ s("span", { className: "tabular-nums opacity-70", children: [
|
|
41
|
+
"· ",
|
|
42
|
+
e
|
|
43
|
+
] })
|
|
44
|
+
]
|
|
45
|
+
}
|
|
46
|
+
));
|
|
47
|
+
b.displayName = "AnswerSourceChip";
|
|
48
|
+
function D({
|
|
49
|
+
title: n = "Answer sources",
|
|
50
|
+
description: e,
|
|
51
|
+
className: a,
|
|
52
|
+
children: t,
|
|
53
|
+
...i
|
|
54
|
+
}) {
|
|
55
|
+
return /* @__PURE__ */ s(x, { className: o("h-full", a), ...i, children: [
|
|
56
|
+
/* @__PURE__ */ s(h, { className: "gap-1", children: [
|
|
57
|
+
/* @__PURE__ */ r(g, { children: n }),
|
|
58
|
+
e && /* @__PURE__ */ r("p", { className: "text-xs text-tertiary", children: e })
|
|
59
|
+
] }),
|
|
60
|
+
/* @__PURE__ */ r(N, { className: "space-y-2", children: t })
|
|
61
|
+
] });
|
|
62
|
+
}
|
|
63
|
+
const y = c.forwardRef(
|
|
64
|
+
({
|
|
65
|
+
name: n,
|
|
66
|
+
source: e,
|
|
67
|
+
description: a,
|
|
68
|
+
status: t,
|
|
69
|
+
icon: i = /* @__PURE__ */ r(f, { "aria-hidden": !0, className: "size-4" }),
|
|
70
|
+
className: l,
|
|
71
|
+
...m
|
|
72
|
+
}, d) => /* @__PURE__ */ s(
|
|
73
|
+
"button",
|
|
74
|
+
{
|
|
75
|
+
ref: d,
|
|
76
|
+
type: "button",
|
|
77
|
+
className: o(
|
|
78
|
+
"flex w-full items-start gap-3 rounded-lg border border-border bg-fill p-3 text-left",
|
|
79
|
+
"transition-colors hover:bg-muted",
|
|
80
|
+
"outline-none focus-visible:ring-3 focus-visible:ring-ring",
|
|
81
|
+
l
|
|
82
|
+
),
|
|
83
|
+
...m,
|
|
84
|
+
children: [
|
|
85
|
+
/* @__PURE__ */ r("span", { className: "mt-0.5 grid size-8 shrink-0 place-items-center rounded-md bg-muted text-foreground", children: i }),
|
|
86
|
+
/* @__PURE__ */ s("span", { className: "min-w-0 flex-1", children: [
|
|
87
|
+
/* @__PURE__ */ s("span", { className: "flex items-center gap-2", children: [
|
|
88
|
+
/* @__PURE__ */ r("span", { className: "min-w-0 flex-1 truncate font-normal tabular-nums text-foreground", children: n }),
|
|
89
|
+
t && /* @__PURE__ */ r("span", { className: "shrink-0", children: t })
|
|
90
|
+
] }),
|
|
91
|
+
e && /* @__PURE__ */ r("span", { className: "mt-0.5 flex items-center gap-1.5 text-xs text-secondary", children: e }),
|
|
92
|
+
a && /* @__PURE__ */ r("span", { className: "mt-1.5 block text-xs text-secondary", children: a })
|
|
93
|
+
] }),
|
|
94
|
+
/* @__PURE__ */ r(
|
|
95
|
+
p,
|
|
96
|
+
{
|
|
97
|
+
"aria-hidden": !0,
|
|
98
|
+
className: "mt-2 size-4 shrink-0 text-tertiary"
|
|
99
|
+
}
|
|
100
|
+
)
|
|
101
|
+
]
|
|
102
|
+
}
|
|
103
|
+
)
|
|
104
|
+
);
|
|
105
|
+
y.displayName = "AnswerSourceItem";
|
|
106
|
+
export {
|
|
107
|
+
b as AnswerSourceChip,
|
|
108
|
+
D as AnswerSourceInspector,
|
|
109
|
+
y as AnswerSourceItem,
|
|
110
|
+
w as AnswerSources
|
|
111
|
+
};
|
package/components/answer.d.ts
CHANGED
|
@@ -3233,6 +3233,7 @@ export declare const answerTool: {
|
|
|
3233
3233
|
type AnswerInteractions = {
|
|
3234
3234
|
onFollowUp?: (followUp: AnswerFollowUp) => void;
|
|
3235
3235
|
onOptionSelect?: (option: AnswerOption) => void;
|
|
3236
|
+
/** Opens the referenced source in the host shell's node inspector. */
|
|
3236
3237
|
onSourceSelect?: (source: AnswerSource) => void;
|
|
3237
3238
|
/**
|
|
3238
3239
|
* Called when a query citation is clicked. Wire it to the shell's detail
|