@actioneer/ads 0.5.6 → 0.5.8
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 +6 -0
- package/components/accordion.js +50 -48
- package/components/agent-icon.d.ts +12 -0
- package/components/agent-icon.js +135 -121
- 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 +2 -2
- package/components/ai-elements/chain-of-thought.js +108 -108
- package/components/ai-elements/chart.js +16 -14
- package/components/ai-elements/inline-citation.js +41 -41
- package/components/ai-elements/message.js +4 -4
- package/components/ai-elements/queue.js +7 -7
- package/components/ai-elements/research-activity.js +114 -114
- package/components/ai-elements/shimmer.d.ts +2 -2
- package/components/ai-elements/speech-input.js +28 -28
- package/components/ai-elements/task-progress.js +26 -16
- package/components/ai-elements/task.js +17 -17
- package/components/ai-elements/tool.js +6 -6
- package/components/ai-elements/transcript.js +6 -5
- package/components/ai-elements/voice.js +1 -1
- package/components/alert.js +10 -10
- package/components/answer-sources.d.ts +42 -0
- package/components/answer-sources.js +111 -0
- package/components/answer.js +115 -114
- package/components/assistant-ui/action-bar.js +94 -48
- package/components/assistant-ui/attachment.js +131 -103
- package/components/assistant-ui/badge.d.ts +1 -1
- package/components/assistant-ui/badge.js +17 -17
- package/components/assistant-ui/chain-of-thought.d.ts +1 -1
- package/components/assistant-ui/composer-add-context.js +9 -9
- package/components/assistant-ui/composer-deep-research.js +5 -5
- package/components/assistant-ui/composer-harness.js +12 -9
- package/components/assistant-ui/composer-trigger-popover.js +45 -34
- package/components/assistant-ui/composer.js +59 -59
- package/components/assistant-ui/error.js +14 -14
- package/components/assistant-ui/file.d.ts +1 -1
- package/components/assistant-ui/image.d.ts +1 -1
- package/components/assistant-ui/image.js +113 -103
- package/components/assistant-ui/markdown-text.js +18 -18
- package/components/assistant-ui/message.js +46 -45
- package/components/assistant-ui/quote.js +1 -1
- package/components/assistant-ui/reasoning.d.ts +1 -1
- package/components/assistant-ui/reasoning.js +66 -77
- package/components/assistant-ui/suggestions.js +4 -4
- package/components/assistant-ui/thread-context.d.ts +2 -0
- package/components/assistant-ui/thread.js +41 -40
- package/components/assistant-ui/tool-fallback.js +60 -63
- package/components/assistant-ui/tool-group.d.ts +1 -1
- package/components/assistant-ui/tool-group.js +36 -42
- package/components/audio-waveform.js +25 -24
- package/components/autocomplete.d.ts +1 -0
- package/components/autocomplete.js +45 -43
- package/components/avatar.js +30 -30
- package/components/badge.d.ts +1 -1
- package/components/breadcrumbs.js +2 -2
- package/components/button.d.ts +2 -2
- package/components/button.js +22 -20
- package/components/card.js +8 -8
- package/components/carousel.js +105 -104
- package/components/chart.js +9 -7
- package/components/checkbox.js +74 -38
- package/components/chip.d.ts +1 -1
- package/components/code-block.js +3 -3
- package/components/collapsible.js +67 -23
- package/components/connector-card.js +6 -6
- package/components/drawer.d.ts +15 -10
- package/components/drawer.js +78 -77
- package/components/dropdown.d.ts +3 -1
- package/components/dropdown.js +88 -79
- package/components/empty-state.d.ts +4 -4
- package/components/empty-state.js +7 -7
- package/components/field.d.ts +4 -0
- package/components/field.js +45 -34
- package/components/file-dropzone.js +12 -12
- package/components/index.d.ts +4 -0
- package/components/index.js +584 -553
- package/components/infinite-canvas.js +1 -1
- package/components/input-field.js +51 -46
- package/components/input.js +20 -20
- package/components/link.js +9 -9
- package/components/modal.js +105 -73
- package/components/navbar.d.ts +1 -1
- package/components/navbar.js +1 -1
- package/components/number-field.js +38 -29
- package/components/page-header.js +12 -12
- package/components/pagination.js +19 -19
- package/components/panel.js +2 -2
- package/components/pixel-blast-svg.js +3 -3
- package/components/pixel-icon.d.ts +3 -1
- package/components/pixel-icon.js +294 -215
- package/components/popover.d.ts +1 -1
- package/components/popover.js +66 -64
- package/components/progress-circle.js +36 -32
- package/components/progress.js +28 -24
- package/components/radio.js +59 -49
- package/components/resizable-panel.js +1 -1
- package/components/reveal.d.ts +2 -2
- package/components/ripple.d.ts +3 -3
- package/components/scroll-area.js +17 -16
- package/components/segmented.d.ts +4 -1
- package/components/segmented.js +26 -25
- package/components/select.d.ts +2 -0
- package/components/select.js +61 -57
- package/components/setting-row.js +45 -42
- package/components/sidebar.d.ts +2 -2
- package/components/sidebar.js +131 -127
- package/components/skeleton.js +5 -5
- package/components/spinner.d.ts +13 -4
- package/components/spinner.js +42 -42
- package/components/stepper.js +21 -21
- package/components/switch.js +52 -32
- package/components/table.d.ts +24 -7
- package/components/table.js +457 -220
- package/components/tabs.js +149 -137
- package/components/textarea.js +1 -2
- package/components/toast.js +66 -66
- package/components/tooltip.js +2 -2
- package/components/tree.js +62 -51
- package/components/typography.d.ts +2 -1
- package/components/typography.js +33 -32
- package/components/ui/button.d.ts +2 -2
- package/components/ui/button.js +19 -19
- package/components/ui/collapsible.d.ts +1 -5
- package/components/ui/dialog.d.ts +3 -3
- package/components/ui/dialog.js +95 -58
- package/components/ui/tooltip.d.ts +2 -2
- package/components/ui/tooltip.js +67 -33
- package/components/viz-charts.js +95 -95
- package/demo/components/add-to-artifact.js +341 -0
- package/demo/lib/artifact-library.js +134 -0
- package/fonts/aribau-grotesk-medium.woff2 +0 -0
- package/fonts/aribau-grotesk-regular.woff2 +0 -0
- package/fonts.css +11 -11
- package/hooks/agents-ui/use-agent-audio-visualizer-aura.js +17 -16
- package/hooks/agents-ui/use-agent-audio-visualizer-wave.js +21 -20
- package/lib/icons.d.ts +12 -0
- package/lib/icons.js +107 -104
- package/lib/motion.d.ts +42 -39
- package/lib/motion.js +112 -52
- package/lib/spinner-mark.d.ts +9 -0
- package/lib/spinner-mark.js +98 -0
- package/llms.txt +69 -26
- package/manifest.json +344 -42
- package/package.json +1 -1
- package/styles.css +175 -161
- package/theme.css +104 -128
- package/components/ui/collapsible.js +0 -35
- package/fonts/aribau-grotesk-500.otf +0 -0
- package/fonts/aribau-grotesk-600.woff2 +0 -0
package/components/answer.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsxs as n, jsx as t, Fragment as D } from "react/jsx-runtime";
|
|
3
|
-
import * as
|
|
3
|
+
import * as b from "react";
|
|
4
4
|
import { cva as H } from "class-variance-authority";
|
|
5
5
|
import { z as e } from "zod/v4";
|
|
6
6
|
import { Alert as T, AlertTitle as O, AlertDescription as L } from "./alert.js";
|
|
@@ -12,7 +12,7 @@ import { FollowUpQuestion as Ae } from "./assistant-ui/follow-up-suggestions.js"
|
|
|
12
12
|
import { Source as je, SourceTitle as Se } from "./assistant-ui/sources.js";
|
|
13
13
|
import { AreaChart as Ce, BarChart as Re, LineChart as Te } from "./chart.js";
|
|
14
14
|
import { Progress as Oe } from "./progress.js";
|
|
15
|
-
import { Skeleton as
|
|
15
|
+
import { Skeleton as p } from "./skeleton.js";
|
|
16
16
|
import { Table as Le, TableHeader as ze, TableRow as B, TableColumn as De, TableBody as qe, TableCell as M } from "./table.js";
|
|
17
17
|
import { Check as q, Minus as Be, WarningCircle as Ke, Clock as Ee, Database as Fe } from "../lib/icons.js";
|
|
18
18
|
import { cn as g } from "../lib/cn.js";
|
|
@@ -461,7 +461,7 @@ const We = "render_answer", Pe = "Render the final answer with one curated ADS t
|
|
|
461
461
|
name: We,
|
|
462
462
|
description: Pe,
|
|
463
463
|
inputSchema: ha
|
|
464
|
-
}, A = H("font-
|
|
464
|
+
}, A = H("font-medium tabular-nums text-foreground", {
|
|
465
465
|
variants: {
|
|
466
466
|
tone: {
|
|
467
467
|
default: "text-foreground",
|
|
@@ -488,7 +488,7 @@ const We = "render_answer", Pe = "Render the final answer with one curated ADS t
|
|
|
488
488
|
}), ga = new Intl.NumberFormat("en-US", {
|
|
489
489
|
notation: "compact",
|
|
490
490
|
maximumFractionDigits: 1
|
|
491
|
-
}), X = (a) => a === "success" || a === "warning" || a === "danger" || a === "info" ? a : "default",
|
|
491
|
+
}), X = (a) => a === "success" || a === "warning" || a === "danger" || a === "info" ? a : "default", ua = (a) => a === "success" || a === "warning" || a === "danger" || a === "info" ? a : "primary", J = b.createContext(void 0);
|
|
492
492
|
function f({ spec: a }) {
|
|
493
493
|
return (
|
|
494
494
|
// `flex-1 min-w-0` lets the header fill its available width, including in
|
|
@@ -520,31 +520,31 @@ function W({
|
|
|
520
520
|
}) {
|
|
521
521
|
const d = a.split(/\n{2,}/).map((m) => m.trim()).filter(Boolean);
|
|
522
522
|
return /* @__PURE__ */ t("div", { className: g("space-y-2 text-sm leading-6 text-secondary", c), children: d.map((m, o) => /* @__PURE__ */ n("p", { children: [
|
|
523
|
-
o === 0 && l && /* @__PURE__ */ n("span", { className: "font-
|
|
523
|
+
o === 0 && l && /* @__PURE__ */ n("span", { className: "font-medium text-foreground", children: [
|
|
524
524
|
l,
|
|
525
525
|
" — "
|
|
526
526
|
] }),
|
|
527
527
|
m
|
|
528
528
|
] }, o)) });
|
|
529
529
|
}
|
|
530
|
-
const Z = (a) => typeof a == "string" ? { label: a } : a,
|
|
530
|
+
const Z = (a) => typeof a == "string" ? { label: a } : a, ba = (a) => a == null ? void 0 : a.split(" · ")[0], E = "inline-flex items-center gap-1 rounded-md px-2 py-0.5 font-mono text-xs tabular-nums", I = "cursor-pointer bg-info-50 text-info-700 outline-none transition-colors hover:bg-info-100 focus-visible:ring-3 focus-visible:ring-info/40 active:scale-[0.97]";
|
|
531
531
|
function F({ citation: a }) {
|
|
532
|
-
const l =
|
|
532
|
+
const l = ba(a.source);
|
|
533
533
|
return /* @__PURE__ */ n(D, { children: [
|
|
534
|
-
/* @__PURE__ */ t(Fe, { "aria-hidden": !0, className: "size-3 shrink-0
|
|
534
|
+
/* @__PURE__ */ t(Fe, { "aria-hidden": !0, className: "size-3 shrink-0" }),
|
|
535
535
|
/* @__PURE__ */ t("span", { children: a.label }),
|
|
536
|
-
l && /* @__PURE__ */ n("span", { className: "max-w-[12ch] truncate font-normal
|
|
536
|
+
l && /* @__PURE__ */ n("span", { className: "max-w-[12ch] truncate font-normal", children: [
|
|
537
537
|
"· ",
|
|
538
538
|
l
|
|
539
539
|
] }),
|
|
540
|
-
a.rows != null && /* @__PURE__ */ n("span", { className: "font-normal
|
|
540
|
+
a.rows != null && /* @__PURE__ */ n("span", { className: "font-normal", children: [
|
|
541
541
|
"· ",
|
|
542
542
|
a.rows.toLocaleString()
|
|
543
543
|
] })
|
|
544
544
|
] });
|
|
545
545
|
}
|
|
546
546
|
function U({ citation: a }) {
|
|
547
|
-
const l =
|
|
547
|
+
const l = b.useContext(J), c = !!(a.query || a.source || a.rows != null);
|
|
548
548
|
return l ? /* @__PURE__ */ t(
|
|
549
549
|
"button",
|
|
550
550
|
{
|
|
@@ -572,7 +572,7 @@ function U({ citation: a }) {
|
|
|
572
572
|
children: [
|
|
573
573
|
/* @__PURE__ */ n("div", { className: "space-y-1 px-3 pb-2 pt-3", children: [
|
|
574
574
|
/* @__PURE__ */ n("div", { className: "flex items-center justify-between gap-3", children: [
|
|
575
|
-
/* @__PURE__ */ t("span", { className: "font-mono text-xs font-
|
|
575
|
+
/* @__PURE__ */ t("span", { className: "font-mono text-xs font-medium text-foreground", children: a.label }),
|
|
576
576
|
a.rows != null && /* @__PURE__ */ n("span", { className: "text-xs tabular-nums text-tertiary", children: [
|
|
577
577
|
a.rows.toLocaleString(),
|
|
578
578
|
" ",
|
|
@@ -628,7 +628,7 @@ function ee({
|
|
|
628
628
|
c.label
|
|
629
629
|
)) });
|
|
630
630
|
}
|
|
631
|
-
function
|
|
631
|
+
function pa({ items: a }) {
|
|
632
632
|
return /* @__PURE__ */ t("div", { className: "grid grid-cols-2 gap-2 @lg:grid-cols-3", children: a.map((l) => /* @__PURE__ */ n("div", { className: "rounded-xl border border-border bg-card px-4 py-3", children: [
|
|
633
633
|
/* @__PURE__ */ t("p", { className: "text-xs font-normal text-tertiary", children: l.label }),
|
|
634
634
|
/* @__PURE__ */ t(
|
|
@@ -652,10 +652,10 @@ function ae({
|
|
|
652
652
|
"span",
|
|
653
653
|
{
|
|
654
654
|
className: g(
|
|
655
|
-
r ? g("text-secondary", i && "font-
|
|
655
|
+
r ? g("text-secondary", i && "font-medium text-foreground") : g(
|
|
656
656
|
"tabular-nums",
|
|
657
657
|
h ? $({ tone: h }) : "text-foreground",
|
|
658
|
-
i && "font-
|
|
658
|
+
i && "font-medium"
|
|
659
659
|
)
|
|
660
660
|
),
|
|
661
661
|
children: o
|
|
@@ -677,7 +677,7 @@ function ae({
|
|
|
677
677
|
"span",
|
|
678
678
|
{
|
|
679
679
|
className: g(
|
|
680
|
-
"font-
|
|
680
|
+
"font-medium text-foreground",
|
|
681
681
|
h > 0 && "tabular-nums"
|
|
682
682
|
),
|
|
683
683
|
children: r
|
|
@@ -691,7 +691,7 @@ function ae({
|
|
|
691
691
|
] });
|
|
692
692
|
}
|
|
693
693
|
function te({ chart: a }) {
|
|
694
|
-
const l =
|
|
694
|
+
const l = b.useMemo(
|
|
695
695
|
() => a.unit ? (d) => `${ga.format(d)}${a.unit}` : void 0,
|
|
696
696
|
[a.unit]
|
|
697
697
|
), c = {
|
|
@@ -717,14 +717,14 @@ function y({
|
|
|
717
717
|
i && /* @__PURE__ */ n("div", { className: "space-y-3", children: [
|
|
718
718
|
(m || !!(l != null && l.length)) && /* @__PURE__ */ n("p", { className: "text-base leading-6 text-tertiary", children: [
|
|
719
719
|
m && /* @__PURE__ */ n(D, { children: [
|
|
720
|
-
/* @__PURE__ */ t("span", { className: "font-
|
|
720
|
+
/* @__PURE__ */ t("span", { className: "font-medium", children: "How computed" }),
|
|
721
721
|
" · ",
|
|
722
722
|
m
|
|
723
723
|
] }),
|
|
724
|
-
l == null ? void 0 : l.map((s,
|
|
724
|
+
l == null ? void 0 : l.map((s, u) => /* @__PURE__ */ n(b.Fragment, { children: [
|
|
725
725
|
" ",
|
|
726
726
|
/* @__PURE__ */ t(U, { citation: Z(s) })
|
|
727
|
-
] },
|
|
727
|
+
] }, u))
|
|
728
728
|
] }),
|
|
729
729
|
!!(o != null && o.length) && /* @__PURE__ */ t("ul", { className: "space-y-1", children: o.map((s) => /* @__PURE__ */ n(
|
|
730
730
|
"li",
|
|
@@ -791,7 +791,7 @@ function y({
|
|
|
791
791
|
] })
|
|
792
792
|
] });
|
|
793
793
|
}
|
|
794
|
-
const ne =
|
|
794
|
+
const ne = b.forwardRef(({ spec: a, onFollowUp: l, onOptionSelect: c, onSourceSelect: d, className: m, ...o }, h) => /* @__PURE__ */ n(
|
|
795
795
|
"div",
|
|
796
796
|
{
|
|
797
797
|
ref: h,
|
|
@@ -817,14 +817,14 @@ const ne = p.forwardRef(({ spec: a, onFollowUp: l, onOptionSelect: c, onSourceSe
|
|
|
817
817
|
scope: "col",
|
|
818
818
|
className: "px-3 py-2 align-bottom",
|
|
819
819
|
children: [
|
|
820
|
-
/* @__PURE__ */ t("span", { className: "block text-base font-
|
|
820
|
+
/* @__PURE__ */ t("span", { className: "block text-base font-medium text-foreground", children: r.label }),
|
|
821
821
|
r.description && /* @__PURE__ */ t("span", { className: "mt-0.5 block text-xs font-normal text-tertiary", children: r.description })
|
|
822
822
|
]
|
|
823
823
|
},
|
|
824
824
|
r.label
|
|
825
825
|
)),
|
|
826
826
|
/* @__PURE__ */ n("th", { scope: "col", className: "px-3 py-2 align-bottom", children: [
|
|
827
|
-
/* @__PURE__ */ t("span", { className: "block text-sm font-
|
|
827
|
+
/* @__PURE__ */ t("span", { className: "block text-sm font-medium text-foreground", children: "Difference" }),
|
|
828
828
|
/* @__PURE__ */ n("span", { className: "mt-0.5 block text-xs font-normal text-tertiary", children: [
|
|
829
829
|
a.subjects[1].label,
|
|
830
830
|
" − ",
|
|
@@ -846,7 +846,7 @@ const ne = p.forwardRef(({ spec: a, onFollowUp: l, onOptionSelect: c, onSourceSe
|
|
|
846
846
|
]
|
|
847
847
|
}
|
|
848
848
|
),
|
|
849
|
-
r.values.map((
|
|
849
|
+
r.values.map((u, j) => /* @__PURE__ */ t(
|
|
850
850
|
"td",
|
|
851
851
|
{
|
|
852
852
|
className: "px-3 py-3 align-top",
|
|
@@ -854,10 +854,10 @@ const ne = p.forwardRef(({ spec: a, onFollowUp: l, onOptionSelect: c, onSourceSe
|
|
|
854
854
|
"span",
|
|
855
855
|
{
|
|
856
856
|
className: g(
|
|
857
|
-
A({ tone:
|
|
857
|
+
A({ tone: u.tone }),
|
|
858
858
|
"block text-base"
|
|
859
859
|
),
|
|
860
|
-
children:
|
|
860
|
+
children: u.value
|
|
861
861
|
}
|
|
862
862
|
)
|
|
863
863
|
},
|
|
@@ -889,7 +889,7 @@ const ne = p.forwardRef(({ spec: a, onFollowUp: l, onOptionSelect: c, onSourceSe
|
|
|
889
889
|
}
|
|
890
890
|
));
|
|
891
891
|
ne.displayName = "ComparisonAnswer";
|
|
892
|
-
const re =
|
|
892
|
+
const re = b.forwardRef(
|
|
893
893
|
({ spec: a, onFollowUp: l, onOptionSelect: c, onSourceSelect: d, className: m, ...o }, h) => /* @__PURE__ */ n(
|
|
894
894
|
"div",
|
|
895
895
|
{
|
|
@@ -930,7 +930,7 @@ const re = p.forwardRef(
|
|
|
930
930
|
)
|
|
931
931
|
);
|
|
932
932
|
re.displayName = "TrendAnswer";
|
|
933
|
-
const ie =
|
|
933
|
+
const ie = b.forwardRef(
|
|
934
934
|
({ spec: a, onFollowUp: l, onOptionSelect: c, onSourceSelect: d, className: m, ...o }, h) => /* @__PURE__ */ n(
|
|
935
935
|
"div",
|
|
936
936
|
{
|
|
@@ -971,7 +971,7 @@ const ie = p.forwardRef(
|
|
|
971
971
|
)
|
|
972
972
|
);
|
|
973
973
|
ie.displayName = "StatusAnswer";
|
|
974
|
-
const le =
|
|
974
|
+
const le = b.forwardRef(({ spec: a, onFollowUp: l, onOptionSelect: c, onSourceSelect: d, className: m, ...o }, h) => /* @__PURE__ */ n(
|
|
975
975
|
"div",
|
|
976
976
|
{
|
|
977
977
|
ref: h,
|
|
@@ -983,7 +983,7 @@ const le = p.forwardRef(({ spec: a, onFollowUp: l, onOptionSelect: c, onSourceSe
|
|
|
983
983
|
/* @__PURE__ */ t(f, { spec: a }),
|
|
984
984
|
a.total && /* @__PURE__ */ n("div", { className: "shrink-0 @md:text-right", children: [
|
|
985
985
|
/* @__PURE__ */ t("p", { className: "text-xs font-normal text-tertiary", children: a.total.label }),
|
|
986
|
-
/* @__PURE__ */ t("p", { className: "mt-1 text-2xl font-
|
|
986
|
+
/* @__PURE__ */ t("p", { className: "mt-1 text-2xl font-medium tabular-nums tracking-tight text-foreground", children: a.total.value })
|
|
987
987
|
] })
|
|
988
988
|
] }),
|
|
989
989
|
/* @__PURE__ */ t("ol", { className: "space-y-2", children: a.items.map((r, i) => /* @__PURE__ */ n("li", { className: "rounded-xl border border-border bg-card px-4 py-3", children: [
|
|
@@ -1008,7 +1008,7 @@ const le = p.forwardRef(({ spec: a, onFollowUp: l, onOptionSelect: c, onSourceSe
|
|
|
1008
1008
|
{
|
|
1009
1009
|
value: r.share,
|
|
1010
1010
|
size: "sm",
|
|
1011
|
-
color:
|
|
1011
|
+
color: ua(r.tone),
|
|
1012
1012
|
label: `${r.label}: ${r.share}%`
|
|
1013
1013
|
}
|
|
1014
1014
|
)
|
|
@@ -1026,7 +1026,7 @@ const le = p.forwardRef(({ spec: a, onFollowUp: l, onOptionSelect: c, onSourceSe
|
|
|
1026
1026
|
}
|
|
1027
1027
|
));
|
|
1028
1028
|
le.displayName = "BreakdownAnswer";
|
|
1029
|
-
const se =
|
|
1029
|
+
const se = b.forwardRef(({ spec: a, onFollowUp: l, onOptionSelect: c, onSourceSelect: d, className: m, ...o }, h) => /* @__PURE__ */ n(
|
|
1030
1030
|
"div",
|
|
1031
1031
|
{
|
|
1032
1032
|
ref: h,
|
|
@@ -1040,9 +1040,9 @@ const se = p.forwardRef(({ spec: a, onFollowUp: l, onOptionSelect: c, onSourceSe
|
|
|
1040
1040
|
return /* @__PURE__ */ n("li", { className: "flex gap-3 rounded-xl border border-border bg-card px-4 py-3.5", children: [
|
|
1041
1041
|
/* @__PURE__ */ t(w, { variant: "soft", className: "mt-0.5 h-fit tabular-nums", children: i + 1 }),
|
|
1042
1042
|
/* @__PURE__ */ n("div", { className: "min-w-0 flex-1", children: [
|
|
1043
|
-
/* @__PURE__ */ t("h3", { className: "text-sm font-
|
|
1043
|
+
/* @__PURE__ */ t("h3", { className: "text-sm font-medium text-foreground", children: r.title }),
|
|
1044
1044
|
r.body && /* @__PURE__ */ t("p", { className: "mt-1 text-sm leading-6 text-secondary", children: r.body }),
|
|
1045
|
-
!!((s = r.bullets) != null && s.length) && /* @__PURE__ */ t("ul", { className: "mt-2 space-y-1.5", children: r.bullets.map((
|
|
1045
|
+
!!((s = r.bullets) != null && s.length) && /* @__PURE__ */ t("ul", { className: "mt-2 space-y-1.5", children: r.bullets.map((u) => /* @__PURE__ */ n("li", { className: "flex items-start gap-2 text-xs leading-5 text-secondary", children: [
|
|
1046
1046
|
/* @__PURE__ */ t(
|
|
1047
1047
|
"span",
|
|
1048
1048
|
{
|
|
@@ -1050,8 +1050,8 @@ const se = p.forwardRef(({ spec: a, onFollowUp: l, onOptionSelect: c, onSourceSe
|
|
|
1050
1050
|
className: "mt-2 size-1 shrink-0 rounded-dot bg-muted-foreground"
|
|
1051
1051
|
}
|
|
1052
1052
|
),
|
|
1053
|
-
/* @__PURE__ */ t("span", { children:
|
|
1054
|
-
] },
|
|
1053
|
+
/* @__PURE__ */ t("span", { children: u })
|
|
1054
|
+
] }, u)) }),
|
|
1055
1055
|
r.code && /* @__PURE__ */ t(
|
|
1056
1056
|
R,
|
|
1057
1057
|
{
|
|
@@ -1077,7 +1077,7 @@ const se = p.forwardRef(({ spec: a, onFollowUp: l, onOptionSelect: c, onSourceSe
|
|
|
1077
1077
|
}
|
|
1078
1078
|
));
|
|
1079
1079
|
se.displayName = "ExplanationAnswer";
|
|
1080
|
-
const oe =
|
|
1080
|
+
const oe = b.forwardRef(({ spec: a, onFollowUp: l, onOptionSelect: c, onSourceSelect: d, className: m, ...o }, h) => {
|
|
1081
1081
|
var r;
|
|
1082
1082
|
return /* @__PURE__ */ n(
|
|
1083
1083
|
"div",
|
|
@@ -1090,9 +1090,9 @@ const oe = p.forwardRef(({ spec: a, onFollowUp: l, onOptionSelect: c, onSourceSe
|
|
|
1090
1090
|
/* @__PURE__ */ t(f, { spec: a }),
|
|
1091
1091
|
a.lead && /* @__PURE__ */ t(W, { text: a.lead, className: "text-base" }),
|
|
1092
1092
|
/* @__PURE__ */ t("div", { className: "space-y-5", children: a.blocks.map((i, s) => {
|
|
1093
|
-
var
|
|
1093
|
+
var u;
|
|
1094
1094
|
return /* @__PURE__ */ n("div", { className: "space-y-2", children: [
|
|
1095
|
-
i.heading && /* @__PURE__ */ t("h3", { className: "text-sm font-
|
|
1095
|
+
i.heading && /* @__PURE__ */ t("h3", { className: "text-sm font-medium text-foreground", children: i.heading }),
|
|
1096
1096
|
i.tone && i.tone !== "default" ? /* @__PURE__ */ n(
|
|
1097
1097
|
T,
|
|
1098
1098
|
{
|
|
@@ -1104,7 +1104,7 @@ const oe = p.forwardRef(({ spec: a, onFollowUp: l, onOptionSelect: c, onSourceSe
|
|
|
1104
1104
|
]
|
|
1105
1105
|
}
|
|
1106
1106
|
) : /* @__PURE__ */ t(W, { text: i.body, lead: i.lead }),
|
|
1107
|
-
!!((
|
|
1107
|
+
!!((u = i.bullets) != null && u.length) && /* @__PURE__ */ t("ul", { className: "space-y-1.5", children: i.bullets.map((j) => /* @__PURE__ */ n(
|
|
1108
1108
|
"li",
|
|
1109
1109
|
{
|
|
1110
1110
|
className: "flex items-start gap-2 text-sm leading-6 text-secondary",
|
|
@@ -1125,7 +1125,7 @@ const oe = p.forwardRef(({ spec: a, onFollowUp: l, onOptionSelect: c, onSourceSe
|
|
|
1125
1125
|
] }, s);
|
|
1126
1126
|
}) }),
|
|
1127
1127
|
!!((r = a.takeaways) != null && r.length) && /* @__PURE__ */ n("div", { className: "space-y-2 rounded-2xl border border-border bg-card px-4 py-3.5", children: [
|
|
1128
|
-
/* @__PURE__ */ t("p", { className: "text-xs font-
|
|
1128
|
+
/* @__PURE__ */ t("p", { className: "text-xs font-medium uppercase tracking-wider text-tertiary", children: "Key takeaways" }),
|
|
1129
1129
|
/* @__PURE__ */ t("ul", { className: "space-y-1.5", children: a.takeaways.map((i, s) => /* @__PURE__ */ n(
|
|
1130
1130
|
"li",
|
|
1131
1131
|
{
|
|
@@ -1139,7 +1139,7 @@ const oe = p.forwardRef(({ spec: a, onFollowUp: l, onOptionSelect: c, onSourceSe
|
|
|
1139
1139
|
}
|
|
1140
1140
|
),
|
|
1141
1141
|
/* @__PURE__ */ n("span", { children: [
|
|
1142
|
-
i.lead && /* @__PURE__ */ n("span", { className: "font-
|
|
1142
|
+
i.lead && /* @__PURE__ */ n("span", { className: "font-medium text-foreground", children: [
|
|
1143
1143
|
i.lead,
|
|
1144
1144
|
" —",
|
|
1145
1145
|
" "
|
|
@@ -1165,7 +1165,7 @@ const oe = p.forwardRef(({ spec: a, onFollowUp: l, onOptionSelect: c, onSourceSe
|
|
|
1165
1165
|
);
|
|
1166
1166
|
});
|
|
1167
1167
|
oe.displayName = "NarrativeAnswer";
|
|
1168
|
-
const de =
|
|
1168
|
+
const de = b.forwardRef(
|
|
1169
1169
|
({ spec: a, onFollowUp: l, onOptionSelect: c, onSourceSelect: d, className: m, ...o }, h) => {
|
|
1170
1170
|
var i;
|
|
1171
1171
|
const r = [a.value.change, a.value.asOf].filter(Boolean).join(" · ");
|
|
@@ -1222,7 +1222,7 @@ const de = p.forwardRef(
|
|
|
1222
1222
|
}
|
|
1223
1223
|
);
|
|
1224
1224
|
de.displayName = "FactAnswer";
|
|
1225
|
-
const ce =
|
|
1225
|
+
const ce = b.forwardRef(
|
|
1226
1226
|
({ spec: a, onFollowUp: l, onOptionSelect: c, onSourceSelect: d, className: m, ...o }, h) => /* @__PURE__ */ n(
|
|
1227
1227
|
"div",
|
|
1228
1228
|
{
|
|
@@ -1247,7 +1247,7 @@ const ce = p.forwardRef(
|
|
|
1247
1247
|
)
|
|
1248
1248
|
);
|
|
1249
1249
|
ce.displayName = "TableAnswer";
|
|
1250
|
-
const me =
|
|
1250
|
+
const me = b.forwardRef(
|
|
1251
1251
|
({ spec: a, onFollowUp: l, onOptionSelect: c, onSourceSelect: d, className: m, ...o }, h) => /* @__PURE__ */ n(
|
|
1252
1252
|
"div",
|
|
1253
1253
|
{
|
|
@@ -1280,7 +1280,7 @@ const me = p.forwardRef(
|
|
|
1280
1280
|
{
|
|
1281
1281
|
className: g(
|
|
1282
1282
|
"text-base font-normal text-foreground",
|
|
1283
|
-
r.highlight && "font-
|
|
1283
|
+
r.highlight && "font-medium"
|
|
1284
1284
|
),
|
|
1285
1285
|
children: r.label
|
|
1286
1286
|
}
|
|
@@ -1342,7 +1342,7 @@ const xa = {
|
|
|
1342
1342
|
pending: "Pending",
|
|
1343
1343
|
failed: "Failed",
|
|
1344
1344
|
skipped: "Skipped"
|
|
1345
|
-
}, he =
|
|
1345
|
+
}, he = b.forwardRef(({ spec: a, onFollowUp: l, onOptionSelect: c, onSourceSelect: d, className: m, ...o }, h) => {
|
|
1346
1346
|
var r, i;
|
|
1347
1347
|
return /* @__PURE__ */ n(
|
|
1348
1348
|
"div",
|
|
@@ -1416,7 +1416,7 @@ const xa = {
|
|
|
1416
1416
|
);
|
|
1417
1417
|
});
|
|
1418
1418
|
he.displayName = "ConfirmationAnswer";
|
|
1419
|
-
const ge =
|
|
1419
|
+
const ge = b.forwardRef(({ spec: a, onFollowUp: l, onOptionSelect: c, onSourceSelect: d, className: m, ...o }, h) => {
|
|
1420
1420
|
var i, s;
|
|
1421
1421
|
const r = c ?? l;
|
|
1422
1422
|
return /* @__PURE__ */ n(
|
|
@@ -1429,26 +1429,26 @@ const ge = p.forwardRef(({ spec: a, onFollowUp: l, onOptionSelect: c, onSourceSe
|
|
|
1429
1429
|
children: [
|
|
1430
1430
|
/* @__PURE__ */ t(f, { spec: a }),
|
|
1431
1431
|
!!((i = a.findings) != null && i.length) && /* @__PURE__ */ t(ee, { items: a.findings }),
|
|
1432
|
-
/* @__PURE__ */ t("p", { className: "text-sm font-
|
|
1433
|
-
!!((s = a.options) != null && s.length) && /* @__PURE__ */ t("div", { className: "space-y-2", children: a.options.map((
|
|
1432
|
+
/* @__PURE__ */ t("p", { className: "text-sm font-medium leading-6 text-foreground", children: a.question }),
|
|
1433
|
+
!!((s = a.options) != null && s.length) && /* @__PURE__ */ t("div", { className: "space-y-2", children: a.options.map((u) => /* @__PURE__ */ n(
|
|
1434
1434
|
"button",
|
|
1435
1435
|
{
|
|
1436
1436
|
type: "button",
|
|
1437
1437
|
disabled: !r,
|
|
1438
|
-
onClick: () => r == null ? void 0 : r(
|
|
1438
|
+
onClick: () => r == null ? void 0 : r(u),
|
|
1439
1439
|
className: g(
|
|
1440
1440
|
"w-full rounded-xl bg-card px-4 py-3 text-left shadow-elevation",
|
|
1441
|
-
"transition-[background,transform,box-shadow] duration-
|
|
1441
|
+
"transition-[background,transform,box-shadow] duration-150 ease-out motion-reduce:transition-none",
|
|
1442
1442
|
"outline-none focus-visible:ring-3 focus-visible:ring-ring",
|
|
1443
|
-
"hover:bg-surface active:scale-
|
|
1443
|
+
"hover:bg-surface active:scale-[0.97]",
|
|
1444
1444
|
"disabled:pointer-events-none"
|
|
1445
1445
|
),
|
|
1446
1446
|
children: [
|
|
1447
|
-
/* @__PURE__ */ t("span", { className: "block text-sm font-
|
|
1448
|
-
|
|
1447
|
+
/* @__PURE__ */ t("span", { className: "block text-sm font-medium text-foreground", children: u.label }),
|
|
1448
|
+
u.description && /* @__PURE__ */ t("span", { className: "mt-0.5 block text-xs leading-5 text-secondary", children: u.description })
|
|
1449
1449
|
]
|
|
1450
1450
|
},
|
|
1451
|
-
|
|
1451
|
+
u.id
|
|
1452
1452
|
)) }),
|
|
1453
1453
|
/* @__PURE__ */ t(
|
|
1454
1454
|
y,
|
|
@@ -1463,7 +1463,7 @@ const ge = p.forwardRef(({ spec: a, onFollowUp: l, onOptionSelect: c, onSourceSe
|
|
|
1463
1463
|
);
|
|
1464
1464
|
});
|
|
1465
1465
|
ge.displayName = "ClarificationAnswer";
|
|
1466
|
-
const
|
|
1466
|
+
const ue = b.forwardRef(
|
|
1467
1467
|
({ spec: a, onFollowUp: l, onOptionSelect: c, onSourceSelect: d, className: m, ...o }, h) => {
|
|
1468
1468
|
var r;
|
|
1469
1469
|
return /* @__PURE__ */ n(
|
|
@@ -1501,7 +1501,7 @@ const be = p.forwardRef(
|
|
|
1501
1501
|
a.reason && /* @__PURE__ */ t("p", { className: "text-sm leading-6 text-secondary", children: a.reason }),
|
|
1502
1502
|
a.baseline && /* @__PURE__ */ n("div", { className: "rounded-xl border border-border bg-card px-4 py-3", children: [
|
|
1503
1503
|
/* @__PURE__ */ t("p", { className: "text-xs font-normal text-tertiary", children: a.baseline.label }),
|
|
1504
|
-
/* @__PURE__ */ t("p", { className: "mt-1 text-lg font-
|
|
1504
|
+
/* @__PURE__ */ t("p", { className: "mt-1 text-lg font-medium tabular-nums tracking-tight text-foreground", children: a.baseline.value })
|
|
1505
1505
|
] }),
|
|
1506
1506
|
a.alternative && /* @__PURE__ */ t(k, { signal: a.alternative }),
|
|
1507
1507
|
/* @__PURE__ */ t(
|
|
@@ -1517,13 +1517,13 @@ const be = p.forwardRef(
|
|
|
1517
1517
|
);
|
|
1518
1518
|
}
|
|
1519
1519
|
);
|
|
1520
|
-
|
|
1520
|
+
ue.displayName = "EmptyAnswer";
|
|
1521
1521
|
const ya = {
|
|
1522
1522
|
user: "You",
|
|
1523
1523
|
admin: "Workspace admin",
|
|
1524
1524
|
platform: "Platform team",
|
|
1525
1525
|
agent: "Agent"
|
|
1526
|
-
},
|
|
1526
|
+
}, be = b.forwardRef(
|
|
1527
1527
|
({ spec: a, onFollowUp: l, onOptionSelect: c, onSourceSelect: d, className: m, ...o }, h) => {
|
|
1528
1528
|
var r, i;
|
|
1529
1529
|
return /* @__PURE__ */ n(
|
|
@@ -1551,13 +1551,13 @@ const ya = {
|
|
|
1551
1551
|
},
|
|
1552
1552
|
s.label
|
|
1553
1553
|
)) }),
|
|
1554
|
-
!!((i = a.resolution) != null && i.length) && /* @__PURE__ */ t("ol", { className: "space-y-2", children: a.resolution.map((s,
|
|
1554
|
+
!!((i = a.resolution) != null && i.length) && /* @__PURE__ */ t("ol", { className: "space-y-2", children: a.resolution.map((s, u) => /* @__PURE__ */ n(
|
|
1555
1555
|
"li",
|
|
1556
1556
|
{
|
|
1557
1557
|
className: "flex items-start justify-between gap-4 rounded-xl border border-border bg-card px-4 py-3",
|
|
1558
1558
|
children: [
|
|
1559
1559
|
/* @__PURE__ */ n("div", { className: "flex min-w-0 items-start gap-2.5", children: [
|
|
1560
|
-
/* @__PURE__ */ t(w, { variant: "soft", className: "mt-0.5 tabular-nums", children:
|
|
1560
|
+
/* @__PURE__ */ t(w, { variant: "soft", className: "mt-0.5 tabular-nums", children: u + 1 }),
|
|
1561
1561
|
/* @__PURE__ */ t("p", { className: "text-sm leading-6 text-foreground", children: s.action })
|
|
1562
1562
|
] }),
|
|
1563
1563
|
s.owner && /* @__PURE__ */ t(w, { variant: "soft", className: "shrink-0", children: ya[s.owner] })
|
|
@@ -1590,8 +1590,8 @@ const ya = {
|
|
|
1590
1590
|
);
|
|
1591
1591
|
}
|
|
1592
1592
|
);
|
|
1593
|
-
|
|
1594
|
-
const
|
|
1593
|
+
be.displayName = "ErrorAnswer";
|
|
1594
|
+
const pe = b.forwardRef(
|
|
1595
1595
|
({ spec: a, onFollowUp: l, onOptionSelect: c, onSourceSelect: d, className: m, ...o }, h) => {
|
|
1596
1596
|
var r;
|
|
1597
1597
|
return /* @__PURE__ */ n(
|
|
@@ -1613,13 +1613,13 @@ const ue = p.forwardRef(
|
|
|
1613
1613
|
] }),
|
|
1614
1614
|
a.scope && /* @__PURE__ */ t("p", { className: "text-xs leading-5 text-tertiary", children: a.scope }),
|
|
1615
1615
|
!!((r = a.alternatives) != null && r.length) && /* @__PURE__ */ n("div", { className: "space-y-2", children: [
|
|
1616
|
-
/* @__PURE__ */ t("p", { className: "text-xs font-
|
|
1616
|
+
/* @__PURE__ */ t("p", { className: "text-xs font-medium uppercase tracking-wider text-tertiary", children: "Available instead" }),
|
|
1617
1617
|
/* @__PURE__ */ t("ul", { className: "space-y-2", children: a.alternatives.map((i) => /* @__PURE__ */ n(
|
|
1618
1618
|
"li",
|
|
1619
1619
|
{
|
|
1620
1620
|
className: "rounded-xl border border-border bg-card px-4 py-3",
|
|
1621
1621
|
children: [
|
|
1622
|
-
/* @__PURE__ */ t("p", { className: "text-sm font-
|
|
1622
|
+
/* @__PURE__ */ t("p", { className: "text-sm font-medium text-foreground", children: i.label }),
|
|
1623
1623
|
i.description && /* @__PURE__ */ t("p", { className: "mt-0.5 text-xs leading-5 text-secondary", children: i.description })
|
|
1624
1624
|
]
|
|
1625
1625
|
},
|
|
@@ -1639,8 +1639,8 @@ const ue = p.forwardRef(
|
|
|
1639
1639
|
);
|
|
1640
1640
|
}
|
|
1641
1641
|
);
|
|
1642
|
-
|
|
1643
|
-
const xe =
|
|
1642
|
+
pe.displayName = "RefusalAnswer";
|
|
1643
|
+
const xe = b.forwardRef(({ spec: a, onFollowUp: l, onOptionSelect: c, onSourceSelect: d, className: m, ...o }, h) => {
|
|
1644
1644
|
var r;
|
|
1645
1645
|
return /* @__PURE__ */ n(
|
|
1646
1646
|
"div",
|
|
@@ -1656,30 +1656,30 @@ const xe = p.forwardRef(({ spec: a, onFollowUp: l, onOptionSelect: c, onSourceSe
|
|
|
1656
1656
|
var s;
|
|
1657
1657
|
return /* @__PURE__ */ n("div", { className: "rounded-xl border border-border bg-card px-4 py-3.5", children: [
|
|
1658
1658
|
/* @__PURE__ */ n("div", { className: "flex flex-wrap items-center gap-2", children: [
|
|
1659
|
-
/* @__PURE__ */ t("h3", { className: "text-sm font-
|
|
1659
|
+
/* @__PURE__ */ t("h3", { className: "text-sm font-medium text-foreground", children: i.term }),
|
|
1660
1660
|
i.category && /* @__PURE__ */ t(w, { variant: "soft", children: i.category })
|
|
1661
1661
|
] }),
|
|
1662
1662
|
i.body && /* @__PURE__ */ t("p", { className: "mt-1 text-sm leading-6 text-secondary", children: i.body }),
|
|
1663
1663
|
i.formula && /* @__PURE__ */ t(R, { isCopyable: !1, className: "mt-2", children: i.formula }),
|
|
1664
|
-
!!((s = i.items) != null && s.length) && /* @__PURE__ */ t("ul", { className: "mt-2 space-y-1.5", children: i.items.map((
|
|
1664
|
+
!!((s = i.items) != null && s.length) && /* @__PURE__ */ t("ul", { className: "mt-2 space-y-1.5", children: i.items.map((u) => /* @__PURE__ */ n(
|
|
1665
1665
|
"li",
|
|
1666
1666
|
{
|
|
1667
1667
|
className: "flex items-baseline justify-between gap-4 text-xs leading-5",
|
|
1668
1668
|
children: [
|
|
1669
|
-
/* @__PURE__ */ t("span", { className: "font-normal text-secondary", children:
|
|
1669
|
+
/* @__PURE__ */ t("span", { className: "font-normal text-secondary", children: u.label }),
|
|
1670
1670
|
/* @__PURE__ */ t(
|
|
1671
1671
|
"span",
|
|
1672
1672
|
{
|
|
1673
1673
|
className: g(
|
|
1674
1674
|
"min-w-0 text-right text-foreground",
|
|
1675
|
-
|
|
1675
|
+
u.code ? "break-all font-mono" : "tabular-nums"
|
|
1676
1676
|
),
|
|
1677
|
-
children:
|
|
1677
|
+
children: u.value
|
|
1678
1678
|
}
|
|
1679
1679
|
)
|
|
1680
1680
|
]
|
|
1681
1681
|
},
|
|
1682
|
-
|
|
1682
|
+
u.label
|
|
1683
1683
|
)) })
|
|
1684
1684
|
] }, i.term);
|
|
1685
1685
|
}),
|
|
@@ -1706,7 +1706,7 @@ const xe = p.forwardRef(({ spec: a, onFollowUp: l, onOptionSelect: c, onSourceSe
|
|
|
1706
1706
|
);
|
|
1707
1707
|
});
|
|
1708
1708
|
xe.displayName = "KnowledgeAnswer";
|
|
1709
|
-
const fe =
|
|
1709
|
+
const fe = b.forwardRef(
|
|
1710
1710
|
({ spec: a, onFollowUp: l, onOptionSelect: c, onSourceSelect: d, className: m, ...o }, h) => {
|
|
1711
1711
|
var r;
|
|
1712
1712
|
return /* @__PURE__ */ n(
|
|
@@ -1719,15 +1719,15 @@ const fe = p.forwardRef(
|
|
|
1719
1719
|
children: [
|
|
1720
1720
|
/* @__PURE__ */ t(f, { spec: a }),
|
|
1721
1721
|
/* @__PURE__ */ t("div", { className: "space-y-2", children: a.options.map((i) => {
|
|
1722
|
-
var s,
|
|
1722
|
+
var s, u, j, V;
|
|
1723
1723
|
return /* @__PURE__ */ n("div", { className: "rounded-2xl border border-border bg-card p-4", children: [
|
|
1724
1724
|
/* @__PURE__ */ n("div", { className: "flex flex-wrap items-center gap-2", children: [
|
|
1725
|
-
/* @__PURE__ */ t("h3", { className: "text-sm font-
|
|
1725
|
+
/* @__PURE__ */ t("h3", { className: "text-sm font-medium text-foreground", children: i.name }),
|
|
1726
1726
|
i.tag && /* @__PURE__ */ t(w, { variant: "soft", children: i.tag }),
|
|
1727
1727
|
i.recommended && /* @__PURE__ */ t(w, { variant: "soft", color: "primary", children: "Recommended" })
|
|
1728
1728
|
] }),
|
|
1729
1729
|
i.description && /* @__PURE__ */ t("p", { className: "mt-1 text-sm leading-6 text-secondary", children: i.description }),
|
|
1730
|
-
(!!((s = i.pros) != null && s.length) || !!((
|
|
1730
|
+
(!!((s = i.pros) != null && s.length) || !!((u = i.cons) != null && u.length)) && /* @__PURE__ */ n("div", { className: "mt-3 grid gap-x-6 gap-y-1.5 @lg:grid-cols-2", children: [
|
|
1731
1731
|
!!((j = i.pros) != null && j.length) && /* @__PURE__ */ t("ul", { className: "space-y-1.5", children: i.pros.map((C) => /* @__PURE__ */ n(
|
|
1732
1732
|
"li",
|
|
1733
1733
|
{
|
|
@@ -1771,7 +1771,7 @@ const fe = p.forwardRef(
|
|
|
1771
1771
|
className: "flex items-baseline justify-between gap-4 py-1.5",
|
|
1772
1772
|
children: [
|
|
1773
1773
|
/* @__PURE__ */ t("dt", { className: "text-sm font-normal text-secondary", children: i.when }),
|
|
1774
|
-
/* @__PURE__ */ t("dd", { className: "text-right text-sm font-
|
|
1774
|
+
/* @__PURE__ */ t("dd", { className: "text-right text-sm font-medium text-foreground", children: i.choose })
|
|
1775
1775
|
]
|
|
1776
1776
|
},
|
|
1777
1777
|
i.when
|
|
@@ -1790,7 +1790,7 @@ const fe = p.forwardRef(
|
|
|
1790
1790
|
}
|
|
1791
1791
|
);
|
|
1792
1792
|
fe.displayName = "DecisionAnswer";
|
|
1793
|
-
const ye =
|
|
1793
|
+
const ye = b.forwardRef(
|
|
1794
1794
|
({ spec: a, onFollowUp: l, onOptionSelect: c, onSourceSelect: d, className: m, ...o }, h) => {
|
|
1795
1795
|
var r;
|
|
1796
1796
|
return /* @__PURE__ */ n(
|
|
@@ -1803,9 +1803,9 @@ const ye = p.forwardRef(
|
|
|
1803
1803
|
children: [
|
|
1804
1804
|
/* @__PURE__ */ t(f, { spec: a }),
|
|
1805
1805
|
a.sections.map((i, s) => /* @__PURE__ */ n("section", { className: "space-y-2", children: [
|
|
1806
|
-
i.title && /* @__PURE__ */ t("h3", { className: "text-sm font-
|
|
1806
|
+
i.title && /* @__PURE__ */ t("h3", { className: "text-sm font-medium text-foreground", children: i.title }),
|
|
1807
1807
|
i.type === "text" && /* @__PURE__ */ t(W, { text: i.body }),
|
|
1808
|
-
i.type === "metrics" && /* @__PURE__ */ t(
|
|
1808
|
+
i.type === "metrics" && /* @__PURE__ */ t(pa, { items: i.items }),
|
|
1809
1809
|
i.type === "table" && /* @__PURE__ */ t(
|
|
1810
1810
|
ae,
|
|
1811
1811
|
{
|
|
@@ -1817,7 +1817,7 @@ const ye = p.forwardRef(
|
|
|
1817
1817
|
/* @__PURE__ */ t(te, { chart: i.chart }),
|
|
1818
1818
|
i.note && /* @__PURE__ */ t("p", { className: "text-xs text-tertiary", children: i.note })
|
|
1819
1819
|
] }),
|
|
1820
|
-
i.type === "list" && /* @__PURE__ */ t("ul", { className: "space-y-1.5", children: i.items.map((
|
|
1820
|
+
i.type === "list" && /* @__PURE__ */ t("ul", { className: "space-y-1.5", children: i.items.map((u) => /* @__PURE__ */ n(
|
|
1821
1821
|
"li",
|
|
1822
1822
|
{
|
|
1823
1823
|
className: "flex items-start gap-2 text-sm leading-6 text-secondary",
|
|
@@ -1830,22 +1830,22 @@ const ye = p.forwardRef(
|
|
|
1830
1830
|
}
|
|
1831
1831
|
),
|
|
1832
1832
|
/* @__PURE__ */ n("span", { children: [
|
|
1833
|
-
|
|
1834
|
-
|
|
1833
|
+
u.lead && /* @__PURE__ */ n("span", { className: "font-medium text-foreground", children: [
|
|
1834
|
+
u.lead,
|
|
1835
1835
|
" —",
|
|
1836
1836
|
" "
|
|
1837
1837
|
] }),
|
|
1838
|
-
|
|
1838
|
+
u.body
|
|
1839
1839
|
] })
|
|
1840
1840
|
]
|
|
1841
1841
|
},
|
|
1842
|
-
|
|
1842
|
+
u.body
|
|
1843
1843
|
)) })
|
|
1844
1844
|
] }, s)),
|
|
1845
1845
|
!!((r = a.definitions) != null && r.length) && /* @__PURE__ */ n("div", { className: "space-y-1.5 pt-1", children: [
|
|
1846
|
-
/* @__PURE__ */ t("p", { className: "text-xs font-
|
|
1846
|
+
/* @__PURE__ */ t("p", { className: "text-xs font-medium uppercase tracking-wider text-tertiary", children: "Definitions" }),
|
|
1847
1847
|
/* @__PURE__ */ t("dl", { className: "space-y-1", children: a.definitions.map((i) => /* @__PURE__ */ n("div", { className: "text-xs leading-5", children: [
|
|
1848
|
-
/* @__PURE__ */ t("dt", { className: "inline font-
|
|
1848
|
+
/* @__PURE__ */ t("dt", { className: "inline font-medium text-secondary", children: i.term }),
|
|
1849
1849
|
" ",
|
|
1850
1850
|
/* @__PURE__ */ n("dd", { className: "inline text-tertiary", children: [
|
|
1851
1851
|
"— ",
|
|
@@ -1867,7 +1867,7 @@ const ye = p.forwardRef(
|
|
|
1867
1867
|
}
|
|
1868
1868
|
);
|
|
1869
1869
|
ye.displayName = "ReportAnswer";
|
|
1870
|
-
const Na =
|
|
1870
|
+
const Na = b.forwardRef(
|
|
1871
1871
|
({ kind: a, className: l, ...c }, d) => {
|
|
1872
1872
|
const m = a === "trend" ? "chart" : a === "fact" ? "tiles" : a === "table" || a === "comparison" || a === "report" ? "table" : a === "narrative" || a === "explanation" || a === "refusal" ? "prose" : a ? "rows" : "block";
|
|
1873
1873
|
return /* @__PURE__ */ n(
|
|
@@ -1875,44 +1875,45 @@ const Na = p.forwardRef(
|
|
|
1875
1875
|
{
|
|
1876
1876
|
ref: d,
|
|
1877
1877
|
"data-answer-kind": a,
|
|
1878
|
+
role: "status",
|
|
1878
1879
|
"aria-label": "Building answer",
|
|
1879
1880
|
className: g("w-full max-w-2xl space-y-4", l),
|
|
1880
1881
|
...c,
|
|
1881
1882
|
children: [
|
|
1882
1883
|
/* @__PURE__ */ n("div", { className: "space-y-2", children: [
|
|
1883
|
-
/* @__PURE__ */ t(
|
|
1884
|
-
/* @__PURE__ */ t(
|
|
1885
|
-
/* @__PURE__ */ t(
|
|
1884
|
+
/* @__PURE__ */ t(p, { className: "h-3 w-24" }),
|
|
1885
|
+
/* @__PURE__ */ t(p, { className: "h-7 w-4/5" }),
|
|
1886
|
+
/* @__PURE__ */ t(p, { className: "h-4 w-full" })
|
|
1886
1887
|
] }),
|
|
1887
|
-
m === "chart" && /* @__PURE__ */ t(
|
|
1888
|
+
m === "chart" && /* @__PURE__ */ t(p, { className: "h-56 w-full rounded-2xl" }),
|
|
1888
1889
|
m === "tiles" && /* @__PURE__ */ n(D, { children: [
|
|
1889
|
-
/* @__PURE__ */ t(
|
|
1890
|
+
/* @__PURE__ */ t(p, { className: "h-24 w-full rounded-2xl" }),
|
|
1890
1891
|
/* @__PURE__ */ n("div", { className: "grid grid-cols-2 gap-2", children: [
|
|
1891
|
-
/* @__PURE__ */ t(
|
|
1892
|
-
/* @__PURE__ */ t(
|
|
1892
|
+
/* @__PURE__ */ t(p, { className: "h-16 rounded-xl" }),
|
|
1893
|
+
/* @__PURE__ */ t(p, { className: "h-16 rounded-xl" })
|
|
1893
1894
|
] })
|
|
1894
1895
|
] }),
|
|
1895
|
-
m === "table" && /* @__PURE__ */ t(
|
|
1896
|
+
m === "table" && /* @__PURE__ */ t(p, { className: "h-48 w-full rounded-2xl" }),
|
|
1896
1897
|
m === "rows" && /* @__PURE__ */ n("div", { className: "space-y-2", children: [
|
|
1897
|
-
/* @__PURE__ */ t(
|
|
1898
|
-
/* @__PURE__ */ t(
|
|
1899
|
-
/* @__PURE__ */ t(
|
|
1898
|
+
/* @__PURE__ */ t(p, { className: "h-12 w-full rounded-xl" }),
|
|
1899
|
+
/* @__PURE__ */ t(p, { className: "h-12 w-full rounded-xl" }),
|
|
1900
|
+
/* @__PURE__ */ t(p, { className: "h-12 w-full rounded-xl" })
|
|
1900
1901
|
] }),
|
|
1901
1902
|
m === "prose" && /* @__PURE__ */ n("div", { className: "space-y-2", children: [
|
|
1902
|
-
/* @__PURE__ */ t(
|
|
1903
|
-
/* @__PURE__ */ t(
|
|
1904
|
-
/* @__PURE__ */ t(
|
|
1905
|
-
/* @__PURE__ */ t(
|
|
1906
|
-
/* @__PURE__ */ t(
|
|
1903
|
+
/* @__PURE__ */ t(p, { className: "h-4 w-full" }),
|
|
1904
|
+
/* @__PURE__ */ t(p, { className: "h-4 w-full" }),
|
|
1905
|
+
/* @__PURE__ */ t(p, { className: "h-4 w-11/12" }),
|
|
1906
|
+
/* @__PURE__ */ t(p, { className: "h-4 w-full" }),
|
|
1907
|
+
/* @__PURE__ */ t(p, { className: "h-4 w-4/5" })
|
|
1907
1908
|
] }),
|
|
1908
|
-
m === "block" && /* @__PURE__ */ t(
|
|
1909
|
+
m === "block" && /* @__PURE__ */ t(p, { className: "h-48 w-full rounded-2xl" })
|
|
1909
1910
|
]
|
|
1910
1911
|
}
|
|
1911
1912
|
);
|
|
1912
1913
|
}
|
|
1913
1914
|
);
|
|
1914
1915
|
Na.displayName = "AnswerSkeleton";
|
|
1915
|
-
const wa =
|
|
1916
|
+
const wa = b.forwardRef(
|
|
1916
1917
|
({ spec: a, onCitationSelect: l, ...c }, d) => {
|
|
1917
1918
|
const m = (() => {
|
|
1918
1919
|
switch (a.kind) {
|
|
@@ -1939,11 +1940,11 @@ const wa = p.forwardRef(
|
|
|
1939
1940
|
case "clarification":
|
|
1940
1941
|
return /* @__PURE__ */ t(ge, { ref: d, spec: a, ...c });
|
|
1941
1942
|
case "empty":
|
|
1942
|
-
return /* @__PURE__ */ t(
|
|
1943
|
+
return /* @__PURE__ */ t(ue, { ref: d, spec: a, ...c });
|
|
1943
1944
|
case "error":
|
|
1944
|
-
return /* @__PURE__ */ t(
|
|
1945
|
+
return /* @__PURE__ */ t(be, { ref: d, spec: a, ...c });
|
|
1945
1946
|
case "refusal":
|
|
1946
|
-
return /* @__PURE__ */ t(
|
|
1947
|
+
return /* @__PURE__ */ t(pe, { ref: d, spec: a, ...c });
|
|
1947
1948
|
case "knowledge":
|
|
1948
1949
|
return /* @__PURE__ */ t(xe, { ref: d, spec: a, ...c });
|
|
1949
1950
|
case "decision":
|
|
@@ -1983,9 +1984,9 @@ export {
|
|
|
1983
1984
|
na as ConfirmationAnswerSchema,
|
|
1984
1985
|
fe as DecisionAnswer,
|
|
1985
1986
|
da as DecisionAnswerSchema,
|
|
1986
|
-
|
|
1987
|
+
ue as EmptyAnswer,
|
|
1987
1988
|
ia as EmptyAnswerSchema,
|
|
1988
|
-
|
|
1989
|
+
be as ErrorAnswer,
|
|
1989
1990
|
la as ErrorAnswerSchema,
|
|
1990
1991
|
se as ExplanationAnswer,
|
|
1991
1992
|
Je as ExplanationAnswerSchema,
|
|
@@ -1997,7 +1998,7 @@ export {
|
|
|
1997
1998
|
Ze as NarrativeAnswerSchema,
|
|
1998
1999
|
me as RankingAnswer,
|
|
1999
2000
|
ta as RankingAnswerSchema,
|
|
2000
|
-
|
|
2001
|
+
pe as RefusalAnswer,
|
|
2001
2002
|
sa as RefusalAnswerSchema,
|
|
2002
2003
|
ye as ReportAnswer,
|
|
2003
2004
|
ma as ReportAnswerSchema,
|