@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.
Files changed (116) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +31 -0
  3. package/dist/agent-avatar/index.d.mts +22 -0
  4. package/dist/agent-avatar/index.d.ts +22 -0
  5. package/dist/agent-avatar/index.js +112 -0
  6. package/dist/agent-avatar/index.mjs +7 -0
  7. package/dist/approval-card/index.d.mts +31 -0
  8. package/dist/approval-card/index.d.ts +31 -0
  9. package/dist/approval-card/index.js +133 -0
  10. package/dist/approval-card/index.mjs +7 -0
  11. package/dist/attachment-card/index.d.mts +30 -0
  12. package/dist/attachment-card/index.d.ts +30 -0
  13. package/dist/attachment-card/index.js +140 -0
  14. package/dist/attachment-card/index.mjs +7 -0
  15. package/dist/chunk-2BWCQQLU.mjs +136 -0
  16. package/dist/chunk-3TH7GFBD.mjs +83 -0
  17. package/dist/chunk-4PCJFQHQ.mjs +66 -0
  18. package/dist/chunk-657RY6MM.mjs +106 -0
  19. package/dist/chunk-7UGSLEYG.mjs +75 -0
  20. package/dist/chunk-D6GHMPBC.mjs +76 -0
  21. package/dist/chunk-DPENLPBM.mjs +105 -0
  22. package/dist/chunk-DPLGRVNQ.mjs +95 -0
  23. package/dist/chunk-EF4MECAI.mjs +81 -0
  24. package/dist/chunk-ENIWC4WX.mjs +94 -0
  25. package/dist/chunk-ETFET3LT.mjs +72 -0
  26. package/dist/chunk-FAJF5RCY.mjs +115 -0
  27. package/dist/chunk-FPOHPDZ2.mjs +109 -0
  28. package/dist/chunk-FYAMA32G.mjs +50 -0
  29. package/dist/chunk-GQYOOLDL.mjs +63 -0
  30. package/dist/chunk-H6VXOP7U.mjs +86 -0
  31. package/dist/chunk-HLW7VEFF.mjs +47 -0
  32. package/dist/chunk-HWISMHCP.mjs +33 -0
  33. package/dist/chunk-KH4OXDEV.mjs +83 -0
  34. package/dist/chunk-KJVPVBET.mjs +103 -0
  35. package/dist/chunk-LZKOCELQ.mjs +136 -0
  36. package/dist/chunk-MGQ7AEYE.mjs +94 -0
  37. package/dist/chunk-MVBXXDZB.mjs +83 -0
  38. package/dist/chunk-NRBIHROX.mjs +162 -0
  39. package/dist/chunk-O5VXD6C3.mjs +114 -0
  40. package/dist/chunk-O5WFJCWK.mjs +63 -0
  41. package/dist/chunk-OOFM7NNH.mjs +68 -0
  42. package/dist/chunk-PAKLXPHD.mjs +115 -0
  43. package/dist/chunk-PWKN5UHT.mjs +152 -0
  44. package/dist/chunk-RGBY6EEU.mjs +80 -0
  45. package/dist/chunk-RGPKTWK4.mjs +77 -0
  46. package/dist/chunk-S3HVRSN2.mjs +95 -0
  47. package/dist/chunk-SCZ4BQ2G.mjs +68 -0
  48. package/dist/chunk-TCCZL2D5.mjs +51 -0
  49. package/dist/chunk-TKUAT5WE.mjs +105 -0
  50. package/dist/chunk-UG4H7RIP.mjs +77 -0
  51. package/dist/chunk-VKLPWFAI.mjs +79 -0
  52. package/dist/code-block/index.d.mts +24 -0
  53. package/dist/code-block/index.d.ts +24 -0
  54. package/dist/code-block/index.js +114 -0
  55. package/dist/code-block/index.mjs +6 -0
  56. package/dist/context-panel/index.d.mts +32 -0
  57. package/dist/context-panel/index.d.ts +32 -0
  58. package/dist/context-panel/index.js +137 -0
  59. package/dist/context-panel/index.mjs +6 -0
  60. package/dist/diff-viewer/index.d.mts +21 -0
  61. package/dist/diff-viewer/index.d.ts +21 -0
  62. package/dist/diff-viewer/index.js +201 -0
  63. package/dist/diff-viewer/index.mjs +7 -0
  64. package/dist/feedback-buttons/index.d.mts +21 -0
  65. package/dist/feedback-buttons/index.d.ts +21 -0
  66. package/dist/feedback-buttons/index.js +111 -0
  67. package/dist/feedback-buttons/index.mjs +7 -0
  68. package/dist/index.d.mts +20 -0
  69. package/dist/index.d.ts +20 -0
  70. package/dist/index.js +1774 -0
  71. package/dist/index.mjs +75 -0
  72. package/dist/message-bubble/index.d.mts +29 -0
  73. package/dist/message-bubble/index.d.ts +29 -0
  74. package/dist/message-bubble/index.js +135 -0
  75. package/dist/message-bubble/index.mjs +7 -0
  76. package/dist/plan-card/index.d.mts +32 -0
  77. package/dist/plan-card/index.d.ts +32 -0
  78. package/dist/plan-card/index.js +202 -0
  79. package/dist/plan-card/index.mjs +7 -0
  80. package/dist/recovery-banner/index.d.mts +20 -0
  81. package/dist/recovery-banner/index.d.ts +20 -0
  82. package/dist/recovery-banner/index.js +109 -0
  83. package/dist/recovery-banner/index.mjs +6 -0
  84. package/dist/run-progress/index.d.mts +29 -0
  85. package/dist/run-progress/index.d.ts +29 -0
  86. package/dist/run-progress/index.js +179 -0
  87. package/dist/run-progress/index.mjs +7 -0
  88. package/dist/source-panel/index.d.mts +25 -0
  89. package/dist/source-panel/index.d.ts +25 -0
  90. package/dist/source-panel/index.js +135 -0
  91. package/dist/source-panel/index.mjs +7 -0
  92. package/dist/step-timeline/index.d.mts +21 -0
  93. package/dist/step-timeline/index.d.ts +21 -0
  94. package/dist/step-timeline/index.js +110 -0
  95. package/dist/step-timeline/index.mjs +7 -0
  96. package/dist/streaming-text/index.d.mts +27 -0
  97. package/dist/streaming-text/index.d.ts +27 -0
  98. package/dist/streaming-text/index.js +97 -0
  99. package/dist/streaming-text/index.mjs +6 -0
  100. package/dist/surface-renderer/index.d.mts +22 -0
  101. package/dist/surface-renderer/index.d.ts +22 -0
  102. package/dist/surface-renderer/index.js +107 -0
  103. package/dist/surface-renderer/index.mjs +6 -0
  104. package/dist/thinking-indicator/index.d.mts +16 -0
  105. package/dist/thinking-indicator/index.d.ts +16 -0
  106. package/dist/thinking-indicator/index.js +74 -0
  107. package/dist/thinking-indicator/index.mjs +6 -0
  108. package/dist/token-usage-indicator/index.d.mts +22 -0
  109. package/dist/token-usage-indicator/index.d.ts +22 -0
  110. package/dist/token-usage-indicator/index.js +110 -0
  111. package/dist/token-usage-indicator/index.mjs +6 -0
  112. package/dist/tool-call-card/index.d.mts +31 -0
  113. package/dist/tool-call-card/index.d.ts +31 -0
  114. package/dist/tool-call-card/index.js +158 -0
  115. package/dist/tool-call-card/index.mjs +7 -0
  116. package/package.json +130 -0
@@ -0,0 +1,136 @@
1
+ import {
2
+ STATUS_LABELS
3
+ } from "./chunk-HWISMHCP.mjs";
4
+
5
+ // src/run-progress/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 statusColors = {
10
+ pending: "bg-[var(--axis-color-gray-300)]",
11
+ running: "bg-[var(--axis-color-blue-500)] animate-pulse",
12
+ complete: "bg-[var(--axis-color-green-500)]",
13
+ error: "bg-[var(--axis-color-red-500)]"
14
+ };
15
+ var statusIcons = {
16
+ pending: null,
17
+ running: /* @__PURE__ */ jsxs("svg", { className: "w-3 h-3 animate-spin", viewBox: "0 0 24 24", fill: "none", children: [
18
+ /* @__PURE__ */ jsx("circle", { className: "opacity-25", cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "4" }),
19
+ /* @__PURE__ */ jsx("path", { className: "opacity-75", fill: "currentColor", d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z" })
20
+ ] }),
21
+ complete: /* @__PURE__ */ jsx("svg", { className: "w-3 h-3", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M5 13l4 4L19 7" }) }),
22
+ error: /* @__PURE__ */ jsx("svg", { className: "w-3 h-3", 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" }) })
23
+ };
24
+ function RunProgress({
25
+ status,
26
+ steps,
27
+ currentStep,
28
+ onCancel,
29
+ onRetry,
30
+ className
31
+ }) {
32
+ const progressPercent = React.useMemo(() => {
33
+ const completed = steps.filter((s) => s.status === "complete").length;
34
+ return Math.round(completed / steps.length * 100);
35
+ }, [steps]);
36
+ return /* @__PURE__ */ jsxs(
37
+ "div",
38
+ {
39
+ className: cn(
40
+ "rounded-lg border p-4",
41
+ "bg-[var(--axis-surface-default)] border-[var(--axis-border-default)]",
42
+ className
43
+ ),
44
+ children: [
45
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between mb-4", children: [
46
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
47
+ status === "running" && /* @__PURE__ */ jsx("div", { className: "w-2 h-2 rounded-full bg-[var(--axis-color-blue-500)] animate-pulse" }),
48
+ /* @__PURE__ */ jsxs("span", { className: "text-sm font-medium text-[var(--axis-text-primary)]", children: [
49
+ status === "idle" && "\uB300\uAE30 \uC911",
50
+ status === "running" && "\uC2E4\uD589 \uC911",
51
+ status === "complete" && "\uC644\uB8CC",
52
+ status === "error" && "\uC624\uB958 \uBC1C\uC0DD"
53
+ ] })
54
+ ] }),
55
+ /* @__PURE__ */ jsxs("span", { className: "text-xs text-[var(--axis-text-secondary)]", children: [
56
+ progressPercent,
57
+ "%"
58
+ ] })
59
+ ] }),
60
+ /* @__PURE__ */ jsx(
61
+ "div",
62
+ {
63
+ role: "progressbar",
64
+ "aria-valuenow": progressPercent,
65
+ "aria-valuemin": 0,
66
+ "aria-valuemax": 100,
67
+ "aria-label": `\uC2E4\uD589 \uC9C4\uD589\uB960 ${progressPercent}%`,
68
+ className: "w-full h-1.5 rounded-full bg-[var(--axis-surface-secondary)] mb-4",
69
+ children: /* @__PURE__ */ jsx(
70
+ "div",
71
+ {
72
+ className: "h-full rounded-full bg-[var(--axis-color-blue-500)] transition-all duration-300",
73
+ style: { width: `${progressPercent}%` }
74
+ }
75
+ )
76
+ }
77
+ ),
78
+ /* @__PURE__ */ jsx("div", { role: "list", "aria-label": "\uC2E4\uD589 \uB2E8\uACC4", className: "space-y-2", children: steps.map((step, index) => /* @__PURE__ */ jsxs(
79
+ "div",
80
+ {
81
+ role: "listitem",
82
+ "aria-current": currentStep === index ? "step" : void 0,
83
+ className: cn(
84
+ "flex items-center gap-3 p-2 rounded-md transition-colors",
85
+ currentStep === index && "bg-[var(--axis-surface-secondary)]"
86
+ ),
87
+ children: [
88
+ /* @__PURE__ */ jsx(
89
+ "div",
90
+ {
91
+ className: cn(
92
+ "w-5 h-5 rounded-full flex items-center justify-center text-white text-xs",
93
+ statusColors[step.status]
94
+ ),
95
+ "aria-hidden": "true",
96
+ children: statusIcons[step.status] || index + 1
97
+ }
98
+ ),
99
+ /* @__PURE__ */ jsxs("div", { className: "flex-1 min-w-0", children: [
100
+ /* @__PURE__ */ jsxs("span", { className: "sr-only", children: [
101
+ STATUS_LABELS[step.status],
102
+ ":"
103
+ ] }),
104
+ /* @__PURE__ */ jsx("p", { className: "text-sm font-medium text-[var(--axis-text-primary)] truncate", children: step.label }),
105
+ step.description && /* @__PURE__ */ jsx("p", { className: "text-xs text-[var(--axis-text-secondary)] truncate", children: step.description })
106
+ ] })
107
+ ]
108
+ },
109
+ step.id
110
+ )) }),
111
+ (onCancel || onRetry) && /* @__PURE__ */ jsxs("div", { className: "flex justify-end gap-2 mt-4 pt-4 border-t border-[var(--axis-border-default)]", children: [
112
+ status === "running" && onCancel && /* @__PURE__ */ jsx(
113
+ "button",
114
+ {
115
+ onClick: onCancel,
116
+ className: "px-3 py-1.5 text-sm rounded-md bg-[var(--axis-surface-secondary)] text-[var(--axis-text-primary)] hover:bg-[var(--axis-surface-tertiary)]",
117
+ children: "\uCDE8\uC18C"
118
+ }
119
+ ),
120
+ status === "error" && onRetry && /* @__PURE__ */ jsx(
121
+ "button",
122
+ {
123
+ onClick: onRetry,
124
+ className: "px-3 py-1.5 text-sm rounded-md bg-[var(--axis-color-blue-500)] text-white hover:bg-[var(--axis-color-blue-600)]",
125
+ children: "\uC7AC\uC2DC\uB3C4"
126
+ }
127
+ )
128
+ ] })
129
+ ]
130
+ }
131
+ );
132
+ }
133
+
134
+ export {
135
+ RunProgress
136
+ };
@@ -0,0 +1,83 @@
1
+ import {
2
+ AGENT_STATUS_LABELS
3
+ } from "./chunk-HWISMHCP.mjs";
4
+
5
+ // src/agent-avatar/index.tsx
6
+ import { cn } from "@axis-ds/ui-react";
7
+ import { jsx, jsxs } from "react/jsx-runtime";
8
+ var sizeStyles = {
9
+ sm: "w-6 h-6 text-xs",
10
+ md: "w-8 h-8 text-sm",
11
+ lg: "w-10 h-10 text-base",
12
+ xl: "w-12 h-12 text-lg"
13
+ };
14
+ var statusStyles = {
15
+ online: "bg-[var(--axis-color-green-500)]",
16
+ busy: "bg-[var(--axis-color-yellow-500)]",
17
+ offline: "bg-[var(--axis-color-gray-400)]"
18
+ };
19
+ var typeColors = {
20
+ assistant: "bg-[var(--axis-color-purple-500)]",
21
+ tool: "bg-[var(--axis-color-blue-500)]",
22
+ system: "bg-[var(--axis-color-gray-600)]"
23
+ };
24
+ function AgentAvatar({
25
+ name,
26
+ src,
27
+ size = "md",
28
+ status,
29
+ type = "assistant",
30
+ className
31
+ }) {
32
+ const initials = name.split(" ").map((n) => n[0]).join("").slice(0, 2).toUpperCase();
33
+ const statusLabel = status ? AGENT_STATUS_LABELS[status] : "";
34
+ const ariaLabel = `${name}${statusLabel ? `, ${statusLabel}` : ""}`;
35
+ return /* @__PURE__ */ jsxs(
36
+ "div",
37
+ {
38
+ role: "img",
39
+ "aria-label": ariaLabel,
40
+ className: cn("relative inline-flex", className),
41
+ children: [
42
+ src ? /* @__PURE__ */ jsx(
43
+ "img",
44
+ {
45
+ src,
46
+ alt: "",
47
+ "aria-hidden": "true",
48
+ className: cn(
49
+ "rounded-full object-cover",
50
+ sizeStyles[size]
51
+ )
52
+ }
53
+ ) : /* @__PURE__ */ jsx(
54
+ "div",
55
+ {
56
+ "aria-hidden": "true",
57
+ className: cn(
58
+ "rounded-full flex items-center justify-center font-medium text-white",
59
+ sizeStyles[size],
60
+ typeColors[type]
61
+ ),
62
+ children: initials
63
+ }
64
+ ),
65
+ status && /* @__PURE__ */ jsx(
66
+ "span",
67
+ {
68
+ "aria-hidden": "true",
69
+ className: cn(
70
+ "absolute bottom-0 right-0 rounded-full border-2 border-[var(--axis-surface-default)]",
71
+ size === "sm" ? "w-2 h-2" : "w-3 h-3",
72
+ statusStyles[status]
73
+ )
74
+ }
75
+ )
76
+ ]
77
+ }
78
+ );
79
+ }
80
+
81
+ export {
82
+ AgentAvatar
83
+ };
@@ -0,0 +1,66 @@
1
+ // src/agent-avatar/index.tsx
2
+ import { cn } from "@axis-ds/ui-react";
3
+ import { jsx, jsxs } from "react/jsx-runtime";
4
+ var sizeStyles = {
5
+ sm: "w-6 h-6 text-xs",
6
+ md: "w-8 h-8 text-sm",
7
+ lg: "w-10 h-10 text-base",
8
+ xl: "w-12 h-12 text-lg"
9
+ };
10
+ var statusStyles = {
11
+ online: "bg-[var(--axis-color-green-500)]",
12
+ busy: "bg-[var(--axis-color-yellow-500)]",
13
+ offline: "bg-[var(--axis-color-gray-400)]"
14
+ };
15
+ var typeColors = {
16
+ assistant: "bg-[var(--axis-color-purple-500)]",
17
+ tool: "bg-[var(--axis-color-blue-500)]",
18
+ system: "bg-[var(--axis-color-gray-600)]"
19
+ };
20
+ function AgentAvatar({
21
+ name,
22
+ src,
23
+ size = "md",
24
+ status,
25
+ type = "assistant",
26
+ className
27
+ }) {
28
+ const initials = name.split(" ").map((n) => n[0]).join("").slice(0, 2).toUpperCase();
29
+ return /* @__PURE__ */ jsxs("div", { className: cn("relative inline-flex", className), children: [
30
+ src ? /* @__PURE__ */ jsx(
31
+ "img",
32
+ {
33
+ src,
34
+ alt: name,
35
+ className: cn(
36
+ "rounded-full object-cover",
37
+ sizeStyles[size]
38
+ )
39
+ }
40
+ ) : /* @__PURE__ */ jsx(
41
+ "div",
42
+ {
43
+ className: cn(
44
+ "rounded-full flex items-center justify-center font-medium text-white",
45
+ sizeStyles[size],
46
+ typeColors[type]
47
+ ),
48
+ children: initials
49
+ }
50
+ ),
51
+ status && /* @__PURE__ */ jsx(
52
+ "span",
53
+ {
54
+ className: cn(
55
+ "absolute bottom-0 right-0 rounded-full border-2 border-[var(--axis-surface-default)]",
56
+ size === "sm" ? "w-2 h-2" : "w-3 h-3",
57
+ statusStyles[status]
58
+ )
59
+ }
60
+ )
61
+ ] });
62
+ }
63
+
64
+ export {
65
+ AgentAvatar
66
+ };
@@ -0,0 +1,106 @@
1
+ import {
2
+ MESSAGE_ROLE_LABELS
3
+ } from "./chunk-SCZ4BQ2G.mjs";
4
+
5
+ // src/message-bubble/index.tsx
6
+ import { cn } from "@axis-ds/ui-react";
7
+ import { jsx, jsxs } from "react/jsx-runtime";
8
+ var roleStyles = {
9
+ user: {
10
+ container: "flex-row-reverse",
11
+ bubble: "bg-[var(--axis-color-blue-500)] text-white rounded-br-sm"
12
+ },
13
+ assistant: {
14
+ container: "flex-row",
15
+ bubble: "bg-[var(--axis-surface-secondary)] text-[var(--axis-text-primary)] rounded-bl-sm"
16
+ },
17
+ system: {
18
+ container: "justify-center",
19
+ bubble: "bg-[var(--axis-surface-tertiary)] text-[var(--axis-text-secondary)] text-xs italic"
20
+ }
21
+ };
22
+ var statusIcons = {
23
+ sending: /* @__PURE__ */ jsxs("svg", { className: "w-3 h-3 animate-spin", viewBox: "0 0 24 24", fill: "none", children: [
24
+ /* @__PURE__ */ jsx("circle", { className: "opacity-25", cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "4" }),
25
+ /* @__PURE__ */ jsx("path", { className: "opacity-75", fill: "currentColor", d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z" })
26
+ ] }),
27
+ sent: /* @__PURE__ */ jsx("svg", { className: "w-3 h-3", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M5 13l4 4L19 7" }) }),
28
+ error: /* @__PURE__ */ jsx("svg", { className: "w-3 h-3", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M12 8v4m0 4h.01" }) })
29
+ };
30
+ function MessageBubble({
31
+ role,
32
+ content,
33
+ timestamp,
34
+ avatar,
35
+ status,
36
+ actions,
37
+ metadata,
38
+ className
39
+ }) {
40
+ const roleLabel = MESSAGE_ROLE_LABELS[role];
41
+ const renderAvatar = () => {
42
+ if (!avatar) return null;
43
+ if (typeof avatar === "string") {
44
+ return /* @__PURE__ */ jsx(
45
+ "img",
46
+ {
47
+ src: avatar,
48
+ alt: "",
49
+ "aria-hidden": "true",
50
+ className: "w-8 h-8 rounded-full object-cover flex-shrink-0"
51
+ }
52
+ );
53
+ }
54
+ return /* @__PURE__ */ jsx("div", { className: "flex-shrink-0", children: avatar });
55
+ };
56
+ return /* @__PURE__ */ jsxs(
57
+ "div",
58
+ {
59
+ role: "article",
60
+ "aria-label": `${roleLabel} \uBA54\uC2DC\uC9C0`,
61
+ className: cn("flex items-start gap-2", roleStyles[role].container, className),
62
+ children: [
63
+ role !== "system" && renderAvatar(),
64
+ /* @__PURE__ */ jsxs("div", { className: cn("max-w-[80%]", role === "system" && "max-w-full"), children: [
65
+ /* @__PURE__ */ jsx(
66
+ "div",
67
+ {
68
+ className: cn(
69
+ "rounded-lg px-3 py-2",
70
+ roleStyles[role].bubble
71
+ ),
72
+ children: /* @__PURE__ */ jsx("div", { className: "text-sm whitespace-pre-wrap", children: content })
73
+ }
74
+ ),
75
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 mt-1 px-1", children: [
76
+ timestamp && /* @__PURE__ */ jsx(
77
+ "time",
78
+ {
79
+ dateTime: timestamp.toISOString(),
80
+ className: "text-xs text-[var(--axis-text-tertiary)]",
81
+ children: timestamp.toLocaleTimeString("ko-KR", { hour: "2-digit", minute: "2-digit" })
82
+ }
83
+ ),
84
+ metadata && /* @__PURE__ */ jsx("span", { className: "text-xs text-[var(--axis-text-tertiary)]", children: metadata }),
85
+ status && /* @__PURE__ */ jsx(
86
+ "span",
87
+ {
88
+ className: cn(
89
+ "text-[var(--axis-text-tertiary)]",
90
+ status === "error" && "text-[var(--axis-text-error)]"
91
+ ),
92
+ "aria-label": status === "sending" ? "\uC804\uC1A1 \uC911" : status === "sent" ? "\uC804\uC1A1\uB428" : "\uC804\uC1A1 \uC2E4\uD328",
93
+ children: statusIcons[status]
94
+ }
95
+ )
96
+ ] }),
97
+ actions && /* @__PURE__ */ jsx("div", { className: "mt-1", children: actions })
98
+ ] })
99
+ ]
100
+ }
101
+ );
102
+ }
103
+
104
+ export {
105
+ MessageBubble
106
+ };
@@ -0,0 +1,75 @@
1
+ // src/recovery-banner/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 RecoveryBanner({
6
+ message,
7
+ description,
8
+ onRetry,
9
+ onDismiss,
10
+ className
11
+ }) {
12
+ const titleId = React.useId();
13
+ const descId = React.useId();
14
+ return /* @__PURE__ */ jsxs(
15
+ "div",
16
+ {
17
+ className: cn(
18
+ "flex items-start gap-3 p-4 rounded-lg border",
19
+ "bg-[var(--axis-surface-error)] border-[var(--axis-color-red-200)]",
20
+ className
21
+ ),
22
+ role: "alert",
23
+ "aria-labelledby": titleId,
24
+ "aria-describedby": description ? descId : void 0,
25
+ children: [
26
+ /* @__PURE__ */ jsx(
27
+ "svg",
28
+ {
29
+ className: "w-5 h-5 text-[var(--axis-color-red-500)] flex-shrink-0 mt-0.5",
30
+ fill: "none",
31
+ stroke: "currentColor",
32
+ viewBox: "0 0 24 24",
33
+ "aria-hidden": "true",
34
+ children: /* @__PURE__ */ jsx(
35
+ "path",
36
+ {
37
+ strokeLinecap: "round",
38
+ strokeLinejoin: "round",
39
+ strokeWidth: 2,
40
+ d: "M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"
41
+ }
42
+ )
43
+ }
44
+ ),
45
+ /* @__PURE__ */ jsxs("div", { className: "flex-1 min-w-0", children: [
46
+ /* @__PURE__ */ jsx("p", { id: titleId, className: "text-sm font-medium text-[var(--axis-text-error)]", children: message }),
47
+ description && /* @__PURE__ */ jsx("p", { id: descId, className: "mt-1 text-sm text-[var(--axis-text-secondary)]", children: description }),
48
+ /* @__PURE__ */ jsxs("div", { className: "flex gap-2 mt-3", children: [
49
+ onRetry && /* @__PURE__ */ jsx(
50
+ "button",
51
+ {
52
+ onClick: onRetry,
53
+ "aria-describedby": descId,
54
+ className: "px-3 py-1.5 text-sm font-medium rounded-md bg-[var(--axis-color-red-500)] text-white hover:bg-[var(--axis-color-red-600)] transition-colors",
55
+ children: "\uC7AC\uC2DC\uB3C4"
56
+ }
57
+ ),
58
+ onDismiss && /* @__PURE__ */ jsx(
59
+ "button",
60
+ {
61
+ onClick: onDismiss,
62
+ className: "px-3 py-1.5 text-sm font-medium rounded-md bg-transparent text-[var(--axis-text-primary)] hover:bg-[var(--axis-surface-secondary)] transition-colors",
63
+ children: "\uBB34\uC2DC"
64
+ }
65
+ )
66
+ ] })
67
+ ] })
68
+ ]
69
+ }
70
+ );
71
+ }
72
+
73
+ export {
74
+ RecoveryBanner
75
+ };
@@ -0,0 +1,76 @@
1
+ // src/approval-card/index.tsx
2
+ import { cn } from "@axis-ds/ui-react";
3
+ import { jsx, jsxs } from "react/jsx-runtime";
4
+ var severityStyles = {
5
+ info: {
6
+ border: "border-l-[var(--axis-color-blue-500)]",
7
+ icon: "text-[var(--axis-color-blue-500)]",
8
+ bg: "bg-[var(--axis-surface-info)]"
9
+ },
10
+ warning: {
11
+ border: "border-l-[var(--axis-color-yellow-500)]",
12
+ icon: "text-[var(--axis-color-yellow-500)]",
13
+ bg: "bg-[var(--axis-surface-warning)]"
14
+ },
15
+ error: {
16
+ border: "border-l-[var(--axis-color-red-500)]",
17
+ icon: "text-[var(--axis-color-red-500)]",
18
+ bg: "bg-[var(--axis-surface-error)]"
19
+ }
20
+ };
21
+ var severityIcons = {
22
+ info: /* @__PURE__ */ jsx("svg", { className: "w-5 h-5", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" }) }),
23
+ warning: /* @__PURE__ */ jsx("svg", { className: "w-5 h-5", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z" }) }),
24
+ error: /* @__PURE__ */ jsx("svg", { className: "w-5 h-5", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" }) })
25
+ };
26
+ var actionVariantStyles = {
27
+ default: "bg-[var(--axis-button-bg-default)] text-white hover:bg-[var(--axis-button-bg-hover)]",
28
+ secondary: "bg-[var(--axis-button-secondary-bg-default)] text-[var(--axis-text-primary)] hover:bg-[var(--axis-button-secondary-bg-hover)]",
29
+ ghost: "bg-transparent text-[var(--axis-text-primary)] hover:bg-[var(--axis-surface-secondary)]",
30
+ destructive: "bg-[var(--axis-button-destructive-bg-default)] text-white hover:bg-[var(--axis-button-destructive-bg-hover)]"
31
+ };
32
+ function ApprovalCard({
33
+ title,
34
+ description,
35
+ severity = "info",
36
+ actions,
37
+ children,
38
+ className
39
+ }) {
40
+ const styles = severityStyles[severity];
41
+ return /* @__PURE__ */ jsx(
42
+ "div",
43
+ {
44
+ className: cn(
45
+ "rounded-lg border border-l-4 p-4",
46
+ "bg-[var(--axis-surface-default)] border-[var(--axis-border-default)]",
47
+ styles.border,
48
+ className
49
+ ),
50
+ children: /* @__PURE__ */ jsxs("div", { className: "flex items-start gap-3", children: [
51
+ /* @__PURE__ */ jsx("div", { className: cn("flex-shrink-0 mt-0.5", styles.icon), children: severityIcons[severity] }),
52
+ /* @__PURE__ */ jsxs("div", { className: "flex-1 min-w-0", children: [
53
+ /* @__PURE__ */ jsx("h4", { className: "text-sm font-semibold text-[var(--axis-text-primary)]", children: title }),
54
+ description && /* @__PURE__ */ jsx("p", { className: "mt-1 text-sm text-[var(--axis-text-secondary)]", children: description }),
55
+ children && /* @__PURE__ */ jsx("div", { className: "mt-3", children }),
56
+ /* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-2 mt-4", children: actions.map((action, index) => /* @__PURE__ */ jsx(
57
+ "button",
58
+ {
59
+ onClick: action.onClick,
60
+ className: cn(
61
+ "px-3 py-1.5 text-sm font-medium rounded-md transition-colors",
62
+ actionVariantStyles[action.variant || "default"]
63
+ ),
64
+ children: action.label
65
+ },
66
+ index
67
+ )) })
68
+ ] })
69
+ ] })
70
+ }
71
+ );
72
+ }
73
+
74
+ export {
75
+ ApprovalCard
76
+ };
@@ -0,0 +1,105 @@
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 !== void 0 && /* @__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
+ };