@townco/ui 0.1.6 → 0.1.7
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/README.md +11 -11
- package/dist/core/hooks/use-chat-input.d.ts +17 -17
- package/dist/core/hooks/use-chat-input.js +55 -64
- package/dist/core/hooks/use-chat-messages.d.ts +11 -11
- package/dist/core/hooks/use-chat-messages.js +114 -121
- package/dist/core/hooks/use-chat-session.d.ts +5 -5
- package/dist/core/hooks/use-chat-session.js +80 -78
- package/dist/core/index.d.ts +1 -1
- package/dist/core/index.js +1 -1
- package/dist/core/schemas/chat.d.ts +56 -83
- package/dist/core/schemas/chat.js +25 -27
- package/dist/core/store/chat-store.d.ts +22 -28
- package/dist/core/store/chat-store.js +50 -59
- package/dist/gui/components/Button.d.ts +7 -23
- package/dist/gui/components/Button.js +27 -40
- package/dist/gui/components/Card.d.ts +7 -26
- package/dist/gui/components/Card.js +8 -54
- package/dist/gui/components/ChatInput.d.ts +36 -58
- package/dist/gui/components/ChatInput.js +121 -191
- package/dist/gui/components/ChatSecondaryPanel.d.ts +11 -14
- package/dist/gui/components/ChatSecondaryPanel.js +38 -115
- package/dist/gui/components/ChatStatus.d.ts +2 -4
- package/dist/gui/components/ChatStatus.js +34 -45
- package/dist/gui/components/Conversation.d.ts +14 -17
- package/dist/gui/components/Conversation.js +83 -143
- package/dist/gui/components/Dialog.d.ts +11 -57
- package/dist/gui/components/Dialog.js +8 -84
- package/dist/gui/components/HeightTransition.d.ts +7 -12
- package/dist/gui/components/HeightTransition.js +77 -88
- package/dist/gui/components/Input.d.ts +6 -13
- package/dist/gui/components/Input.js +16 -27
- package/dist/gui/components/Label.d.ts +1 -7
- package/dist/gui/components/Label.js +2 -12
- package/dist/gui/components/MarkdownRenderer.d.ts +4 -6
- package/dist/gui/components/MarkdownRenderer.js +81 -178
- package/dist/gui/components/Message.d.ts +18 -25
- package/dist/gui/components/Message.js +23 -44
- package/dist/gui/components/MessageContent.d.ts +22 -29
- package/dist/gui/components/MessageContent.js +85 -157
- package/dist/gui/components/Reasoning.d.ts +24 -30
- package/dist/gui/components/Reasoning.js +60 -187
- package/dist/gui/components/Response.d.ts +9 -11
- package/dist/gui/components/Response.js +90 -229
- package/dist/gui/components/Select.d.ts +10 -69
- package/dist/gui/components/Select.js +12 -118
- package/dist/gui/components/Tabs.d.ts +4 -24
- package/dist/gui/components/Tabs.js +4 -32
- package/dist/gui/components/Task.d.ts +24 -28
- package/dist/gui/components/Task.js +31 -164
- package/dist/gui/components/Textarea.d.ts +7 -15
- package/dist/gui/components/Textarea.js +46 -63
- package/dist/gui/components/ThinkingBlock.d.ts +10 -20
- package/dist/gui/components/ThinkingBlock.js +35 -134
- package/dist/gui/components/TodoList.d.ts +10 -12
- package/dist/gui/components/TodoList.js +7 -22
- package/dist/gui/components/TodoListItem.d.ts +6 -9
- package/dist/gui/components/TodoListItem.js +4 -18
- package/dist/gui/components/index.d.ts +8 -59
- package/dist/gui/components/index.js +8 -42
- package/dist/gui/lib/utils.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/index.test.js +1 -0
- package/dist/sdk/client/acp-client.d.ts +76 -88
- package/dist/sdk/client/acp-client.js +217 -215
- package/dist/sdk/index.d.ts +1 -1
- package/dist/sdk/index.js +1 -1
- package/dist/sdk/schemas/agent.d.ts +64 -111
- package/dist/sdk/schemas/agent.js +24 -24
- package/dist/sdk/schemas/message.d.ts +147 -245
- package/dist/sdk/schemas/message.js +40 -40
- package/dist/sdk/schemas/session.d.ts +135 -219
- package/dist/sdk/schemas/session.js +27 -27
- package/dist/sdk/transports/http.d.ts +55 -55
- package/dist/sdk/transports/http.js +469 -472
- package/dist/sdk/transports/stdio.d.ts +20 -20
- package/dist/sdk/transports/stdio.js +286 -289
- package/dist/sdk/transports/types.d.ts +42 -42
- package/dist/sdk/transports/websocket.d.ts +12 -12
- package/dist/sdk/transports/websocket.js +46 -52
- package/dist/tui/components/ChatView.d.ts +2 -4
- package/dist/tui/components/ChatView.js +18 -51
- package/dist/tui/components/GameOfLife.js +35 -64
- package/dist/tui/components/InputBox.d.ts +11 -18
- package/dist/tui/components/InputBox.js +10 -70
- package/dist/tui/components/MessageList.d.ts +2 -4
- package/dist/tui/components/MessageList.js +10 -37
- package/dist/tui/components/MultiSelect.d.ts +10 -15
- package/dist/tui/components/MultiSelect.js +73 -116
- package/dist/tui/components/ReadlineInput.d.ts +6 -12
- package/dist/tui/components/ReadlineInput.js +237 -252
- package/dist/tui/components/SingleSelect.d.ts +9 -15
- package/dist/tui/components/SingleSelect.js +43 -84
- package/dist/tui/components/StatusBar.d.ts +6 -11
- package/dist/tui/components/StatusBar.js +67 -102
- package/dist/tui/index.d.ts +1 -1
- package/dist/tui/index.js +1 -1
- package/package.json +2 -2
- package/dist/core/hooks/index.d.ts.map +0 -1
- package/dist/core/hooks/index.js.map +0 -1
- package/dist/core/hooks/use-chat-input.d.ts.map +0 -1
- package/dist/core/hooks/use-chat-input.js.map +0 -1
- package/dist/core/hooks/use-chat-messages.d.ts.map +0 -1
- package/dist/core/hooks/use-chat-messages.js.map +0 -1
- package/dist/core/hooks/use-chat-session.d.ts.map +0 -1
- package/dist/core/hooks/use-chat-session.js.map +0 -1
- package/dist/core/hooks/use-media-query.d.ts +0 -39
- package/dist/core/hooks/use-media-query.js +0 -80
- package/dist/core/index.d.ts.map +0 -1
- package/dist/core/index.js.map +0 -1
- package/dist/core/schemas/chat.d.ts.map +0 -1
- package/dist/core/schemas/chat.js.map +0 -1
- package/dist/core/schemas/index.d.ts.map +0 -1
- package/dist/core/schemas/index.js.map +0 -1
- package/dist/core/store/chat-store.d.ts.map +0 -1
- package/dist/core/store/chat-store.js.map +0 -1
- package/dist/gui/components/Button.d.ts.map +0 -1
- package/dist/gui/components/Button.js.map +0 -1
- package/dist/gui/components/Card.d.ts.map +0 -1
- package/dist/gui/components/Card.js.map +0 -1
- package/dist/gui/components/ChatHeader.d.ts +0 -65
- package/dist/gui/components/ChatHeader.js +0 -189
- package/dist/gui/components/ChatInput.d.ts.map +0 -1
- package/dist/gui/components/ChatInput.js.map +0 -1
- package/dist/gui/components/ChatInterface.d.ts +0 -12
- package/dist/gui/components/ChatInterface.d.ts.map +0 -1
- package/dist/gui/components/ChatInterface.js +0 -204
- package/dist/gui/components/ChatInterface.js.map +0 -1
- package/dist/gui/components/ChatLayout.d.ts +0 -82
- package/dist/gui/components/ChatLayout.js +0 -232
- package/dist/gui/components/ChatPanelTabContent.d.ts +0 -27
- package/dist/gui/components/ChatPanelTabContent.js +0 -93
- package/dist/gui/components/ChatPreview.d.ts +0 -12
- package/dist/gui/components/ChatPreview.d.ts.map +0 -1
- package/dist/gui/components/ChatPreview.js +0 -214
- package/dist/gui/components/ChatPreview.js.map +0 -1
- package/dist/gui/components/ChatSecondaryPanel.d.ts.map +0 -1
- package/dist/gui/components/ChatSecondaryPanel.js.map +0 -1
- package/dist/gui/components/ChatSidebar.d.ts +0 -27
- package/dist/gui/components/ChatSidebar.js +0 -57
- package/dist/gui/components/ChatStatus.d.ts.map +0 -1
- package/dist/gui/components/ChatStatus.js.map +0 -1
- package/dist/gui/components/ChatView.d.ts +0 -8
- package/dist/gui/components/ChatView.d.ts.map +0 -1
- package/dist/gui/components/ChatView.js +0 -42
- package/dist/gui/components/ChatView.js.map +0 -1
- package/dist/gui/components/ConfigPanel.d.ts +0 -20
- package/dist/gui/components/ConfigPanel.d.ts.map +0 -1
- package/dist/gui/components/ConfigPanel.js +0 -225
- package/dist/gui/components/ConfigPanel.js.map +0 -1
- package/dist/gui/components/Conversation.d.ts.map +0 -1
- package/dist/gui/components/Conversation.js.map +0 -1
- package/dist/gui/components/Dialog.d.ts.map +0 -1
- package/dist/gui/components/Dialog.js.map +0 -1
- package/dist/gui/components/DropdownMenu.d.ts +0 -108
- package/dist/gui/components/DropdownMenu.js +0 -215
- package/dist/gui/components/HeightTransition.d.ts.map +0 -1
- package/dist/gui/components/HeightTransition.js.map +0 -1
- package/dist/gui/components/Input.d.ts.map +0 -1
- package/dist/gui/components/Input.js.map +0 -1
- package/dist/gui/components/InputBox.d.ts +0 -21
- package/dist/gui/components/InputBox.d.ts.map +0 -1
- package/dist/gui/components/InputBox.js +0 -90
- package/dist/gui/components/InputBox.js.map +0 -1
- package/dist/gui/components/Label.d.ts.map +0 -1
- package/dist/gui/components/Label.js.map +0 -1
- package/dist/gui/components/MarkdownRenderer.d.ts.map +0 -1
- package/dist/gui/components/MarkdownRenderer.js.map +0 -1
- package/dist/gui/components/Message.d.ts.map +0 -1
- package/dist/gui/components/Message.js.map +0 -1
- package/dist/gui/components/MessageContent.d.ts.map +0 -1
- package/dist/gui/components/MessageContent.js.map +0 -1
- package/dist/gui/components/MessageList.d.ts.map +0 -1
- package/dist/gui/components/MessageList.js.map +0 -1
- package/dist/gui/components/PlaygroundLayout.d.ts +0 -14
- package/dist/gui/components/PlaygroundLayout.d.ts.map +0 -1
- package/dist/gui/components/PlaygroundLayout.js +0 -49
- package/dist/gui/components/PlaygroundLayout.js.map +0 -1
- package/dist/gui/components/Reasoning.d.ts.map +0 -1
- package/dist/gui/components/Reasoning.js.map +0 -1
- package/dist/gui/components/Response.d.ts.map +0 -1
- package/dist/gui/components/Response.js.map +0 -1
- package/dist/gui/components/Select.d.ts.map +0 -1
- package/dist/gui/components/Select.js.map +0 -1
- package/dist/gui/components/Sonner.d.ts +0 -7
- package/dist/gui/components/Sonner.js +0 -34
- package/dist/gui/components/StatusBar.d.ts +0 -12
- package/dist/gui/components/StatusBar.d.ts.map +0 -1
- package/dist/gui/components/StatusBar.js +0 -58
- package/dist/gui/components/StatusBar.js.map +0 -1
- package/dist/gui/components/Tabs.d.ts.map +0 -1
- package/dist/gui/components/Tabs.js.map +0 -1
- package/dist/gui/components/Task.d.ts.map +0 -1
- package/dist/gui/components/Task.js.map +0 -1
- package/dist/gui/components/Textarea.d.ts.map +0 -1
- package/dist/gui/components/Textarea.js.map +0 -1
- package/dist/gui/components/ThinkingBlock.d.ts.map +0 -1
- package/dist/gui/components/ThinkingBlock.js.map +0 -1
- package/dist/gui/components/TodoList.d.ts.map +0 -1
- package/dist/gui/components/TodoList.js.map +0 -1
- package/dist/gui/components/TodoListItem.d.ts.map +0 -1
- package/dist/gui/components/TodoListItem.js.map +0 -1
- package/dist/gui/components/index.d.ts.map +0 -1
- package/dist/gui/components/index.js.map +0 -1
- package/dist/gui/index.d.ts.map +0 -1
- package/dist/gui/index.js.map +0 -1
- package/dist/gui/lib/utils.d.ts.map +0 -1
- package/dist/gui/lib/utils.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/sdk/client/acp-client.d.ts.map +0 -1
- package/dist/sdk/client/acp-client.js.map +0 -1
- package/dist/sdk/client/index.d.ts.map +0 -1
- package/dist/sdk/client/index.js.map +0 -1
- package/dist/sdk/index.d.ts.map +0 -1
- package/dist/sdk/index.js.map +0 -1
- package/dist/sdk/schemas/agent.d.ts.map +0 -1
- package/dist/sdk/schemas/agent.js.map +0 -1
- package/dist/sdk/schemas/index.d.ts.map +0 -1
- package/dist/sdk/schemas/index.js.map +0 -1
- package/dist/sdk/schemas/message.d.ts.map +0 -1
- package/dist/sdk/schemas/message.js.map +0 -1
- package/dist/sdk/schemas/session.d.ts.map +0 -1
- package/dist/sdk/schemas/session.js.map +0 -1
- package/dist/sdk/transports/http.d.ts.map +0 -1
- package/dist/sdk/transports/http.js.map +0 -1
- package/dist/sdk/transports/index.d.ts.map +0 -1
- package/dist/sdk/transports/index.js.map +0 -1
- package/dist/sdk/transports/stdio.d.ts.map +0 -1
- package/dist/sdk/transports/stdio.js.map +0 -1
- package/dist/sdk/transports/types.d.ts.map +0 -1
- package/dist/sdk/transports/types.js.map +0 -1
- package/dist/sdk/transports/websocket.d.ts.map +0 -1
- package/dist/sdk/transports/websocket.js.map +0 -1
- package/dist/tui/components/ChatView.d.ts.map +0 -1
- package/dist/tui/components/ChatView.js.map +0 -1
- package/dist/tui/components/GameOfLife.d.ts.map +0 -1
- package/dist/tui/components/GameOfLife.js.map +0 -1
- package/dist/tui/components/InputBox.d.ts.map +0 -1
- package/dist/tui/components/InputBox.js.map +0 -1
- package/dist/tui/components/MessageList.d.ts.map +0 -1
- package/dist/tui/components/MessageList.js.map +0 -1
- package/dist/tui/components/ReadlineInput.d.ts.map +0 -1
- package/dist/tui/components/ReadlineInput.js.map +0 -1
- package/dist/tui/components/StatusBar.d.ts.map +0 -1
- package/dist/tui/components/StatusBar.js.map +0 -1
- package/dist/tui/components/index.d.ts.map +0 -1
- package/dist/tui/components/index.js.map +0 -1
- package/dist/tui/index.d.ts.map +0 -1
- package/dist/tui/index.js.map +0 -1
|
@@ -1,234 +1,95 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
3
|
import ReactMarkdown from "react-markdown";
|
|
4
4
|
import remarkGfm from "remark-gfm";
|
|
5
5
|
import { cn } from "../lib/utils.js";
|
|
6
|
-
export const Response = React.forwardRef(
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
_jsx("pre", { className: "my-4 rounded-lg", ...props }),
|
|
96
|
-
// Heading styling with improved hierarchy
|
|
97
|
-
h1: ({ node, ...props }) =>
|
|
98
|
-
_jsx("h1", {
|
|
99
|
-
className:
|
|
100
|
-
"text-2xl font-bold mt-6 mb-4 text-foreground border-b border-border pb-2",
|
|
101
|
-
...props,
|
|
102
|
-
}),
|
|
103
|
-
h2: ({ node, ...props }) =>
|
|
104
|
-
_jsx("h2", {
|
|
105
|
-
className:
|
|
106
|
-
"text-xl font-semibold mt-5 mb-3 text-foreground border-b border-border/50 pb-1.5",
|
|
107
|
-
...props,
|
|
108
|
-
}),
|
|
109
|
-
h3: ({ node, ...props }) =>
|
|
110
|
-
_jsx("h3", {
|
|
111
|
-
className: "text-lg font-semibold mt-4 mb-2 text-foreground",
|
|
112
|
-
...props,
|
|
113
|
-
}),
|
|
114
|
-
h4: ({ node, ...props }) =>
|
|
115
|
-
_jsx("h4", {
|
|
116
|
-
className: "text-base font-semibold mt-3 mb-2 text-foreground",
|
|
117
|
-
...props,
|
|
118
|
-
}),
|
|
119
|
-
// List styling
|
|
120
|
-
ul: ({ node, ...props }) => {
|
|
121
|
-
// Check if this is a task list by looking for checkbox inputs in children
|
|
122
|
-
const isTaskList = node?.children?.some(
|
|
123
|
-
(child) =>
|
|
124
|
-
typeof child === "object" &&
|
|
125
|
-
child !== null &&
|
|
126
|
-
"type" in child &&
|
|
127
|
-
child.type === "element" &&
|
|
128
|
-
"tagName" in child &&
|
|
129
|
-
child.tagName === "li" &&
|
|
130
|
-
"children" in child &&
|
|
131
|
-
Array.isArray(child.children) &&
|
|
132
|
-
child.children.some(
|
|
133
|
-
(grandChild) =>
|
|
134
|
-
typeof grandChild === "object" &&
|
|
135
|
-
grandChild !== null &&
|
|
136
|
-
"type" in grandChild &&
|
|
137
|
-
grandChild.type === "element" &&
|
|
138
|
-
"tagName" in grandChild &&
|
|
139
|
-
grandChild.tagName === "input" &&
|
|
140
|
-
"properties" in grandChild &&
|
|
141
|
-
typeof grandChild.properties === "object" &&
|
|
142
|
-
grandChild.properties !== null &&
|
|
143
|
-
"type" in grandChild.properties &&
|
|
144
|
-
grandChild.properties.type === "checkbox",
|
|
145
|
-
),
|
|
146
|
-
);
|
|
147
|
-
return _jsx("ul", {
|
|
148
|
-
className: cn(
|
|
149
|
-
"my-2 space-y-1 text-foreground",
|
|
150
|
-
isTaskList ? "list-none space-y-2" : "list-disc list-inside",
|
|
151
|
-
),
|
|
152
|
-
...props,
|
|
153
|
-
});
|
|
154
|
-
},
|
|
155
|
-
ol: ({ node, ...props }) =>
|
|
156
|
-
_jsx("ol", {
|
|
157
|
-
className: "list-decimal list-inside my-2 space-y-1 text-foreground",
|
|
158
|
-
...props,
|
|
159
|
-
}),
|
|
160
|
-
// List item styling
|
|
161
|
-
li: ({ node, ...props }) => {
|
|
162
|
-
// Check if this li contains a checkbox (task list item)
|
|
163
|
-
const isTaskListItem = node?.children?.some(
|
|
164
|
-
(child) =>
|
|
165
|
-
typeof child === "object" &&
|
|
166
|
-
child !== null &&
|
|
167
|
-
"type" in child &&
|
|
168
|
-
child.type === "element" &&
|
|
169
|
-
"tagName" in child &&
|
|
170
|
-
child.tagName === "input" &&
|
|
171
|
-
"properties" in child &&
|
|
172
|
-
typeof child.properties === "object" &&
|
|
173
|
-
child.properties !== null &&
|
|
174
|
-
"type" in child.properties &&
|
|
175
|
-
child.properties.type === "checkbox",
|
|
176
|
-
);
|
|
177
|
-
return _jsx("li", {
|
|
178
|
-
className: cn("flex items-start", isTaskListItem ? "gap-2" : "ml-2"),
|
|
179
|
-
...props,
|
|
180
|
-
});
|
|
181
|
-
},
|
|
182
|
-
// Link styling with hover effect
|
|
183
|
-
a: ({ node, ...props }) =>
|
|
184
|
-
_jsx("a", {
|
|
185
|
-
className:
|
|
186
|
-
"text-primary hover:underline decoration-2 underline-offset-2 transition-all",
|
|
187
|
-
target: "_blank",
|
|
188
|
-
rel: "noopener noreferrer",
|
|
189
|
-
...props,
|
|
190
|
-
}),
|
|
191
|
-
// Paragraph styling
|
|
192
|
-
p: ({ node, ...props }) =>
|
|
193
|
-
_jsx("p", {
|
|
194
|
-
className: "my-2 text-foreground leading-relaxed",
|
|
195
|
-
...props,
|
|
196
|
-
}),
|
|
197
|
-
// Blockquote styling with enhanced visual
|
|
198
|
-
blockquote: ({ node, ...props }) =>
|
|
199
|
-
_jsx("blockquote", {
|
|
200
|
-
className:
|
|
201
|
-
"border-l-4 border-[primary] pl-4 italic my-4 text-foreground bg-card py-2 rounded-r-md shadow-sm",
|
|
202
|
-
...props,
|
|
203
|
-
}),
|
|
204
|
-
// Horizontal rule
|
|
205
|
-
hr: ({ node, ...props }) =>
|
|
206
|
-
_jsx("hr", {
|
|
207
|
-
className: "my-6 border-t border-border opacity-50",
|
|
208
|
-
...props,
|
|
209
|
-
}),
|
|
210
|
-
};
|
|
211
|
-
return _jsxs("div", {
|
|
212
|
-
ref: ref,
|
|
213
|
-
className: cn(
|
|
214
|
-
"markdown-content prose prose-sm max-w-none dark:prose-invert",
|
|
215
|
-
className,
|
|
216
|
-
),
|
|
217
|
-
...props,
|
|
218
|
-
children: [
|
|
219
|
-
_jsx(ReactMarkdown, {
|
|
220
|
-
remarkPlugins: [remarkGfm],
|
|
221
|
-
components: components,
|
|
222
|
-
children: content,
|
|
223
|
-
}),
|
|
224
|
-
isStreaming &&
|
|
225
|
-
content &&
|
|
226
|
-
_jsx("span", {
|
|
227
|
-
className: "inline-block ml-1 animate-typing text-primary",
|
|
228
|
-
children: "...",
|
|
229
|
-
}),
|
|
230
|
-
],
|
|
231
|
-
});
|
|
232
|
-
},
|
|
233
|
-
);
|
|
6
|
+
export const Response = React.forwardRef(({ content, isStreaming = false, showEmpty = true, emptyMessage = "", className, ...props }, ref) => {
|
|
7
|
+
// Show empty state during streaming if no content yet
|
|
8
|
+
if (!content && isStreaming && showEmpty) {
|
|
9
|
+
return (_jsx("div", { ref: ref, className: cn("opacity-70 italic text-sm", className), ...props, children: emptyMessage }));
|
|
10
|
+
}
|
|
11
|
+
if (!content) {
|
|
12
|
+
return null;
|
|
13
|
+
}
|
|
14
|
+
const components = {
|
|
15
|
+
// Table styling
|
|
16
|
+
table: ({ node, ...props }) => (_jsx("div", { className: "overflow-x-auto my-4", children: _jsx("table", { className: "min-w-full border-collapse border border-border rounded-md", ...props }) })),
|
|
17
|
+
thead: ({ node, ...props }) => (_jsx("thead", { className: "bg-card border-b border-border", ...props })),
|
|
18
|
+
tbody: ({ node, ...props }) => _jsx("tbody", { ...props }),
|
|
19
|
+
tr: ({ node, ...props }) => (_jsx("tr", { className: "border-b border-border hover:bg-card transition-colors", ...props })),
|
|
20
|
+
th: ({ node, ...props }) => (_jsx("th", { className: "px-4 py-2 text-left font-semibold text-foreground border-r border-border last:border-r-0", ...props })),
|
|
21
|
+
td: ({ node, ...props }) => (_jsx("td", { className: "px-4 py-2 text-foreground border-r border-border last:border-r-0", ...props })),
|
|
22
|
+
// Task list styling
|
|
23
|
+
input: ({ node, checked, ...props }) => {
|
|
24
|
+
if (props.type === "checkbox") {
|
|
25
|
+
return (_jsx("input", { type: "checkbox", checked: checked || false, disabled: true, readOnly: true, className: "mr-2 w-4 h-4 accent-[primary] cursor-not-allowed", ...props }));
|
|
26
|
+
}
|
|
27
|
+
return _jsx("input", { ...props });
|
|
28
|
+
},
|
|
29
|
+
// Code block styling with enhanced shadows
|
|
30
|
+
code: ({ node, ...props }) => {
|
|
31
|
+
const inline = !props.className?.includes("language-");
|
|
32
|
+
if (inline) {
|
|
33
|
+
return (_jsx("code", { className: "px-1.5 py-0.5 bg-card border border-border rounded text-sm font-mono text-foreground", ...props }));
|
|
34
|
+
}
|
|
35
|
+
return (_jsx("code", { className: "block p-4 bg-card border border-border rounded-md overflow-x-auto text-sm font-mono text-foreground shadow-sm", ...props }));
|
|
36
|
+
},
|
|
37
|
+
pre: ({ node, ...props }) => (_jsx("pre", { className: "my-4 rounded-lg", ...props })),
|
|
38
|
+
// Heading styling with improved hierarchy
|
|
39
|
+
h1: ({ node, ...props }) => (_jsx("h1", { className: "text-2xl font-bold mt-6 mb-4 text-foreground border-b border-border pb-2", ...props })),
|
|
40
|
+
h2: ({ node, ...props }) => (_jsx("h2", { className: "text-xl font-semibold mt-5 mb-3 text-foreground border-b border-border/50 pb-1.5", ...props })),
|
|
41
|
+
h3: ({ node, ...props }) => (_jsx("h3", { className: "text-lg font-semibold mt-4 mb-2 text-foreground", ...props })),
|
|
42
|
+
h4: ({ node, ...props }) => (_jsx("h4", { className: "text-base font-semibold mt-3 mb-2 text-foreground", ...props })),
|
|
43
|
+
// List styling
|
|
44
|
+
ul: ({ node, ...props }) => {
|
|
45
|
+
// Check if this is a task list by looking for checkbox inputs in children
|
|
46
|
+
const isTaskList = node?.children?.some((child) => typeof child === "object" &&
|
|
47
|
+
child !== null &&
|
|
48
|
+
"type" in child &&
|
|
49
|
+
child.type === "element" &&
|
|
50
|
+
"tagName" in child &&
|
|
51
|
+
child.tagName === "li" &&
|
|
52
|
+
"children" in child &&
|
|
53
|
+
Array.isArray(child.children) &&
|
|
54
|
+
child.children.some((grandChild) => typeof grandChild === "object" &&
|
|
55
|
+
grandChild !== null &&
|
|
56
|
+
"type" in grandChild &&
|
|
57
|
+
grandChild.type === "element" &&
|
|
58
|
+
"tagName" in grandChild &&
|
|
59
|
+
grandChild.tagName === "input" &&
|
|
60
|
+
"properties" in grandChild &&
|
|
61
|
+
typeof grandChild.properties === "object" &&
|
|
62
|
+
grandChild.properties !== null &&
|
|
63
|
+
"type" in grandChild.properties &&
|
|
64
|
+
grandChild.properties.type === "checkbox"));
|
|
65
|
+
return (_jsx("ul", { className: cn("my-2 space-y-1 text-foreground", isTaskList ? "list-none space-y-2" : "list-disc list-inside"), ...props }));
|
|
66
|
+
},
|
|
67
|
+
ol: ({ node, ...props }) => (_jsx("ol", { className: "list-decimal list-inside my-2 space-y-1 text-foreground", ...props })),
|
|
68
|
+
// List item styling
|
|
69
|
+
li: ({ node, ...props }) => {
|
|
70
|
+
// Check if this li contains a checkbox (task list item)
|
|
71
|
+
const isTaskListItem = node?.children?.some((child) => typeof child === "object" &&
|
|
72
|
+
child !== null &&
|
|
73
|
+
"type" in child &&
|
|
74
|
+
child.type === "element" &&
|
|
75
|
+
"tagName" in child &&
|
|
76
|
+
child.tagName === "input" &&
|
|
77
|
+
"properties" in child &&
|
|
78
|
+
typeof child.properties === "object" &&
|
|
79
|
+
child.properties !== null &&
|
|
80
|
+
"type" in child.properties &&
|
|
81
|
+
child.properties.type === "checkbox");
|
|
82
|
+
return (_jsx("li", { className: cn("flex items-start", isTaskListItem ? "gap-2" : "ml-2"), ...props }));
|
|
83
|
+
},
|
|
84
|
+
// Link styling with hover effect
|
|
85
|
+
a: ({ node, ...props }) => (_jsx("a", { className: "text-primary hover:underline decoration-2 underline-offset-2 transition-all", target: "_blank", rel: "noopener noreferrer", ...props })),
|
|
86
|
+
// Paragraph styling
|
|
87
|
+
p: ({ node, ...props }) => (_jsx("p", { className: "my-2 text-foreground leading-relaxed", ...props })),
|
|
88
|
+
// Blockquote styling with enhanced visual
|
|
89
|
+
blockquote: ({ node, ...props }) => (_jsx("blockquote", { className: "border-l-4 border-[primary] pl-4 italic my-4 text-foreground bg-card py-2 rounded-r-md shadow-sm", ...props })),
|
|
90
|
+
// Horizontal rule
|
|
91
|
+
hr: ({ node, ...props }) => (_jsx("hr", { className: "my-6 border-t border-border opacity-50", ...props })),
|
|
92
|
+
};
|
|
93
|
+
return (_jsxs("div", { ref: ref, className: cn("markdown-content prose prose-sm max-w-none dark:prose-invert", className), ...props, children: [_jsx(ReactMarkdown, { remarkPlugins: [remarkGfm], components: components, children: content }), isStreaming && content && (_jsx("span", { className: "inline-block ml-1 animate-typing text-primary", children: "..." }))] }));
|
|
94
|
+
});
|
|
234
95
|
Response.displayName = "Response";
|
|
@@ -1,72 +1,13 @@
|
|
|
1
1
|
import * as SelectPrimitive from "@radix-ui/react-select";
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
declare const Select: React.FC<SelectPrimitive.SelectProps>;
|
|
4
|
-
declare const SelectGroup: React.ForwardRefExoticComponent<
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
declare const
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
declare const
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
> &
|
|
15
|
-
React.RefAttributes<HTMLButtonElement>
|
|
16
|
-
>;
|
|
17
|
-
declare const SelectScrollUpButton: React.ForwardRefExoticComponent<
|
|
18
|
-
Omit<
|
|
19
|
-
SelectPrimitive.SelectScrollUpButtonProps &
|
|
20
|
-
React.RefAttributes<HTMLDivElement>,
|
|
21
|
-
"ref"
|
|
22
|
-
> &
|
|
23
|
-
React.RefAttributes<HTMLDivElement>
|
|
24
|
-
>;
|
|
25
|
-
declare const SelectScrollDownButton: React.ForwardRefExoticComponent<
|
|
26
|
-
Omit<
|
|
27
|
-
SelectPrimitive.SelectScrollDownButtonProps &
|
|
28
|
-
React.RefAttributes<HTMLDivElement>,
|
|
29
|
-
"ref"
|
|
30
|
-
> &
|
|
31
|
-
React.RefAttributes<HTMLDivElement>
|
|
32
|
-
>;
|
|
33
|
-
declare const SelectContent: React.ForwardRefExoticComponent<
|
|
34
|
-
Omit<
|
|
35
|
-
SelectPrimitive.SelectContentProps & React.RefAttributes<HTMLDivElement>,
|
|
36
|
-
"ref"
|
|
37
|
-
> &
|
|
38
|
-
React.RefAttributes<HTMLDivElement>
|
|
39
|
-
>;
|
|
40
|
-
declare const SelectLabel: React.ForwardRefExoticComponent<
|
|
41
|
-
Omit<
|
|
42
|
-
SelectPrimitive.SelectLabelProps & React.RefAttributes<HTMLDivElement>,
|
|
43
|
-
"ref"
|
|
44
|
-
> &
|
|
45
|
-
React.RefAttributes<HTMLDivElement>
|
|
46
|
-
>;
|
|
47
|
-
declare const SelectItem: React.ForwardRefExoticComponent<
|
|
48
|
-
Omit<
|
|
49
|
-
SelectPrimitive.SelectItemProps & React.RefAttributes<HTMLDivElement>,
|
|
50
|
-
"ref"
|
|
51
|
-
> &
|
|
52
|
-
React.RefAttributes<HTMLDivElement>
|
|
53
|
-
>;
|
|
54
|
-
declare const SelectSeparator: React.ForwardRefExoticComponent<
|
|
55
|
-
Omit<
|
|
56
|
-
SelectPrimitive.SelectSeparatorProps & React.RefAttributes<HTMLDivElement>,
|
|
57
|
-
"ref"
|
|
58
|
-
> &
|
|
59
|
-
React.RefAttributes<HTMLDivElement>
|
|
60
|
-
>;
|
|
61
|
-
export {
|
|
62
|
-
Select,
|
|
63
|
-
SelectGroup,
|
|
64
|
-
SelectValue,
|
|
65
|
-
SelectTrigger,
|
|
66
|
-
SelectContent,
|
|
67
|
-
SelectLabel,
|
|
68
|
-
SelectItem,
|
|
69
|
-
SelectSeparator,
|
|
70
|
-
SelectScrollUpButton,
|
|
71
|
-
SelectScrollDownButton,
|
|
72
|
-
};
|
|
4
|
+
declare const SelectGroup: React.ForwardRefExoticComponent<SelectPrimitive.SelectGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
5
|
+
declare const SelectValue: React.ForwardRefExoticComponent<SelectPrimitive.SelectValueProps & React.RefAttributes<HTMLSpanElement>>;
|
|
6
|
+
declare const SelectTrigger: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
7
|
+
declare const SelectScrollUpButton: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectScrollUpButtonProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
8
|
+
declare const SelectScrollDownButton: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectScrollDownButtonProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
9
|
+
declare const SelectContent: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
10
|
+
declare const SelectLabel: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectLabelProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
11
|
+
declare const SelectItem: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
12
|
+
declare const SelectSeparator: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectSeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
13
|
+
export { Select, SelectGroup, SelectValue, SelectTrigger, SelectContent, SelectLabel, SelectItem, SelectSeparator, SelectScrollUpButton, SelectScrollDownButton, };
|
|
@@ -1,132 +1,26 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
2
|
import * as SelectPrimitive from "@radix-ui/react-select";
|
|
2
3
|
import { Check, ChevronDown, ChevronsUpDown, ChevronUp } from "lucide-react";
|
|
3
4
|
import * as React from "react";
|
|
4
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
5
5
|
import { cn } from "../lib/utils.js";
|
|
6
|
-
|
|
7
6
|
const Select = SelectPrimitive.Root;
|
|
8
7
|
const SelectGroup = SelectPrimitive.Group;
|
|
9
8
|
const SelectValue = SelectPrimitive.Value;
|
|
10
|
-
const SelectTrigger = React.forwardRef(
|
|
11
|
-
({ className, children, ...props }, ref) =>
|
|
12
|
-
_jsxs(SelectPrimitive.Trigger, {
|
|
13
|
-
ref: ref,
|
|
14
|
-
className: cn(
|
|
15
|
-
"flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",
|
|
16
|
-
className,
|
|
17
|
-
),
|
|
18
|
-
...props,
|
|
19
|
-
children: [
|
|
20
|
-
children,
|
|
21
|
-
_jsx(SelectPrimitive.Icon, {
|
|
22
|
-
asChild: true,
|
|
23
|
-
children: _jsx(ChevronsUpDown, { className: "h-4 w-4 opacity-50" }),
|
|
24
|
-
}),
|
|
25
|
-
],
|
|
26
|
-
}),
|
|
27
|
-
);
|
|
9
|
+
const SelectTrigger = React.forwardRef(({ className, children, ...props }, ref) => (_jsxs(SelectPrimitive.Trigger, { ref: ref, className: cn("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1", className), ...props, children: [children, _jsx(SelectPrimitive.Icon, { asChild: true, children: _jsx(ChevronsUpDown, { className: "h-4 w-4 opacity-50" }) })] })));
|
|
28
10
|
SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
|
|
29
|
-
const SelectScrollUpButton = React.forwardRef(({ className, ...props }, ref) =>
|
|
30
|
-
_jsx(SelectPrimitive.ScrollUpButton, {
|
|
31
|
-
ref: ref,
|
|
32
|
-
className: cn(
|
|
33
|
-
"flex cursor-default items-center justify-center py-1",
|
|
34
|
-
className,
|
|
35
|
-
),
|
|
36
|
-
...props,
|
|
37
|
-
children: _jsx(ChevronUp, { className: "h-4 w-4" }),
|
|
38
|
-
}),
|
|
39
|
-
);
|
|
11
|
+
const SelectScrollUpButton = React.forwardRef(({ className, ...props }, ref) => (_jsx(SelectPrimitive.ScrollUpButton, { ref: ref, className: cn("flex cursor-default items-center justify-center py-1", className), ...props, children: _jsx(ChevronUp, { className: "h-4 w-4" }) })));
|
|
40
12
|
SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
|
|
41
|
-
const SelectScrollDownButton = React.forwardRef(
|
|
42
|
-
({ className, ...props }, ref) =>
|
|
43
|
-
_jsx(SelectPrimitive.ScrollDownButton, {
|
|
44
|
-
ref: ref,
|
|
45
|
-
className: cn(
|
|
46
|
-
"flex cursor-default items-center justify-center py-1",
|
|
47
|
-
className,
|
|
48
|
-
),
|
|
49
|
-
...props,
|
|
50
|
-
children: _jsx(ChevronDown, { className: "h-4 w-4" }),
|
|
51
|
-
}),
|
|
52
|
-
);
|
|
13
|
+
const SelectScrollDownButton = React.forwardRef(({ className, ...props }, ref) => (_jsx(SelectPrimitive.ScrollDownButton, { ref: ref, className: cn("flex cursor-default items-center justify-center py-1", className), ...props, children: _jsx(ChevronDown, { className: "h-4 w-4" }) })));
|
|
53
14
|
SelectScrollDownButton.displayName =
|
|
54
|
-
|
|
55
|
-
const SelectContent = React.forwardRef(
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
children: _jsxs(SelectPrimitive.Content, {
|
|
59
|
-
ref: ref,
|
|
60
|
-
className: cn(
|
|
61
|
-
"relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
62
|
-
position === "popper" &&
|
|
63
|
-
"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
|
|
64
|
-
className,
|
|
65
|
-
),
|
|
66
|
-
position: position,
|
|
67
|
-
...props,
|
|
68
|
-
children: [
|
|
69
|
-
_jsx(SelectScrollUpButton, {}),
|
|
70
|
-
_jsx(SelectPrimitive.Viewport, {
|
|
71
|
-
className: cn(
|
|
72
|
-
"p-1",
|
|
73
|
-
position === "popper" &&
|
|
74
|
-
"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]",
|
|
75
|
-
),
|
|
76
|
-
children: children,
|
|
77
|
-
}),
|
|
78
|
-
_jsx(SelectScrollDownButton, {}),
|
|
79
|
-
],
|
|
80
|
-
}),
|
|
81
|
-
}),
|
|
82
|
-
);
|
|
15
|
+
SelectPrimitive.ScrollDownButton.displayName;
|
|
16
|
+
const SelectContent = React.forwardRef(({ className, children, position = "popper", ...props }, ref) => (_jsx(SelectPrimitive.Portal, { children: _jsxs(SelectPrimitive.Content, { ref: ref, className: cn("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2", position === "popper" &&
|
|
17
|
+
"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1", className), position: position, ...props, children: [_jsx(SelectScrollUpButton, {}), _jsx(SelectPrimitive.Viewport, { className: cn("p-1", position === "popper" &&
|
|
18
|
+
"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"), children: children }), _jsx(SelectScrollDownButton, {})] }) })));
|
|
83
19
|
SelectContent.displayName = SelectPrimitive.Content.displayName;
|
|
84
|
-
const SelectLabel = React.forwardRef(({ className, ...props }, ref) =>
|
|
85
|
-
_jsx(SelectPrimitive.Label, {
|
|
86
|
-
ref: ref,
|
|
87
|
-
className: cn("py-1.5 pl-8 pr-2 text-sm font-semibold", className),
|
|
88
|
-
...props,
|
|
89
|
-
}),
|
|
90
|
-
);
|
|
20
|
+
const SelectLabel = React.forwardRef(({ className, ...props }, ref) => (_jsx(SelectPrimitive.Label, { ref: ref, className: cn("py-1.5 pl-8 pr-2 text-sm font-semibold", className), ...props })));
|
|
91
21
|
SelectLabel.displayName = SelectPrimitive.Label.displayName;
|
|
92
|
-
const SelectItem = React.forwardRef(({ className, children, ...props }, ref) =>
|
|
93
|
-
_jsxs(SelectPrimitive.Item, {
|
|
94
|
-
ref: ref,
|
|
95
|
-
className: cn(
|
|
96
|
-
"relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
97
|
-
className,
|
|
98
|
-
),
|
|
99
|
-
...props,
|
|
100
|
-
children: [
|
|
101
|
-
_jsx("span", {
|
|
102
|
-
className:
|
|
103
|
-
"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",
|
|
104
|
-
children: _jsx(SelectPrimitive.ItemIndicator, {
|
|
105
|
-
children: _jsx(Check, { className: "h-4 w-4" }),
|
|
106
|
-
}),
|
|
107
|
-
}),
|
|
108
|
-
_jsx(SelectPrimitive.ItemText, { children: children }),
|
|
109
|
-
],
|
|
110
|
-
}),
|
|
111
|
-
);
|
|
22
|
+
const SelectItem = React.forwardRef(({ className, children, ...props }, ref) => (_jsxs(SelectPrimitive.Item, { ref: ref, className: cn("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50", className), ...props, children: [_jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: _jsx(SelectPrimitive.ItemIndicator, { children: _jsx(Check, { className: "h-4 w-4" }) }) }), _jsx(SelectPrimitive.ItemText, { children: children })] })));
|
|
112
23
|
SelectItem.displayName = SelectPrimitive.Item.displayName;
|
|
113
|
-
const SelectSeparator = React.forwardRef(({ className, ...props }, ref) =>
|
|
114
|
-
_jsx(SelectPrimitive.Separator, {
|
|
115
|
-
ref: ref,
|
|
116
|
-
className: cn("-mx-1 my-1 h-px bg-muted", className),
|
|
117
|
-
...props,
|
|
118
|
-
}),
|
|
119
|
-
);
|
|
24
|
+
const SelectSeparator = React.forwardRef(({ className, ...props }, ref) => (_jsx(SelectPrimitive.Separator, { ref: ref, className: cn("-mx-1 my-1 h-px bg-muted", className), ...props })));
|
|
120
25
|
SelectSeparator.displayName = SelectPrimitive.Separator.displayName;
|
|
121
|
-
export {
|
|
122
|
-
Select,
|
|
123
|
-
SelectGroup,
|
|
124
|
-
SelectValue,
|
|
125
|
-
SelectTrigger,
|
|
126
|
-
SelectContent,
|
|
127
|
-
SelectLabel,
|
|
128
|
-
SelectItem,
|
|
129
|
-
SelectSeparator,
|
|
130
|
-
SelectScrollUpButton,
|
|
131
|
-
SelectScrollDownButton,
|
|
132
|
-
};
|
|
26
|
+
export { Select, SelectGroup, SelectValue, SelectTrigger, SelectContent, SelectLabel, SelectItem, SelectSeparator, SelectScrollUpButton, SelectScrollDownButton, };
|
|
@@ -1,27 +1,7 @@
|
|
|
1
1
|
import * as TabsPrimitive from "@radix-ui/react-tabs";
|
|
2
2
|
import * as React from "react";
|
|
3
|
-
declare const Tabs: React.ForwardRefExoticComponent<
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
declare const
|
|
7
|
-
Omit<
|
|
8
|
-
TabsPrimitive.TabsListProps & React.RefAttributes<HTMLDivElement>,
|
|
9
|
-
"ref"
|
|
10
|
-
> &
|
|
11
|
-
React.RefAttributes<HTMLDivElement>
|
|
12
|
-
>;
|
|
13
|
-
declare const TabsTrigger: React.ForwardRefExoticComponent<
|
|
14
|
-
Omit<
|
|
15
|
-
TabsPrimitive.TabsTriggerProps & React.RefAttributes<HTMLButtonElement>,
|
|
16
|
-
"ref"
|
|
17
|
-
> &
|
|
18
|
-
React.RefAttributes<HTMLButtonElement>
|
|
19
|
-
>;
|
|
20
|
-
declare const TabsContent: React.ForwardRefExoticComponent<
|
|
21
|
-
Omit<
|
|
22
|
-
TabsPrimitive.TabsContentProps & React.RefAttributes<HTMLDivElement>,
|
|
23
|
-
"ref"
|
|
24
|
-
> &
|
|
25
|
-
React.RefAttributes<HTMLDivElement>
|
|
26
|
-
>;
|
|
3
|
+
declare const Tabs: React.ForwardRefExoticComponent<TabsPrimitive.TabsProps & React.RefAttributes<HTMLDivElement>>;
|
|
4
|
+
declare const TabsList: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsListProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
5
|
+
declare const TabsTrigger: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
6
|
+
declare const TabsContent: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
27
7
|
export { Tabs, TabsList, TabsTrigger, TabsContent };
|
|
@@ -1,40 +1,12 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1
2
|
import * as TabsPrimitive from "@radix-ui/react-tabs";
|
|
2
3
|
import * as React from "react";
|
|
3
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
4
4
|
import { cn } from "../lib/utils.js";
|
|
5
|
-
|
|
6
5
|
const Tabs = TabsPrimitive.Root;
|
|
7
|
-
const TabsList = React.forwardRef(({ className, ...props }, ref) =>
|
|
8
|
-
_jsx(TabsPrimitive.List, {
|
|
9
|
-
ref: ref,
|
|
10
|
-
className: cn(
|
|
11
|
-
"inline-flex h-10 items-center rounded-md bg-muted p-1 text-muted-foreground gap-1",
|
|
12
|
-
className,
|
|
13
|
-
),
|
|
14
|
-
...props,
|
|
15
|
-
}),
|
|
16
|
-
);
|
|
6
|
+
const TabsList = React.forwardRef(({ className, ...props }, ref) => (_jsx(TabsPrimitive.List, { ref: ref, className: cn("inline-flex h-10 items-center rounded-md bg-muted p-1 text-muted-foreground gap-1", className), ...props })));
|
|
17
7
|
TabsList.displayName = TabsPrimitive.List.displayName;
|
|
18
|
-
const TabsTrigger = React.forwardRef(({ className, ...props }, ref) =>
|
|
19
|
-
_jsx(TabsPrimitive.Trigger, {
|
|
20
|
-
ref: ref,
|
|
21
|
-
className: cn(
|
|
22
|
-
"inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",
|
|
23
|
-
className,
|
|
24
|
-
),
|
|
25
|
-
...props,
|
|
26
|
-
}),
|
|
27
|
-
);
|
|
8
|
+
const TabsTrigger = React.forwardRef(({ className, ...props }, ref) => (_jsx(TabsPrimitive.Trigger, { ref: ref, className: cn("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm", className), ...props })));
|
|
28
9
|
TabsTrigger.displayName = TabsPrimitive.Trigger.displayName;
|
|
29
|
-
const TabsContent = React.forwardRef(({ className, ...props }, ref) =>
|
|
30
|
-
_jsx(TabsPrimitive.Content, {
|
|
31
|
-
ref: ref,
|
|
32
|
-
className: cn(
|
|
33
|
-
"mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
|
|
34
|
-
className,
|
|
35
|
-
),
|
|
36
|
-
...props,
|
|
37
|
-
}),
|
|
38
|
-
);
|
|
10
|
+
const TabsContent = React.forwardRef(({ className, ...props }, ref) => (_jsx(TabsPrimitive.Content, { ref: ref, className: cn("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2", className), ...props })));
|
|
39
11
|
TabsContent.displayName = TabsPrimitive.Content.displayName;
|
|
40
12
|
export { Tabs, TabsList, TabsTrigger, TabsContent };
|