@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,110 @@
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/step-timeline/index.tsx
21
+ var step_timeline_exports = {};
22
+ __export(step_timeline_exports, {
23
+ StepTimeline: () => StepTimeline
24
+ });
25
+ module.exports = __toCommonJS(step_timeline_exports);
26
+ var import_ui_react = require("@axis-ds/ui-react");
27
+
28
+ // src/constants/a11y-labels.ts
29
+ var STATUS_LABELS = {
30
+ pending: "\uB300\uAE30 \uC911",
31
+ running: "\uC2E4\uD589 \uC911",
32
+ complete: "\uC644\uB8CC",
33
+ success: "\uC131\uACF5",
34
+ error: "\uC624\uB958",
35
+ skipped: "\uAC74\uB108\uB700",
36
+ idle: "\uB300\uAE30 \uC911"
37
+ };
38
+
39
+ // src/step-timeline/index.tsx
40
+ var import_jsx_runtime = require("react/jsx-runtime");
41
+ function StepTimeline({
42
+ steps,
43
+ orientation = "vertical",
44
+ className
45
+ }) {
46
+ const isVertical = orientation === "vertical";
47
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
48
+ "div",
49
+ {
50
+ role: "list",
51
+ "aria-label": "\uC791\uC5C5 \uD0C0\uC784\uB77C\uC778",
52
+ className: (0, import_ui_react.cn)(
53
+ isVertical ? "flex flex-col gap-4" : "flex items-center gap-2",
54
+ className
55
+ ),
56
+ children: steps.map((step, index) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
57
+ "div",
58
+ {
59
+ role: "listitem",
60
+ "aria-current": step.status === "running" ? "step" : void 0,
61
+ className: (0, import_ui_react.cn)(
62
+ "relative flex",
63
+ isVertical ? "items-start gap-3" : "flex-col items-center"
64
+ ),
65
+ children: [
66
+ index < steps.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
67
+ "div",
68
+ {
69
+ "aria-hidden": "true",
70
+ className: (0, import_ui_react.cn)(
71
+ "absolute bg-[var(--axis-border-default)]",
72
+ 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"
73
+ )
74
+ }
75
+ ),
76
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
77
+ "div",
78
+ {
79
+ "aria-hidden": "true",
80
+ className: (0, import_ui_react.cn)(
81
+ "relative z-10 w-5 h-5 rounded-full flex items-center justify-center",
82
+ step.status === "complete" && "bg-[var(--axis-color-green-500)]",
83
+ step.status === "running" && "bg-[var(--axis-color-blue-500)] animate-pulse",
84
+ step.status === "error" && "bg-[var(--axis-color-red-500)]",
85
+ step.status === "skipped" && "bg-[var(--axis-color-gray-300)]",
86
+ step.status === "pending" && "bg-[var(--axis-color-gray-300)]"
87
+ ),
88
+ children: step.status === "complete" && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", { className: "w-3 h-3 text-white", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 3, d: "M5 13l4 4L19 7" }) })
89
+ }
90
+ ),
91
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: (0, import_ui_react.cn)(isVertical ? "flex-1" : "text-center mt-2"), children: [
92
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className: "sr-only", children: [
93
+ STATUS_LABELS[step.status],
94
+ ":"
95
+ ] }),
96
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-sm font-medium text-[var(--axis-text-primary)]", children: step.label }),
97
+ step.description && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-xs text-[var(--axis-text-secondary)]", children: step.description }),
98
+ step.timestamp && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-xs text-[var(--axis-text-tertiary)]", children: step.timestamp.toLocaleTimeString() })
99
+ ] })
100
+ ]
101
+ },
102
+ step.id
103
+ ))
104
+ }
105
+ );
106
+ }
107
+ // Annotate the CommonJS export names for ESM import in node:
108
+ 0 && (module.exports = {
109
+ StepTimeline
110
+ });
@@ -0,0 +1,7 @@
1
+ import {
2
+ StepTimeline
3
+ } from "../chunk-RGPKTWK4.mjs";
4
+ import "../chunk-SCZ4BQ2G.mjs";
5
+ export {
6
+ StepTimeline
7
+ };
@@ -0,0 +1,27 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+
3
+ interface StreamingTextProps {
4
+ /** 접근성 라이브 영역 모드 */
5
+ "aria-live"?: "polite" | "assertive" | "off";
6
+ /** 접근성 레이블 */
7
+ "aria-label"?: string;
8
+ /** 스트리밍할 텍스트 */
9
+ text: string;
10
+ /** 스트리밍 속도 (ms) */
11
+ speed?: number;
12
+ /** 스트리밍 완료 여부 */
13
+ isComplete?: boolean;
14
+ /** 커서 표시 여부 */
15
+ showCursor?: boolean;
16
+ /** 완료 콜백 */
17
+ onComplete?: () => void;
18
+ /** 추가 클래스 */
19
+ className?: string;
20
+ }
21
+ /**
22
+ * 텍스트를 실시간으로 스트리밍하는 컴포넌트
23
+ * AI 응답을 타이핑 효과로 표시할 때 사용
24
+ */
25
+ declare function StreamingText({ text, speed, isComplete, showCursor, onComplete, "aria-live": ariaLive, "aria-label": ariaLabel, className, }: StreamingTextProps): react_jsx_runtime.JSX.Element;
26
+
27
+ export { StreamingText, type StreamingTextProps };
@@ -0,0 +1,27 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+
3
+ interface StreamingTextProps {
4
+ /** 접근성 라이브 영역 모드 */
5
+ "aria-live"?: "polite" | "assertive" | "off";
6
+ /** 접근성 레이블 */
7
+ "aria-label"?: string;
8
+ /** 스트리밍할 텍스트 */
9
+ text: string;
10
+ /** 스트리밍 속도 (ms) */
11
+ speed?: number;
12
+ /** 스트리밍 완료 여부 */
13
+ isComplete?: boolean;
14
+ /** 커서 표시 여부 */
15
+ showCursor?: boolean;
16
+ /** 완료 콜백 */
17
+ onComplete?: () => void;
18
+ /** 추가 클래스 */
19
+ className?: string;
20
+ }
21
+ /**
22
+ * 텍스트를 실시간으로 스트리밍하는 컴포넌트
23
+ * AI 응답을 타이핑 효과로 표시할 때 사용
24
+ */
25
+ declare function StreamingText({ text, speed, isComplete, showCursor, onComplete, "aria-live": ariaLive, "aria-label": ariaLabel, className, }: StreamingTextProps): react_jsx_runtime.JSX.Element;
26
+
27
+ export { StreamingText, type StreamingTextProps };
@@ -0,0 +1,97 @@
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/streaming-text/index.tsx
31
+ var streaming_text_exports = {};
32
+ __export(streaming_text_exports, {
33
+ StreamingText: () => StreamingText
34
+ });
35
+ module.exports = __toCommonJS(streaming_text_exports);
36
+ var React = __toESM(require("react"));
37
+ var import_ui_react = require("@axis-ds/ui-react");
38
+ var import_jsx_runtime = require("react/jsx-runtime");
39
+ function StreamingText({
40
+ text,
41
+ speed = 20,
42
+ isComplete = false,
43
+ showCursor = true,
44
+ onComplete,
45
+ "aria-live": ariaLive,
46
+ "aria-label": ariaLabel,
47
+ className
48
+ }) {
49
+ const [displayedText, setDisplayedText] = React.useState("");
50
+ const [isStreaming, setIsStreaming] = React.useState(false);
51
+ const prevTextRef = React.useRef("");
52
+ React.useEffect(() => {
53
+ if (isComplete) {
54
+ setDisplayedText(text);
55
+ setIsStreaming(false);
56
+ return;
57
+ }
58
+ if (text.length > prevTextRef.current.length && text.startsWith(prevTextRef.current)) {
59
+ const newText = text.slice(prevTextRef.current.length);
60
+ let charIndex = 0;
61
+ setIsStreaming(true);
62
+ const interval = setInterval(() => {
63
+ if (charIndex < newText.length) {
64
+ setDisplayedText((prev) => prev + newText[charIndex]);
65
+ charIndex++;
66
+ } else {
67
+ clearInterval(interval);
68
+ setIsStreaming(false);
69
+ if (onComplete) onComplete();
70
+ }
71
+ }, speed);
72
+ prevTextRef.current = text;
73
+ return () => clearInterval(interval);
74
+ } else if (text !== prevTextRef.current) {
75
+ setDisplayedText("");
76
+ prevTextRef.current = "";
77
+ }
78
+ }, [text, speed, isComplete, onComplete]);
79
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
80
+ "div",
81
+ {
82
+ role: "region",
83
+ "aria-label": ariaLabel || "AI \uC751\uB2F5",
84
+ "aria-live": ariaLive ?? "polite",
85
+ "aria-busy": isStreaming,
86
+ className: (0, import_ui_react.cn)("relative", className),
87
+ children: [
88
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "text-[var(--axis-text-primary)] whitespace-pre-wrap", children: displayedText }),
89
+ showCursor && isStreaming && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "inline-block w-0.5 h-4 ml-0.5 bg-[var(--axis-text-primary)] animate-pulse", "aria-hidden": "true" })
90
+ ]
91
+ }
92
+ );
93
+ }
94
+ // Annotate the CommonJS export names for ESM import in node:
95
+ 0 && (module.exports = {
96
+ StreamingText
97
+ });
@@ -0,0 +1,6 @@
1
+ import {
2
+ StreamingText
3
+ } from "../chunk-GQYOOLDL.mjs";
4
+ export {
5
+ StreamingText
6
+ };
@@ -0,0 +1,22 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import * as React from 'react';
3
+
4
+ type SurfaceType = "text" | "code" | "table" | "chart" | "form" | "custom";
5
+ interface Surface {
6
+ id: string;
7
+ type: SurfaceType;
8
+ title?: string;
9
+ content: unknown;
10
+ metadata?: Record<string, unknown>;
11
+ }
12
+ interface SurfaceRendererProps {
13
+ surface: Surface;
14
+ renderCustom?: (surface: Surface) => React.ReactNode;
15
+ className?: string;
16
+ }
17
+ /**
18
+ * 다양한 타입의 Surface를 동적으로 렌더링하는 컴포넌트
19
+ */
20
+ declare function SurfaceRenderer({ surface, renderCustom, className, }: SurfaceRendererProps): react_jsx_runtime.JSX.Element;
21
+
22
+ export { type Surface, SurfaceRenderer, type SurfaceRendererProps, type SurfaceType };
@@ -0,0 +1,22 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import * as React from 'react';
3
+
4
+ type SurfaceType = "text" | "code" | "table" | "chart" | "form" | "custom";
5
+ interface Surface {
6
+ id: string;
7
+ type: SurfaceType;
8
+ title?: string;
9
+ content: unknown;
10
+ metadata?: Record<string, unknown>;
11
+ }
12
+ interface SurfaceRendererProps {
13
+ surface: Surface;
14
+ renderCustom?: (surface: Surface) => React.ReactNode;
15
+ className?: string;
16
+ }
17
+ /**
18
+ * 다양한 타입의 Surface를 동적으로 렌더링하는 컴포넌트
19
+ */
20
+ declare function SurfaceRenderer({ surface, renderCustom, className, }: SurfaceRendererProps): react_jsx_runtime.JSX.Element;
21
+
22
+ export { type Surface, SurfaceRenderer, type SurfaceRendererProps, type SurfaceType };
@@ -0,0 +1,107 @@
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/surface-renderer/index.tsx
21
+ var surface_renderer_exports = {};
22
+ __export(surface_renderer_exports, {
23
+ SurfaceRenderer: () => SurfaceRenderer
24
+ });
25
+ module.exports = __toCommonJS(surface_renderer_exports);
26
+ var import_ui_react = require("@axis-ds/ui-react");
27
+ var import_jsx_runtime = require("react/jsx-runtime");
28
+ function SurfaceRenderer({
29
+ surface,
30
+ renderCustom,
31
+ className
32
+ }) {
33
+ const renderContent = () => {
34
+ switch (surface.type) {
35
+ case "text":
36
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "prose prose-sm max-w-none text-[var(--axis-text-primary)]", children: String(surface.content) });
37
+ case "code":
38
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("pre", { className: "p-3 rounded-md bg-[var(--axis-surface-secondary)] overflow-x-auto", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("code", { className: "text-sm font-mono text-[var(--axis-text-primary)]", children: String(surface.content) }) });
39
+ case "table":
40
+ const tableData = surface.content;
41
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "overflow-x-auto", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("table", { role: "table", className: "w-full text-sm", children: [
42
+ surface.title && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("caption", { className: "sr-only", children: surface.title }),
43
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("thead", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("tr", { className: "border-b border-[var(--axis-border-default)]", children: tableData.headers.map((header, i) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
44
+ "th",
45
+ {
46
+ scope: "col",
47
+ className: "px-3 py-2 text-left font-medium text-[var(--axis-text-secondary)]",
48
+ children: header
49
+ },
50
+ i
51
+ )) }) }),
52
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("tbody", { children: tableData.rows.map((row, i) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
53
+ "tr",
54
+ {
55
+ className: "border-b border-[var(--axis-border-default)] last:border-0",
56
+ children: row.map((cell, j) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
57
+ "td",
58
+ {
59
+ className: "px-3 py-2 text-[var(--axis-text-primary)]",
60
+ children: cell
61
+ },
62
+ j
63
+ ))
64
+ },
65
+ i
66
+ )) })
67
+ ] }) });
68
+ case "chart":
69
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "p-4 text-center text-[var(--axis-text-secondary)]", children: [
70
+ "[\uCC28\uD2B8: ",
71
+ surface.title || "\uB370\uC774\uD130 \uC2DC\uAC01\uD654",
72
+ "]"
73
+ ] });
74
+ case "form":
75
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "p-4 text-center text-[var(--axis-text-secondary)]", children: [
76
+ "[\uD3FC: ",
77
+ surface.title || "\uC785\uB825 \uC591\uC2DD",
78
+ "]"
79
+ ] });
80
+ case "custom":
81
+ if (renderCustom) {
82
+ return renderCustom(surface);
83
+ }
84
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "p-4 text-center text-[var(--axis-text-secondary)]", children: "[\uCEE4\uC2A4\uD140 Surface]" });
85
+ default:
86
+ return null;
87
+ }
88
+ };
89
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
90
+ "div",
91
+ {
92
+ className: (0, import_ui_react.cn)(
93
+ "rounded-lg border p-4",
94
+ "bg-[var(--axis-surface-default)] border-[var(--axis-border-default)]",
95
+ className
96
+ ),
97
+ children: [
98
+ surface.title && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h4", { className: "text-sm font-medium text-[var(--axis-text-primary)] mb-3", children: surface.title }),
99
+ renderContent()
100
+ ]
101
+ }
102
+ );
103
+ }
104
+ // Annotate the CommonJS export names for ESM import in node:
105
+ 0 && (module.exports = {
106
+ SurfaceRenderer
107
+ });
@@ -0,0 +1,6 @@
1
+ import {
2
+ SurfaceRenderer
3
+ } from "../chunk-MVBXXDZB.mjs";
4
+ export {
5
+ SurfaceRenderer
6
+ };
@@ -0,0 +1,16 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+
3
+ interface ThinkingIndicatorProps {
4
+ /** 표시할 텍스트 */
5
+ text?: string;
6
+ /** 크기 */
7
+ size?: "sm" | "md" | "lg";
8
+ /** 추가 클래스 */
9
+ className?: string;
10
+ }
11
+ /**
12
+ * AI가 생각 중임을 표시하는 인디케이터
13
+ */
14
+ declare function ThinkingIndicator({ text, size, className, }: ThinkingIndicatorProps): react_jsx_runtime.JSX.Element;
15
+
16
+ export { ThinkingIndicator, type ThinkingIndicatorProps };
@@ -0,0 +1,16 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+
3
+ interface ThinkingIndicatorProps {
4
+ /** 표시할 텍스트 */
5
+ text?: string;
6
+ /** 크기 */
7
+ size?: "sm" | "md" | "lg";
8
+ /** 추가 클래스 */
9
+ className?: string;
10
+ }
11
+ /**
12
+ * AI가 생각 중임을 표시하는 인디케이터
13
+ */
14
+ declare function ThinkingIndicator({ text, size, className, }: ThinkingIndicatorProps): react_jsx_runtime.JSX.Element;
15
+
16
+ export { ThinkingIndicator, type ThinkingIndicatorProps };
@@ -0,0 +1,74 @@
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/thinking-indicator/index.tsx
21
+ var thinking_indicator_exports = {};
22
+ __export(thinking_indicator_exports, {
23
+ ThinkingIndicator: () => ThinkingIndicator
24
+ });
25
+ module.exports = __toCommonJS(thinking_indicator_exports);
26
+ var import_ui_react = require("@axis-ds/ui-react");
27
+ var import_jsx_runtime = require("react/jsx-runtime");
28
+ var sizeStyles = {
29
+ sm: "text-xs gap-1",
30
+ md: "text-sm gap-1.5",
31
+ lg: "text-base gap-2"
32
+ };
33
+ var dotSizes = {
34
+ sm: "w-1 h-1",
35
+ md: "w-1.5 h-1.5",
36
+ lg: "w-2 h-2"
37
+ };
38
+ function ThinkingIndicator({
39
+ text = "\uC0DD\uAC01 \uC911",
40
+ size = "md",
41
+ className
42
+ }) {
43
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
44
+ "div",
45
+ {
46
+ role: "status",
47
+ "aria-live": "polite",
48
+ "aria-label": text,
49
+ className: (0, import_ui_react.cn)(
50
+ "flex items-center text-[var(--axis-text-secondary)]",
51
+ sizeStyles[size],
52
+ className
53
+ ),
54
+ children: [
55
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: text }),
56
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "flex gap-0.5", "aria-hidden": "true", children: [0, 1, 2].map((i) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
57
+ "div",
58
+ {
59
+ className: (0, import_ui_react.cn)(
60
+ "rounded-full bg-current animate-bounce",
61
+ dotSizes[size]
62
+ ),
63
+ style: { animationDelay: `${i * 150}ms` }
64
+ },
65
+ i
66
+ )) })
67
+ ]
68
+ }
69
+ );
70
+ }
71
+ // Annotate the CommonJS export names for ESM import in node:
72
+ 0 && (module.exports = {
73
+ ThinkingIndicator
74
+ });
@@ -0,0 +1,6 @@
1
+ import {
2
+ ThinkingIndicator
3
+ } from "../chunk-FYAMA32G.mjs";
4
+ export {
5
+ ThinkingIndicator
6
+ };
@@ -0,0 +1,22 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+
3
+ interface TokenUsageIndicatorProps {
4
+ /** 현재 사용 토큰 수 */
5
+ current: number;
6
+ /** 최대 토큰 수 */
7
+ max: number;
8
+ /** 비용 (USD) */
9
+ cost?: number;
10
+ /** 경고 임계치 (0-1, 기본 0.8) */
11
+ warningThreshold?: number;
12
+ /** 컴팩트 모드 */
13
+ compact?: boolean;
14
+ /** 추가 클래스 */
15
+ className?: string;
16
+ }
17
+ /**
18
+ * 토큰 사용량 및 비용 표시 컴포넌트
19
+ */
20
+ declare function TokenUsageIndicator({ current, max, cost, warningThreshold, compact, className, }: TokenUsageIndicatorProps): react_jsx_runtime.JSX.Element;
21
+
22
+ export { TokenUsageIndicator, type TokenUsageIndicatorProps };
@@ -0,0 +1,22 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+
3
+ interface TokenUsageIndicatorProps {
4
+ /** 현재 사용 토큰 수 */
5
+ current: number;
6
+ /** 최대 토큰 수 */
7
+ max: number;
8
+ /** 비용 (USD) */
9
+ cost?: number;
10
+ /** 경고 임계치 (0-1, 기본 0.8) */
11
+ warningThreshold?: number;
12
+ /** 컴팩트 모드 */
13
+ compact?: boolean;
14
+ /** 추가 클래스 */
15
+ className?: string;
16
+ }
17
+ /**
18
+ * 토큰 사용량 및 비용 표시 컴포넌트
19
+ */
20
+ declare function TokenUsageIndicator({ current, max, cost, warningThreshold, compact, className, }: TokenUsageIndicatorProps): react_jsx_runtime.JSX.Element;
21
+
22
+ export { TokenUsageIndicator, type TokenUsageIndicatorProps };