@wallarm-org/design-system 3.2.0 → 3.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/AnimatedBackground/blur/BlurBackground.d.ts +6 -0
- package/dist/components/AnimatedBackground/blur/BlurBackground.js +176 -76
- package/dist/components/AnimatedBackground/blur/index.d.ts +1 -1
- package/dist/components/AnimatedBackground/index.d.ts +1 -1
- package/dist/components/ApprovalCard/ApprovalCard.d.ts +13 -0
- package/dist/components/ApprovalCard/ApprovalCard.js +249 -0
- package/dist/components/ApprovalCard/ApprovalCardActions.d.ts +6 -0
- package/dist/components/ApprovalCard/ApprovalCardActions.js +50 -0
- package/dist/components/ApprovalCard/ApprovalCardContent.d.ts +6 -0
- package/dist/components/ApprovalCard/ApprovalCardContent.js +50 -0
- package/dist/components/ApprovalCard/classes.d.ts +10 -0
- package/dist/components/ApprovalCard/classes.js +26 -0
- package/dist/components/ApprovalCard/index.d.ts +3 -0
- package/dist/components/ApprovalCard/index.js +3 -0
- package/dist/components/AssistantMessage/AssistantMessage.d.ts +12 -0
- package/dist/components/AssistantMessage/AssistantMessage.js +66 -0
- package/dist/components/AssistantMessage/AssistantMessageContent.d.ts +10 -0
- package/dist/components/AssistantMessage/AssistantMessageContent.js +50 -0
- package/dist/components/AssistantMessage/AssistantMessageError.d.ts +13 -0
- package/dist/components/AssistantMessage/AssistantMessageError.js +93 -0
- package/dist/components/AssistantMessage/AssistantMessageLoader.d.ts +13 -0
- package/dist/components/AssistantMessage/AssistantMessageLoader.js +88 -0
- package/dist/components/AssistantMessage/AssistantMessageMarkdown.d.ts +71 -0
- package/dist/components/AssistantMessage/AssistantMessageMarkdown.js +278 -0
- package/dist/components/AssistantMessage/AssistantMessageMarkdownCodeBlock.d.ts +17 -0
- package/dist/components/AssistantMessage/AssistantMessageMarkdownCodeBlock.js +94 -0
- package/dist/components/AssistantMessage/AssistantMessageMarkdownInlineCode.d.ts +10 -0
- package/dist/components/AssistantMessage/AssistantMessageMarkdownInlineCode.js +59 -0
- package/dist/components/AssistantMessage/AssistantMessageMarkdownLink.d.ts +14 -0
- package/dist/components/AssistantMessage/AssistantMessageMarkdownLink.js +65 -0
- package/dist/components/AssistantMessage/AssistantMessageMarkdownTable.d.ts +7 -0
- package/dist/components/AssistantMessage/AssistantMessageMarkdownTable.js +70 -0
- package/dist/components/AssistantMessage/classes.d.ts +38 -0
- package/dist/components/AssistantMessage/classes.js +46 -0
- package/dist/components/AssistantMessage/index.d.ts +9 -0
- package/dist/components/AssistantMessage/index.js +9 -0
- package/dist/components/AssistantMessage/lib/markdown.d.ts +20 -0
- package/dist/components/AssistantMessage/lib/markdown.js +51 -0
- package/dist/components/ChainOfThought/ChainOfThought.d.ts +10 -0
- package/dist/components/ChainOfThought/ChainOfThought.js +66 -0
- package/dist/components/ChainOfThought/ChainOfThoughtStep.d.ts +31 -0
- package/dist/components/ChainOfThought/ChainOfThoughtStep.js +312 -0
- package/dist/components/ChainOfThought/classes.d.ts +20 -0
- package/dist/components/ChainOfThought/classes.js +84 -0
- package/dist/components/ChainOfThought/index.d.ts +2 -0
- package/dist/components/ChainOfThought/index.js +2 -0
- package/dist/components/Chat/Chat.d.ts +12 -0
- package/dist/components/Chat/Chat.js +90 -0
- package/dist/components/Chat/ChatBody.d.ts +12 -0
- package/dist/components/Chat/ChatBody.js +52 -0
- package/dist/components/Chat/ChatFooter.d.ts +7 -0
- package/dist/components/Chat/ChatFooter.js +50 -0
- package/dist/components/Chat/ChatGreeting.d.ts +8 -0
- package/dist/components/Chat/ChatGreeting.js +94 -0
- package/dist/components/Chat/ChatHeader.d.ts +6 -0
- package/dist/components/Chat/ChatHeader.js +50 -0
- package/dist/components/Chat/ChatHeaderActions.d.ts +7 -0
- package/dist/components/Chat/ChatHeaderActions.js +50 -0
- package/dist/components/Chat/ChatHeaderTitle.d.ts +12 -0
- package/dist/components/Chat/ChatHeaderTitle.js +99 -0
- package/dist/components/Chat/ChatSuggestion.d.ts +7 -0
- package/dist/components/Chat/ChatSuggestion.js +56 -0
- package/dist/components/Chat/ChatSuggestions.d.ts +14 -0
- package/dist/components/Chat/ChatSuggestions.js +111 -0
- package/dist/components/Chat/ChatSuggestionsContext.d.ts +7 -0
- package/dist/components/Chat/ChatSuggestionsContext.js +7 -0
- package/dist/components/Chat/ChatTrigger.d.ts +13 -0
- package/dist/components/Chat/ChatTrigger.js +101 -0
- package/dist/components/Chat/classes.d.ts +17 -0
- package/dist/components/Chat/classes.js +44 -0
- package/dist/components/Chat/index.d.ts +10 -0
- package/dist/components/Chat/index.js +10 -0
- package/dist/components/ChatInput/ChatInput.d.ts +30 -0
- package/dist/components/ChatInput/ChatInput.js +230 -0
- package/dist/components/ChatInput/ChatInputContext.d.ts +11 -0
- package/dist/components/ChatInput/ChatInputContext.js +8 -0
- package/dist/components/ChatInput/ChatInputSubmit.d.ts +10 -0
- package/dist/components/ChatInput/ChatInputSubmit.js +175 -0
- package/dist/components/ChatInput/ChatInputTextarea.d.ts +6 -0
- package/dist/components/ChatInput/ChatInputTextarea.js +155 -0
- package/dist/components/ChatInput/classes.d.ts +9 -0
- package/dist/components/ChatInput/classes.js +22 -0
- package/dist/components/ChatInput/index.d.ts +3 -0
- package/dist/components/ChatInput/index.js +3 -0
- package/dist/components/ChatPermissions/ChatPermissions.d.ts +12 -0
- package/dist/components/ChatPermissions/ChatPermissions.js +66 -0
- package/dist/components/ChatPermissions/ChatPermissionsContent.d.ts +7 -0
- package/dist/components/ChatPermissions/ChatPermissionsContent.js +73 -0
- package/dist/components/ChatPermissions/ChatPermissionsContext.d.ts +7 -0
- package/dist/components/ChatPermissions/ChatPermissionsContext.js +8 -0
- package/dist/components/ChatPermissions/ChatPermissionsItem.d.ts +17 -0
- package/dist/components/ChatPermissions/ChatPermissionsItem.js +115 -0
- package/dist/components/ChatPermissions/ChatPermissionsTrigger.d.ts +6 -0
- package/dist/components/ChatPermissions/ChatPermissionsTrigger.js +110 -0
- package/dist/components/ChatPermissions/classes.d.ts +3 -0
- package/dist/components/ChatPermissions/classes.js +5 -0
- package/dist/components/ChatPermissions/index.d.ts +4 -0
- package/dist/components/ChatPermissions/index.js +4 -0
- package/dist/components/Conversation/Conversation.d.ts +19 -0
- package/dist/components/Conversation/Conversation.js +102 -0
- package/dist/components/Conversation/ConversationContent.d.ts +11 -0
- package/dist/components/Conversation/ConversationContent.js +103 -0
- package/dist/components/Conversation/ConversationContext.d.ts +14 -0
- package/dist/components/Conversation/ConversationContext.js +8 -0
- package/dist/components/Conversation/ConversationEmptyState.d.ts +15 -0
- package/dist/components/Conversation/ConversationEmptyState.js +70 -0
- package/dist/components/Conversation/ConversationScrollButton.d.ts +13 -0
- package/dist/components/Conversation/ConversationScrollButton.js +138 -0
- package/dist/components/Conversation/classes.d.ts +13 -0
- package/dist/components/Conversation/classes.js +8 -0
- package/dist/components/Conversation/index.d.ts +4 -0
- package/dist/components/Conversation/index.js +4 -0
- package/dist/components/Conversation/useStickToBottom.d.ts +9 -0
- package/dist/components/Conversation/useStickToBottom.js +203 -0
- package/dist/components/MessageActions/MessageAction.d.ts +18 -0
- package/dist/components/MessageActions/MessageAction.js +109 -0
- package/dist/components/MessageActions/MessageActions.d.ts +12 -0
- package/dist/components/MessageActions/MessageActions.js +74 -0
- package/dist/components/MessageActions/MessageTimestamp.d.ts +7 -0
- package/dist/components/MessageActions/MessageTimestamp.js +50 -0
- package/dist/components/MessageActions/classes.d.ts +5 -0
- package/dist/components/MessageActions/classes.js +15 -0
- package/dist/components/MessageActions/index.d.ts +3 -0
- package/dist/components/MessageActions/index.js +3 -0
- package/dist/components/Popover/PopoverContent.d.ts +2 -1
- package/dist/components/Popover/PopoverContent.js +42 -39
- package/dist/components/UserMessage/UserMessage.d.ts +10 -0
- package/dist/components/UserMessage/UserMessage.js +66 -0
- package/dist/components/UserMessage/UserMessageBubble.d.ts +16 -0
- package/dist/components/UserMessage/UserMessageBubble.js +175 -0
- package/dist/components/UserMessage/UserMessageContext.d.ts +9 -0
- package/dist/components/UserMessage/UserMessageContext.js +4 -0
- package/dist/components/UserMessage/UserMessageShowMore.d.ts +15 -0
- package/dist/components/UserMessage/UserMessageShowMore.js +87 -0
- package/dist/components/UserMessage/classes.d.ts +11 -0
- package/dist/components/UserMessage/classes.js +32 -0
- package/dist/components/UserMessage/index.d.ts +3 -0
- package/dist/components/UserMessage/index.js +3 -0
- package/dist/components/WallyAssistant/WallyAssistant.d.ts +56 -0
- package/dist/components/WallyAssistant/WallyAssistant.js +541 -0
- package/dist/components/WallyAssistant/index.d.ts +10 -0
- package/dist/components/WallyAssistant/index.js +8 -0
- package/dist/components/WallyAssistant/model/deriveChatState.d.ts +33 -0
- package/dist/components/WallyAssistant/model/deriveChatState.js +54 -0
- package/dist/components/WallyAssistant/model/labels.d.ts +43 -0
- package/dist/components/WallyAssistant/model/labels.js +33 -0
- package/dist/components/WallyAssistant/model/model.d.ts +184 -0
- package/dist/components/WallyAssistant/model/model.js +0 -0
- package/dist/components/WallyAssistant/views/ApprovalCardView.d.ts +20 -0
- package/dist/components/WallyAssistant/views/ApprovalCardView.js +274 -0
- package/dist/components/WallyAssistant/views/ChainOfThoughtView.d.ts +18 -0
- package/dist/components/WallyAssistant/views/ChainOfThoughtView.js +301 -0
- package/dist/components/WallyAssistant/views/ChatMessageView.d.ts +15 -0
- package/dist/components/WallyAssistant/views/ChatMessageView.js +372 -0
- package/dist/components/WallyAssistant/views/ChatPartView.d.ts +16 -0
- package/dist/components/WallyAssistant/views/ChatPartView.js +171 -0
- package/dist/components/WallyAssistant/views/ChatViewContext.d.ts +98 -0
- package/dist/components/WallyAssistant/views/ChatViewContext.js +44 -0
- package/dist/components/WallyAssistant/views/ChatViewProvider.d.ts +18 -0
- package/dist/components/WallyAssistant/views/ChatViewProvider.js +96 -0
- package/dist/components/WallyAssistant/views/stepIcons.d.ts +8 -0
- package/dist/components/WallyAssistant/views/stepIcons.js +47 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.js +10 -0
- package/dist/metadata/components.json +30786 -15960
- package/dist/theme/components/animated-background.css +6 -1
- package/dist/theme/index.css +1 -0
- package/dist/theme/utilities/shimmer-text.css +27 -0
- package/package.json +3 -1
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { c } from "react/compiler-runtime";
|
|
3
|
+
import { RefreshCcw } from "../../../icons/index.js";
|
|
4
|
+
import { useTestId } from "../../../utils/testId.js";
|
|
5
|
+
import { AssistantMessageContent, AssistantMessageError } from "../../AssistantMessage/index.js";
|
|
6
|
+
import { Button } from "../../Button/index.js";
|
|
7
|
+
import { useRenderEveryTime } from "../../Table/lib/useRenderEveryTime.js";
|
|
8
|
+
import { UserMessageBubble, UserMessageShowMore } from "../../UserMessage/index.js";
|
|
9
|
+
import { isLiveStep, isRunningStatus } from "../model/deriveChatState.js";
|
|
10
|
+
import { ApprovalCardView } from "./ApprovalCardView.js";
|
|
11
|
+
import { ChainOfThoughtView } from "./ChainOfThoughtView.js";
|
|
12
|
+
import { MarkdownView, useChatView } from "./ChatViewContext.js";
|
|
13
|
+
const RetryButton = (t0)=>{
|
|
14
|
+
const $ = c(9);
|
|
15
|
+
const { message, part } = t0;
|
|
16
|
+
const { labels, handlers } = useChatView();
|
|
17
|
+
const t1 = useTestId("retry");
|
|
18
|
+
let t2;
|
|
19
|
+
if ($[0] !== handlers || $[1] !== message || $[2] !== part) {
|
|
20
|
+
t2 = ()=>{
|
|
21
|
+
if ("assistant" === message.role) handlers.current.onRetry?.(message, part);
|
|
22
|
+
};
|
|
23
|
+
$[0] = handlers;
|
|
24
|
+
$[1] = message;
|
|
25
|
+
$[2] = part;
|
|
26
|
+
$[3] = t2;
|
|
27
|
+
} else t2 = $[3];
|
|
28
|
+
let t3;
|
|
29
|
+
if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
|
|
30
|
+
t3 = /*#__PURE__*/ jsx(RefreshCcw, {});
|
|
31
|
+
$[4] = t3;
|
|
32
|
+
} else t3 = $[4];
|
|
33
|
+
let t4;
|
|
34
|
+
if ($[5] !== labels.retry || $[6] !== t1 || $[7] !== t2) {
|
|
35
|
+
t4 = /*#__PURE__*/ jsxs(Button, {
|
|
36
|
+
variant: "ghost",
|
|
37
|
+
color: "neutral",
|
|
38
|
+
size: "small",
|
|
39
|
+
"data-testid": t1,
|
|
40
|
+
onClick: t2,
|
|
41
|
+
children: [
|
|
42
|
+
t3,
|
|
43
|
+
labels.retry
|
|
44
|
+
]
|
|
45
|
+
});
|
|
46
|
+
$[5] = labels.retry;
|
|
47
|
+
$[6] = t1;
|
|
48
|
+
$[7] = t2;
|
|
49
|
+
$[8] = t4;
|
|
50
|
+
} else t4 = $[8];
|
|
51
|
+
return t4;
|
|
52
|
+
};
|
|
53
|
+
const isAbsentPart = (p)=>"text" === p.type && !p.text || "chain-of-thought" === p.type && !p.steps.length;
|
|
54
|
+
const isWorking = (message, part)=>{
|
|
55
|
+
if ("chain-of-thought" !== part.type || part.steps.some(isLiveStep)) return false;
|
|
56
|
+
const after = message.parts.slice(message.parts.indexOf(part) + 1);
|
|
57
|
+
return after.every((p)=>"approval" === p.type || isAbsentPart(p));
|
|
58
|
+
};
|
|
59
|
+
const ChatPartView = (t0)=>{
|
|
60
|
+
const $ = c(26);
|
|
61
|
+
const { part, message, isLast, placement: t1 } = t0;
|
|
62
|
+
const placement = void 0 === t1 ? "inline" : t1;
|
|
63
|
+
const { status, labels, renderPart, hasRetry } = useChatView();
|
|
64
|
+
let t2;
|
|
65
|
+
if ($[0] !== status) {
|
|
66
|
+
t2 = isRunningStatus(status);
|
|
67
|
+
$[0] = status;
|
|
68
|
+
$[1] = t2;
|
|
69
|
+
} else t2 = $[1];
|
|
70
|
+
const running = t2;
|
|
71
|
+
const active = running && isLast;
|
|
72
|
+
const streaming = active && message.parts[message.parts.length - 1]?.id === part.id;
|
|
73
|
+
let defaultNode;
|
|
74
|
+
if ($[2] !== active || $[3] !== hasRetry || $[4] !== isLast || $[5] !== labels || $[6] !== message || $[7] !== part || $[8] !== streaming) {
|
|
75
|
+
defaultNode = null;
|
|
76
|
+
switch(part.type){
|
|
77
|
+
case "text":
|
|
78
|
+
defaultNode = "user" === message.role ? /*#__PURE__*/ jsx(UserMessageBubble, {
|
|
79
|
+
showMore: /*#__PURE__*/ jsx(UserMessageShowMore, {
|
|
80
|
+
showMoreLabel: labels.showMore,
|
|
81
|
+
showLessLabel: labels.showLess
|
|
82
|
+
}),
|
|
83
|
+
children: part.text
|
|
84
|
+
}) : /*#__PURE__*/ jsx(AssistantMessageContent, {
|
|
85
|
+
children: /*#__PURE__*/ jsx(MarkdownView, {
|
|
86
|
+
text: part.text,
|
|
87
|
+
streaming: streaming,
|
|
88
|
+
variant: "answer",
|
|
89
|
+
messageId: message.id,
|
|
90
|
+
partId: part.id
|
|
91
|
+
})
|
|
92
|
+
});
|
|
93
|
+
break;
|
|
94
|
+
case "chain-of-thought":
|
|
95
|
+
{
|
|
96
|
+
let t3;
|
|
97
|
+
if ($[10] !== active || $[11] !== message || $[12] !== part) {
|
|
98
|
+
t3 = active && isWorking(message, part);
|
|
99
|
+
$[10] = active;
|
|
100
|
+
$[11] = message;
|
|
101
|
+
$[12] = part;
|
|
102
|
+
$[13] = t3;
|
|
103
|
+
} else t3 = $[13];
|
|
104
|
+
defaultNode = /*#__PURE__*/ jsx(ChainOfThoughtView, {
|
|
105
|
+
part: part,
|
|
106
|
+
message: message,
|
|
107
|
+
active: active,
|
|
108
|
+
working: t3
|
|
109
|
+
});
|
|
110
|
+
break;
|
|
111
|
+
}
|
|
112
|
+
case "approval":
|
|
113
|
+
defaultNode = /*#__PURE__*/ jsx(ApprovalCardView, {
|
|
114
|
+
approval: part,
|
|
115
|
+
message: message,
|
|
116
|
+
disabled: !isLast
|
|
117
|
+
});
|
|
118
|
+
break;
|
|
119
|
+
case "error":
|
|
120
|
+
{
|
|
121
|
+
let t3;
|
|
122
|
+
if ($[14] !== hasRetry || $[15] !== message || $[16] !== part) {
|
|
123
|
+
t3 = part.retryable && hasRetry ? /*#__PURE__*/ jsx(RetryButton, {
|
|
124
|
+
message: message,
|
|
125
|
+
part: part
|
|
126
|
+
}) : null;
|
|
127
|
+
$[14] = hasRetry;
|
|
128
|
+
$[15] = message;
|
|
129
|
+
$[16] = part;
|
|
130
|
+
$[17] = t3;
|
|
131
|
+
} else t3 = $[17];
|
|
132
|
+
defaultNode = /*#__PURE__*/ jsx(AssistantMessageError, {
|
|
133
|
+
action: t3,
|
|
134
|
+
children: part.text
|
|
135
|
+
});
|
|
136
|
+
break;
|
|
137
|
+
}
|
|
138
|
+
default:
|
|
139
|
+
}
|
|
140
|
+
$[2] = active;
|
|
141
|
+
$[3] = hasRetry;
|
|
142
|
+
$[4] = isLast;
|
|
143
|
+
$[5] = labels;
|
|
144
|
+
$[6] = message;
|
|
145
|
+
$[7] = part;
|
|
146
|
+
$[8] = streaming;
|
|
147
|
+
$[9] = defaultNode;
|
|
148
|
+
} else defaultNode = $[9];
|
|
149
|
+
let t3;
|
|
150
|
+
if ($[18] !== defaultNode || $[19] !== isLast || $[20] !== message || $[21] !== part || $[22] !== placement || $[23] !== renderPart || $[24] !== streaming) {
|
|
151
|
+
t3 = ()=>renderPart?.(part, {
|
|
152
|
+
message,
|
|
153
|
+
isLast,
|
|
154
|
+
streaming,
|
|
155
|
+
placement,
|
|
156
|
+
defaultRender: ()=>defaultNode
|
|
157
|
+
});
|
|
158
|
+
$[18] = defaultNode;
|
|
159
|
+
$[19] = isLast;
|
|
160
|
+
$[20] = message;
|
|
161
|
+
$[21] = part;
|
|
162
|
+
$[22] = placement;
|
|
163
|
+
$[23] = renderPart;
|
|
164
|
+
$[24] = streaming;
|
|
165
|
+
$[25] = t3;
|
|
166
|
+
} else t3 = $[25];
|
|
167
|
+
const custom = useRenderEveryTime(t3);
|
|
168
|
+
return void 0 === custom ? defaultNode : custom;
|
|
169
|
+
};
|
|
170
|
+
ChatPartView.displayName = "ChatPartView";
|
|
171
|
+
export { ChatPartView, isAbsentPart };
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { type ComponentType, type FC, type ReactNode, type RefObject } from 'react';
|
|
2
|
+
import { type AssistantMessageMarkdownVariant } from '../../AssistantMessage/index.js';
|
|
3
|
+
import { type ChatLabels } from '../model/labels.js';
|
|
4
|
+
import type { ChatApprovalPart, ChatApprovalResponse, ChatAssistantMessage, ChatErrorPart, ChatFeedback, ChatId, ChatMessage, ChatPart, ChatStatus, ChatStep } from '../model/model.js';
|
|
5
|
+
export interface ChatMarkdownProps {
|
|
6
|
+
text: string;
|
|
7
|
+
/** The text is still growing (the streaming answer's tail, or the body of a live step): use a streaming-safe parser. */
|
|
8
|
+
streaming: boolean;
|
|
9
|
+
/** 'chain-of-thought': Figma 494:4292 wants InlineCodeSnippet copyable={false} size='sm' text-secondary there. */
|
|
10
|
+
variant: AssistantMessageMarkdownVariant;
|
|
11
|
+
/** Absent for an ApprovalCardView rendered without a message (e.g. a CopilotKit HITL card). */
|
|
12
|
+
messageId?: ChatId;
|
|
13
|
+
/** The part's id — the step's id for chain-of-thought bodies — e.g. to resolve [1] citations from your store. */
|
|
14
|
+
partId: ChatId;
|
|
15
|
+
}
|
|
16
|
+
export interface ChatPartRenderContext {
|
|
17
|
+
message: ChatMessage;
|
|
18
|
+
/** `message` is the last row. */
|
|
19
|
+
isLast: boolean;
|
|
20
|
+
/** This part is the growing tail of the streaming answer. */
|
|
21
|
+
streaming: boolean;
|
|
22
|
+
placement: 'inline' | 'docked';
|
|
23
|
+
/** The DS rendering of this part (null for custom and unknown types). Wrap it, or return it as is. */
|
|
24
|
+
defaultRender: () => ReactNode;
|
|
25
|
+
}
|
|
26
|
+
export interface ChatStepRenderContext {
|
|
27
|
+
message: ChatMessage;
|
|
28
|
+
/** The default body: `content` as markdown, then the nested steps (null when both are absent). */
|
|
29
|
+
defaultRender: () => ReactNode;
|
|
30
|
+
}
|
|
31
|
+
/** Prebuilt nodes for the actions row; null when not applicable (no text, no onFeedback, no createdAt). */
|
|
32
|
+
export interface ChatMessageActionNodes {
|
|
33
|
+
copy: ReactNode;
|
|
34
|
+
like: ReactNode;
|
|
35
|
+
dislike: ReactNode;
|
|
36
|
+
timestamp: ReactNode;
|
|
37
|
+
}
|
|
38
|
+
/** Everything the data views read. WallyAssistant takes the same props; custom layouts pass them to ChatViewProvider. */
|
|
39
|
+
export interface ChatViewConfig {
|
|
40
|
+
/** Default 'ready'. */
|
|
41
|
+
status?: ChatStatus;
|
|
42
|
+
labels?: Partial<ChatLabels>;
|
|
43
|
+
/** Icon key → element from src/icons; wins over the built-in Figma 483:1899 table. */
|
|
44
|
+
icons?: Readonly<Record<string, ReactNode>>;
|
|
45
|
+
/** The markdown renderer, at module scope (never inline). Default: the DS `AssistantMessageMarkdown` (GFM,
|
|
46
|
+
* streaming-safe, no raw HTML, http/https/mailto/relative links only, no images). A replacement owns its own
|
|
47
|
+
* sanitizing. To change one element, wrap it at module scope:
|
|
48
|
+
* `const WallyMarkdown: FC<ChatMarkdownProps> = p => <AssistantMessageMarkdown {...p} components={MAP} />`. */
|
|
49
|
+
markdown?: ComponentType<ChatMarkdownProps>;
|
|
50
|
+
/** ISO → label. Default: DS formatRelativeTime (honours DateFormatProvider). Give it a new identity on your
|
|
51
|
+
* clock tick to refresh "2 min ago" — the DS runs no clock. */
|
|
52
|
+
formatTimestamp?: (createdAt: string) => string;
|
|
53
|
+
/** 'docked': the last message's approvals render in the footer. Default 'inline' here;
|
|
54
|
+
* WallyAssistant defaults to 'docked' (Figma). A custom layout passes the same value to
|
|
55
|
+
* `deriveChatState`, or the approval renders twice (provider 'inline') or never (provider 'docked'). */
|
|
56
|
+
approvalPlacement?: 'docked' | 'inline';
|
|
57
|
+
/** Called for every part, custom and unknown types included. undefined = the default; null = nothing.
|
|
58
|
+
* A render function: no hooks inside — put them in the components you return.
|
|
59
|
+
* While it is set, every part counts as rendered for the loader and the actions row (its output
|
|
60
|
+
* is unknown up front), so a running reply made only of parts it maps to nothing shows no loader. */
|
|
61
|
+
renderPart?: (part: ChatPart, ctx: ChatPartRenderContext) => ReactNode | undefined;
|
|
62
|
+
/** A step's collapsible body: rich tool output, or a card for one tool via `step.name`.
|
|
63
|
+
* undefined = the default; null = no body (the row isn't collapsible). No hooks inside. */
|
|
64
|
+
renderStepContent?: (step: ChatStep, ctx: ChatStepRenderContext) => ReactNode | undefined;
|
|
65
|
+
/** The actions row's children (Figma Wally order: Copy, ThumbsUp, ThumbsDown, Ellipsis, Timestamp).
|
|
66
|
+
* undefined = the default order; null = no row. No hooks inside. */
|
|
67
|
+
renderMessageActions?: (message: ChatMessage, actions: ChatMessageActionNodes) => ReactNode | undefined;
|
|
68
|
+
/** Absent → approval buttons are disabled. */
|
|
69
|
+
onApprovalRespond?: (response: ChatApprovalResponse, approval: ChatApprovalPart) => void;
|
|
70
|
+
/** Absent → no thumbs. Clicking the pressed thumb sends null. */
|
|
71
|
+
onFeedback?: (message: ChatAssistantMessage, value: ChatFeedback | null) => void;
|
|
72
|
+
/** Fired after Copy copied; Copy itself shows whenever the message has text. */
|
|
73
|
+
onCopy?: (message: ChatMessage, text: string) => void;
|
|
74
|
+
/** Absent → no Retry on error parts. */
|
|
75
|
+
onRetry?: (message: ChatAssistantMessage, part: ChatErrorPart) => void;
|
|
76
|
+
}
|
|
77
|
+
export type ChatViewHandlers = Pick<ChatViewConfig, 'onApprovalRespond' | 'onFeedback' | 'onCopy' | 'onRetry'>;
|
|
78
|
+
/** Internal: render-time config plus a latest-value ref for the handlers (read only in event handlers). */
|
|
79
|
+
export interface ChatViewContextValue extends Pick<ChatViewConfig, 'icons' | 'formatTimestamp' | 'renderPart' | 'renderStepContent' | 'renderMessageActions'> {
|
|
80
|
+
status: ChatStatus;
|
|
81
|
+
labels: ChatLabels;
|
|
82
|
+
markdown: ComponentType<ChatMarkdownProps>;
|
|
83
|
+
approvalPlacement: 'docked' | 'inline';
|
|
84
|
+
handlers: RefObject<ChatViewHandlers>;
|
|
85
|
+
hasApprovalRespond: boolean;
|
|
86
|
+
hasFeedback: boolean;
|
|
87
|
+
hasCopy: boolean;
|
|
88
|
+
hasRetry: boolean;
|
|
89
|
+
}
|
|
90
|
+
export declare const ChatViewContext: import("react").Context<ChatViewContextValue | null>;
|
|
91
|
+
/** The provider's config, or the defaults outside one (never throws). */
|
|
92
|
+
export declare const useChatView: () => ChatViewContextValue;
|
|
93
|
+
/**
|
|
94
|
+
* The configured markdown with primitive props only: its compiled body memoizes the element on
|
|
95
|
+
* `text`, so an unchanged body is never re-rendered (re-parsed), even when the mapper rebuilds every
|
|
96
|
+
* message and part object on each snapshot (§7.7).
|
|
97
|
+
*/
|
|
98
|
+
export declare const MarkdownView: FC<ChatMarkdownProps>;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { c } from "react/compiler-runtime";
|
|
2
|
+
import { createContext, createElement, useContext } from "react";
|
|
3
|
+
import { AssistantMessageMarkdown } from "../../AssistantMessage/index.js";
|
|
4
|
+
import { DEFAULT_CHAT_LABELS } from "../model/labels.js";
|
|
5
|
+
const NO_HANDLERS = {
|
|
6
|
+
current: {}
|
|
7
|
+
};
|
|
8
|
+
const DEFAULT_VALUE = {
|
|
9
|
+
status: "ready",
|
|
10
|
+
labels: DEFAULT_CHAT_LABELS,
|
|
11
|
+
markdown: AssistantMessageMarkdown,
|
|
12
|
+
approvalPlacement: "inline",
|
|
13
|
+
handlers: NO_HANDLERS,
|
|
14
|
+
hasApprovalRespond: false,
|
|
15
|
+
hasFeedback: false,
|
|
16
|
+
hasCopy: false,
|
|
17
|
+
hasRetry: false
|
|
18
|
+
};
|
|
19
|
+
const ChatViewContext = createContext(null);
|
|
20
|
+
const useChatView = ()=>useContext(ChatViewContext) ?? DEFAULT_VALUE;
|
|
21
|
+
const MarkdownView = (t0)=>{
|
|
22
|
+
const $ = c(7);
|
|
23
|
+
const { text, streaming, variant, messageId, partId } = t0;
|
|
24
|
+
const { markdown } = useChatView();
|
|
25
|
+
let t1;
|
|
26
|
+
if ($[0] !== markdown || $[1] !== messageId || $[2] !== partId || $[3] !== streaming || $[4] !== text || $[5] !== variant) {
|
|
27
|
+
t1 = createElement(markdown, {
|
|
28
|
+
text,
|
|
29
|
+
streaming,
|
|
30
|
+
variant,
|
|
31
|
+
messageId,
|
|
32
|
+
partId
|
|
33
|
+
});
|
|
34
|
+
$[0] = markdown;
|
|
35
|
+
$[1] = messageId;
|
|
36
|
+
$[2] = partId;
|
|
37
|
+
$[3] = streaming;
|
|
38
|
+
$[4] = text;
|
|
39
|
+
$[5] = variant;
|
|
40
|
+
$[6] = t1;
|
|
41
|
+
} else t1 = $[6];
|
|
42
|
+
return t1;
|
|
43
|
+
};
|
|
44
|
+
export { ChatViewContext, MarkdownView, useChatView };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type FC, type ReactNode } from 'react';
|
|
2
|
+
import { type ChatViewConfig } from './ChatViewContext.js';
|
|
3
|
+
export interface ChatViewProviderProps extends ChatViewConfig {
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Hands the data-view config (labels, icons, markdown, render seams, callbacks) to every
|
|
8
|
+
* `ChatMessageView`, `ChatPartView`, `ChainOfThoughtView` and `ApprovalCardView` below it.
|
|
9
|
+
* Renders no DOM. Handler callbacks are read through a latest-value ref, so inline handlers
|
|
10
|
+
* never re-render the log; keep `labels`, `icons`, `markdown`, `formatTimestamp` and the render
|
|
11
|
+
* callbacks stable (module scope or memoized) in long threads. Per snapshot, a message's views
|
|
12
|
+
* (and `renderPart` for its parts) re-render unless the message keeps its identity, so keep
|
|
13
|
+
* unchanged messages by reference (structural sharing) when you use `renderPart`; markdown bodies
|
|
14
|
+
* are memoized on `text` and are spared either way. Give `deriveChatState` the same
|
|
15
|
+
* `approvalPlacement` as this provider: one hides the docked approvals in the message, the other
|
|
16
|
+
* lists them for your footer.
|
|
17
|
+
*/
|
|
18
|
+
export declare const ChatViewProvider: FC<ChatViewProviderProps>;
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { c } from "react/compiler-runtime";
|
|
3
|
+
import { useLayoutEffect, useRef } from "react";
|
|
4
|
+
import { AssistantMessageMarkdown } from "../../AssistantMessage/index.js";
|
|
5
|
+
import { DEFAULT_CHAT_LABELS } from "../model/labels.js";
|
|
6
|
+
import { ChatViewContext } from "./ChatViewContext.js";
|
|
7
|
+
const ChatViewProvider = (t0)=>{
|
|
8
|
+
const $ = c(25);
|
|
9
|
+
const { children, status: t1, labels, icons, markdown: t2, formatTimestamp, approvalPlacement: t3, renderPart, renderStepContent, renderMessageActions, onApprovalRespond, onFeedback, onCopy, onRetry } = t0;
|
|
10
|
+
const status = void 0 === t1 ? "ready" : t1;
|
|
11
|
+
const markdown = void 0 === t2 ? AssistantMessageMarkdown : t2;
|
|
12
|
+
const approvalPlacement = void 0 === t3 ? "inline" : t3;
|
|
13
|
+
let t4;
|
|
14
|
+
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
15
|
+
t4 = {};
|
|
16
|
+
$[0] = t4;
|
|
17
|
+
} else t4 = $[0];
|
|
18
|
+
const handlers = useRef(t4);
|
|
19
|
+
let t5;
|
|
20
|
+
if ($[1] !== onApprovalRespond || $[2] !== onCopy || $[3] !== onFeedback || $[4] !== onRetry) {
|
|
21
|
+
t5 = ()=>{
|
|
22
|
+
handlers.current = {
|
|
23
|
+
onApprovalRespond,
|
|
24
|
+
onFeedback,
|
|
25
|
+
onCopy,
|
|
26
|
+
onRetry
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
$[1] = onApprovalRespond;
|
|
30
|
+
$[2] = onCopy;
|
|
31
|
+
$[3] = onFeedback;
|
|
32
|
+
$[4] = onRetry;
|
|
33
|
+
$[5] = t5;
|
|
34
|
+
} else t5 = $[5];
|
|
35
|
+
useLayoutEffect(t5);
|
|
36
|
+
let t6;
|
|
37
|
+
if ($[6] !== labels) {
|
|
38
|
+
t6 = {
|
|
39
|
+
...DEFAULT_CHAT_LABELS,
|
|
40
|
+
...labels
|
|
41
|
+
};
|
|
42
|
+
$[6] = labels;
|
|
43
|
+
$[7] = t6;
|
|
44
|
+
} else t6 = $[7];
|
|
45
|
+
const t7 = null != onApprovalRespond;
|
|
46
|
+
const t8 = null != onFeedback;
|
|
47
|
+
const t9 = null != onCopy;
|
|
48
|
+
const t10 = null != onRetry;
|
|
49
|
+
let t11;
|
|
50
|
+
if ($[8] !== approvalPlacement || $[9] !== formatTimestamp || $[10] !== icons || $[11] !== markdown || $[12] !== renderMessageActions || $[13] !== renderPart || $[14] !== renderStepContent || $[15] !== status || $[16] !== t10 || $[17] !== t6 || $[18] !== t7 || $[19] !== t8 || $[20] !== t9) {
|
|
51
|
+
t11 = {
|
|
52
|
+
status,
|
|
53
|
+
labels: t6,
|
|
54
|
+
icons,
|
|
55
|
+
markdown,
|
|
56
|
+
formatTimestamp,
|
|
57
|
+
approvalPlacement,
|
|
58
|
+
renderPart,
|
|
59
|
+
renderStepContent,
|
|
60
|
+
renderMessageActions,
|
|
61
|
+
handlers,
|
|
62
|
+
hasApprovalRespond: t7,
|
|
63
|
+
hasFeedback: t8,
|
|
64
|
+
hasCopy: t9,
|
|
65
|
+
hasRetry: t10
|
|
66
|
+
};
|
|
67
|
+
$[8] = approvalPlacement;
|
|
68
|
+
$[9] = formatTimestamp;
|
|
69
|
+
$[10] = icons;
|
|
70
|
+
$[11] = markdown;
|
|
71
|
+
$[12] = renderMessageActions;
|
|
72
|
+
$[13] = renderPart;
|
|
73
|
+
$[14] = renderStepContent;
|
|
74
|
+
$[15] = status;
|
|
75
|
+
$[16] = t10;
|
|
76
|
+
$[17] = t6;
|
|
77
|
+
$[18] = t7;
|
|
78
|
+
$[19] = t8;
|
|
79
|
+
$[20] = t9;
|
|
80
|
+
$[21] = t11;
|
|
81
|
+
} else t11 = $[21];
|
|
82
|
+
const value = t11;
|
|
83
|
+
let t12;
|
|
84
|
+
if ($[22] !== children || $[23] !== value) {
|
|
85
|
+
t12 = /*#__PURE__*/ jsx(ChatViewContext, {
|
|
86
|
+
value: value,
|
|
87
|
+
children: children
|
|
88
|
+
});
|
|
89
|
+
$[22] = children;
|
|
90
|
+
$[23] = value;
|
|
91
|
+
$[24] = t12;
|
|
92
|
+
} else t12 = $[24];
|
|
93
|
+
return t12;
|
|
94
|
+
};
|
|
95
|
+
ChatViewProvider.displayName = "ChatViewProvider";
|
|
96
|
+
export { ChatViewProvider };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { ChatStep, ChatStepStatus } from '../model/model.js';
|
|
3
|
+
/** App `icons`, then the Figma table, then `fallback`. Context chips use it with a Quote fallback. */
|
|
4
|
+
export declare const resolveIcon: (key: string | undefined, icons: Readonly<Record<string, ReactNode>> | undefined, fallback?: ReactNode) => ReactNode;
|
|
5
|
+
/** `icon: null` → the Simple row; otherwise the key, then the kind's default, then CircleDashed. */
|
|
6
|
+
export declare const resolveStepIcon: (step: Pick<ChatStep, 'icon' | 'kind'>, icons: Readonly<Record<string, ReactNode>> | undefined) => ReactNode;
|
|
7
|
+
/** `ChatStepStatus` → `ChainOfThoughtStep status`; unknown values render as done. */
|
|
8
|
+
export declare const stepVisualStatus: (status: ChatStepStatus) => 'running' | 'done' | 'error';
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Activity, BadgeCheck, Bot, Brain, CircleDashed, Database, Download, FilePlus, FileText, Filter, GitBranch, Globe, Link, ListChecks, Pencil, Plug, Radar, Search, ShieldAlert, Terminal, Wrench } from "../../../icons/index.js";
|
|
3
|
+
const STEP_TYPE_ICONS = {
|
|
4
|
+
thinking: /*#__PURE__*/ jsx(Brain, {}),
|
|
5
|
+
plan: /*#__PURE__*/ jsx(ListChecks, {}),
|
|
6
|
+
decision: /*#__PURE__*/ jsx(GitBranch, {}),
|
|
7
|
+
subagent: /*#__PURE__*/ jsx(Bot, {}),
|
|
8
|
+
tool: /*#__PURE__*/ jsx(Wrench, {}),
|
|
9
|
+
command: /*#__PURE__*/ jsx(Terminal, {}),
|
|
10
|
+
'web-search': /*#__PURE__*/ jsx(Globe, {}),
|
|
11
|
+
query: /*#__PURE__*/ jsx(Search, {}),
|
|
12
|
+
datastore: /*#__PURE__*/ jsx(Database, {}),
|
|
13
|
+
api: /*#__PURE__*/ jsx(Plug, {}),
|
|
14
|
+
read: /*#__PURE__*/ jsx(FileText, {}),
|
|
15
|
+
fetch: /*#__PURE__*/ jsx(Download, {}),
|
|
16
|
+
filter: /*#__PURE__*/ jsx(Filter, {}),
|
|
17
|
+
create: /*#__PURE__*/ jsx(FilePlus, {}),
|
|
18
|
+
edit: /*#__PURE__*/ jsx(Pencil, {}),
|
|
19
|
+
cite: /*#__PURE__*/ jsx(Link, {}),
|
|
20
|
+
threat: /*#__PURE__*/ jsx(ShieldAlert, {}),
|
|
21
|
+
scan: /*#__PURE__*/ jsx(Radar, {}),
|
|
22
|
+
pending: /*#__PURE__*/ jsx(CircleDashed, {}),
|
|
23
|
+
summary: /*#__PURE__*/ jsx(Activity, {}),
|
|
24
|
+
created: /*#__PURE__*/ jsx(BadgeCheck, {})
|
|
25
|
+
};
|
|
26
|
+
const KIND_ICONS = {
|
|
27
|
+
reasoning: /*#__PURE__*/ jsx(Brain, {}),
|
|
28
|
+
tool: /*#__PURE__*/ jsx(Wrench, {}),
|
|
29
|
+
agent: /*#__PURE__*/ jsx(Bot, {})
|
|
30
|
+
};
|
|
31
|
+
const DEFAULT_ICON = /*#__PURE__*/ jsx(CircleDashed, {});
|
|
32
|
+
const lookup = (table, key)=>table && key && Object.hasOwn(table, key) ? table[key] : void 0;
|
|
33
|
+
const resolveIcon = (key, icons, fallback = DEFAULT_ICON)=>lookup(icons, key) ?? lookup(STEP_TYPE_ICONS, key) ?? fallback;
|
|
34
|
+
const resolveStepIcon = (step, icons)=>null === step.icon ? null : resolveIcon(step.icon, icons, lookup(KIND_ICONS, step.kind) ?? DEFAULT_ICON);
|
|
35
|
+
const stepVisualStatus = (status)=>{
|
|
36
|
+
switch(status){
|
|
37
|
+
case 'pending':
|
|
38
|
+
case 'running':
|
|
39
|
+
case 'awaiting-approval':
|
|
40
|
+
return 'running';
|
|
41
|
+
case 'error':
|
|
42
|
+
return 'error';
|
|
43
|
+
default:
|
|
44
|
+
return 'done';
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
export { resolveIcon, resolveStepIcon, stepVisualStatus };
|
package/dist/index.d.ts
CHANGED
|
@@ -15,7 +15,9 @@ export { CalendarDate, CalendarDateTime, getLocalTimeZone, parseDate, parseDateT
|
|
|
15
15
|
export { Accordion, AccordionActions, type AccordionActionsProps, AccordionContent, type AccordionContentProps, AccordionItem, type AccordionItemProps, type AccordionProps, AccordionTrigger, type AccordionTriggerProps, type AccordionValueChangeDetails, type AccordionVariant, } from './components/Accordion/index.js';
|
|
16
16
|
export { Alert, AlertClose, type AlertCloseProps, type AlertColor, AlertContent, type AlertContentProps, AlertControls, type AlertControlsProps, AlertDescription, type AlertDescriptionProps, AlertIcon, type AlertIconProps, type AlertProps, AlertTitle, type AlertTitleProps, } from './components/Alert/index.js';
|
|
17
17
|
export { AnimatedBackground, type AnimatedBackgroundProps, } from './components/AnimatedBackground/index.js';
|
|
18
|
+
export { ApprovalCard, ApprovalCardActions, type ApprovalCardActionsProps, ApprovalCardContent, type ApprovalCardContentProps, type ApprovalCardProps, type ApprovalCardStatus, } from './components/ApprovalCard/index.js';
|
|
18
19
|
export { AppShell, AppShellAside, type AppShellAsideProps, AppShellHeader, type AppShellHeaderProps, type AppShellProps, AppShellRail, type AppShellRailProps, AppShellRemote, type AppShellRemoteProps, } from './components/AppShell/index.js';
|
|
20
|
+
export { AssistantMessage, AssistantMessageContent, type AssistantMessageContentProps, AssistantMessageError, type AssistantMessageErrorProps, AssistantMessageLoader, type AssistantMessageLoaderProps, type AssistantMessageProps, } from './components/AssistantMessage/index.js';
|
|
19
21
|
export { Attribute, AttributeActions, AttributeActionsContent, type AttributeActionsContentProps, AttributeActionsItem, type AttributeActionsItemProps, type AttributeActionsProps, AttributeActionsTarget, type AttributeActionsTargetProps, AttributeLabel, AttributeLabelDescription, type AttributeLabelDescriptionProps, AttributeLabelInfo, type AttributeLabelInfoProps, type AttributeLabelProps, type AttributeProps, AttributeValue, type AttributeValueProps, } from './components/Attribute/index.js';
|
|
20
22
|
export { Avatar, AvatarContent, type AvatarContentProps, AvatarDescription, type AvatarDescriptionProps, AvatarFallback, type AvatarFallbackProps, AvatarImage, type AvatarImageProps, AvatarName, type AvatarNameProps, AvatarOverlay, type AvatarOverlayProps, type AvatarProps, type AvatarStatusChangeDetails, } from './components/Avatar/index.js';
|
|
21
23
|
export { Badge, type BadgeProps } from './components/Badge/index.js';
|
|
@@ -24,8 +26,13 @@ export { Breadcrumbs, BreadcrumbsEllipsis, type BreadcrumbsEllipsisProps, Breadc
|
|
|
24
26
|
export { Button, type ButtonProps } from './components/Button/index.js';
|
|
25
27
|
export { Calendar, CalendarApplyButton, type CalendarApplyButtonProps, CalendarBody, type CalendarBodyProps, CalendarContent, type CalendarContentProps, type CalendarContextValue, CalendarDayName, CalendarFooter, CalendarFooterControls, type CalendarFooterControlsProps, type CalendarFooterProps, CalendarGrid, CalendarGrids, type CalendarGridsProps, CalendarHeader, CalendarInputHeader, type CalendarInputHeaderProps, CalendarKeyboardHints, type CalendarKeyboardHintsProps, CalendarPresetItem, CalendarPresets, type CalendarPresetsProps, type CalendarProps, CalendarProvider, CalendarResetButton, type CalendarResetButtonProps, CalendarTrigger, type CalendarTriggerProps, type CalendarType, DAY_NAMES, type DateRangePreset, type DateValue, DEFAULT_RANGE_PRESETS, DEFAULT_SINGLE_PRESETS, MONTH_NAMES, type PresetConfig, type PresetValue, useCalendarContext, } from './components/Calendar/index.js';
|
|
26
28
|
export { Card, CardContent, type CardContentProps, CardFooter, type CardFooterProps, CardHeader, type CardHeaderProps, type CardProps, CardTitle, type CardTitleProps, cardVariants, } from './components/Card/index.js';
|
|
29
|
+
export { ChainOfThought, type ChainOfThoughtProps, ChainOfThoughtStep, type ChainOfThoughtStepProps, } from './components/ChainOfThought/index.js';
|
|
30
|
+
export { Chat, type ChatBackground, ChatBody, type ChatBodyProps, ChatFooter, type ChatFooterProps, ChatGreeting, type ChatGreetingProps, ChatHeader, ChatHeaderActions, type ChatHeaderActionsProps, type ChatHeaderProps, ChatHeaderTitle, type ChatHeaderTitleProps, type ChatProps, ChatSuggestion, type ChatSuggestionProps, ChatSuggestions, type ChatSuggestionsPlacement, type ChatSuggestionsProps, ChatTrigger, type ChatTriggerProps, } from './components/Chat/index.js';
|
|
31
|
+
export { ChatInput, type ChatInputProps, ChatInputSubmit, type ChatInputSubmitProps, ChatInputTextarea, type ChatInputTextareaProps, } from './components/ChatInput/index.js';
|
|
32
|
+
export { ChatPermissions, ChatPermissionsContent, type ChatPermissionsContentProps, ChatPermissionsItem, type ChatPermissionsItemCheckedChangeDetails, type ChatPermissionsItemProps, type ChatPermissionsProps, ChatPermissionsTrigger, type ChatPermissionsTriggerProps, } from './components/ChatPermissions/index.js';
|
|
27
33
|
export { Checkbox, CheckboxDescription, type CheckboxDescriptionProps, CheckboxGroup, type CheckboxGroupProps, CheckboxIndicator, CheckboxLabel, type CheckboxLabelProps, type CheckboxProps, } from './components/Checkbox/index.js';
|
|
28
34
|
export { Code, type CodeProps } from './components/Code/index.js';
|
|
35
|
+
export { Conversation, ConversationContent, type ConversationContentProps, ConversationEmptyState, type ConversationEmptyStateProps, type ConversationProps, ConversationScrollButton, type ConversationScrollButtonProps, } from './components/Conversation/index.js';
|
|
29
36
|
export { Copyable, CopyableIcon, type CopyableIconProps, CopyableLabel, type CopyableLabelProps, type CopyableProps, useCopyable, } from './components/Copyable/index.js';
|
|
30
37
|
export { Country, CountryFlag, type CountryFlagProps, CountryName, type CountryNameProps, type CountryProps, } from './components/Country/index.js';
|
|
31
38
|
export { type DateFormatContextValue, DateFormatProvider, type DateFormatProviderProps, type DateOrder, useDateFormat, } from './components/DateFormatProvider/index.js';
|
|
@@ -56,6 +63,7 @@ export { Link, type LinkProps } from './components/Link/index.js';
|
|
|
56
63
|
export { List, ListIcon, type ListIconProps, ListItem, type ListItemProps, type ListProps, } from './components/List/index.js';
|
|
57
64
|
export { Loader, type LoaderProps } from './components/Loader/index.js';
|
|
58
65
|
export { Logo, type LogoProps, type LogoSize, type LogoStyle, type LogoType, } from './components/Logo/index.js';
|
|
66
|
+
export { MessageAction, type MessageActionProps, MessageActions, type MessageActionsProps, MessageTimestamp, type MessageTimestampProps, } from './components/MessageActions/index.js';
|
|
59
67
|
export { NavRail, NavRailBody, type NavRailBodyProps, NavRailFooter, type NavRailFooterProps, NavRailItem, type NavRailItemProps, type NavRailMode, type NavRailProps, NavRailSeparator, type NavRailSeparatorProps, NavRailSkeleton, type NavRailSkeletonProps, } from './components/NavRail/index.js';
|
|
60
68
|
export { NumberInput, type NumberInputProps } from './components/NumberInput/index.js';
|
|
61
69
|
export { NumericBadge, type NumericBadgeProps, } from './components/NumericBadge/index.js';
|
|
@@ -101,6 +109,8 @@ export { TopHeader, TopHeaderActions, type TopHeaderActionsProps, TopHeaderLogo,
|
|
|
101
109
|
export { type BeaconStepEffectOptions, beaconStepEffect, Tour, type TourProps, type TourStatusChangeDetails, type TourStepAction, type TourStepChangeDetails, type TourStepChangeDetailsExtended, type TourStepDetails, type TourStepEffectArgs, useTour, type WaitForStepEventOptions, waitForStepEvent, } from './components/Tour/index.js';
|
|
102
110
|
export { Tree, TreeItem, TreeItemContent, type TreeItemContentProps, TreeItemHeader, type TreeItemHeaderProps, type TreeItemProps, type TreeProps, useTreeDepth, useTreeIndent, } from './components/Tree/index.js';
|
|
103
111
|
export { TREE_VIEW_INDENT_STEP, TreeView, TreeViewItem, type TreeViewItemProps, type TreeViewProps, } from './components/TreeView/index.js';
|
|
112
|
+
export { UserMessage, UserMessageBubble, type UserMessageBubbleProps, type UserMessageProps, UserMessageShowMore, type UserMessageShowMoreProps, } from './components/UserMessage/index.js';
|
|
104
113
|
export { UtilityPage, type UtilityPageProps } from './components/UtilityPage/index.js';
|
|
114
|
+
export { ApprovalCardView, type ApprovalCardViewProps, ChainOfThoughtView, type ChainOfThoughtViewProps, type ChatApprovalOption, type ChatApprovalOptionKind, type ChatApprovalPart, type ChatApprovalResponse, type ChatApprovalStatus, type ChatAssistantMessage, type ChatAssistantPart, type ChatChainOfThoughtPart, type ChatContextItem, type ChatCustomPart, type ChatErrorPart, type ChatFeedback, type ChatIconKey, type ChatId, type ChatLabels, type ChatMarkdownProps, type ChatMessage, type ChatMessageActionNodes, ChatMessageView, type ChatMessageViewProps, type ChatMeta, type ChatOpen, type ChatPart, type ChatPartRenderContext, ChatPartView, type ChatPartViewProps, type ChatSnapshot, type ChatStatus, type ChatStep, type ChatStepKind, type ChatStepRenderContext, type ChatStepStatus, type ChatSuggestionItem, type ChatTextPart, type ChatToolPermission, type ChatUserMessage, type ChatUserPart, type ChatViewConfig, ChatViewProvider, type ChatViewProviderProps, type ChatViewState, copyTextOf, DEFAULT_CHAT_LABELS, deriveChatState, WallyAssistant, type WallyAssistantProps, } from './components/WallyAssistant/index.js';
|
|
105
115
|
export { WallyIcon, type WallyIconProps, type WallyIconSize, type WallyIconStyle, } from './components/WallyIcon/index.js';
|
|
106
116
|
export { type TestableProps, TestIdProvider, useTestId } from './utils/testId.js';
|
package/dist/index.js
CHANGED
|
@@ -4,7 +4,9 @@ export { CalendarDate, CalendarDateTime, Time, ZonedDateTime, getLocalTimeZone,
|
|
|
4
4
|
export { Accordion, AccordionActions, AccordionContent, AccordionItem, AccordionTrigger } from "./components/Accordion/index.js";
|
|
5
5
|
export { Alert, AlertClose, AlertContent, AlertControls, AlertDescription, AlertIcon, AlertTitle } from "./components/Alert/index.js";
|
|
6
6
|
export { AnimatedBackground } from "./components/AnimatedBackground/index.js";
|
|
7
|
+
export { ApprovalCard, ApprovalCardActions, ApprovalCardContent } from "./components/ApprovalCard/index.js";
|
|
7
8
|
export { AppShell, AppShellAside, AppShellHeader, AppShellRail, AppShellRemote } from "./components/AppShell/index.js";
|
|
9
|
+
export { AssistantMessage, AssistantMessageContent, AssistantMessageError, AssistantMessageLoader } from "./components/AssistantMessage/index.js";
|
|
8
10
|
export { Attribute, AttributeActions, AttributeActionsContent, AttributeActionsItem, AttributeActionsTarget, AttributeLabel, AttributeLabelDescription, AttributeLabelInfo, AttributeValue } from "./components/Attribute/index.js";
|
|
9
11
|
export { Avatar, AvatarContent, AvatarDescription, AvatarFallback, AvatarImage, AvatarName, AvatarOverlay } from "./components/Avatar/index.js";
|
|
10
12
|
export { Badge } from "./components/Badge/index.js";
|
|
@@ -13,8 +15,13 @@ export { Breadcrumbs, BreadcrumbsEllipsis, BreadcrumbsItem, BreadcrumbsScopeSwit
|
|
|
13
15
|
export { Button } from "./components/Button/index.js";
|
|
14
16
|
export { Calendar, CalendarApplyButton, CalendarBody, CalendarContent, CalendarDayName, CalendarFooter, CalendarFooterControls, CalendarGrid, CalendarGrids, CalendarHeader, CalendarInputHeader, CalendarKeyboardHints, CalendarPresetItem, CalendarPresets, CalendarProvider, CalendarResetButton, CalendarTrigger, DAY_NAMES, DEFAULT_RANGE_PRESETS, DEFAULT_SINGLE_PRESETS, MONTH_NAMES, useCalendarContext } from "./components/Calendar/index.js";
|
|
15
17
|
export { Card, CardContent, CardFooter, CardHeader, CardTitle, cardVariants } from "./components/Card/index.js";
|
|
18
|
+
export { ChainOfThought, ChainOfThoughtStep } from "./components/ChainOfThought/index.js";
|
|
19
|
+
export { Chat, ChatBody, ChatFooter, ChatGreeting, ChatHeader, ChatHeaderActions, ChatHeaderTitle, ChatSuggestion, ChatSuggestions, ChatTrigger } from "./components/Chat/index.js";
|
|
20
|
+
export { ChatInput, ChatInputSubmit, ChatInputTextarea } from "./components/ChatInput/index.js";
|
|
21
|
+
export { ChatPermissions, ChatPermissionsContent, ChatPermissionsItem, ChatPermissionsTrigger } from "./components/ChatPermissions/index.js";
|
|
16
22
|
export { Checkbox, CheckboxDescription, CheckboxGroup, CheckboxIndicator, CheckboxLabel } from "./components/Checkbox/index.js";
|
|
17
23
|
export { Code } from "./components/Code/index.js";
|
|
24
|
+
export { Conversation, ConversationContent, ConversationEmptyState, ConversationScrollButton } from "./components/Conversation/index.js";
|
|
18
25
|
export { Copyable, CopyableIcon, CopyableLabel, useCopyable } from "./components/Copyable/index.js";
|
|
19
26
|
export { Country, CountryFlag, CountryName } from "./components/Country/index.js";
|
|
20
27
|
export { DateFormatProvider, useDateFormat } from "./components/DateFormatProvider/index.js";
|
|
@@ -45,6 +52,7 @@ export { Link } from "./components/Link/index.js";
|
|
|
45
52
|
export { List, ListIcon, ListItem } from "./components/List/index.js";
|
|
46
53
|
export { Loader } from "./components/Loader/index.js";
|
|
47
54
|
export { Logo } from "./components/Logo/index.js";
|
|
55
|
+
export { MessageAction, MessageActions, MessageTimestamp } from "./components/MessageActions/index.js";
|
|
48
56
|
export { NavRail, NavRailBody, NavRailFooter, NavRailItem, NavRailSeparator, NavRailSkeleton } from "./components/NavRail/index.js";
|
|
49
57
|
export { NumberInput } from "./components/NumberInput/index.js";
|
|
50
58
|
export { NumericBadge } from "./components/NumericBadge/index.js";
|
|
@@ -90,6 +98,8 @@ export { TopHeader, TopHeaderActions, TopHeaderLogo } from "./components/TopHead
|
|
|
90
98
|
export { Tour, beaconStepEffect, useTour, waitForStepEvent } from "./components/Tour/index.js";
|
|
91
99
|
export { Tree, TreeItem, TreeItemContent, TreeItemHeader, useTreeDepth, useTreeIndent } from "./components/Tree/index.js";
|
|
92
100
|
export { TREE_VIEW_INDENT_STEP, TreeView, TreeViewItem } from "./components/TreeView/index.js";
|
|
101
|
+
export { UserMessage, UserMessageBubble, UserMessageShowMore } from "./components/UserMessage/index.js";
|
|
93
102
|
export { UtilityPage } from "./components/UtilityPage/index.js";
|
|
103
|
+
export { ApprovalCardView, ChainOfThoughtView, ChatMessageView, ChatPartView, ChatViewProvider, DEFAULT_CHAT_LABELS, WallyAssistant, copyTextOf, deriveChatState } from "./components/WallyAssistant/index.js";
|
|
94
104
|
export { WallyIcon } from "./components/WallyIcon/index.js";
|
|
95
105
|
export { TestIdProvider, useTestId } from "./utils/testId.js";
|