@axis-ds/agentic-ui 1.1.2 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/dist/index.mjs +10 -10
- package/package.json +18 -15
- package/dist/chunk-2BWCQQLU.mjs +0 -136
- package/dist/chunk-3TH7GFBD.mjs +0 -83
- package/dist/chunk-4PCJFQHQ.mjs +0 -66
- package/dist/chunk-D6GHMPBC.mjs +0 -76
- package/dist/chunk-DPENLPBM.mjs +0 -105
- package/dist/chunk-EF4MECAI.mjs +0 -81
- package/dist/chunk-HLW7VEFF.mjs +0 -47
- package/dist/chunk-HWISMHCP.mjs +0 -33
- package/dist/chunk-MGQ7AEYE.mjs +0 -94
- package/dist/chunk-O5VXD6C3.mjs +0 -114
- package/dist/chunk-O5WFJCWK.mjs +0 -63
- package/dist/chunk-OOFM7NNH.mjs +0 -68
- package/dist/chunk-PAKLXPHD.mjs +0 -115
- package/dist/chunk-S3HVRSN2.mjs +0 -95
- package/dist/chunk-TCCZL2D5.mjs +0 -51
- package/dist/chunk-TKUAT5WE.mjs +0 -105
- package/dist/chunk-UG4H7RIP.mjs +0 -77
- package/dist/chunk-VKLPWFAI.mjs +0 -79
package/dist/chunk-S3HVRSN2.mjs
DELETED
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
SOURCE_TYPE_LABELS
|
|
3
|
-
} from "./chunk-HWISMHCP.mjs";
|
|
4
|
-
|
|
5
|
-
// src/source-panel/index.tsx
|
|
6
|
-
import * as React from "react";
|
|
7
|
-
import { cn } from "@axis-ds/ui-react";
|
|
8
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
|
-
var sourceIcons = {
|
|
10
|
-
web: /* @__PURE__ */ jsx("svg", { className: "w-4 h-4", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M21 12a9 9 0 01-9 9m9-9a9 9 0 00-9-9m9 9H3m9 9a9 9 0 01-9-9m9 9c1.657 0 3-4.03 3-9s-1.343-9-3-9m0 18c-1.657 0-3-4.03-3-9s1.343-9 3-9m-9 9a9 9 0 019-9" }) }),
|
|
11
|
-
file: /* @__PURE__ */ jsx("svg", { className: "w-4 h-4", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z" }) }),
|
|
12
|
-
database: /* @__PURE__ */ jsx("svg", { className: "w-4 h-4", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M4 7v10c0 2.21 3.582 4 8 4s8-1.79 8-4V7M4 7c0 2.21 3.582 4 8 4s8-1.79 8-4M4 7c0-2.21 3.582-4 8-4s8 1.79 8 4" }) }),
|
|
13
|
-
api: /* @__PURE__ */ jsx("svg", { className: "w-4 h-4", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M8 9l3 3-3 3m5 0h3M5 20h14a2 2 0 002-2V6a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z" }) })
|
|
14
|
-
};
|
|
15
|
-
function SourcePanel({
|
|
16
|
-
sources,
|
|
17
|
-
expandable = true,
|
|
18
|
-
defaultExpanded = false,
|
|
19
|
-
maxItems = 5,
|
|
20
|
-
className
|
|
21
|
-
}) {
|
|
22
|
-
const [isExpanded, setIsExpanded] = React.useState(defaultExpanded);
|
|
23
|
-
const displayedSources = isExpanded ? sources : sources.slice(0, maxItems);
|
|
24
|
-
const hasMore = sources.length > maxItems;
|
|
25
|
-
const listId = React.useId();
|
|
26
|
-
if (sources.length === 0) return null;
|
|
27
|
-
return /* @__PURE__ */ jsxs(
|
|
28
|
-
"div",
|
|
29
|
-
{
|
|
30
|
-
className: cn(
|
|
31
|
-
"rounded-lg border p-3",
|
|
32
|
-
"bg-[var(--axis-surface-secondary)] border-[var(--axis-border-default)]",
|
|
33
|
-
className
|
|
34
|
-
),
|
|
35
|
-
children: [
|
|
36
|
-
/* @__PURE__ */ jsxs("h4", { className: "text-xs font-medium text-[var(--axis-text-secondary)] mb-2", children: [
|
|
37
|
-
"\uCD9C\uCC98 (",
|
|
38
|
-
sources.length,
|
|
39
|
-
"\uAC1C)"
|
|
40
|
-
] }),
|
|
41
|
-
/* @__PURE__ */ jsx("div", { id: listId, role: "list", "aria-label": "\uCD9C\uCC98 \uBAA9\uB85D", className: "space-y-2", children: displayedSources.map((source) => /* @__PURE__ */ jsxs(
|
|
42
|
-
"div",
|
|
43
|
-
{
|
|
44
|
-
role: "listitem",
|
|
45
|
-
className: "flex items-start gap-2 p-2 rounded-md bg-[var(--axis-surface-default)]",
|
|
46
|
-
children: [
|
|
47
|
-
/* @__PURE__ */ jsx("span", { className: "text-[var(--axis-icon-secondary)] mt-0.5", "aria-hidden": "true", children: sourceIcons[source.type] }),
|
|
48
|
-
/* @__PURE__ */ jsxs("div", { className: "flex-1 min-w-0", children: [
|
|
49
|
-
/* @__PURE__ */ jsxs("span", { className: "sr-only", children: [
|
|
50
|
-
SOURCE_TYPE_LABELS[source.type],
|
|
51
|
-
":"
|
|
52
|
-
] }),
|
|
53
|
-
/* @__PURE__ */ jsx("p", { className: "text-sm font-medium text-[var(--axis-text-primary)] truncate", children: source.url ? /* @__PURE__ */ jsxs(
|
|
54
|
-
"a",
|
|
55
|
-
{
|
|
56
|
-
href: source.url,
|
|
57
|
-
target: "_blank",
|
|
58
|
-
rel: "noopener noreferrer",
|
|
59
|
-
className: "hover:underline",
|
|
60
|
-
"aria-label": `${source.title} (\uC0C8 \uCC3D\uC5D0\uC11C \uC5F4\uB9BC)`,
|
|
61
|
-
children: [
|
|
62
|
-
source.title,
|
|
63
|
-
/* @__PURE__ */ jsx("span", { className: "sr-only", children: ", \uC0C8 \uCC3D\uC5D0\uC11C \uC5F4\uB9BC" })
|
|
64
|
-
]
|
|
65
|
-
}
|
|
66
|
-
) : source.title }),
|
|
67
|
-
source.snippet && /* @__PURE__ */ jsx("p", { className: "text-xs text-[var(--axis-text-secondary)] line-clamp-2 mt-0.5", children: source.snippet }),
|
|
68
|
-
source.path && /* @__PURE__ */ jsx("code", { className: "text-xs text-[var(--axis-text-tertiary)]", children: source.path })
|
|
69
|
-
] }),
|
|
70
|
-
source.relevance !== void 0 && /* @__PURE__ */ jsxs("span", { className: "text-xs text-[var(--axis-text-tertiary)]", children: [
|
|
71
|
-
Math.round(source.relevance * 100),
|
|
72
|
-
"%"
|
|
73
|
-
] })
|
|
74
|
-
]
|
|
75
|
-
},
|
|
76
|
-
source.id
|
|
77
|
-
)) }),
|
|
78
|
-
expandable && hasMore && /* @__PURE__ */ jsx(
|
|
79
|
-
"button",
|
|
80
|
-
{
|
|
81
|
-
onClick: () => setIsExpanded(!isExpanded),
|
|
82
|
-
"aria-expanded": isExpanded,
|
|
83
|
-
"aria-controls": listId,
|
|
84
|
-
className: "mt-2 text-xs text-[var(--axis-text-brand)] hover:underline",
|
|
85
|
-
children: isExpanded ? "\uC811\uAE30" : `${sources.length - maxItems}\uAC1C \uB354 \uBCF4\uAE30`
|
|
86
|
-
}
|
|
87
|
-
)
|
|
88
|
-
]
|
|
89
|
-
}
|
|
90
|
-
);
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
export {
|
|
94
|
-
SourcePanel
|
|
95
|
-
};
|
package/dist/chunk-TCCZL2D5.mjs
DELETED
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
// src/streaming-text/index.tsx
|
|
2
|
-
import * as React from "react";
|
|
3
|
-
import { cn } from "@axis-ds/ui-react";
|
|
4
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
-
function StreamingText({
|
|
6
|
-
text,
|
|
7
|
-
speed = 20,
|
|
8
|
-
isComplete = false,
|
|
9
|
-
showCursor = true,
|
|
10
|
-
onComplete,
|
|
11
|
-
className
|
|
12
|
-
}) {
|
|
13
|
-
const [displayedText, setDisplayedText] = React.useState("");
|
|
14
|
-
const [isStreaming, setIsStreaming] = React.useState(false);
|
|
15
|
-
const prevTextRef = React.useRef("");
|
|
16
|
-
React.useEffect(() => {
|
|
17
|
-
if (isComplete) {
|
|
18
|
-
setDisplayedText(text);
|
|
19
|
-
setIsStreaming(false);
|
|
20
|
-
return;
|
|
21
|
-
}
|
|
22
|
-
if (text.length > prevTextRef.current.length && text.startsWith(prevTextRef.current)) {
|
|
23
|
-
const newText = text.slice(prevTextRef.current.length);
|
|
24
|
-
let charIndex = 0;
|
|
25
|
-
setIsStreaming(true);
|
|
26
|
-
const interval = setInterval(() => {
|
|
27
|
-
if (charIndex < newText.length) {
|
|
28
|
-
setDisplayedText((prev) => prev + newText[charIndex]);
|
|
29
|
-
charIndex++;
|
|
30
|
-
} else {
|
|
31
|
-
clearInterval(interval);
|
|
32
|
-
setIsStreaming(false);
|
|
33
|
-
if (onComplete) onComplete();
|
|
34
|
-
}
|
|
35
|
-
}, speed);
|
|
36
|
-
prevTextRef.current = text;
|
|
37
|
-
return () => clearInterval(interval);
|
|
38
|
-
} else if (text !== prevTextRef.current) {
|
|
39
|
-
setDisplayedText("");
|
|
40
|
-
prevTextRef.current = "";
|
|
41
|
-
}
|
|
42
|
-
}, [text, speed, isComplete, onComplete]);
|
|
43
|
-
return /* @__PURE__ */ jsxs("div", { className: cn("relative", className), children: [
|
|
44
|
-
/* @__PURE__ */ jsx("span", { className: "text-[var(--axis-text-primary)] whitespace-pre-wrap", children: displayedText }),
|
|
45
|
-
showCursor && isStreaming && /* @__PURE__ */ jsx("span", { className: "inline-block w-0.5 h-4 ml-0.5 bg-[var(--axis-text-primary)] animate-pulse" })
|
|
46
|
-
] });
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
export {
|
|
50
|
-
StreamingText
|
|
51
|
-
};
|
package/dist/chunk-TKUAT5WE.mjs
DELETED
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
// src/tool-call-card/index.tsx
|
|
2
|
-
import * as React from "react";
|
|
3
|
-
import { cn } from "@axis-ds/ui-react";
|
|
4
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
-
var statusConfig = {
|
|
6
|
-
pending: {
|
|
7
|
-
color: "text-[var(--axis-color-gray-400)]",
|
|
8
|
-
icon: /* @__PURE__ */ jsx("svg", { className: "w-4 h-4", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "10", strokeWidth: 2 }) })
|
|
9
|
-
},
|
|
10
|
-
running: {
|
|
11
|
-
color: "text-[var(--axis-color-blue-500)]",
|
|
12
|
-
icon: /* @__PURE__ */ jsxs("svg", { className: "w-4 h-4 animate-spin", viewBox: "0 0 24 24", fill: "none", children: [
|
|
13
|
-
/* @__PURE__ */ jsx("circle", { className: "opacity-25", cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "4" }),
|
|
14
|
-
/* @__PURE__ */ jsx("path", { className: "opacity-75", fill: "currentColor", d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z" })
|
|
15
|
-
] })
|
|
16
|
-
},
|
|
17
|
-
success: {
|
|
18
|
-
color: "text-[var(--axis-color-green-500)]",
|
|
19
|
-
icon: /* @__PURE__ */ jsx("svg", { className: "w-4 h-4", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M5 13l4 4L19 7" }) })
|
|
20
|
-
},
|
|
21
|
-
error: {
|
|
22
|
-
color: "text-[var(--axis-color-red-500)]",
|
|
23
|
-
icon: /* @__PURE__ */ jsx("svg", { className: "w-4 h-4", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M6 18L18 6M6 6l12 12" }) })
|
|
24
|
-
}
|
|
25
|
-
};
|
|
26
|
-
function ToolCallCard({
|
|
27
|
-
toolName,
|
|
28
|
-
description,
|
|
29
|
-
status,
|
|
30
|
-
input,
|
|
31
|
-
output,
|
|
32
|
-
error,
|
|
33
|
-
duration,
|
|
34
|
-
defaultExpanded = false,
|
|
35
|
-
className
|
|
36
|
-
}) {
|
|
37
|
-
const [isExpanded, setIsExpanded] = React.useState(defaultExpanded);
|
|
38
|
-
const config = statusConfig[status];
|
|
39
|
-
return /* @__PURE__ */ jsxs(
|
|
40
|
-
"div",
|
|
41
|
-
{
|
|
42
|
-
className: cn(
|
|
43
|
-
"rounded-lg border overflow-hidden",
|
|
44
|
-
"bg-[var(--axis-surface-default)] border-[var(--axis-border-default)]",
|
|
45
|
-
className
|
|
46
|
-
),
|
|
47
|
-
children: [
|
|
48
|
-
/* @__PURE__ */ jsxs(
|
|
49
|
-
"button",
|
|
50
|
-
{
|
|
51
|
-
onClick: () => setIsExpanded(!isExpanded),
|
|
52
|
-
className: "w-full flex items-center justify-between p-3 hover:bg-[var(--axis-surface-secondary)] transition-colors",
|
|
53
|
-
children: [
|
|
54
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
55
|
-
/* @__PURE__ */ jsx("span", { className: config.color, children: config.icon }),
|
|
56
|
-
/* @__PURE__ */ jsx("code", { className: "text-sm font-mono text-[var(--axis-text-primary)]", children: toolName }),
|
|
57
|
-
description && /* @__PURE__ */ jsxs("span", { className: "text-xs text-[var(--axis-text-secondary)]", children: [
|
|
58
|
-
"\u2014 ",
|
|
59
|
-
description
|
|
60
|
-
] })
|
|
61
|
-
] }),
|
|
62
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
63
|
-
duration !== void 0 && /* @__PURE__ */ jsxs("span", { className: "text-xs text-[var(--axis-text-tertiary)]", children: [
|
|
64
|
-
duration,
|
|
65
|
-
"ms"
|
|
66
|
-
] }),
|
|
67
|
-
/* @__PURE__ */ jsx(
|
|
68
|
-
"svg",
|
|
69
|
-
{
|
|
70
|
-
className: cn(
|
|
71
|
-
"w-4 h-4 text-[var(--axis-text-secondary)] transition-transform",
|
|
72
|
-
isExpanded && "rotate-180"
|
|
73
|
-
),
|
|
74
|
-
fill: "none",
|
|
75
|
-
stroke: "currentColor",
|
|
76
|
-
viewBox: "0 0 24 24",
|
|
77
|
-
children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M19 9l-7 7-7-7" })
|
|
78
|
-
}
|
|
79
|
-
)
|
|
80
|
-
] })
|
|
81
|
-
]
|
|
82
|
-
}
|
|
83
|
-
),
|
|
84
|
-
isExpanded && /* @__PURE__ */ jsxs("div", { className: "border-t border-[var(--axis-border-default)] p-3 space-y-3", children: [
|
|
85
|
-
input && /* @__PURE__ */ jsxs("div", { children: [
|
|
86
|
-
/* @__PURE__ */ jsx("h5", { className: "text-xs font-medium text-[var(--axis-text-secondary)] mb-1", children: "\uC785\uB825" }),
|
|
87
|
-
/* @__PURE__ */ jsx("pre", { className: "text-xs p-2 rounded bg-[var(--axis-surface-secondary)] overflow-x-auto", children: /* @__PURE__ */ jsx("code", { className: "text-[var(--axis-text-primary)]", children: JSON.stringify(input, null, 2) }) })
|
|
88
|
-
] }),
|
|
89
|
-
output && /* @__PURE__ */ jsxs("div", { children: [
|
|
90
|
-
/* @__PURE__ */ jsx("h5", { className: "text-xs font-medium text-[var(--axis-text-secondary)] mb-1", children: "\uCD9C\uB825" }),
|
|
91
|
-
/* @__PURE__ */ jsx("pre", { className: "text-xs p-2 rounded bg-[var(--axis-surface-secondary)] overflow-x-auto", children: /* @__PURE__ */ jsx("code", { className: "text-[var(--axis-text-primary)]", children: typeof output === "string" ? output : JSON.stringify(output, null, 2) }) })
|
|
92
|
-
] }),
|
|
93
|
-
error && /* @__PURE__ */ jsxs("div", { children: [
|
|
94
|
-
/* @__PURE__ */ jsx("h5", { className: "text-xs font-medium text-[var(--axis-text-error)] mb-1", children: "\uC5D0\uB7EC" }),
|
|
95
|
-
/* @__PURE__ */ jsx("pre", { className: "text-xs p-2 rounded bg-[var(--axis-surface-error)] overflow-x-auto", children: /* @__PURE__ */ jsx("code", { className: "text-[var(--axis-text-error)]", children: error }) })
|
|
96
|
-
] })
|
|
97
|
-
] })
|
|
98
|
-
]
|
|
99
|
-
}
|
|
100
|
-
);
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
export {
|
|
104
|
-
ToolCallCard
|
|
105
|
-
};
|
package/dist/chunk-UG4H7RIP.mjs
DELETED
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
STATUS_LABELS
|
|
3
|
-
} from "./chunk-HWISMHCP.mjs";
|
|
4
|
-
|
|
5
|
-
// src/step-timeline/index.tsx
|
|
6
|
-
import { cn } from "@axis-ds/ui-react";
|
|
7
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
-
function StepTimeline({
|
|
9
|
-
steps,
|
|
10
|
-
orientation = "vertical",
|
|
11
|
-
className
|
|
12
|
-
}) {
|
|
13
|
-
const isVertical = orientation === "vertical";
|
|
14
|
-
return /* @__PURE__ */ jsx(
|
|
15
|
-
"div",
|
|
16
|
-
{
|
|
17
|
-
role: "list",
|
|
18
|
-
"aria-label": "\uC791\uC5C5 \uD0C0\uC784\uB77C\uC778",
|
|
19
|
-
className: cn(
|
|
20
|
-
isVertical ? "flex flex-col gap-4" : "flex items-center gap-2",
|
|
21
|
-
className
|
|
22
|
-
),
|
|
23
|
-
children: steps.map((step, index) => /* @__PURE__ */ jsxs(
|
|
24
|
-
"div",
|
|
25
|
-
{
|
|
26
|
-
role: "listitem",
|
|
27
|
-
"aria-current": step.status === "running" ? "step" : void 0,
|
|
28
|
-
className: cn(
|
|
29
|
-
"relative flex",
|
|
30
|
-
isVertical ? "items-start gap-3" : "flex-col items-center"
|
|
31
|
-
),
|
|
32
|
-
children: [
|
|
33
|
-
index < steps.length - 1 && /* @__PURE__ */ jsx(
|
|
34
|
-
"div",
|
|
35
|
-
{
|
|
36
|
-
"aria-hidden": "true",
|
|
37
|
-
className: cn(
|
|
38
|
-
"absolute bg-[var(--axis-border-default)]",
|
|
39
|
-
isVertical ? "left-2.5 top-6 w-0.5 h-full -translate-x-1/2" : "top-2.5 left-6 h-0.5 w-full"
|
|
40
|
-
)
|
|
41
|
-
}
|
|
42
|
-
),
|
|
43
|
-
/* @__PURE__ */ jsx(
|
|
44
|
-
"div",
|
|
45
|
-
{
|
|
46
|
-
"aria-hidden": "true",
|
|
47
|
-
className: cn(
|
|
48
|
-
"relative z-10 w-5 h-5 rounded-full flex items-center justify-center",
|
|
49
|
-
step.status === "complete" && "bg-[var(--axis-color-green-500)]",
|
|
50
|
-
step.status === "running" && "bg-[var(--axis-color-blue-500)] animate-pulse",
|
|
51
|
-
step.status === "error" && "bg-[var(--axis-color-red-500)]",
|
|
52
|
-
step.status === "skipped" && "bg-[var(--axis-color-gray-300)]",
|
|
53
|
-
step.status === "pending" && "bg-[var(--axis-color-gray-300)]"
|
|
54
|
-
),
|
|
55
|
-
children: step.status === "complete" && /* @__PURE__ */ jsx("svg", { className: "w-3 h-3 text-white", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 3, d: "M5 13l4 4L19 7" }) })
|
|
56
|
-
}
|
|
57
|
-
),
|
|
58
|
-
/* @__PURE__ */ jsxs("div", { className: cn(isVertical ? "flex-1" : "text-center mt-2"), children: [
|
|
59
|
-
/* @__PURE__ */ jsxs("span", { className: "sr-only", children: [
|
|
60
|
-
STATUS_LABELS[step.status],
|
|
61
|
-
":"
|
|
62
|
-
] }),
|
|
63
|
-
/* @__PURE__ */ jsx("p", { className: "text-sm font-medium text-[var(--axis-text-primary)]", children: step.label }),
|
|
64
|
-
step.description && /* @__PURE__ */ jsx("p", { className: "text-xs text-[var(--axis-text-secondary)]", children: step.description }),
|
|
65
|
-
step.timestamp && /* @__PURE__ */ jsx("p", { className: "text-xs text-[var(--axis-text-tertiary)]", children: step.timestamp.toLocaleTimeString() })
|
|
66
|
-
] })
|
|
67
|
-
]
|
|
68
|
-
},
|
|
69
|
-
step.id
|
|
70
|
-
))
|
|
71
|
-
}
|
|
72
|
-
);
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
export {
|
|
76
|
-
StepTimeline
|
|
77
|
-
};
|
package/dist/chunk-VKLPWFAI.mjs
DELETED
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
// src/source-panel/index.tsx
|
|
2
|
-
import * as React from "react";
|
|
3
|
-
import { cn } from "@axis-ds/ui-react";
|
|
4
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
-
var sourceIcons = {
|
|
6
|
-
web: /* @__PURE__ */ jsx("svg", { className: "w-4 h-4", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M21 12a9 9 0 01-9 9m9-9a9 9 0 00-9-9m9 9H3m9 9a9 9 0 01-9-9m9 9c1.657 0 3-4.03 3-9s-1.343-9-3-9m0 18c-1.657 0-3-4.03-3-9s1.343-9 3-9m-9 9a9 9 0 019-9" }) }),
|
|
7
|
-
file: /* @__PURE__ */ jsx("svg", { className: "w-4 h-4", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z" }) }),
|
|
8
|
-
database: /* @__PURE__ */ jsx("svg", { className: "w-4 h-4", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M4 7v10c0 2.21 3.582 4 8 4s8-1.79 8-4V7M4 7c0 2.21 3.582 4 8 4s8-1.79 8-4M4 7c0-2.21 3.582-4 8-4s8 1.79 8 4" }) }),
|
|
9
|
-
api: /* @__PURE__ */ jsx("svg", { className: "w-4 h-4", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M8 9l3 3-3 3m5 0h3M5 20h14a2 2 0 002-2V6a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z" }) })
|
|
10
|
-
};
|
|
11
|
-
function SourcePanel({
|
|
12
|
-
sources,
|
|
13
|
-
expandable = true,
|
|
14
|
-
defaultExpanded = false,
|
|
15
|
-
maxItems = 5,
|
|
16
|
-
className
|
|
17
|
-
}) {
|
|
18
|
-
const [isExpanded, setIsExpanded] = React.useState(defaultExpanded);
|
|
19
|
-
const displayedSources = isExpanded ? sources : sources.slice(0, maxItems);
|
|
20
|
-
const hasMore = sources.length > maxItems;
|
|
21
|
-
if (sources.length === 0) return null;
|
|
22
|
-
return /* @__PURE__ */ jsxs(
|
|
23
|
-
"div",
|
|
24
|
-
{
|
|
25
|
-
className: cn(
|
|
26
|
-
"rounded-lg border p-3",
|
|
27
|
-
"bg-[var(--axis-surface-secondary)] border-[var(--axis-border-default)]",
|
|
28
|
-
className
|
|
29
|
-
),
|
|
30
|
-
children: [
|
|
31
|
-
/* @__PURE__ */ jsxs("h4", { className: "text-xs font-medium text-[var(--axis-text-secondary)] mb-2", children: [
|
|
32
|
-
"\uCD9C\uCC98 (",
|
|
33
|
-
sources.length,
|
|
34
|
-
"\uAC1C)"
|
|
35
|
-
] }),
|
|
36
|
-
/* @__PURE__ */ jsx("div", { className: "space-y-2", children: displayedSources.map((source) => /* @__PURE__ */ jsxs(
|
|
37
|
-
"div",
|
|
38
|
-
{
|
|
39
|
-
className: "flex items-start gap-2 p-2 rounded-md bg-[var(--axis-surface-default)]",
|
|
40
|
-
children: [
|
|
41
|
-
/* @__PURE__ */ jsx("span", { className: "text-[var(--axis-icon-secondary)] mt-0.5", children: sourceIcons[source.type] }),
|
|
42
|
-
/* @__PURE__ */ jsxs("div", { className: "flex-1 min-w-0", children: [
|
|
43
|
-
/* @__PURE__ */ jsx("p", { className: "text-sm font-medium text-[var(--axis-text-primary)] truncate", children: source.url ? /* @__PURE__ */ jsx(
|
|
44
|
-
"a",
|
|
45
|
-
{
|
|
46
|
-
href: source.url,
|
|
47
|
-
target: "_blank",
|
|
48
|
-
rel: "noopener noreferrer",
|
|
49
|
-
className: "hover:underline",
|
|
50
|
-
children: source.title
|
|
51
|
-
}
|
|
52
|
-
) : source.title }),
|
|
53
|
-
source.snippet && /* @__PURE__ */ jsx("p", { className: "text-xs text-[var(--axis-text-secondary)] line-clamp-2 mt-0.5", children: source.snippet }),
|
|
54
|
-
source.path && /* @__PURE__ */ jsx("code", { className: "text-xs text-[var(--axis-text-tertiary)]", children: source.path })
|
|
55
|
-
] }),
|
|
56
|
-
source.relevance !== void 0 && /* @__PURE__ */ jsxs("span", { className: "text-xs text-[var(--axis-text-tertiary)]", children: [
|
|
57
|
-
Math.round(source.relevance * 100),
|
|
58
|
-
"%"
|
|
59
|
-
] })
|
|
60
|
-
]
|
|
61
|
-
},
|
|
62
|
-
source.id
|
|
63
|
-
)) }),
|
|
64
|
-
expandable && hasMore && /* @__PURE__ */ jsx(
|
|
65
|
-
"button",
|
|
66
|
-
{
|
|
67
|
-
onClick: () => setIsExpanded(!isExpanded),
|
|
68
|
-
className: "mt-2 text-xs text-[var(--axis-text-brand)] hover:underline",
|
|
69
|
-
children: isExpanded ? "\uC811\uAE30" : `${sources.length - maxItems}\uAC1C \uB354 \uBCF4\uAE30`
|
|
70
|
-
}
|
|
71
|
-
)
|
|
72
|
-
]
|
|
73
|
-
}
|
|
74
|
-
);
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
export {
|
|
78
|
-
SourcePanel
|
|
79
|
-
};
|