@t3q-ui/design-system 1.62.0 → 1.63.1
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/CHANGELOG.md +20 -0
- package/README.md +21 -0
- package/dist/chunk-DWF6AFPQ.js +409 -0
- package/dist/chunk-DWF6AFPQ.js.map +1 -0
- package/dist/{chunk-B7EVWGOO.cjs → chunk-ESAMXUUJ.cjs} +2264 -1129
- package/dist/chunk-ESAMXUUJ.cjs.map +1 -0
- package/dist/{chunk-RWXQIS6W.js → chunk-GZZXYYDY.js} +2182 -1049
- package/dist/chunk-GZZXYYDY.js.map +1 -0
- package/dist/chunk-OQOBPYZT.cjs +443 -0
- package/dist/chunk-OQOBPYZT.cjs.map +1 -0
- package/dist/{index-49sVdPlX.d.cts → index-DoIChamr.d.cts} +177 -1
- package/dist/{index-49sVdPlX.d.ts → index-DoIChamr.d.ts} +177 -1
- package/dist/index.cjs +1146 -1799
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +12 -0
- package/dist/index.css.map +1 -1
- package/dist/index.d.cts +54 -7
- package/dist/index.d.ts +54 -7
- package/dist/index.js +584 -1264
- package/dist/index.js.map +1 -1
- package/dist/markdown/index.cjs +441 -0
- package/dist/markdown/index.cjs.map +1 -0
- package/dist/markdown/index.d.cts +24 -0
- package/dist/markdown/index.d.ts +24 -0
- package/dist/markdown/index.js +434 -0
- package/dist/markdown/index.js.map +1 -0
- package/dist/patterns/index.cjs +586 -69
- package/dist/patterns/index.cjs.map +1 -1
- package/dist/patterns/index.d.cts +119 -2
- package/dist/patterns/index.d.ts +119 -2
- package/dist/patterns/index.js +520 -5
- package/dist/patterns/index.js.map +1 -1
- package/dist/styles.css +23 -0
- package/mcp/manifests/components.json +2620 -68
- package/package.json +20 -3
- package/skills/tds/SKILL.md +7 -3
- package/skills/tds/examples/chat-page.tsx +313 -0
- package/skills/tds/reference/components.md +239 -12
- package/skills/tds/rules.md +3 -2
- package/dist/chunk-B7EVWGOO.cjs.map +0 -1
- package/dist/chunk-RWXQIS6W.js.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import { ReactNode, ComponentProps } from 'react';
|
|
3
3
|
import { ColDef } from 'ag-grid-community';
|
|
4
|
-
import { B as BadgeProps,
|
|
4
|
+
import { B as BadgeProps, X as AgGridTableType, g as ButtonProps, S as PageHeaderProps, I as DrawerContent, v as DialogContent, o as ChatAttachment, p as ChatSource, h as ChatComposerProps, m as ChatHistoryProps } from '../index-DoIChamr.cjs';
|
|
5
5
|
import { FieldValues, UseFormReturn } from 'react-hook-form';
|
|
6
6
|
import 'class-variance-authority';
|
|
7
7
|
import '@radix-ui/react-dialog';
|
|
@@ -326,6 +326,123 @@ type DashboardPanelProps = {
|
|
|
326
326
|
*/
|
|
327
327
|
declare function DashboardPanel({ title, value, unit, stats, loading, empty, children, }: DashboardPanelProps): react_jsx_runtime.JSX.Element;
|
|
328
328
|
|
|
329
|
+
/** 대화 메시지 하나 (`messages` 배열의 항목) */
|
|
330
|
+
type ChatMessageItem = {
|
|
331
|
+
/** 고유 값. `onRegenerate`·`onFeedback` 에 넘어간다 */
|
|
332
|
+
id: string;
|
|
333
|
+
/** 보낸 사람 */
|
|
334
|
+
role: 'user' | 'assistant';
|
|
335
|
+
/** 본문. AI 답변은 `<Markdown>{text}</Markdown>`(`@t3q-ui/design-system/markdown`), 사용자 메시지는 문자열. 생성 중 아직 받은 글자가 없으면 비워 둔다(null·빈 문자열) — 대기 표시가 그려진다 */
|
|
336
|
+
content?: ReactNode;
|
|
337
|
+
/** 복사할 원문(마크다운 문자열). 주면 답변 아래에 복사 버튼이 붙는다 */
|
|
338
|
+
copyText?: string;
|
|
339
|
+
/** 생성 실패 안내. 받은 본문은 두고 그 아래에 그린다. `onRegenerate` 가 있으면 "다시 시도" 가 붙는다 */
|
|
340
|
+
error?: ReactNode;
|
|
341
|
+
/** 첨부 파일 (사용자 메시지) */
|
|
342
|
+
attachments?: ChatAttachment[];
|
|
343
|
+
/** 출처 (AI 답변) */
|
|
344
|
+
sources?: ChatSource[];
|
|
345
|
+
/** 행동 버튼 줄의 보조 정보 (모델 이름·시각 등) */
|
|
346
|
+
meta?: ReactNode;
|
|
347
|
+
/** 기본 행동 뒤에 붙는 추가 버튼 (`IconButton`) */
|
|
348
|
+
actions?: ReactNode;
|
|
349
|
+
/** 지금 눌린 평가 */
|
|
350
|
+
feedback?: 'up' | 'down';
|
|
351
|
+
};
|
|
352
|
+
/** 빈 대화의 인사말과 추천 질문 */
|
|
353
|
+
type ChatWelcome = {
|
|
354
|
+
/** 인사말 한 줄 (예: "무엇을 도와드릴까요?") */
|
|
355
|
+
title: ReactNode;
|
|
356
|
+
/** 인사말 아래 설명 */
|
|
357
|
+
description?: ReactNode;
|
|
358
|
+
/** 추천 질문. 누르면 그 문장이 바로 전송된다. 3개까지 권장 */
|
|
359
|
+
suggestions?: string[];
|
|
360
|
+
};
|
|
361
|
+
/** ChatPage · ChatPanel 이 공유하는 props */
|
|
362
|
+
type ChatShellProps = {
|
|
363
|
+
/** 대화 메시지. 시간순 */
|
|
364
|
+
messages: ChatMessageItem[];
|
|
365
|
+
/** 답변 생성 중. 마지막 답변이 생성 중인 메시지가 되고(행동 버튼 숨김), 마지막이 사용자 메시지이거나 답변 본문이 비어 있으면 대기 표시를 그린다. 전송 버튼은 중지 버튼으로 바뀐다 */
|
|
366
|
+
streaming?: boolean;
|
|
367
|
+
/** 전송. 추천 질문을 눌렀을 때도 불린다 */
|
|
368
|
+
onSend: (text: string) => void;
|
|
369
|
+
/** 생성 중지. 주면 생성 중에 중지 버튼이 보인다 */
|
|
370
|
+
onStop?: () => void;
|
|
371
|
+
/** 다시 생성. 주면 마지막 답변에 버튼이 붙고, 실패한 답변의 "다시 시도" 도 이것을 부른다 */
|
|
372
|
+
onRegenerate?: (id: string) => void;
|
|
373
|
+
/** 평가. 주면 답변마다 "도움이 됐어요·안 됐어요" 버튼이 붙는다. 눌린 상태는 항목의 `feedback` */
|
|
374
|
+
onFeedback?: (id: string, value: 'up' | 'down') => void;
|
|
375
|
+
/** 빈 대화에서 보일 인사말·추천 질문 */
|
|
376
|
+
welcome?: ChatWelcome;
|
|
377
|
+
/** 입력창 아래 안내 한 줄 (예: "AI 가 만든 답변은 틀릴 수 있습니다") */
|
|
378
|
+
note?: ReactNode;
|
|
379
|
+
/** true 면 메시지 자리에 로딩 표시 (지난 대화를 불러오는 중) */
|
|
380
|
+
loading?: boolean;
|
|
381
|
+
/** 주면 메시지 대신 오류 상자 (지난 대화를 못 불러옴). `onRetry` 가 있으면 "다시 시도" 버튼 */
|
|
382
|
+
error?: ReactNode;
|
|
383
|
+
/** error 상태의 "다시 시도" 클릭 */
|
|
384
|
+
onRetry?: () => void;
|
|
385
|
+
} & Pick<ChatComposerProps, 'value' | 'onValueChange' | 'disabled' | 'placeholder' | 'maxRows' | 'menu' | 'elemBefore' | 'elemAfter' | 'attachments' | 'onAttach' | 'onRemoveAttachment' | 'accept' | 'multiple'>;
|
|
386
|
+
|
|
387
|
+
/** 대화 오른쪽에 나란히 여는 패널(파라미터·설정 등). ListPage 의 `detail` 과 같은 모양 */
|
|
388
|
+
type ChatPageSidePanel = {
|
|
389
|
+
/** 패널 제목 (h2). 패널의 접근성 이름 */
|
|
390
|
+
title: ReactNode;
|
|
391
|
+
/** 제목 아래 한 줄 */
|
|
392
|
+
description?: ReactNode;
|
|
393
|
+
/** 닫기 — 오른쪽 위 닫기 버튼이 부른다 */
|
|
394
|
+
onClose: () => void;
|
|
395
|
+
/** 본문 */
|
|
396
|
+
children: ReactNode;
|
|
397
|
+
/** 맨 아래 버튼 줄 (오른쪽 정렬, 간격 8px) */
|
|
398
|
+
footer?: ReactNode;
|
|
399
|
+
/** 패널 폭. small 360 · medium 480(기본) — Drawer size 와 같은 값 */
|
|
400
|
+
width?: 'small' | 'medium';
|
|
401
|
+
};
|
|
402
|
+
type ChatPageProps = ChatShellProps & {
|
|
403
|
+
/** 화면 제목 (h1) */
|
|
404
|
+
title: string;
|
|
405
|
+
/** 제목 바로 옆 자리 — 모델 선택(`SelectTrigger appearance='none'`)이나 상태 Badge */
|
|
406
|
+
status?: ReactNode;
|
|
407
|
+
/** 헤더 오른쪽 자리. `actions` 왼쪽에 놓인다 */
|
|
408
|
+
titleRight?: ReactNode;
|
|
409
|
+
/** 헤더 오른쪽 끝의 행동 버튼. 버튼 사이 8px 로 그린다 */
|
|
410
|
+
actions?: ReactNode;
|
|
411
|
+
/** 왼쪽 대화 기록. 주면 기록 바(280px)와 헤더의 접기 버튼(제목·`status` 오른쪽)이 생긴다. 화면이 좁으면 Drawer 로 열린다 */
|
|
412
|
+
history?: Omit<ChatHistoryProps, 'className'>;
|
|
413
|
+
/** 오른쪽 패널. 열 때 객체를 주고 닫으면 undefined 로. 화면이 좁으면 Drawer 로 열린다 */
|
|
414
|
+
sidePanel?: ChatPageSidePanel;
|
|
415
|
+
};
|
|
416
|
+
/**
|
|
417
|
+
* 챗 화면 패턴(전체 화면형). 얇은 헤더 → [대화 기록 | 대화 + 입력창 | 옆 패널] 을 배치하고 스크롤·빈 화면·생성 상태를 맡는다.
|
|
418
|
+
*
|
|
419
|
+
* 언제 쓰나: AI와 대화하는 독립 화면(프롬프트 테스트·어시스턴트). 메시지·기록·전송·스트리밍은 소비 앱이 넘기고, 패턴은 배치와 자동 스크롤, 대기·오류 표시, 접근성 알림을 책임진다.
|
|
420
|
+
* 언제 안 쓰나: 다른 화면 옆에 붙는 좁은 대화(→ ChatPanel), 댓글·활동 이력, 알림 목록(→ EventList).
|
|
421
|
+
* 대신/함께: 부모가 높이를 가져야 한다 — 패턴은 그 높이를 채우고 메시지 목록만 스크롤한다(높이가 없으면 문서가 스크롤되고 입력창이 화면 아래에 붙는다). AI 답변 본문은 `@t3q-ui/design-system/markdown` 의 `Markdown` 으로 `content` 에 넘긴다. 생성 중에는 `streaming` 을 켜고 `onStop` 을 준다. 답변 실패는 항목의 `error`, 지난 대화를 불러오는 중·실패는 `loading`·`error`. 삭제 확인은 `history.onDelete` 에서 AlertDialog 로. 모델 선택은 제목 옆 `status` 에 `SelectTrigger appearance='none'` 으로, 파일 첨부와 켜고 끄는 옵션은 입력창의 `+` 메뉴(`onAttach`·`menu`)에, 파라미터 패널은 `sidePanel`.
|
|
422
|
+
*/
|
|
423
|
+
declare function ChatPage({ title, status, titleRight, actions, history, sidePanel, ...shell }: ChatPageProps): react_jsx_runtime.JSX.Element;
|
|
424
|
+
|
|
425
|
+
type ChatPanelProps = ChatShellProps & {
|
|
426
|
+
/** 패널 제목 (h2). 주지 않으면 헤더를 그리지 않는다 — 제목과 닫기 버튼이 이미 있는 Drawer 안에서 쓸 때 */
|
|
427
|
+
title?: ReactNode;
|
|
428
|
+
/** 제목이 없을 때 대화 영역의 접근성 이름. 기본 "AI 대화" */
|
|
429
|
+
label?: string;
|
|
430
|
+
/** 헤더 오른쪽의 행동 버튼 (새 대화 등). 버튼 사이 8px 로 그린다 */
|
|
431
|
+
actions?: ReactNode;
|
|
432
|
+
/** 닫기. 주면 헤더 오른쪽 끝에 닫기 버튼이 생긴다 */
|
|
433
|
+
onClose?: () => void;
|
|
434
|
+
/** 바깥 요소에 덧붙일 클래스 (놓이는 자리의 테두리 등) */
|
|
435
|
+
className?: string;
|
|
436
|
+
};
|
|
437
|
+
/**
|
|
438
|
+
* 챗 화면 패턴(옆 패널형). 다른 화면 옆의 좁은 칸이나 Drawer 안에서 헤더(선택) → 대화 → 입력창을 배치한다.
|
|
439
|
+
*
|
|
440
|
+
* 언제 쓰나: 본 화면을 보면서 AI에게 묻는 보조 대화(코드 도우미·문서 도우미). 놓인 자리의 폭과 높이를 그대로 채운다.
|
|
441
|
+
* 언제 안 쓰나: 대화가 화면의 주 내용이고 지난 대화 기록이 필요한 화면(→ ChatPage).
|
|
442
|
+
* 대신/함께: 부모가 높이를 가져야 한다(옆 칸은 `h-full`, Drawer 는 `DrawerContent` 안에 그대로). Drawer 안에서는 `title`·`onClose` 를 주지 않는다 — Drawer 가 제목과 닫기 버튼을 그린다. 그 밖의 props(`messages`·`streaming`·`onSend`·`onStop`·`welcome`·`note` …)는 ChatPage 와 같다. 빈 대화에서도 입력창은 아래에 있고 인사말·추천 질문이 메시지 자리 가운데에 놓인다.
|
|
443
|
+
*/
|
|
444
|
+
declare function ChatPanel({ title, label, actions, onClose, className, ...shell }: ChatPanelProps): react_jsx_runtime.JSX.Element;
|
|
445
|
+
|
|
329
446
|
/**
|
|
330
447
|
* 패턴 공통 로딩 자리표시. 스크린리더에는 "불러오는 중" 으로 읽힌다.
|
|
331
448
|
*
|
|
@@ -377,4 +494,4 @@ declare function ErrorState({ className, title, description, onRetry, retryLabel
|
|
|
377
494
|
retryLabel?: ReactNode;
|
|
378
495
|
}): react_jsx_runtime.JSX.Element;
|
|
379
496
|
|
|
380
|
-
export { DashboardLayout, type DashboardLayoutProps, DashboardPanel, type DashboardPanelProps, DashboardSection, type DashboardSectionProps, type DashboardStat, DetailPage, type DetailPageAction, type DetailPageProps, EmptyState, ErrorState, FormDialog, type FormDialogProps, FormDrawer, type FormDrawerProps, FormPage, type FormPageProps, type FormShellProps, ListPage, type ListPageDetail, type ListPageEmptyContent, type ListPageProps, type ListPageQuickFilter, LoadingState };
|
|
497
|
+
export { type ChatMessageItem, ChatPage, type ChatPageProps, type ChatPageSidePanel, ChatPanel, type ChatPanelProps, type ChatShellProps, type ChatWelcome, DashboardLayout, type DashboardLayoutProps, DashboardPanel, type DashboardPanelProps, DashboardSection, type DashboardSectionProps, type DashboardStat, DetailPage, type DetailPageAction, type DetailPageProps, EmptyState, ErrorState, FormDialog, type FormDialogProps, FormDrawer, type FormDrawerProps, FormPage, type FormPageProps, type FormShellProps, ListPage, type ListPageDetail, type ListPageEmptyContent, type ListPageProps, type ListPageQuickFilter, LoadingState };
|
package/dist/patterns/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import { ReactNode, ComponentProps } from 'react';
|
|
3
3
|
import { ColDef } from 'ag-grid-community';
|
|
4
|
-
import { B as BadgeProps,
|
|
4
|
+
import { B as BadgeProps, X as AgGridTableType, g as ButtonProps, S as PageHeaderProps, I as DrawerContent, v as DialogContent, o as ChatAttachment, p as ChatSource, h as ChatComposerProps, m as ChatHistoryProps } from '../index-DoIChamr.js';
|
|
5
5
|
import { FieldValues, UseFormReturn } from 'react-hook-form';
|
|
6
6
|
import 'class-variance-authority';
|
|
7
7
|
import '@radix-ui/react-dialog';
|
|
@@ -326,6 +326,123 @@ type DashboardPanelProps = {
|
|
|
326
326
|
*/
|
|
327
327
|
declare function DashboardPanel({ title, value, unit, stats, loading, empty, children, }: DashboardPanelProps): react_jsx_runtime.JSX.Element;
|
|
328
328
|
|
|
329
|
+
/** 대화 메시지 하나 (`messages` 배열의 항목) */
|
|
330
|
+
type ChatMessageItem = {
|
|
331
|
+
/** 고유 값. `onRegenerate`·`onFeedback` 에 넘어간다 */
|
|
332
|
+
id: string;
|
|
333
|
+
/** 보낸 사람 */
|
|
334
|
+
role: 'user' | 'assistant';
|
|
335
|
+
/** 본문. AI 답변은 `<Markdown>{text}</Markdown>`(`@t3q-ui/design-system/markdown`), 사용자 메시지는 문자열. 생성 중 아직 받은 글자가 없으면 비워 둔다(null·빈 문자열) — 대기 표시가 그려진다 */
|
|
336
|
+
content?: ReactNode;
|
|
337
|
+
/** 복사할 원문(마크다운 문자열). 주면 답변 아래에 복사 버튼이 붙는다 */
|
|
338
|
+
copyText?: string;
|
|
339
|
+
/** 생성 실패 안내. 받은 본문은 두고 그 아래에 그린다. `onRegenerate` 가 있으면 "다시 시도" 가 붙는다 */
|
|
340
|
+
error?: ReactNode;
|
|
341
|
+
/** 첨부 파일 (사용자 메시지) */
|
|
342
|
+
attachments?: ChatAttachment[];
|
|
343
|
+
/** 출처 (AI 답변) */
|
|
344
|
+
sources?: ChatSource[];
|
|
345
|
+
/** 행동 버튼 줄의 보조 정보 (모델 이름·시각 등) */
|
|
346
|
+
meta?: ReactNode;
|
|
347
|
+
/** 기본 행동 뒤에 붙는 추가 버튼 (`IconButton`) */
|
|
348
|
+
actions?: ReactNode;
|
|
349
|
+
/** 지금 눌린 평가 */
|
|
350
|
+
feedback?: 'up' | 'down';
|
|
351
|
+
};
|
|
352
|
+
/** 빈 대화의 인사말과 추천 질문 */
|
|
353
|
+
type ChatWelcome = {
|
|
354
|
+
/** 인사말 한 줄 (예: "무엇을 도와드릴까요?") */
|
|
355
|
+
title: ReactNode;
|
|
356
|
+
/** 인사말 아래 설명 */
|
|
357
|
+
description?: ReactNode;
|
|
358
|
+
/** 추천 질문. 누르면 그 문장이 바로 전송된다. 3개까지 권장 */
|
|
359
|
+
suggestions?: string[];
|
|
360
|
+
};
|
|
361
|
+
/** ChatPage · ChatPanel 이 공유하는 props */
|
|
362
|
+
type ChatShellProps = {
|
|
363
|
+
/** 대화 메시지. 시간순 */
|
|
364
|
+
messages: ChatMessageItem[];
|
|
365
|
+
/** 답변 생성 중. 마지막 답변이 생성 중인 메시지가 되고(행동 버튼 숨김), 마지막이 사용자 메시지이거나 답변 본문이 비어 있으면 대기 표시를 그린다. 전송 버튼은 중지 버튼으로 바뀐다 */
|
|
366
|
+
streaming?: boolean;
|
|
367
|
+
/** 전송. 추천 질문을 눌렀을 때도 불린다 */
|
|
368
|
+
onSend: (text: string) => void;
|
|
369
|
+
/** 생성 중지. 주면 생성 중에 중지 버튼이 보인다 */
|
|
370
|
+
onStop?: () => void;
|
|
371
|
+
/** 다시 생성. 주면 마지막 답변에 버튼이 붙고, 실패한 답변의 "다시 시도" 도 이것을 부른다 */
|
|
372
|
+
onRegenerate?: (id: string) => void;
|
|
373
|
+
/** 평가. 주면 답변마다 "도움이 됐어요·안 됐어요" 버튼이 붙는다. 눌린 상태는 항목의 `feedback` */
|
|
374
|
+
onFeedback?: (id: string, value: 'up' | 'down') => void;
|
|
375
|
+
/** 빈 대화에서 보일 인사말·추천 질문 */
|
|
376
|
+
welcome?: ChatWelcome;
|
|
377
|
+
/** 입력창 아래 안내 한 줄 (예: "AI 가 만든 답변은 틀릴 수 있습니다") */
|
|
378
|
+
note?: ReactNode;
|
|
379
|
+
/** true 면 메시지 자리에 로딩 표시 (지난 대화를 불러오는 중) */
|
|
380
|
+
loading?: boolean;
|
|
381
|
+
/** 주면 메시지 대신 오류 상자 (지난 대화를 못 불러옴). `onRetry` 가 있으면 "다시 시도" 버튼 */
|
|
382
|
+
error?: ReactNode;
|
|
383
|
+
/** error 상태의 "다시 시도" 클릭 */
|
|
384
|
+
onRetry?: () => void;
|
|
385
|
+
} & Pick<ChatComposerProps, 'value' | 'onValueChange' | 'disabled' | 'placeholder' | 'maxRows' | 'menu' | 'elemBefore' | 'elemAfter' | 'attachments' | 'onAttach' | 'onRemoveAttachment' | 'accept' | 'multiple'>;
|
|
386
|
+
|
|
387
|
+
/** 대화 오른쪽에 나란히 여는 패널(파라미터·설정 등). ListPage 의 `detail` 과 같은 모양 */
|
|
388
|
+
type ChatPageSidePanel = {
|
|
389
|
+
/** 패널 제목 (h2). 패널의 접근성 이름 */
|
|
390
|
+
title: ReactNode;
|
|
391
|
+
/** 제목 아래 한 줄 */
|
|
392
|
+
description?: ReactNode;
|
|
393
|
+
/** 닫기 — 오른쪽 위 닫기 버튼이 부른다 */
|
|
394
|
+
onClose: () => void;
|
|
395
|
+
/** 본문 */
|
|
396
|
+
children: ReactNode;
|
|
397
|
+
/** 맨 아래 버튼 줄 (오른쪽 정렬, 간격 8px) */
|
|
398
|
+
footer?: ReactNode;
|
|
399
|
+
/** 패널 폭. small 360 · medium 480(기본) — Drawer size 와 같은 값 */
|
|
400
|
+
width?: 'small' | 'medium';
|
|
401
|
+
};
|
|
402
|
+
type ChatPageProps = ChatShellProps & {
|
|
403
|
+
/** 화면 제목 (h1) */
|
|
404
|
+
title: string;
|
|
405
|
+
/** 제목 바로 옆 자리 — 모델 선택(`SelectTrigger appearance='none'`)이나 상태 Badge */
|
|
406
|
+
status?: ReactNode;
|
|
407
|
+
/** 헤더 오른쪽 자리. `actions` 왼쪽에 놓인다 */
|
|
408
|
+
titleRight?: ReactNode;
|
|
409
|
+
/** 헤더 오른쪽 끝의 행동 버튼. 버튼 사이 8px 로 그린다 */
|
|
410
|
+
actions?: ReactNode;
|
|
411
|
+
/** 왼쪽 대화 기록. 주면 기록 바(280px)와 헤더의 접기 버튼(제목·`status` 오른쪽)이 생긴다. 화면이 좁으면 Drawer 로 열린다 */
|
|
412
|
+
history?: Omit<ChatHistoryProps, 'className'>;
|
|
413
|
+
/** 오른쪽 패널. 열 때 객체를 주고 닫으면 undefined 로. 화면이 좁으면 Drawer 로 열린다 */
|
|
414
|
+
sidePanel?: ChatPageSidePanel;
|
|
415
|
+
};
|
|
416
|
+
/**
|
|
417
|
+
* 챗 화면 패턴(전체 화면형). 얇은 헤더 → [대화 기록 | 대화 + 입력창 | 옆 패널] 을 배치하고 스크롤·빈 화면·생성 상태를 맡는다.
|
|
418
|
+
*
|
|
419
|
+
* 언제 쓰나: AI와 대화하는 독립 화면(프롬프트 테스트·어시스턴트). 메시지·기록·전송·스트리밍은 소비 앱이 넘기고, 패턴은 배치와 자동 스크롤, 대기·오류 표시, 접근성 알림을 책임진다.
|
|
420
|
+
* 언제 안 쓰나: 다른 화면 옆에 붙는 좁은 대화(→ ChatPanel), 댓글·활동 이력, 알림 목록(→ EventList).
|
|
421
|
+
* 대신/함께: 부모가 높이를 가져야 한다 — 패턴은 그 높이를 채우고 메시지 목록만 스크롤한다(높이가 없으면 문서가 스크롤되고 입력창이 화면 아래에 붙는다). AI 답변 본문은 `@t3q-ui/design-system/markdown` 의 `Markdown` 으로 `content` 에 넘긴다. 생성 중에는 `streaming` 을 켜고 `onStop` 을 준다. 답변 실패는 항목의 `error`, 지난 대화를 불러오는 중·실패는 `loading`·`error`. 삭제 확인은 `history.onDelete` 에서 AlertDialog 로. 모델 선택은 제목 옆 `status` 에 `SelectTrigger appearance='none'` 으로, 파일 첨부와 켜고 끄는 옵션은 입력창의 `+` 메뉴(`onAttach`·`menu`)에, 파라미터 패널은 `sidePanel`.
|
|
422
|
+
*/
|
|
423
|
+
declare function ChatPage({ title, status, titleRight, actions, history, sidePanel, ...shell }: ChatPageProps): react_jsx_runtime.JSX.Element;
|
|
424
|
+
|
|
425
|
+
type ChatPanelProps = ChatShellProps & {
|
|
426
|
+
/** 패널 제목 (h2). 주지 않으면 헤더를 그리지 않는다 — 제목과 닫기 버튼이 이미 있는 Drawer 안에서 쓸 때 */
|
|
427
|
+
title?: ReactNode;
|
|
428
|
+
/** 제목이 없을 때 대화 영역의 접근성 이름. 기본 "AI 대화" */
|
|
429
|
+
label?: string;
|
|
430
|
+
/** 헤더 오른쪽의 행동 버튼 (새 대화 등). 버튼 사이 8px 로 그린다 */
|
|
431
|
+
actions?: ReactNode;
|
|
432
|
+
/** 닫기. 주면 헤더 오른쪽 끝에 닫기 버튼이 생긴다 */
|
|
433
|
+
onClose?: () => void;
|
|
434
|
+
/** 바깥 요소에 덧붙일 클래스 (놓이는 자리의 테두리 등) */
|
|
435
|
+
className?: string;
|
|
436
|
+
};
|
|
437
|
+
/**
|
|
438
|
+
* 챗 화면 패턴(옆 패널형). 다른 화면 옆의 좁은 칸이나 Drawer 안에서 헤더(선택) → 대화 → 입력창을 배치한다.
|
|
439
|
+
*
|
|
440
|
+
* 언제 쓰나: 본 화면을 보면서 AI에게 묻는 보조 대화(코드 도우미·문서 도우미). 놓인 자리의 폭과 높이를 그대로 채운다.
|
|
441
|
+
* 언제 안 쓰나: 대화가 화면의 주 내용이고 지난 대화 기록이 필요한 화면(→ ChatPage).
|
|
442
|
+
* 대신/함께: 부모가 높이를 가져야 한다(옆 칸은 `h-full`, Drawer 는 `DrawerContent` 안에 그대로). Drawer 안에서는 `title`·`onClose` 를 주지 않는다 — Drawer 가 제목과 닫기 버튼을 그린다. 그 밖의 props(`messages`·`streaming`·`onSend`·`onStop`·`welcome`·`note` …)는 ChatPage 와 같다. 빈 대화에서도 입력창은 아래에 있고 인사말·추천 질문이 메시지 자리 가운데에 놓인다.
|
|
443
|
+
*/
|
|
444
|
+
declare function ChatPanel({ title, label, actions, onClose, className, ...shell }: ChatPanelProps): react_jsx_runtime.JSX.Element;
|
|
445
|
+
|
|
329
446
|
/**
|
|
330
447
|
* 패턴 공통 로딩 자리표시. 스크린리더에는 "불러오는 중" 으로 읽힌다.
|
|
331
448
|
*
|
|
@@ -377,4 +494,4 @@ declare function ErrorState({ className, title, description, onRetry, retryLabel
|
|
|
377
494
|
retryLabel?: ReactNode;
|
|
378
495
|
}): react_jsx_runtime.JSX.Element;
|
|
379
496
|
|
|
380
|
-
export { DashboardLayout, type DashboardLayoutProps, DashboardPanel, type DashboardPanelProps, DashboardSection, type DashboardSectionProps, type DashboardStat, DetailPage, type DetailPageAction, type DetailPageProps, EmptyState, ErrorState, FormDialog, type FormDialogProps, FormDrawer, type FormDrawerProps, FormPage, type FormPageProps, type FormShellProps, ListPage, type ListPageDetail, type ListPageEmptyContent, type ListPageProps, type ListPageQuickFilter, LoadingState };
|
|
497
|
+
export { type ChatMessageItem, ChatPage, type ChatPageProps, type ChatPageSidePanel, ChatPanel, type ChatPanelProps, type ChatShellProps, type ChatWelcome, DashboardLayout, type DashboardLayoutProps, DashboardPanel, type DashboardPanelProps, DashboardSection, type DashboardSectionProps, type DashboardStat, DetailPage, type DetailPageAction, type DetailPageProps, EmptyState, ErrorState, FormDialog, type FormDialogProps, FormDrawer, type FormDrawerProps, FormPage, type FormPageProps, type FormShellProps, ListPage, type ListPageDetail, type ListPageEmptyContent, type ListPageProps, type ListPageQuickFilter, LoadingState };
|