@t3q-ui/design-system 1.62.0 → 1.63.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 (38) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/chunk-DWF6AFPQ.js +409 -0
  3. package/dist/chunk-DWF6AFPQ.js.map +1 -0
  4. package/dist/{chunk-B7EVWGOO.cjs → chunk-ESAMXUUJ.cjs} +2264 -1129
  5. package/dist/chunk-ESAMXUUJ.cjs.map +1 -0
  6. package/dist/{chunk-RWXQIS6W.js → chunk-GZZXYYDY.js} +2182 -1049
  7. package/dist/chunk-GZZXYYDY.js.map +1 -0
  8. package/dist/chunk-OQOBPYZT.cjs +443 -0
  9. package/dist/chunk-OQOBPYZT.cjs.map +1 -0
  10. package/dist/{index-49sVdPlX.d.cts → index-DoIChamr.d.cts} +177 -1
  11. package/dist/{index-49sVdPlX.d.ts → index-DoIChamr.d.ts} +177 -1
  12. package/dist/index.cjs +1146 -1799
  13. package/dist/index.cjs.map +1 -1
  14. package/dist/index.css +12 -0
  15. package/dist/index.css.map +1 -1
  16. package/dist/index.d.cts +54 -7
  17. package/dist/index.d.ts +54 -7
  18. package/dist/index.js +584 -1264
  19. package/dist/index.js.map +1 -1
  20. package/dist/markdown/index.cjs +412 -0
  21. package/dist/markdown/index.cjs.map +1 -0
  22. package/dist/markdown/index.d.cts +24 -0
  23. package/dist/markdown/index.d.ts +24 -0
  24. package/dist/markdown/index.js +405 -0
  25. package/dist/markdown/index.js.map +1 -0
  26. package/dist/patterns/index.cjs +586 -69
  27. package/dist/patterns/index.cjs.map +1 -1
  28. package/dist/patterns/index.d.cts +119 -2
  29. package/dist/patterns/index.d.ts +119 -2
  30. package/dist/patterns/index.js +520 -5
  31. package/dist/patterns/index.js.map +1 -1
  32. package/dist/styles.css +23 -0
  33. package/mcp/manifests/components.json +2620 -68
  34. package/package.json +19 -2
  35. package/skills/tds/examples/chat-page.tsx +313 -0
  36. package/skills/tds/reference/components.md +238 -11
  37. package/dist/chunk-B7EVWGOO.cjs.map +0 -1
  38. package/dist/chunk-RWXQIS6W.js.map +0 -1
@@ -57,6 +57,182 @@ interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, Var
57
57
  */
58
58
  declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
59
59
 
60
+ /** 메시지·입력창에 붙는 파일 하나 */
61
+ type ChatAttachment = {
62
+ /** 고유 값. 지우기(`onRemoveAttachment`)에 넘어간다 */
63
+ id: string;
64
+ /** 파일 이름 */
65
+ name: string;
66
+ /** 올리는 중이면 `uploading`, 실패했으면 `error`. 없으면 준비됨 */
67
+ status?: 'uploading' | 'error';
68
+ /** 실패 사유 한 줄 (`status='error'` 일 때 칩 아래에 보인다) */
69
+ error?: React.ReactNode;
70
+ /** 주면 보낸 메시지의 칩이 이 주소로 가는 링크가 된다 */
71
+ href?: string;
72
+ };
73
+ /** AI 답변이 참고한 출처 하나 */
74
+ type ChatSource = {
75
+ /** 출처 제목 (한 줄) */
76
+ title: string;
77
+ /** 주면 제목이 새 탭으로 여는 링크가 된다 */
78
+ href?: string;
79
+ /** 제목 아래 설명 (두 줄까지) */
80
+ description?: React.ReactNode;
81
+ };
82
+ interface ChatMessageProps {
83
+ /** 보낸 사람. `user` = 오른쪽 말풍선, `assistant` = 말풍선 없이 본문 폭 전체. (`role` 이 아닌 것은 JSX 에서 ARIA role 과 헷갈리지 않게) */
84
+ from: 'user' | 'assistant';
85
+ /** 본문. AI 답변은 `<Markdown>`(`@t3q-ui/design-system/markdown`)으로 넘긴다 */
86
+ children?: React.ReactNode;
87
+ /** 첫 글자가 오기 전 대기 표시(스피너 + 글자). 본문 대신 그린다 */
88
+ pending?: boolean;
89
+ /** 생성 중. 켜져 있으면 행동 버튼·출처·메타를 숨긴다(끝난 뒤에 나타난다) */
90
+ streaming?: boolean;
91
+ /** 오류 안내. 받은 본문은 그대로 두고 그 아래에 그린다 */
92
+ error?: React.ReactNode;
93
+ /** 오류 안내의 "다시 시도" 클릭. 주면 버튼이 붙는다 */
94
+ onRetry?: () => void;
95
+ /** 첨부 파일 칩 (사용자 메시지 위) */
96
+ attachments?: ChatAttachment[];
97
+ /** 출처. 주면 답변 아래에 "출처 N개" 로 접혀 보인다 */
98
+ sources?: ChatSource[];
99
+ /** 행동 버튼 줄 오른쪽의 보조 정보 (모델 이름·시각 등) */
100
+ meta?: React.ReactNode;
101
+ /** 기본 행동(복사·다시 생성·평가) 뒤에 붙는 추가 버튼. `IconButton` 으로 넣는다 */
102
+ actions?: React.ReactNode;
103
+ /** 복사할 원문. 주면 복사 버튼이 붙는다 */
104
+ copyText?: string;
105
+ /** 다시 생성 클릭. 주면 버튼이 붙는다 */
106
+ onRegenerate?: () => void;
107
+ /** 평가(도움이 됐어요·안 됐어요) 클릭. 주면 두 버튼이 붙는다 */
108
+ onFeedback?: (value: 'up' | 'down') => void;
109
+ /** 지금 눌린 평가 */
110
+ feedback?: 'up' | 'down';
111
+ /** 보이지 않는 발신자 제목("내 메시지"·"AI 답변")의 heading 레벨. 화면 제목이 h1 이면 2(기본), 패널 제목(h2) 아래면 3 */
112
+ headingLevel?: 2 | 3 | 4;
113
+ /** 바깥 요소에 덧붙일 클래스 */
114
+ className?: string;
115
+ }
116
+ /**
117
+ * 대화 메시지 하나. 사용자 메시지는 오른쪽 말풍선, AI 답변은 말풍선 없이 본문 폭 전체에 그리고 아래에 출처·행동 버튼·메타를 둔다.
118
+ *
119
+ * 언제 쓰나: 챗 화면의 메시지 목록. 보통은 `ChatPage`·`ChatPanel` 패턴이 `messages` 배열로 이것을 그리므로 직접 쓸 일이 없다 — 패턴을 쓸 수 없는 자리(다른 화면 안에 대화 몇 줄을 보여 줄 때)에만 직접 쓴다.
120
+ * 언제 안 쓰나: 알림·이벤트 목록(→ EventList), 댓글·활동 이력(→ 소비 앱), 화면 안내(→ Alert).
121
+ * 대신/함께: AI 답변 본문은 `@t3q-ui/design-system/markdown` 의 `Markdown` 으로 넘긴다. 복사는 `copyText`(원문), 다시 생성·평가는 핸들러를 줄 때만 버튼이 생긴다. 생성이 실패하면 받은 본문은 두고 `error`(+`onRetry`)를 준다 — 토스트로만 알리지 않는다. 첫 글자 전에는 `pending`.
122
+ */
123
+ declare function ChatMessage({ from, children, pending, streaming, error, onRetry, attachments, sources, meta, actions, copyText, onRegenerate, onFeedback, feedback, headingLevel, className, }: ChatMessageProps): react_jsx_runtime.JSX.Element;
124
+
125
+ interface ChatComposerProps {
126
+ /** 입력 값. 주면 제어 컴포넌트가 된다(`onValueChange` 와 함께). 없으면 내부 상태로 관리하고 전송 뒤 비운다 */
127
+ value?: string;
128
+ /** 입력 값이 바뀔 때. 전송 뒤에는 빈 문자열로 불린다 */
129
+ onValueChange?: (value: string) => void;
130
+ /** 전송. 앞뒤 공백을 뗀 글자를 넘긴다. 글 없이 첨부만 있으면 빈 문자열 */
131
+ onSubmit: (text: string) => void;
132
+ /** 답변 생성 중. 전송 버튼이 중지 버튼으로 바뀌고 Enter 로 전송되지 않는다(입력은 계속할 수 있다) */
133
+ streaming?: boolean;
134
+ /** 중지 클릭. `streaming` 인데 주지 않으면 전송 버튼이 비활성으로 남는다 */
135
+ onStop?: () => void;
136
+ /** 입력과 전송을 모두 잠근다 (예: 모델을 아직 고르지 않음). 이유는 `placeholder` 에 적는다 */
137
+ disabled?: boolean;
138
+ /** 입력창 안내 문구. 기본 "메시지를 입력하세요" */
139
+ placeholder?: string;
140
+ /** 입력창의 접근성 이름. 기본 "메시지" */
141
+ label?: string;
142
+ /** 입력창이 자라는 최대 줄 수. 넘으면 안에서 스크롤. 기본 6 */
143
+ maxRows?: number;
144
+ /** `+` 메뉴에 넣을 항목(`DropdownMenuItem`). 주면 아래 줄 왼쪽에 `+` 버튼이 생기고, 누르면 메뉴가 열린다. `onAttach` 가 있으면 "파일 첨부" 가 맨 위에 놓인다 */
145
+ menu?: React.ReactNode;
146
+ /** 아래 줄 왼쪽 자리 (모델 선택 등). `+` 버튼 오른쪽에 놓인다. 켜고 끄는 옵션은 여기보다 `menu` 에 넣는다 */
147
+ elemBefore?: React.ReactNode;
148
+ /** 아래 줄 오른쪽 자리. 전송 버튼 왼쪽에 놓인다 */
149
+ elemAfter?: React.ReactNode;
150
+ /** 붙여 둔 파일. 입력창 위에 칩으로 보인다. 올리기·실패 상태는 소비 앱이 정한다 */
151
+ attachments?: ChatAttachment[];
152
+ /** 파일을 골랐을 때. 주면 `+` 메뉴에 "파일 첨부" 가 생긴다. 서버로 올리는 일은 소비 앱이 한다 */
153
+ onAttach?: (files: File[]) => void;
154
+ /** 칩의 지우기 클릭 */
155
+ onRemoveAttachment?: (id: string) => void;
156
+ /** 고를 수 있는 파일 종류 (`<input accept>` 와 같은 형식) */
157
+ accept?: string;
158
+ /** 한 번에 여러 파일을 고를 수 있는가. 기본 true */
159
+ multiple?: boolean;
160
+ /** 바깥 상자에 덧붙일 클래스 */
161
+ className?: string;
162
+ }
163
+ /**
164
+ * 챗 입력창. 자동으로 늘어나는 입력란 아래에 `+` 메뉴(파일 첨부·옵션)와 전송(생성 중에는 중지) 버튼을 둔 둥근 상자.
165
+ *
166
+ * 언제 쓰나: AI에게 보내는 메시지 입력. 보통은 `ChatPage`·`ChatPanel` 패턴이 이것을 그리므로 직접 쓸 일이 없다 — 패턴을 쓸 수 없는 자리에만 직접 쓴다.
167
+ * 언제 안 쓰나: 폼의 여러 줄 입력(→ Textarea), 검색(→ TextField), 댓글 작성처럼 제출 버튼이 따로 있는 폼(→ FormPage).
168
+ * 대신/함께: Enter 로 전송, Shift+Enter 로 줄바꿈(한글 조합 중 Enter 는 전송하지 않는다). 비어 있으면 전송이 비활성이고, 올리는 중인 첨부가 있어도 비활성이다. 전송한 뒤에도 포커스는 입력란에 남는다. 파일 첨부와 켜고 끄는 옵션은 `+` 메뉴(`onAttach`·`menu`)에, 모델 선택처럼 늘 보여야 하는 것은 `elemBefore`·`elemAfter` 에 넣는다.
169
+ */
170
+ declare const ChatComposer: React.ForwardRefExoticComponent<ChatComposerProps & React.RefAttributes<HTMLTextAreaElement>>;
171
+
172
+ /** 대화 기록 한 줄 */
173
+ type ChatHistoryItem = {
174
+ /** 고유 값. `activeId`·`onSelect`·`onRename`·`onDelete` 에 쓰인다 */
175
+ id: string;
176
+ /** 대화 제목. 비어 있으면 "제목 없음" */
177
+ title: string;
178
+ /** 마지막으로 바뀐 시각. 모든 항목에 있으면 날짜별(오늘·어제·지난 7일·지난 30일·이전)로 묶는다 */
179
+ updatedAt?: Date | number | string;
180
+ };
181
+ type ChatHistoryGroup = {
182
+ /** 묶음 이름. 날짜가 없어 묶지 않을 때는 null */
183
+ label: string | null;
184
+ items: ChatHistoryItem[];
185
+ };
186
+ /**
187
+ * 대화 기록을 날짜별로 묶는다. 받은 순서는 묶음 안에서 그대로 유지한다.
188
+ * 날짜가 없거나 잘못된 항목이 하나라도 있으면 묶지 않고 한 묶음(label null)으로 돌려준다 — 일부만 묶으면 나머지가 갈 곳이 없다.
189
+ * 달력 날짜 기준이라 자정을 넘기면 "오늘" 이 "어제" 가 된다. 미래 시각은 "오늘" 로 본다.
190
+ */
191
+ declare function groupChatHistoryByDate(items: ChatHistoryItem[], now: Date | number): ChatHistoryGroup[];
192
+ interface ChatHistoryProps {
193
+ /** 대화 목록. 보여 줄 순서대로(보통 최신순) */
194
+ items: ChatHistoryItem[];
195
+ /** 지금 열려 있는 대화 */
196
+ activeId?: string | null;
197
+ /** 대화를 골랐을 때 */
198
+ onSelect: (id: string) => void;
199
+ /** 새 대화 클릭. 주면 맨 위에 "새 대화" 버튼이 생긴다 */
200
+ onNew?: () => void;
201
+ /** 이름을 바꿨을 때(그 자리 입력에서 Enter·포커스 이동으로 확정). 주면 항목 메뉴에 "이름 변경" 이 생긴다 */
202
+ onRename?: (id: string, title: string) => void;
203
+ /** 항목 메뉴의 "삭제" 클릭. 확인 대화상자(AlertDialog)는 소비 앱이 여기서 연다 */
204
+ onDelete?: (id: string) => void;
205
+ /** 검색. 주면 검색 입력이 생긴다. 조회와 지연(debounce)은 소비 앱이 한다 */
206
+ search?: {
207
+ /** 검색어 */
208
+ value: string;
209
+ /** 검색어가 바뀔 때 */
210
+ onChange: (value: string) => void;
211
+ };
212
+ /** true 면 목록 자리에 Skeleton */
213
+ loading?: boolean;
214
+ /** 주면 목록 대신 오류 안내. `onRetry` 가 있으면 "다시 시도" 버튼 */
215
+ error?: React.ReactNode;
216
+ /** 오류 안내의 "다시 시도" 클릭 */
217
+ onRetry?: () => void;
218
+ /** 더 불러올 대화가 있는가. true 면 목록 끝에 닿을 때 `onLoadMore` 를 부른다 */
219
+ hasMore?: boolean;
220
+ /** 목록 끝에 닿았을 때 */
221
+ onLoadMore?: () => void;
222
+ /** 날짜 묶음의 기준 시각. 기본은 처음 그릴 때의 현재 시각 */
223
+ now?: Date | number;
224
+ /** 바깥 요소에 덧붙일 클래스 */
225
+ className?: string;
226
+ }
227
+ /**
228
+ * 대화 기록 목록. 새 대화 버튼 → 검색 → 날짜별 묶음 순서로 그리고, 항목마다 이름 변경·삭제 메뉴를 둔다.
229
+ *
230
+ * 언제 쓰나: 챗 화면 왼쪽의 지난 대화 목록. 보통은 `ChatPage` 패턴이 `history` prop 으로 이것을 그리므로 직접 쓸 일이 없다.
231
+ * 언제 안 쓰나: 앱의 메뉴(→ Sidebar), 표로 봐야 하는 목록(→ ListPage), 최근 이벤트(→ EventList).
232
+ * 대신/함께: 날짜 묶음은 모든 항목에 `updatedAt` 이 있을 때만 생긴다. 이름 변경은 그 자리 입력(Enter 확정·Escape 취소), 삭제는 `onDelete` 에서 소비 앱이 AlertDialog 로 확인한다. 불러오는 중은 `loading`, 실패는 `error`(+`onRetry`), 더 있으면 `hasMore` + `onLoadMore`.
233
+ */
234
+ declare function ChatHistory({ items, activeId, onSelect, onNew, onRename, onDelete, search, loading, error, onRetry, hasMore, onLoadMore, now, className, }: ChatHistoryProps): react_jsx_runtime.JSX.Element;
235
+
60
236
  declare const Dialog: React.FC<DialogPrimitive.DialogProps>;
61
237
  declare const DialogTrigger: React.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
62
238
  declare const DialogPortal: React.FC<DialogPrimitive.DialogPortalProps>;
@@ -287,4 +463,4 @@ interface TwoLineCellRendererParams<TRow = unknown> extends ICellRendererParams<
287
463
  */
288
464
  declare function TwoLineCellRenderer<TRow = unknown>(params: TwoLineCellRendererParams<TRow>): react_jsx_runtime.JSX.Element;
289
465
 
290
- export { type TwoLineCellRendererParams as $, DrawerDescription as A, type BadgeProps as B, type PageHeaderState as C, Dialog as D, PageHeaderProvider as E, usePageHeader as F, type PageHeaderProps as G, PageHeader as H, AgGridTable as I, HeaderCheckboxRenderer as J, type AgGridTableType as K, withExplicitSortIcons as L, withSortIconOffset as M, estimateHeaderTextWidth as N, withFlexFill as O, type PageHeaderTabItem as P, BALANCED_FILL_MIN_WIDTH as Q, RowCheckboxRenderer as R, SORT_ICON_OFFSET_CLASS as S, withBalancedFill as T, NUMBER_COLUMN_WIDTH as U, withNumberColumnWidth as V, withTypeClasses as W, withHeaderMinWidth as X, withWidthFloor as Y, growColumnIds as Z, fitColumnsToContent as _, Badge as a, TwoLineCellRenderer as a0, badgeVariants as b, type BadgeTone as c, BADGE_OUTLINE_ACCENT as d, Button as e, buttonVariants as f, type ButtonProps as g, DialogPortal as h, DialogOverlay as i, DialogTrigger as j, DialogClose as k, DialogContent as l, DialogHeader as m, DialogFooter as n, DialogTitle as o, DialogDescription as p, Drawer as q, DrawerPortal as r, DrawerOverlay as s, DrawerTrigger as t, DrawerClose as u, DrawerContent as v, DrawerHeader as w, DrawerBody as x, DrawerFooter as y, DrawerTitle as z };
466
+ export { estimateHeaderTextWidth as $, Drawer as A, type BadgeProps as B, ChatComposer as C, Dialog as D, DrawerPortal as E, DrawerOverlay as F, DrawerTrigger as G, DrawerClose as H, DrawerContent as I, DrawerHeader as J, DrawerBody as K, DrawerFooter as L, DrawerTitle as M, DrawerDescription as N, type PageHeaderState as O, type PageHeaderTabItem as P, PageHeaderProvider as Q, usePageHeader as R, type PageHeaderProps as S, PageHeader as T, AgGridTable as U, HeaderCheckboxRenderer as V, RowCheckboxRenderer as W, type AgGridTableType as X, withExplicitSortIcons as Y, SORT_ICON_OFFSET_CLASS as Z, withSortIconOffset as _, Badge as a, withFlexFill as a0, BALANCED_FILL_MIN_WIDTH as a1, withBalancedFill as a2, NUMBER_COLUMN_WIDTH as a3, withNumberColumnWidth as a4, withTypeClasses as a5, withHeaderMinWidth as a6, withWidthFloor as a7, growColumnIds as a8, fitColumnsToContent as a9, type TwoLineCellRendererParams as aa, TwoLineCellRenderer as ab, badgeVariants as b, type BadgeTone as c, BADGE_OUTLINE_ACCENT as d, Button as e, buttonVariants as f, type ButtonProps as g, type ChatComposerProps as h, ChatHistory as i, type ChatHistoryItem as j, type ChatHistoryGroup as k, groupChatHistoryByDate as l, type ChatHistoryProps as m, ChatMessage as n, type ChatAttachment as o, type ChatSource as p, type ChatMessageProps as q, DialogPortal as r, DialogOverlay as s, DialogTrigger as t, DialogClose as u, DialogContent as v, DialogHeader as w, DialogFooter as x, DialogTitle as y, DialogDescription as z };
@@ -57,6 +57,182 @@ interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, Var
57
57
  */
58
58
  declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
59
59
 
60
+ /** 메시지·입력창에 붙는 파일 하나 */
61
+ type ChatAttachment = {
62
+ /** 고유 값. 지우기(`onRemoveAttachment`)에 넘어간다 */
63
+ id: string;
64
+ /** 파일 이름 */
65
+ name: string;
66
+ /** 올리는 중이면 `uploading`, 실패했으면 `error`. 없으면 준비됨 */
67
+ status?: 'uploading' | 'error';
68
+ /** 실패 사유 한 줄 (`status='error'` 일 때 칩 아래에 보인다) */
69
+ error?: React.ReactNode;
70
+ /** 주면 보낸 메시지의 칩이 이 주소로 가는 링크가 된다 */
71
+ href?: string;
72
+ };
73
+ /** AI 답변이 참고한 출처 하나 */
74
+ type ChatSource = {
75
+ /** 출처 제목 (한 줄) */
76
+ title: string;
77
+ /** 주면 제목이 새 탭으로 여는 링크가 된다 */
78
+ href?: string;
79
+ /** 제목 아래 설명 (두 줄까지) */
80
+ description?: React.ReactNode;
81
+ };
82
+ interface ChatMessageProps {
83
+ /** 보낸 사람. `user` = 오른쪽 말풍선, `assistant` = 말풍선 없이 본문 폭 전체. (`role` 이 아닌 것은 JSX 에서 ARIA role 과 헷갈리지 않게) */
84
+ from: 'user' | 'assistant';
85
+ /** 본문. AI 답변은 `<Markdown>`(`@t3q-ui/design-system/markdown`)으로 넘긴다 */
86
+ children?: React.ReactNode;
87
+ /** 첫 글자가 오기 전 대기 표시(스피너 + 글자). 본문 대신 그린다 */
88
+ pending?: boolean;
89
+ /** 생성 중. 켜져 있으면 행동 버튼·출처·메타를 숨긴다(끝난 뒤에 나타난다) */
90
+ streaming?: boolean;
91
+ /** 오류 안내. 받은 본문은 그대로 두고 그 아래에 그린다 */
92
+ error?: React.ReactNode;
93
+ /** 오류 안내의 "다시 시도" 클릭. 주면 버튼이 붙는다 */
94
+ onRetry?: () => void;
95
+ /** 첨부 파일 칩 (사용자 메시지 위) */
96
+ attachments?: ChatAttachment[];
97
+ /** 출처. 주면 답변 아래에 "출처 N개" 로 접혀 보인다 */
98
+ sources?: ChatSource[];
99
+ /** 행동 버튼 줄 오른쪽의 보조 정보 (모델 이름·시각 등) */
100
+ meta?: React.ReactNode;
101
+ /** 기본 행동(복사·다시 생성·평가) 뒤에 붙는 추가 버튼. `IconButton` 으로 넣는다 */
102
+ actions?: React.ReactNode;
103
+ /** 복사할 원문. 주면 복사 버튼이 붙는다 */
104
+ copyText?: string;
105
+ /** 다시 생성 클릭. 주면 버튼이 붙는다 */
106
+ onRegenerate?: () => void;
107
+ /** 평가(도움이 됐어요·안 됐어요) 클릭. 주면 두 버튼이 붙는다 */
108
+ onFeedback?: (value: 'up' | 'down') => void;
109
+ /** 지금 눌린 평가 */
110
+ feedback?: 'up' | 'down';
111
+ /** 보이지 않는 발신자 제목("내 메시지"·"AI 답변")의 heading 레벨. 화면 제목이 h1 이면 2(기본), 패널 제목(h2) 아래면 3 */
112
+ headingLevel?: 2 | 3 | 4;
113
+ /** 바깥 요소에 덧붙일 클래스 */
114
+ className?: string;
115
+ }
116
+ /**
117
+ * 대화 메시지 하나. 사용자 메시지는 오른쪽 말풍선, AI 답변은 말풍선 없이 본문 폭 전체에 그리고 아래에 출처·행동 버튼·메타를 둔다.
118
+ *
119
+ * 언제 쓰나: 챗 화면의 메시지 목록. 보통은 `ChatPage`·`ChatPanel` 패턴이 `messages` 배열로 이것을 그리므로 직접 쓸 일이 없다 — 패턴을 쓸 수 없는 자리(다른 화면 안에 대화 몇 줄을 보여 줄 때)에만 직접 쓴다.
120
+ * 언제 안 쓰나: 알림·이벤트 목록(→ EventList), 댓글·활동 이력(→ 소비 앱), 화면 안내(→ Alert).
121
+ * 대신/함께: AI 답변 본문은 `@t3q-ui/design-system/markdown` 의 `Markdown` 으로 넘긴다. 복사는 `copyText`(원문), 다시 생성·평가는 핸들러를 줄 때만 버튼이 생긴다. 생성이 실패하면 받은 본문은 두고 `error`(+`onRetry`)를 준다 — 토스트로만 알리지 않는다. 첫 글자 전에는 `pending`.
122
+ */
123
+ declare function ChatMessage({ from, children, pending, streaming, error, onRetry, attachments, sources, meta, actions, copyText, onRegenerate, onFeedback, feedback, headingLevel, className, }: ChatMessageProps): react_jsx_runtime.JSX.Element;
124
+
125
+ interface ChatComposerProps {
126
+ /** 입력 값. 주면 제어 컴포넌트가 된다(`onValueChange` 와 함께). 없으면 내부 상태로 관리하고 전송 뒤 비운다 */
127
+ value?: string;
128
+ /** 입력 값이 바뀔 때. 전송 뒤에는 빈 문자열로 불린다 */
129
+ onValueChange?: (value: string) => void;
130
+ /** 전송. 앞뒤 공백을 뗀 글자를 넘긴다. 글 없이 첨부만 있으면 빈 문자열 */
131
+ onSubmit: (text: string) => void;
132
+ /** 답변 생성 중. 전송 버튼이 중지 버튼으로 바뀌고 Enter 로 전송되지 않는다(입력은 계속할 수 있다) */
133
+ streaming?: boolean;
134
+ /** 중지 클릭. `streaming` 인데 주지 않으면 전송 버튼이 비활성으로 남는다 */
135
+ onStop?: () => void;
136
+ /** 입력과 전송을 모두 잠근다 (예: 모델을 아직 고르지 않음). 이유는 `placeholder` 에 적는다 */
137
+ disabled?: boolean;
138
+ /** 입력창 안내 문구. 기본 "메시지를 입력하세요" */
139
+ placeholder?: string;
140
+ /** 입력창의 접근성 이름. 기본 "메시지" */
141
+ label?: string;
142
+ /** 입력창이 자라는 최대 줄 수. 넘으면 안에서 스크롤. 기본 6 */
143
+ maxRows?: number;
144
+ /** `+` 메뉴에 넣을 항목(`DropdownMenuItem`). 주면 아래 줄 왼쪽에 `+` 버튼이 생기고, 누르면 메뉴가 열린다. `onAttach` 가 있으면 "파일 첨부" 가 맨 위에 놓인다 */
145
+ menu?: React.ReactNode;
146
+ /** 아래 줄 왼쪽 자리 (모델 선택 등). `+` 버튼 오른쪽에 놓인다. 켜고 끄는 옵션은 여기보다 `menu` 에 넣는다 */
147
+ elemBefore?: React.ReactNode;
148
+ /** 아래 줄 오른쪽 자리. 전송 버튼 왼쪽에 놓인다 */
149
+ elemAfter?: React.ReactNode;
150
+ /** 붙여 둔 파일. 입력창 위에 칩으로 보인다. 올리기·실패 상태는 소비 앱이 정한다 */
151
+ attachments?: ChatAttachment[];
152
+ /** 파일을 골랐을 때. 주면 `+` 메뉴에 "파일 첨부" 가 생긴다. 서버로 올리는 일은 소비 앱이 한다 */
153
+ onAttach?: (files: File[]) => void;
154
+ /** 칩의 지우기 클릭 */
155
+ onRemoveAttachment?: (id: string) => void;
156
+ /** 고를 수 있는 파일 종류 (`<input accept>` 와 같은 형식) */
157
+ accept?: string;
158
+ /** 한 번에 여러 파일을 고를 수 있는가. 기본 true */
159
+ multiple?: boolean;
160
+ /** 바깥 상자에 덧붙일 클래스 */
161
+ className?: string;
162
+ }
163
+ /**
164
+ * 챗 입력창. 자동으로 늘어나는 입력란 아래에 `+` 메뉴(파일 첨부·옵션)와 전송(생성 중에는 중지) 버튼을 둔 둥근 상자.
165
+ *
166
+ * 언제 쓰나: AI에게 보내는 메시지 입력. 보통은 `ChatPage`·`ChatPanel` 패턴이 이것을 그리므로 직접 쓸 일이 없다 — 패턴을 쓸 수 없는 자리에만 직접 쓴다.
167
+ * 언제 안 쓰나: 폼의 여러 줄 입력(→ Textarea), 검색(→ TextField), 댓글 작성처럼 제출 버튼이 따로 있는 폼(→ FormPage).
168
+ * 대신/함께: Enter 로 전송, Shift+Enter 로 줄바꿈(한글 조합 중 Enter 는 전송하지 않는다). 비어 있으면 전송이 비활성이고, 올리는 중인 첨부가 있어도 비활성이다. 전송한 뒤에도 포커스는 입력란에 남는다. 파일 첨부와 켜고 끄는 옵션은 `+` 메뉴(`onAttach`·`menu`)에, 모델 선택처럼 늘 보여야 하는 것은 `elemBefore`·`elemAfter` 에 넣는다.
169
+ */
170
+ declare const ChatComposer: React.ForwardRefExoticComponent<ChatComposerProps & React.RefAttributes<HTMLTextAreaElement>>;
171
+
172
+ /** 대화 기록 한 줄 */
173
+ type ChatHistoryItem = {
174
+ /** 고유 값. `activeId`·`onSelect`·`onRename`·`onDelete` 에 쓰인다 */
175
+ id: string;
176
+ /** 대화 제목. 비어 있으면 "제목 없음" */
177
+ title: string;
178
+ /** 마지막으로 바뀐 시각. 모든 항목에 있으면 날짜별(오늘·어제·지난 7일·지난 30일·이전)로 묶는다 */
179
+ updatedAt?: Date | number | string;
180
+ };
181
+ type ChatHistoryGroup = {
182
+ /** 묶음 이름. 날짜가 없어 묶지 않을 때는 null */
183
+ label: string | null;
184
+ items: ChatHistoryItem[];
185
+ };
186
+ /**
187
+ * 대화 기록을 날짜별로 묶는다. 받은 순서는 묶음 안에서 그대로 유지한다.
188
+ * 날짜가 없거나 잘못된 항목이 하나라도 있으면 묶지 않고 한 묶음(label null)으로 돌려준다 — 일부만 묶으면 나머지가 갈 곳이 없다.
189
+ * 달력 날짜 기준이라 자정을 넘기면 "오늘" 이 "어제" 가 된다. 미래 시각은 "오늘" 로 본다.
190
+ */
191
+ declare function groupChatHistoryByDate(items: ChatHistoryItem[], now: Date | number): ChatHistoryGroup[];
192
+ interface ChatHistoryProps {
193
+ /** 대화 목록. 보여 줄 순서대로(보통 최신순) */
194
+ items: ChatHistoryItem[];
195
+ /** 지금 열려 있는 대화 */
196
+ activeId?: string | null;
197
+ /** 대화를 골랐을 때 */
198
+ onSelect: (id: string) => void;
199
+ /** 새 대화 클릭. 주면 맨 위에 "새 대화" 버튼이 생긴다 */
200
+ onNew?: () => void;
201
+ /** 이름을 바꿨을 때(그 자리 입력에서 Enter·포커스 이동으로 확정). 주면 항목 메뉴에 "이름 변경" 이 생긴다 */
202
+ onRename?: (id: string, title: string) => void;
203
+ /** 항목 메뉴의 "삭제" 클릭. 확인 대화상자(AlertDialog)는 소비 앱이 여기서 연다 */
204
+ onDelete?: (id: string) => void;
205
+ /** 검색. 주면 검색 입력이 생긴다. 조회와 지연(debounce)은 소비 앱이 한다 */
206
+ search?: {
207
+ /** 검색어 */
208
+ value: string;
209
+ /** 검색어가 바뀔 때 */
210
+ onChange: (value: string) => void;
211
+ };
212
+ /** true 면 목록 자리에 Skeleton */
213
+ loading?: boolean;
214
+ /** 주면 목록 대신 오류 안내. `onRetry` 가 있으면 "다시 시도" 버튼 */
215
+ error?: React.ReactNode;
216
+ /** 오류 안내의 "다시 시도" 클릭 */
217
+ onRetry?: () => void;
218
+ /** 더 불러올 대화가 있는가. true 면 목록 끝에 닿을 때 `onLoadMore` 를 부른다 */
219
+ hasMore?: boolean;
220
+ /** 목록 끝에 닿았을 때 */
221
+ onLoadMore?: () => void;
222
+ /** 날짜 묶음의 기준 시각. 기본은 처음 그릴 때의 현재 시각 */
223
+ now?: Date | number;
224
+ /** 바깥 요소에 덧붙일 클래스 */
225
+ className?: string;
226
+ }
227
+ /**
228
+ * 대화 기록 목록. 새 대화 버튼 → 검색 → 날짜별 묶음 순서로 그리고, 항목마다 이름 변경·삭제 메뉴를 둔다.
229
+ *
230
+ * 언제 쓰나: 챗 화면 왼쪽의 지난 대화 목록. 보통은 `ChatPage` 패턴이 `history` prop 으로 이것을 그리므로 직접 쓸 일이 없다.
231
+ * 언제 안 쓰나: 앱의 메뉴(→ Sidebar), 표로 봐야 하는 목록(→ ListPage), 최근 이벤트(→ EventList).
232
+ * 대신/함께: 날짜 묶음은 모든 항목에 `updatedAt` 이 있을 때만 생긴다. 이름 변경은 그 자리 입력(Enter 확정·Escape 취소), 삭제는 `onDelete` 에서 소비 앱이 AlertDialog 로 확인한다. 불러오는 중은 `loading`, 실패는 `error`(+`onRetry`), 더 있으면 `hasMore` + `onLoadMore`.
233
+ */
234
+ declare function ChatHistory({ items, activeId, onSelect, onNew, onRename, onDelete, search, loading, error, onRetry, hasMore, onLoadMore, now, className, }: ChatHistoryProps): react_jsx_runtime.JSX.Element;
235
+
60
236
  declare const Dialog: React.FC<DialogPrimitive.DialogProps>;
61
237
  declare const DialogTrigger: React.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
62
238
  declare const DialogPortal: React.FC<DialogPrimitive.DialogPortalProps>;
@@ -287,4 +463,4 @@ interface TwoLineCellRendererParams<TRow = unknown> extends ICellRendererParams<
287
463
  */
288
464
  declare function TwoLineCellRenderer<TRow = unknown>(params: TwoLineCellRendererParams<TRow>): react_jsx_runtime.JSX.Element;
289
465
 
290
- export { type TwoLineCellRendererParams as $, DrawerDescription as A, type BadgeProps as B, type PageHeaderState as C, Dialog as D, PageHeaderProvider as E, usePageHeader as F, type PageHeaderProps as G, PageHeader as H, AgGridTable as I, HeaderCheckboxRenderer as J, type AgGridTableType as K, withExplicitSortIcons as L, withSortIconOffset as M, estimateHeaderTextWidth as N, withFlexFill as O, type PageHeaderTabItem as P, BALANCED_FILL_MIN_WIDTH as Q, RowCheckboxRenderer as R, SORT_ICON_OFFSET_CLASS as S, withBalancedFill as T, NUMBER_COLUMN_WIDTH as U, withNumberColumnWidth as V, withTypeClasses as W, withHeaderMinWidth as X, withWidthFloor as Y, growColumnIds as Z, fitColumnsToContent as _, Badge as a, TwoLineCellRenderer as a0, badgeVariants as b, type BadgeTone as c, BADGE_OUTLINE_ACCENT as d, Button as e, buttonVariants as f, type ButtonProps as g, DialogPortal as h, DialogOverlay as i, DialogTrigger as j, DialogClose as k, DialogContent as l, DialogHeader as m, DialogFooter as n, DialogTitle as o, DialogDescription as p, Drawer as q, DrawerPortal as r, DrawerOverlay as s, DrawerTrigger as t, DrawerClose as u, DrawerContent as v, DrawerHeader as w, DrawerBody as x, DrawerFooter as y, DrawerTitle as z };
466
+ export { estimateHeaderTextWidth as $, Drawer as A, type BadgeProps as B, ChatComposer as C, Dialog as D, DrawerPortal as E, DrawerOverlay as F, DrawerTrigger as G, DrawerClose as H, DrawerContent as I, DrawerHeader as J, DrawerBody as K, DrawerFooter as L, DrawerTitle as M, DrawerDescription as N, type PageHeaderState as O, type PageHeaderTabItem as P, PageHeaderProvider as Q, usePageHeader as R, type PageHeaderProps as S, PageHeader as T, AgGridTable as U, HeaderCheckboxRenderer as V, RowCheckboxRenderer as W, type AgGridTableType as X, withExplicitSortIcons as Y, SORT_ICON_OFFSET_CLASS as Z, withSortIconOffset as _, Badge as a, withFlexFill as a0, BALANCED_FILL_MIN_WIDTH as a1, withBalancedFill as a2, NUMBER_COLUMN_WIDTH as a3, withNumberColumnWidth as a4, withTypeClasses as a5, withHeaderMinWidth as a6, withWidthFloor as a7, growColumnIds as a8, fitColumnsToContent as a9, type TwoLineCellRendererParams as aa, TwoLineCellRenderer as ab, badgeVariants as b, type BadgeTone as c, BADGE_OUTLINE_ACCENT as d, Button as e, buttonVariants as f, type ButtonProps as g, type ChatComposerProps as h, ChatHistory as i, type ChatHistoryItem as j, type ChatHistoryGroup as k, groupChatHistoryByDate as l, type ChatHistoryProps as m, ChatMessage as n, type ChatAttachment as o, type ChatSource as p, type ChatMessageProps as q, DialogPortal as r, DialogOverlay as s, DialogTrigger as t, DialogClose as u, DialogContent as v, DialogHeader as w, DialogFooter as x, DialogTitle as y, DialogDescription as z };