@axis-ds/agentic-ui 1.1.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/README.md +31 -0
- package/dist/agent-avatar/index.d.mts +22 -0
- package/dist/agent-avatar/index.d.ts +22 -0
- package/dist/agent-avatar/index.js +112 -0
- package/dist/agent-avatar/index.mjs +7 -0
- package/dist/approval-card/index.d.mts +31 -0
- package/dist/approval-card/index.d.ts +31 -0
- package/dist/approval-card/index.js +133 -0
- package/dist/approval-card/index.mjs +7 -0
- package/dist/attachment-card/index.d.mts +30 -0
- package/dist/attachment-card/index.d.ts +30 -0
- package/dist/attachment-card/index.js +140 -0
- package/dist/attachment-card/index.mjs +7 -0
- package/dist/chunk-2BWCQQLU.mjs +136 -0
- package/dist/chunk-3TH7GFBD.mjs +83 -0
- package/dist/chunk-4PCJFQHQ.mjs +66 -0
- package/dist/chunk-657RY6MM.mjs +106 -0
- package/dist/chunk-7UGSLEYG.mjs +75 -0
- package/dist/chunk-D6GHMPBC.mjs +76 -0
- package/dist/chunk-DPENLPBM.mjs +105 -0
- package/dist/chunk-DPLGRVNQ.mjs +95 -0
- package/dist/chunk-EF4MECAI.mjs +81 -0
- package/dist/chunk-ENIWC4WX.mjs +94 -0
- package/dist/chunk-ETFET3LT.mjs +72 -0
- package/dist/chunk-FAJF5RCY.mjs +115 -0
- package/dist/chunk-FPOHPDZ2.mjs +109 -0
- package/dist/chunk-FYAMA32G.mjs +50 -0
- package/dist/chunk-GQYOOLDL.mjs +63 -0
- package/dist/chunk-H6VXOP7U.mjs +86 -0
- package/dist/chunk-HLW7VEFF.mjs +47 -0
- package/dist/chunk-HWISMHCP.mjs +33 -0
- package/dist/chunk-KH4OXDEV.mjs +83 -0
- package/dist/chunk-KJVPVBET.mjs +103 -0
- package/dist/chunk-LZKOCELQ.mjs +136 -0
- package/dist/chunk-MGQ7AEYE.mjs +94 -0
- package/dist/chunk-MVBXXDZB.mjs +83 -0
- package/dist/chunk-NRBIHROX.mjs +162 -0
- package/dist/chunk-O5VXD6C3.mjs +114 -0
- package/dist/chunk-O5WFJCWK.mjs +63 -0
- package/dist/chunk-OOFM7NNH.mjs +68 -0
- package/dist/chunk-PAKLXPHD.mjs +115 -0
- package/dist/chunk-PWKN5UHT.mjs +152 -0
- package/dist/chunk-RGBY6EEU.mjs +80 -0
- package/dist/chunk-RGPKTWK4.mjs +77 -0
- package/dist/chunk-S3HVRSN2.mjs +95 -0
- package/dist/chunk-SCZ4BQ2G.mjs +68 -0
- package/dist/chunk-TCCZL2D5.mjs +51 -0
- package/dist/chunk-TKUAT5WE.mjs +105 -0
- package/dist/chunk-UG4H7RIP.mjs +77 -0
- package/dist/chunk-VKLPWFAI.mjs +79 -0
- package/dist/code-block/index.d.mts +24 -0
- package/dist/code-block/index.d.ts +24 -0
- package/dist/code-block/index.js +114 -0
- package/dist/code-block/index.mjs +6 -0
- package/dist/context-panel/index.d.mts +32 -0
- package/dist/context-panel/index.d.ts +32 -0
- package/dist/context-panel/index.js +137 -0
- package/dist/context-panel/index.mjs +6 -0
- package/dist/diff-viewer/index.d.mts +21 -0
- package/dist/diff-viewer/index.d.ts +21 -0
- package/dist/diff-viewer/index.js +201 -0
- package/dist/diff-viewer/index.mjs +7 -0
- package/dist/feedback-buttons/index.d.mts +21 -0
- package/dist/feedback-buttons/index.d.ts +21 -0
- package/dist/feedback-buttons/index.js +111 -0
- package/dist/feedback-buttons/index.mjs +7 -0
- package/dist/index.d.mts +20 -0
- package/dist/index.d.ts +20 -0
- package/dist/index.js +1774 -0
- package/dist/index.mjs +75 -0
- package/dist/message-bubble/index.d.mts +29 -0
- package/dist/message-bubble/index.d.ts +29 -0
- package/dist/message-bubble/index.js +135 -0
- package/dist/message-bubble/index.mjs +7 -0
- package/dist/plan-card/index.d.mts +32 -0
- package/dist/plan-card/index.d.ts +32 -0
- package/dist/plan-card/index.js +202 -0
- package/dist/plan-card/index.mjs +7 -0
- package/dist/recovery-banner/index.d.mts +20 -0
- package/dist/recovery-banner/index.d.ts +20 -0
- package/dist/recovery-banner/index.js +109 -0
- package/dist/recovery-banner/index.mjs +6 -0
- package/dist/run-progress/index.d.mts +29 -0
- package/dist/run-progress/index.d.ts +29 -0
- package/dist/run-progress/index.js +179 -0
- package/dist/run-progress/index.mjs +7 -0
- package/dist/source-panel/index.d.mts +25 -0
- package/dist/source-panel/index.d.ts +25 -0
- package/dist/source-panel/index.js +135 -0
- package/dist/source-panel/index.mjs +7 -0
- package/dist/step-timeline/index.d.mts +21 -0
- package/dist/step-timeline/index.d.ts +21 -0
- package/dist/step-timeline/index.js +110 -0
- package/dist/step-timeline/index.mjs +7 -0
- package/dist/streaming-text/index.d.mts +27 -0
- package/dist/streaming-text/index.d.ts +27 -0
- package/dist/streaming-text/index.js +97 -0
- package/dist/streaming-text/index.mjs +6 -0
- package/dist/surface-renderer/index.d.mts +22 -0
- package/dist/surface-renderer/index.d.ts +22 -0
- package/dist/surface-renderer/index.js +107 -0
- package/dist/surface-renderer/index.mjs +6 -0
- package/dist/thinking-indicator/index.d.mts +16 -0
- package/dist/thinking-indicator/index.d.ts +16 -0
- package/dist/thinking-indicator/index.js +74 -0
- package/dist/thinking-indicator/index.mjs +6 -0
- package/dist/token-usage-indicator/index.d.mts +22 -0
- package/dist/token-usage-indicator/index.d.ts +22 -0
- package/dist/token-usage-indicator/index.js +110 -0
- package/dist/token-usage-indicator/index.mjs +6 -0
- package/dist/tool-call-card/index.d.mts +31 -0
- package/dist/tool-call-card/index.d.ts +31 -0
- package/dist/tool-call-card/index.js +158 -0
- package/dist/tool-call-card/index.mjs +7 -0
- package/package.json +130 -0
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ThinkingIndicator
|
|
3
|
+
} from "./chunk-FYAMA32G.mjs";
|
|
4
|
+
import {
|
|
5
|
+
ToolCallCard
|
|
6
|
+
} from "./chunk-FAJF5RCY.mjs";
|
|
7
|
+
import {
|
|
8
|
+
TokenUsageIndicator
|
|
9
|
+
} from "./chunk-H6VXOP7U.mjs";
|
|
10
|
+
import {
|
|
11
|
+
MessageBubble
|
|
12
|
+
} from "./chunk-657RY6MM.mjs";
|
|
13
|
+
import {
|
|
14
|
+
RunProgress
|
|
15
|
+
} from "./chunk-LZKOCELQ.mjs";
|
|
16
|
+
import {
|
|
17
|
+
PlanCard
|
|
18
|
+
} from "./chunk-PWKN5UHT.mjs";
|
|
19
|
+
import {
|
|
20
|
+
RecoveryBanner
|
|
21
|
+
} from "./chunk-7UGSLEYG.mjs";
|
|
22
|
+
import {
|
|
23
|
+
StepTimeline
|
|
24
|
+
} from "./chunk-RGPKTWK4.mjs";
|
|
25
|
+
import {
|
|
26
|
+
SourcePanel
|
|
27
|
+
} from "./chunk-DPLGRVNQ.mjs";
|
|
28
|
+
import {
|
|
29
|
+
SurfaceRenderer
|
|
30
|
+
} from "./chunk-MVBXXDZB.mjs";
|
|
31
|
+
import {
|
|
32
|
+
StreamingText
|
|
33
|
+
} from "./chunk-GQYOOLDL.mjs";
|
|
34
|
+
import {
|
|
35
|
+
AgentAvatar
|
|
36
|
+
} from "./chunk-KH4OXDEV.mjs";
|
|
37
|
+
import {
|
|
38
|
+
ApprovalCard
|
|
39
|
+
} from "./chunk-ENIWC4WX.mjs";
|
|
40
|
+
import {
|
|
41
|
+
ContextPanel
|
|
42
|
+
} from "./chunk-KJVPVBET.mjs";
|
|
43
|
+
import {
|
|
44
|
+
CodeBlock
|
|
45
|
+
} from "./chunk-RGBY6EEU.mjs";
|
|
46
|
+
import {
|
|
47
|
+
AttachmentCard
|
|
48
|
+
} from "./chunk-FPOHPDZ2.mjs";
|
|
49
|
+
import {
|
|
50
|
+
FeedbackButtons
|
|
51
|
+
} from "./chunk-ETFET3LT.mjs";
|
|
52
|
+
import {
|
|
53
|
+
DiffViewer
|
|
54
|
+
} from "./chunk-NRBIHROX.mjs";
|
|
55
|
+
import "./chunk-SCZ4BQ2G.mjs";
|
|
56
|
+
export {
|
|
57
|
+
AgentAvatar,
|
|
58
|
+
ApprovalCard,
|
|
59
|
+
AttachmentCard,
|
|
60
|
+
CodeBlock,
|
|
61
|
+
ContextPanel,
|
|
62
|
+
DiffViewer,
|
|
63
|
+
FeedbackButtons,
|
|
64
|
+
MessageBubble,
|
|
65
|
+
PlanCard,
|
|
66
|
+
RecoveryBanner,
|
|
67
|
+
RunProgress,
|
|
68
|
+
SourcePanel,
|
|
69
|
+
StepTimeline,
|
|
70
|
+
StreamingText,
|
|
71
|
+
SurfaceRenderer,
|
|
72
|
+
ThinkingIndicator,
|
|
73
|
+
TokenUsageIndicator,
|
|
74
|
+
ToolCallCard
|
|
75
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
|
|
4
|
+
type MessageRole = "user" | "assistant" | "system";
|
|
5
|
+
type MessageStatus = "sending" | "sent" | "error";
|
|
6
|
+
interface MessageBubbleProps {
|
|
7
|
+
/** 메시지 역할 */
|
|
8
|
+
role: MessageRole;
|
|
9
|
+
/** 메시지 내용 */
|
|
10
|
+
content: React.ReactNode;
|
|
11
|
+
/** 타임스탬프 */
|
|
12
|
+
timestamp?: Date;
|
|
13
|
+
/** 아바타 (ReactNode 또는 이미지 URL) */
|
|
14
|
+
avatar?: React.ReactNode | string;
|
|
15
|
+
/** 전송 상태 */
|
|
16
|
+
status?: MessageStatus;
|
|
17
|
+
/** 하단 액션 영역 */
|
|
18
|
+
actions?: React.ReactNode;
|
|
19
|
+
/** 메타데이터 (모델명 등) */
|
|
20
|
+
metadata?: string;
|
|
21
|
+
/** 추가 클래스 */
|
|
22
|
+
className?: string;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* 대화 메시지 버블 컴포넌트
|
|
26
|
+
*/
|
|
27
|
+
declare function MessageBubble({ role, content, timestamp, avatar, status, actions, metadata, className, }: MessageBubbleProps): react_jsx_runtime.JSX.Element;
|
|
28
|
+
|
|
29
|
+
export { MessageBubble, type MessageBubbleProps, type MessageRole, type MessageStatus };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
|
|
4
|
+
type MessageRole = "user" | "assistant" | "system";
|
|
5
|
+
type MessageStatus = "sending" | "sent" | "error";
|
|
6
|
+
interface MessageBubbleProps {
|
|
7
|
+
/** 메시지 역할 */
|
|
8
|
+
role: MessageRole;
|
|
9
|
+
/** 메시지 내용 */
|
|
10
|
+
content: React.ReactNode;
|
|
11
|
+
/** 타임스탬프 */
|
|
12
|
+
timestamp?: Date;
|
|
13
|
+
/** 아바타 (ReactNode 또는 이미지 URL) */
|
|
14
|
+
avatar?: React.ReactNode | string;
|
|
15
|
+
/** 전송 상태 */
|
|
16
|
+
status?: MessageStatus;
|
|
17
|
+
/** 하단 액션 영역 */
|
|
18
|
+
actions?: React.ReactNode;
|
|
19
|
+
/** 메타데이터 (모델명 등) */
|
|
20
|
+
metadata?: string;
|
|
21
|
+
/** 추가 클래스 */
|
|
22
|
+
className?: string;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* 대화 메시지 버블 컴포넌트
|
|
26
|
+
*/
|
|
27
|
+
declare function MessageBubble({ role, content, timestamp, avatar, status, actions, metadata, className, }: MessageBubbleProps): react_jsx_runtime.JSX.Element;
|
|
28
|
+
|
|
29
|
+
export { MessageBubble, type MessageBubbleProps, type MessageRole, type MessageStatus };
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/message-bubble/index.tsx
|
|
21
|
+
var message_bubble_exports = {};
|
|
22
|
+
__export(message_bubble_exports, {
|
|
23
|
+
MessageBubble: () => MessageBubble
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(message_bubble_exports);
|
|
26
|
+
var import_ui_react = require("@axis-ds/ui-react");
|
|
27
|
+
|
|
28
|
+
// src/constants/a11y-labels.ts
|
|
29
|
+
var MESSAGE_ROLE_LABELS = {
|
|
30
|
+
user: "\uC0AC\uC6A9\uC790",
|
|
31
|
+
assistant: "\uC5B4\uC2DC\uC2A4\uD134\uD2B8",
|
|
32
|
+
system: "\uC2DC\uC2A4\uD15C"
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
// src/message-bubble/index.tsx
|
|
36
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
37
|
+
var roleStyles = {
|
|
38
|
+
user: {
|
|
39
|
+
container: "flex-row-reverse",
|
|
40
|
+
bubble: "bg-[var(--axis-color-blue-500)] text-white rounded-br-sm"
|
|
41
|
+
},
|
|
42
|
+
assistant: {
|
|
43
|
+
container: "flex-row",
|
|
44
|
+
bubble: "bg-[var(--axis-surface-secondary)] text-[var(--axis-text-primary)] rounded-bl-sm"
|
|
45
|
+
},
|
|
46
|
+
system: {
|
|
47
|
+
container: "justify-center",
|
|
48
|
+
bubble: "bg-[var(--axis-surface-tertiary)] text-[var(--axis-text-secondary)] text-xs italic"
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
var statusIcons = {
|
|
52
|
+
sending: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("svg", { className: "w-3 h-3 animate-spin", viewBox: "0 0 24 24", fill: "none", children: [
|
|
53
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("circle", { className: "opacity-25", cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "4" }),
|
|
54
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { className: "opacity-75", fill: "currentColor", d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z" })
|
|
55
|
+
] }),
|
|
56
|
+
sent: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", { className: "w-3 h-3", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M5 13l4 4L19 7" }) }),
|
|
57
|
+
error: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", { className: "w-3 h-3", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M12 8v4m0 4h.01" }) })
|
|
58
|
+
};
|
|
59
|
+
function MessageBubble({
|
|
60
|
+
role,
|
|
61
|
+
content,
|
|
62
|
+
timestamp,
|
|
63
|
+
avatar,
|
|
64
|
+
status,
|
|
65
|
+
actions,
|
|
66
|
+
metadata,
|
|
67
|
+
className
|
|
68
|
+
}) {
|
|
69
|
+
const roleLabel = MESSAGE_ROLE_LABELS[role];
|
|
70
|
+
const renderAvatar = () => {
|
|
71
|
+
if (!avatar) return null;
|
|
72
|
+
if (typeof avatar === "string") {
|
|
73
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
74
|
+
"img",
|
|
75
|
+
{
|
|
76
|
+
src: avatar,
|
|
77
|
+
alt: "",
|
|
78
|
+
"aria-hidden": "true",
|
|
79
|
+
className: "w-8 h-8 rounded-full object-cover flex-shrink-0"
|
|
80
|
+
}
|
|
81
|
+
);
|
|
82
|
+
}
|
|
83
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "flex-shrink-0", children: avatar });
|
|
84
|
+
};
|
|
85
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
86
|
+
"div",
|
|
87
|
+
{
|
|
88
|
+
role: "article",
|
|
89
|
+
"aria-label": `${roleLabel} \uBA54\uC2DC\uC9C0`,
|
|
90
|
+
className: (0, import_ui_react.cn)("flex items-start gap-2", roleStyles[role].container, className),
|
|
91
|
+
children: [
|
|
92
|
+
role !== "system" && renderAvatar(),
|
|
93
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: (0, import_ui_react.cn)("max-w-[80%]", role === "system" && "max-w-full"), children: [
|
|
94
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
95
|
+
"div",
|
|
96
|
+
{
|
|
97
|
+
className: (0, import_ui_react.cn)(
|
|
98
|
+
"rounded-lg px-3 py-2",
|
|
99
|
+
roleStyles[role].bubble
|
|
100
|
+
),
|
|
101
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "text-sm whitespace-pre-wrap", children: content })
|
|
102
|
+
}
|
|
103
|
+
),
|
|
104
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex items-center gap-2 mt-1 px-1", children: [
|
|
105
|
+
timestamp && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
106
|
+
"time",
|
|
107
|
+
{
|
|
108
|
+
dateTime: timestamp.toISOString(),
|
|
109
|
+
className: "text-xs text-[var(--axis-text-tertiary)]",
|
|
110
|
+
children: timestamp.toLocaleTimeString("ko-KR", { hour: "2-digit", minute: "2-digit" })
|
|
111
|
+
}
|
|
112
|
+
),
|
|
113
|
+
metadata && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "text-xs text-[var(--axis-text-tertiary)]", children: metadata }),
|
|
114
|
+
status && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
115
|
+
"span",
|
|
116
|
+
{
|
|
117
|
+
className: (0, import_ui_react.cn)(
|
|
118
|
+
"text-[var(--axis-text-tertiary)]",
|
|
119
|
+
status === "error" && "text-[var(--axis-text-error)]"
|
|
120
|
+
),
|
|
121
|
+
"aria-label": status === "sending" ? "\uC804\uC1A1 \uC911" : status === "sent" ? "\uC804\uC1A1\uB428" : "\uC804\uC1A1 \uC2E4\uD328",
|
|
122
|
+
children: statusIcons[status]
|
|
123
|
+
}
|
|
124
|
+
)
|
|
125
|
+
] }),
|
|
126
|
+
actions && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "mt-1", children: actions })
|
|
127
|
+
] })
|
|
128
|
+
]
|
|
129
|
+
}
|
|
130
|
+
);
|
|
131
|
+
}
|
|
132
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
133
|
+
0 && (module.exports = {
|
|
134
|
+
MessageBubble
|
|
135
|
+
});
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
|
|
3
|
+
type PlanStatus = "draft" | "pending" | "approved" | "rejected" | "executing" | "completed";
|
|
4
|
+
type PlanStepStatus = "pending" | "running" | "complete" | "error" | "skipped";
|
|
5
|
+
interface PlanStep {
|
|
6
|
+
id: string;
|
|
7
|
+
label: string;
|
|
8
|
+
status: PlanStepStatus;
|
|
9
|
+
description?: string;
|
|
10
|
+
}
|
|
11
|
+
interface PlanCardProps {
|
|
12
|
+
/** 계획 제목 */
|
|
13
|
+
title: string;
|
|
14
|
+
/** 단계 목록 */
|
|
15
|
+
steps: PlanStep[];
|
|
16
|
+
/** 계획 상태 */
|
|
17
|
+
status?: PlanStatus;
|
|
18
|
+
/** 승인 콜백 */
|
|
19
|
+
onApprove?: () => void;
|
|
20
|
+
/** 수정 콜백 */
|
|
21
|
+
onEdit?: () => void;
|
|
22
|
+
/** 거절 콜백 */
|
|
23
|
+
onReject?: () => void;
|
|
24
|
+
/** 추가 클래스 */
|
|
25
|
+
className?: string;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* AI 실행 계획을 표시하고 승인/거절하는 카드 컴포넌트
|
|
29
|
+
*/
|
|
30
|
+
declare function PlanCard({ title, steps, status, onApprove, onEdit, onReject, className, }: PlanCardProps): react_jsx_runtime.JSX.Element;
|
|
31
|
+
|
|
32
|
+
export { PlanCard, type PlanCardProps, type PlanStatus, type PlanStep, type PlanStepStatus };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
|
|
3
|
+
type PlanStatus = "draft" | "pending" | "approved" | "rejected" | "executing" | "completed";
|
|
4
|
+
type PlanStepStatus = "pending" | "running" | "complete" | "error" | "skipped";
|
|
5
|
+
interface PlanStep {
|
|
6
|
+
id: string;
|
|
7
|
+
label: string;
|
|
8
|
+
status: PlanStepStatus;
|
|
9
|
+
description?: string;
|
|
10
|
+
}
|
|
11
|
+
interface PlanCardProps {
|
|
12
|
+
/** 계획 제목 */
|
|
13
|
+
title: string;
|
|
14
|
+
/** 단계 목록 */
|
|
15
|
+
steps: PlanStep[];
|
|
16
|
+
/** 계획 상태 */
|
|
17
|
+
status?: PlanStatus;
|
|
18
|
+
/** 승인 콜백 */
|
|
19
|
+
onApprove?: () => void;
|
|
20
|
+
/** 수정 콜백 */
|
|
21
|
+
onEdit?: () => void;
|
|
22
|
+
/** 거절 콜백 */
|
|
23
|
+
onReject?: () => void;
|
|
24
|
+
/** 추가 클래스 */
|
|
25
|
+
className?: string;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* AI 실행 계획을 표시하고 승인/거절하는 카드 컴포넌트
|
|
29
|
+
*/
|
|
30
|
+
declare function PlanCard({ title, steps, status, onApprove, onEdit, onReject, className, }: PlanCardProps): react_jsx_runtime.JSX.Element;
|
|
31
|
+
|
|
32
|
+
export { PlanCard, type PlanCardProps, type PlanStatus, type PlanStep, type PlanStepStatus };
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
|
|
30
|
+
// src/plan-card/index.tsx
|
|
31
|
+
var plan_card_exports = {};
|
|
32
|
+
__export(plan_card_exports, {
|
|
33
|
+
PlanCard: () => PlanCard
|
|
34
|
+
});
|
|
35
|
+
module.exports = __toCommonJS(plan_card_exports);
|
|
36
|
+
var React = __toESM(require("react"));
|
|
37
|
+
var import_ui_react = require("@axis-ds/ui-react");
|
|
38
|
+
|
|
39
|
+
// src/constants/a11y-labels.ts
|
|
40
|
+
var STATUS_LABELS = {
|
|
41
|
+
pending: "\uB300\uAE30 \uC911",
|
|
42
|
+
running: "\uC2E4\uD589 \uC911",
|
|
43
|
+
complete: "\uC644\uB8CC",
|
|
44
|
+
success: "\uC131\uACF5",
|
|
45
|
+
error: "\uC624\uB958",
|
|
46
|
+
skipped: "\uAC74\uB108\uB700",
|
|
47
|
+
idle: "\uB300\uAE30 \uC911"
|
|
48
|
+
};
|
|
49
|
+
var PLAN_STATUS_LABELS = {
|
|
50
|
+
draft: "\uCD08\uC548",
|
|
51
|
+
pending: "\uC2B9\uC778 \uB300\uAE30",
|
|
52
|
+
approved: "\uC2B9\uC778\uB428",
|
|
53
|
+
rejected: "\uAC70\uC808\uB428",
|
|
54
|
+
executing: "\uC2E4\uD589 \uC911",
|
|
55
|
+
completed: "\uC644\uB8CC"
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
// src/plan-card/index.tsx
|
|
59
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
60
|
+
var planStatusStyles = {
|
|
61
|
+
draft: {
|
|
62
|
+
border: "border-l-[var(--axis-color-gray-400)]",
|
|
63
|
+
badge: "bg-[var(--axis-color-gray-100)] text-[var(--axis-color-gray-600)]"
|
|
64
|
+
},
|
|
65
|
+
pending: {
|
|
66
|
+
border: "border-l-[var(--axis-color-yellow-500)]",
|
|
67
|
+
badge: "bg-[var(--axis-color-yellow-500)]/10 text-[var(--axis-color-yellow-600)]"
|
|
68
|
+
},
|
|
69
|
+
approved: {
|
|
70
|
+
border: "border-l-[var(--axis-color-green-500)]",
|
|
71
|
+
badge: "bg-[var(--axis-color-green-500)]/10 text-[var(--axis-color-green-600)]"
|
|
72
|
+
},
|
|
73
|
+
rejected: {
|
|
74
|
+
border: "border-l-[var(--axis-color-red-500)]",
|
|
75
|
+
badge: "bg-[var(--axis-color-red-500)]/10 text-[var(--axis-color-red-600)]"
|
|
76
|
+
},
|
|
77
|
+
executing: {
|
|
78
|
+
border: "border-l-[var(--axis-color-blue-500)]",
|
|
79
|
+
badge: "bg-[var(--axis-color-blue-500)]/10 text-[var(--axis-color-blue-600)]"
|
|
80
|
+
},
|
|
81
|
+
completed: {
|
|
82
|
+
border: "border-l-[var(--axis-color-green-500)]",
|
|
83
|
+
badge: "bg-[var(--axis-color-green-500)]/10 text-[var(--axis-color-green-600)]"
|
|
84
|
+
}
|
|
85
|
+
};
|
|
86
|
+
var stepStatusIcons = {
|
|
87
|
+
pending: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", { className: "w-4 h-4 text-[var(--axis-color-gray-400)]", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("circle", { cx: "12", cy: "12", r: "10", strokeWidth: 2 }) }),
|
|
88
|
+
running: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("svg", { className: "w-4 h-4 text-[var(--axis-color-blue-500)] animate-spin", viewBox: "0 0 24 24", fill: "none", children: [
|
|
89
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("circle", { className: "opacity-25", cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "4" }),
|
|
90
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { className: "opacity-75", fill: "currentColor", d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z" })
|
|
91
|
+
] }),
|
|
92
|
+
complete: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", { className: "w-4 h-4 text-[var(--axis-color-green-500)]", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M5 13l4 4L19 7" }) }),
|
|
93
|
+
error: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", { className: "w-4 h-4 text-[var(--axis-color-red-500)]", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M6 18L18 6M6 6l12 12" }) }),
|
|
94
|
+
skipped: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", { className: "w-4 h-4 text-[var(--axis-color-gray-400)]", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M13 5l7 7-7 7M5 5l7 7-7 7" }) })
|
|
95
|
+
};
|
|
96
|
+
function PlanCard({
|
|
97
|
+
title,
|
|
98
|
+
steps,
|
|
99
|
+
status = "pending",
|
|
100
|
+
onApprove,
|
|
101
|
+
onEdit,
|
|
102
|
+
onReject,
|
|
103
|
+
className
|
|
104
|
+
}) {
|
|
105
|
+
const styles = planStatusStyles[status];
|
|
106
|
+
const titleId = React.useId();
|
|
107
|
+
const statusLabel = PLAN_STATUS_LABELS[status];
|
|
108
|
+
const completedCount = steps.filter((s) => s.status === "complete").length;
|
|
109
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
110
|
+
"div",
|
|
111
|
+
{
|
|
112
|
+
role: "region",
|
|
113
|
+
"aria-labelledby": titleId,
|
|
114
|
+
className: (0, import_ui_react.cn)(
|
|
115
|
+
"rounded-lg border border-l-4 overflow-hidden",
|
|
116
|
+
"bg-[var(--axis-surface-default)] border-[var(--axis-border-default)]",
|
|
117
|
+
styles.border,
|
|
118
|
+
className
|
|
119
|
+
),
|
|
120
|
+
children: [
|
|
121
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "p-4", children: [
|
|
122
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex items-center justify-between mb-2", children: [
|
|
123
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
124
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", { className: "w-4 h-4 text-[var(--axis-icon-secondary)]", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2" }) }),
|
|
125
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("h4", { id: titleId, className: "text-sm font-semibold text-[var(--axis-text-primary)]", children: title })
|
|
126
|
+
] }),
|
|
127
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: (0, import_ui_react.cn)("text-xs px-2 py-0.5 rounded-full font-medium", styles.badge), children: statusLabel })
|
|
128
|
+
] }),
|
|
129
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex items-center gap-2 text-xs text-[var(--axis-text-tertiary)]", children: [
|
|
130
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { children: [
|
|
131
|
+
completedCount,
|
|
132
|
+
"/",
|
|
133
|
+
steps.length,
|
|
134
|
+
" \uB2E8\uACC4"
|
|
135
|
+
] }),
|
|
136
|
+
steps.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "flex-1 h-1 rounded-full bg-[var(--axis-surface-secondary)] overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
137
|
+
"div",
|
|
138
|
+
{
|
|
139
|
+
className: "h-full rounded-full bg-[var(--axis-color-green-500)] transition-all",
|
|
140
|
+
style: { width: `${completedCount / steps.length * 100}%` },
|
|
141
|
+
"aria-hidden": "true"
|
|
142
|
+
}
|
|
143
|
+
) })
|
|
144
|
+
] })
|
|
145
|
+
] }),
|
|
146
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { role: "list", "aria-label": "\uC2E4\uD589 \uB2E8\uACC4", className: "border-t border-[var(--axis-border-default)] divide-y divide-[var(--axis-border-default)]", children: steps.map((step) => {
|
|
147
|
+
const stepStatusLabel = STATUS_LABELS[step.status] || step.status;
|
|
148
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
149
|
+
"div",
|
|
150
|
+
{
|
|
151
|
+
role: "listitem",
|
|
152
|
+
"aria-current": step.status === "running" ? "step" : void 0,
|
|
153
|
+
className: "flex items-start gap-3 px-4 py-2.5",
|
|
154
|
+
children: [
|
|
155
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { "aria-hidden": "true", className: "mt-0.5 flex-shrink-0", children: stepStatusIcons[step.status] }),
|
|
156
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex-1 min-w-0", children: [
|
|
157
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className: "sr-only", children: [
|
|
158
|
+
stepStatusLabel,
|
|
159
|
+
":"
|
|
160
|
+
] }),
|
|
161
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-sm text-[var(--axis-text-primary)]", children: step.label }),
|
|
162
|
+
step.description && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-xs text-[var(--axis-text-secondary)] mt-0.5", children: step.description })
|
|
163
|
+
] })
|
|
164
|
+
]
|
|
165
|
+
},
|
|
166
|
+
step.id
|
|
167
|
+
);
|
|
168
|
+
}) }),
|
|
169
|
+
(status === "pending" || status === "draft") && (onApprove || onEdit || onReject) && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex gap-2 p-3 border-t border-[var(--axis-border-default)] bg-[var(--axis-surface-secondary)]", children: [
|
|
170
|
+
onApprove && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
171
|
+
"button",
|
|
172
|
+
{
|
|
173
|
+
onClick: onApprove,
|
|
174
|
+
className: "px-3 py-1.5 text-xs font-medium rounded-md bg-[var(--axis-color-green-500)] text-white hover:bg-[var(--axis-color-green-600)] transition-colors",
|
|
175
|
+
children: "\uC2B9\uC778"
|
|
176
|
+
}
|
|
177
|
+
),
|
|
178
|
+
onEdit && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
179
|
+
"button",
|
|
180
|
+
{
|
|
181
|
+
onClick: onEdit,
|
|
182
|
+
className: "px-3 py-1.5 text-xs font-medium rounded-md bg-[var(--axis-button-secondary-bg-default)] text-[var(--axis-text-primary)] hover:bg-[var(--axis-button-secondary-bg-hover)] transition-colors",
|
|
183
|
+
children: "\uC218\uC815"
|
|
184
|
+
}
|
|
185
|
+
),
|
|
186
|
+
onReject && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
187
|
+
"button",
|
|
188
|
+
{
|
|
189
|
+
onClick: onReject,
|
|
190
|
+
className: "px-3 py-1.5 text-xs font-medium rounded-md text-[var(--axis-color-red-500)] hover:bg-[var(--axis-color-red-500)]/10 transition-colors",
|
|
191
|
+
children: "\uAC70\uC808"
|
|
192
|
+
}
|
|
193
|
+
)
|
|
194
|
+
] })
|
|
195
|
+
]
|
|
196
|
+
}
|
|
197
|
+
);
|
|
198
|
+
}
|
|
199
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
200
|
+
0 && (module.exports = {
|
|
201
|
+
PlanCard
|
|
202
|
+
});
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
|
|
3
|
+
interface RecoveryBannerProps {
|
|
4
|
+
/** 에러 메시지 */
|
|
5
|
+
message: string;
|
|
6
|
+
/** 상세 설명 */
|
|
7
|
+
description?: string;
|
|
8
|
+
/** 재시도 콜백 */
|
|
9
|
+
onRetry?: () => void;
|
|
10
|
+
/** 무시 콜백 */
|
|
11
|
+
onDismiss?: () => void;
|
|
12
|
+
/** 추가 클래스 */
|
|
13
|
+
className?: string;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* 에러 발생 시 복구 옵션을 제공하는 배너
|
|
17
|
+
*/
|
|
18
|
+
declare function RecoveryBanner({ message, description, onRetry, onDismiss, className, }: RecoveryBannerProps): react_jsx_runtime.JSX.Element;
|
|
19
|
+
|
|
20
|
+
export { RecoveryBanner, type RecoveryBannerProps };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
|
|
3
|
+
interface RecoveryBannerProps {
|
|
4
|
+
/** 에러 메시지 */
|
|
5
|
+
message: string;
|
|
6
|
+
/** 상세 설명 */
|
|
7
|
+
description?: string;
|
|
8
|
+
/** 재시도 콜백 */
|
|
9
|
+
onRetry?: () => void;
|
|
10
|
+
/** 무시 콜백 */
|
|
11
|
+
onDismiss?: () => void;
|
|
12
|
+
/** 추가 클래스 */
|
|
13
|
+
className?: string;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* 에러 발생 시 복구 옵션을 제공하는 배너
|
|
17
|
+
*/
|
|
18
|
+
declare function RecoveryBanner({ message, description, onRetry, onDismiss, className, }: RecoveryBannerProps): react_jsx_runtime.JSX.Element;
|
|
19
|
+
|
|
20
|
+
export { RecoveryBanner, type RecoveryBannerProps };
|