@townco/ui 0.1.8 → 0.1.9
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/core/hooks/index.d.ts.map +1 -0
- package/dist/core/hooks/index.js.map +1 -0
- package/dist/core/hooks/use-chat-input.d.ts +17 -17
- package/dist/core/hooks/use-chat-input.d.ts.map +1 -0
- package/dist/core/hooks/use-chat-input.js +64 -55
- package/dist/core/hooks/use-chat-input.js.map +1 -0
- package/dist/core/hooks/use-chat-messages.d.ts +11 -11
- package/dist/core/hooks/use-chat-messages.d.ts.map +1 -0
- package/dist/core/hooks/use-chat-messages.js +121 -114
- package/dist/core/hooks/use-chat-messages.js.map +1 -0
- package/dist/core/hooks/use-chat-session.d.ts +5 -5
- package/dist/core/hooks/use-chat-session.d.ts.map +1 -0
- package/dist/core/hooks/use-chat-session.js +78 -80
- package/dist/core/hooks/use-chat-session.js.map +1 -0
- package/dist/core/index.d.ts.map +1 -0
- package/dist/core/index.js.map +1 -0
- package/dist/core/schemas/chat.d.ts +83 -56
- package/dist/core/schemas/chat.d.ts.map +1 -0
- package/dist/core/schemas/chat.js +27 -25
- package/dist/core/schemas/chat.js.map +1 -0
- package/dist/core/schemas/index.d.ts.map +1 -0
- package/dist/core/schemas/index.js.map +1 -0
- package/dist/core/store/chat-store.d.ts +28 -22
- package/dist/core/store/chat-store.d.ts.map +1 -0
- package/dist/core/store/chat-store.js +59 -50
- package/dist/core/store/chat-store.js.map +1 -0
- package/dist/gui/components/Button.d.ts +23 -7
- package/dist/gui/components/Button.d.ts.map +1 -0
- package/dist/gui/components/Button.js +40 -27
- package/dist/gui/components/Button.js.map +1 -0
- package/dist/gui/components/Card.d.ts +26 -7
- package/dist/gui/components/Card.d.ts.map +1 -0
- package/dist/gui/components/Card.js +54 -8
- package/dist/gui/components/Card.js.map +1 -0
- package/dist/gui/components/ChatInput.d.ts.map +1 -0
- package/dist/gui/components/ChatInput.js.map +1 -0
- package/dist/gui/components/ChatInterface.d.ts +12 -0
- package/dist/gui/components/ChatInterface.d.ts.map +1 -0
- package/dist/gui/components/ChatInterface.js +204 -0
- package/dist/gui/components/ChatInterface.js.map +1 -0
- package/dist/gui/components/ChatPreview.d.ts +12 -0
- package/dist/gui/components/ChatPreview.d.ts.map +1 -0
- package/dist/gui/components/ChatPreview.js +214 -0
- package/dist/gui/components/ChatPreview.js.map +1 -0
- package/dist/gui/components/ChatSecondaryPanel.d.ts +14 -11
- package/dist/gui/components/ChatSecondaryPanel.d.ts.map +1 -0
- package/dist/gui/components/ChatSecondaryPanel.js +115 -38
- package/dist/gui/components/ChatSecondaryPanel.js.map +1 -0
- package/dist/gui/components/ChatStatus.d.ts +4 -2
- package/dist/gui/components/ChatStatus.d.ts.map +1 -0
- package/dist/gui/components/ChatStatus.js +45 -34
- package/dist/gui/components/ChatStatus.js.map +1 -0
- package/dist/gui/components/ChatView.d.ts +8 -0
- package/dist/gui/components/ChatView.d.ts.map +1 -0
- package/dist/gui/components/ChatView.js +42 -0
- package/dist/gui/components/ChatView.js.map +1 -0
- package/dist/gui/components/ConfigPanel.d.ts +20 -0
- package/dist/gui/components/ConfigPanel.d.ts.map +1 -0
- package/dist/gui/components/ConfigPanel.js +225 -0
- package/dist/gui/components/ConfigPanel.js.map +1 -0
- package/dist/gui/components/Conversation.d.ts +17 -14
- package/dist/gui/components/Conversation.d.ts.map +1 -0
- package/dist/gui/components/Conversation.js +143 -83
- package/dist/gui/components/Conversation.js.map +1 -0
- package/dist/gui/components/Dialog.d.ts +57 -11
- package/dist/gui/components/Dialog.d.ts.map +1 -0
- package/dist/gui/components/Dialog.js +84 -8
- package/dist/gui/components/Dialog.js.map +1 -0
- package/dist/gui/components/HeightTransition.d.ts +12 -7
- package/dist/gui/components/HeightTransition.d.ts.map +1 -0
- package/dist/gui/components/HeightTransition.js +88 -77
- package/dist/gui/components/HeightTransition.js.map +1 -0
- package/dist/gui/components/Input.d.ts +13 -6
- package/dist/gui/components/Input.d.ts.map +1 -0
- package/dist/gui/components/Input.js +27 -16
- package/dist/gui/components/Input.js.map +1 -0
- package/dist/gui/components/InputBox.d.ts +21 -0
- package/dist/gui/components/InputBox.d.ts.map +1 -0
- package/dist/gui/components/InputBox.js +90 -0
- package/dist/gui/components/InputBox.js.map +1 -0
- package/dist/gui/components/Label.d.ts +7 -1
- package/dist/gui/components/Label.d.ts.map +1 -0
- package/dist/gui/components/Label.js +12 -2
- package/dist/gui/components/Label.js.map +1 -0
- package/dist/gui/components/MarkdownRenderer.d.ts +6 -4
- package/dist/gui/components/MarkdownRenderer.d.ts.map +1 -0
- package/dist/gui/components/MarkdownRenderer.js +178 -81
- package/dist/gui/components/MarkdownRenderer.js.map +1 -0
- package/dist/gui/components/Message.d.ts.map +1 -0
- package/dist/gui/components/Message.js.map +1 -0
- package/dist/gui/components/MessageContent.d.ts +29 -22
- package/dist/gui/components/MessageContent.d.ts.map +1 -0
- package/dist/gui/components/MessageContent.js.map +1 -0
- package/dist/gui/components/MessageList.d.ts.map +1 -0
- package/dist/gui/components/MessageList.js.map +1 -0
- package/dist/gui/components/PlaygroundLayout.d.ts +14 -0
- package/dist/gui/components/PlaygroundLayout.d.ts.map +1 -0
- package/dist/gui/components/PlaygroundLayout.js +49 -0
- package/dist/gui/components/PlaygroundLayout.js.map +1 -0
- package/dist/gui/components/Reasoning.d.ts +30 -24
- package/dist/gui/components/Reasoning.d.ts.map +1 -0
- package/dist/gui/components/Reasoning.js +187 -60
- package/dist/gui/components/Reasoning.js.map +1 -0
- package/dist/gui/components/Response.d.ts +11 -9
- package/dist/gui/components/Response.d.ts.map +1 -0
- package/dist/gui/components/Response.js +229 -90
- package/dist/gui/components/Response.js.map +1 -0
- package/dist/gui/components/Select.d.ts +69 -10
- package/dist/gui/components/Select.d.ts.map +1 -0
- package/dist/gui/components/Select.js +118 -12
- package/dist/gui/components/Select.js.map +1 -0
- package/dist/gui/components/StatusBar.d.ts +12 -0
- package/dist/gui/components/StatusBar.d.ts.map +1 -0
- package/dist/gui/components/StatusBar.js +58 -0
- package/dist/gui/components/StatusBar.js.map +1 -0
- package/dist/gui/components/Tabs.d.ts +24 -4
- package/dist/gui/components/Tabs.d.ts.map +1 -0
- package/dist/gui/components/Tabs.js +32 -4
- package/dist/gui/components/Tabs.js.map +1 -0
- package/dist/gui/components/Task.d.ts +28 -24
- package/dist/gui/components/Task.d.ts.map +1 -0
- package/dist/gui/components/Task.js +164 -31
- package/dist/gui/components/Task.js.map +1 -0
- package/dist/gui/components/Textarea.d.ts +15 -7
- package/dist/gui/components/Textarea.d.ts.map +1 -0
- package/dist/gui/components/Textarea.js +63 -46
- package/dist/gui/components/Textarea.js.map +1 -0
- package/dist/gui/components/ThinkingBlock.d.ts +20 -10
- package/dist/gui/components/ThinkingBlock.d.ts.map +1 -0
- package/dist/gui/components/ThinkingBlock.js +134 -35
- package/dist/gui/components/ThinkingBlock.js.map +1 -0
- package/dist/gui/components/TodoList.d.ts +12 -10
- package/dist/gui/components/TodoList.d.ts.map +1 -0
- package/dist/gui/components/TodoList.js +22 -7
- package/dist/gui/components/TodoList.js.map +1 -0
- package/dist/gui/components/TodoListItem.d.ts +9 -6
- package/dist/gui/components/TodoListItem.d.ts.map +1 -0
- package/dist/gui/components/TodoListItem.js +18 -4
- package/dist/gui/components/TodoListItem.js.map +1 -0
- package/dist/gui/components/index.d.ts.map +1 -0
- package/dist/gui/components/index.js.map +1 -0
- package/dist/gui/index.d.ts.map +1 -0
- package/dist/gui/index.js.map +1 -0
- package/dist/gui/lib/utils.d.ts.map +1 -0
- package/dist/gui/lib/utils.js +1 -1
- package/dist/gui/lib/utils.js.map +1 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js.map +1 -0
- package/dist/index.test.js +0 -1
- package/dist/sdk/client/acp-client.d.ts +88 -76
- package/dist/sdk/client/acp-client.d.ts.map +1 -0
- package/dist/sdk/client/acp-client.js +215 -217
- package/dist/sdk/client/acp-client.js.map +1 -0
- package/dist/sdk/client/index.d.ts.map +1 -0
- package/dist/sdk/client/index.js.map +1 -0
- package/dist/sdk/index.d.ts.map +1 -0
- package/dist/sdk/index.js.map +1 -0
- package/dist/sdk/schemas/agent.d.ts +111 -64
- package/dist/sdk/schemas/agent.d.ts.map +1 -0
- package/dist/sdk/schemas/agent.js +24 -24
- package/dist/sdk/schemas/agent.js.map +1 -0
- package/dist/sdk/schemas/index.d.ts.map +1 -0
- package/dist/sdk/schemas/index.js.map +1 -0
- package/dist/sdk/schemas/message.d.ts +245 -147
- package/dist/sdk/schemas/message.d.ts.map +1 -0
- package/dist/sdk/schemas/message.js +40 -40
- package/dist/sdk/schemas/message.js.map +1 -0
- package/dist/sdk/schemas/session.d.ts +219 -135
- package/dist/sdk/schemas/session.d.ts.map +1 -0
- package/dist/sdk/schemas/session.js +27 -27
- package/dist/sdk/schemas/session.js.map +1 -0
- package/dist/sdk/transports/http.d.ts +55 -55
- package/dist/sdk/transports/http.d.ts.map +1 -0
- package/dist/sdk/transports/http.js +472 -469
- package/dist/sdk/transports/http.js.map +1 -0
- package/dist/sdk/transports/index.d.ts.map +1 -0
- package/dist/sdk/transports/index.js.map +1 -0
- package/dist/sdk/transports/stdio.d.ts +20 -20
- package/dist/sdk/transports/stdio.d.ts.map +1 -0
- package/dist/sdk/transports/stdio.js.map +1 -0
- package/dist/sdk/transports/types.d.ts +42 -42
- package/dist/sdk/transports/types.d.ts.map +1 -0
- package/dist/sdk/transports/types.js.map +1 -0
- package/dist/sdk/transports/websocket.d.ts +12 -12
- package/dist/sdk/transports/websocket.d.ts.map +1 -0
- package/dist/sdk/transports/websocket.js +52 -46
- package/dist/sdk/transports/websocket.js.map +1 -0
- package/dist/tui/components/ChatView.d.ts +4 -2
- package/dist/tui/components/ChatView.d.ts.map +1 -0
- package/dist/tui/components/ChatView.js +51 -18
- package/dist/tui/components/ChatView.js.map +1 -0
- package/dist/tui/components/GameOfLife.d.ts.map +1 -0
- package/dist/tui/components/GameOfLife.js +64 -35
- package/dist/tui/components/GameOfLife.js.map +1 -0
- package/dist/tui/components/InputBox.d.ts +18 -11
- package/dist/tui/components/InputBox.d.ts.map +1 -0
- package/dist/tui/components/InputBox.js +70 -10
- package/dist/tui/components/InputBox.js.map +1 -0
- package/dist/tui/components/MessageList.d.ts +4 -2
- package/dist/tui/components/MessageList.d.ts.map +1 -0
- package/dist/tui/components/MessageList.js +37 -10
- package/dist/tui/components/MessageList.js.map +1 -0
- package/dist/tui/components/ReadlineInput.d.ts +12 -6
- package/dist/tui/components/ReadlineInput.d.ts.map +1 -0
- package/dist/tui/components/ReadlineInput.js +252 -237
- package/dist/tui/components/ReadlineInput.js.map +1 -0
- package/dist/tui/components/SingleSelect.d.ts +15 -9
- package/dist/tui/components/SingleSelect.js +84 -43
- package/dist/tui/components/StatusBar.d.ts +11 -6
- package/dist/tui/components/StatusBar.d.ts.map +1 -0
- package/dist/tui/components/StatusBar.js +102 -67
- package/dist/tui/components/StatusBar.js.map +1 -0
- package/dist/tui/components/index.d.ts.map +1 -0
- package/dist/tui/components/index.js.map +1 -0
- package/dist/tui/index.d.ts.map +1 -0
- package/dist/tui/index.js.map +1 -0
- package/package.json +2 -2
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Input } from "./Input.js";
|
|
3
|
+
import { Label } from "./Label.js";
|
|
4
|
+
import {
|
|
5
|
+
Select,
|
|
6
|
+
SelectContent,
|
|
7
|
+
SelectItem,
|
|
8
|
+
SelectTrigger,
|
|
9
|
+
SelectValue,
|
|
10
|
+
} from "./Select.js";
|
|
11
|
+
|
|
12
|
+
const fontOptions = [
|
|
13
|
+
"Inter",
|
|
14
|
+
"Arial",
|
|
15
|
+
"Georgia",
|
|
16
|
+
"Courier New",
|
|
17
|
+
"Times New Roman",
|
|
18
|
+
"Verdana",
|
|
19
|
+
];
|
|
20
|
+
const statusOptions = [
|
|
21
|
+
"v0.1.0",
|
|
22
|
+
"Connected",
|
|
23
|
+
"Syncing...",
|
|
24
|
+
"Ready",
|
|
25
|
+
"Processing",
|
|
26
|
+
"Online",
|
|
27
|
+
];
|
|
28
|
+
export function ConfigPanel({
|
|
29
|
+
config,
|
|
30
|
+
status,
|
|
31
|
+
onConfigChange,
|
|
32
|
+
onStatusChange,
|
|
33
|
+
}) {
|
|
34
|
+
const handleColorSchemeChange = (newScheme) => {
|
|
35
|
+
onConfigChange({ ...config, colorScheme: newScheme });
|
|
36
|
+
};
|
|
37
|
+
const handleAccentColorChange = (e) => {
|
|
38
|
+
const newColor = e.target.value;
|
|
39
|
+
onConfigChange({ ...config, accentColor: newColor });
|
|
40
|
+
};
|
|
41
|
+
const handleTypographyChange = (newTypography) => {
|
|
42
|
+
onConfigChange({ ...config, typography: newTypography });
|
|
43
|
+
};
|
|
44
|
+
const handleFontSizeChange = (e) => {
|
|
45
|
+
const newSize = parseInt(e.target.value, 10);
|
|
46
|
+
if (!isNaN(newSize) && newSize > 0) {
|
|
47
|
+
onConfigChange({ ...config, fontSize: newSize });
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
const handleThinkingDisplayStyleChange = (newStyle) => {
|
|
51
|
+
onConfigChange({ ...config, thinkingDisplayStyle: newStyle });
|
|
52
|
+
};
|
|
53
|
+
const handleStatusChange = () => {
|
|
54
|
+
const currentIndex = statusOptions.indexOf(status);
|
|
55
|
+
const nextIndex = (currentIndex + 1) % statusOptions.length;
|
|
56
|
+
onStatusChange(statusOptions[nextIndex]);
|
|
57
|
+
};
|
|
58
|
+
return _jsxs("div", {
|
|
59
|
+
className:
|
|
60
|
+
"h-full p-6 bg-[var(--color-surface)] border-r border-[var(--color-border)] overflow-y-auto",
|
|
61
|
+
children: [
|
|
62
|
+
_jsx("h2", {
|
|
63
|
+
className: "text-2xl font-semibold mb-8 m-0 text-[var(--color-text)]",
|
|
64
|
+
children: "Design Configuration",
|
|
65
|
+
}),
|
|
66
|
+
_jsxs("div", {
|
|
67
|
+
className: "mb-6",
|
|
68
|
+
children: [
|
|
69
|
+
_jsx(Label, {
|
|
70
|
+
htmlFor: "color-scheme",
|
|
71
|
+
className: "mb-2 text-[var(--color-text)]",
|
|
72
|
+
children: "Color Scheme",
|
|
73
|
+
}),
|
|
74
|
+
_jsxs(Select, {
|
|
75
|
+
value: config.colorScheme,
|
|
76
|
+
onValueChange: handleColorSchemeChange,
|
|
77
|
+
children: [
|
|
78
|
+
_jsx(SelectTrigger, {
|
|
79
|
+
id: "color-scheme",
|
|
80
|
+
className:
|
|
81
|
+
"w-full bg-[var(--color-bg)] text-[var(--color-text)] border-[var(--color-border)] focus:border-[var(--color-accent)]",
|
|
82
|
+
children: _jsx(SelectValue, {}),
|
|
83
|
+
}),
|
|
84
|
+
_jsxs(SelectContent, {
|
|
85
|
+
className: "bg-[var(--color-bg)] border-[var(--color-border)]",
|
|
86
|
+
children: [
|
|
87
|
+
_jsx(SelectItem, { value: "light", children: "Light" }),
|
|
88
|
+
_jsx(SelectItem, { value: "dark", children: "Dark" }),
|
|
89
|
+
],
|
|
90
|
+
}),
|
|
91
|
+
],
|
|
92
|
+
}),
|
|
93
|
+
],
|
|
94
|
+
}),
|
|
95
|
+
_jsxs("div", {
|
|
96
|
+
className: "mb-6",
|
|
97
|
+
children: [
|
|
98
|
+
_jsx(Label, {
|
|
99
|
+
htmlFor: "accent-color",
|
|
100
|
+
className: "mb-2 text-[var(--color-text)]",
|
|
101
|
+
children: "Accent Color",
|
|
102
|
+
}),
|
|
103
|
+
_jsxs("div", {
|
|
104
|
+
className: "flex gap-2 items-center",
|
|
105
|
+
children: [
|
|
106
|
+
_jsx("input", {
|
|
107
|
+
type: "color",
|
|
108
|
+
id: "accent-color",
|
|
109
|
+
value: config.accentColor,
|
|
110
|
+
onChange: handleAccentColorChange,
|
|
111
|
+
className:
|
|
112
|
+
"w-[60px] h-10 border border-[var(--color-border)] rounded-md cursor-pointer bg-transparent",
|
|
113
|
+
}),
|
|
114
|
+
_jsx(Input, {
|
|
115
|
+
type: "text",
|
|
116
|
+
value: config.accentColor,
|
|
117
|
+
onChange: handleAccentColorChange,
|
|
118
|
+
pattern: "^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$",
|
|
119
|
+
className:
|
|
120
|
+
"flex-1 bg-[var(--color-bg)] text-[var(--color-text)] border-[var(--color-border)] focus:border-[var(--color-accent)]",
|
|
121
|
+
}),
|
|
122
|
+
],
|
|
123
|
+
}),
|
|
124
|
+
],
|
|
125
|
+
}),
|
|
126
|
+
_jsxs("div", {
|
|
127
|
+
className: "mb-6",
|
|
128
|
+
children: [
|
|
129
|
+
_jsx(Label, {
|
|
130
|
+
htmlFor: "typography",
|
|
131
|
+
className: "mb-2 text-[var(--color-text)]",
|
|
132
|
+
children: "Typography",
|
|
133
|
+
}),
|
|
134
|
+
_jsxs(Select, {
|
|
135
|
+
value: config.typography,
|
|
136
|
+
onValueChange: handleTypographyChange,
|
|
137
|
+
children: [
|
|
138
|
+
_jsx(SelectTrigger, {
|
|
139
|
+
id: "typography",
|
|
140
|
+
className:
|
|
141
|
+
"w-full bg-[var(--color-bg)] text-[var(--color-text)] border-[var(--color-border)] focus:border-[var(--color-accent)]",
|
|
142
|
+
children: _jsx(SelectValue, {}),
|
|
143
|
+
}),
|
|
144
|
+
_jsx(SelectContent, {
|
|
145
|
+
className: "bg-[var(--color-bg)] border-[var(--color-border)]",
|
|
146
|
+
children: fontOptions.map((font) =>
|
|
147
|
+
_jsx(SelectItem, { value: font, children: font }, font),
|
|
148
|
+
),
|
|
149
|
+
}),
|
|
150
|
+
],
|
|
151
|
+
}),
|
|
152
|
+
],
|
|
153
|
+
}),
|
|
154
|
+
_jsxs("div", {
|
|
155
|
+
className: "mb-6",
|
|
156
|
+
children: [
|
|
157
|
+
_jsx(Label, {
|
|
158
|
+
htmlFor: "font-size",
|
|
159
|
+
className: "mb-2 text-[var(--color-text)]",
|
|
160
|
+
children: "Font Size (px)",
|
|
161
|
+
}),
|
|
162
|
+
_jsx(Input, {
|
|
163
|
+
type: "number",
|
|
164
|
+
id: "font-size",
|
|
165
|
+
value: config.fontSize,
|
|
166
|
+
onChange: handleFontSizeChange,
|
|
167
|
+
min: "8",
|
|
168
|
+
max: "32",
|
|
169
|
+
className:
|
|
170
|
+
"w-full bg-[var(--color-bg)] text-[var(--color-text)] border-[var(--color-border)] focus:border-[var(--color-accent)]",
|
|
171
|
+
}),
|
|
172
|
+
],
|
|
173
|
+
}),
|
|
174
|
+
_jsxs("div", {
|
|
175
|
+
className: "mb-6",
|
|
176
|
+
children: [
|
|
177
|
+
_jsx(Label, {
|
|
178
|
+
htmlFor: "thinking-display-style",
|
|
179
|
+
className: "mb-2 text-[var(--color-text)]",
|
|
180
|
+
children: "Thinking Display Style",
|
|
181
|
+
}),
|
|
182
|
+
_jsxs(Select, {
|
|
183
|
+
value: config.thinkingDisplayStyle || "collapsible",
|
|
184
|
+
onValueChange: handleThinkingDisplayStyleChange,
|
|
185
|
+
children: [
|
|
186
|
+
_jsx(SelectTrigger, {
|
|
187
|
+
id: "thinking-display-style",
|
|
188
|
+
className:
|
|
189
|
+
"w-full bg-[var(--color-bg)] text-[var(--color-text)] border-[var(--color-border)] focus:border-[var(--color-accent)]",
|
|
190
|
+
children: _jsx(SelectValue, {}),
|
|
191
|
+
}),
|
|
192
|
+
_jsxs(SelectContent, {
|
|
193
|
+
className: "bg-[var(--color-bg)] border-[var(--color-border)]",
|
|
194
|
+
children: [
|
|
195
|
+
_jsx(SelectItem, {
|
|
196
|
+
value: "collapsible",
|
|
197
|
+
children: "Collapsible Section",
|
|
198
|
+
}),
|
|
199
|
+
_jsx(SelectItem, { value: "inline", children: "Inline" }),
|
|
200
|
+
],
|
|
201
|
+
}),
|
|
202
|
+
],
|
|
203
|
+
}),
|
|
204
|
+
],
|
|
205
|
+
}),
|
|
206
|
+
_jsxs("div", {
|
|
207
|
+
className: "mb-6",
|
|
208
|
+
children: [
|
|
209
|
+
_jsx(Label, {
|
|
210
|
+
htmlFor: "status-test",
|
|
211
|
+
className: "mb-2 text-[var(--color-text)]",
|
|
212
|
+
children: "Chat Status",
|
|
213
|
+
}),
|
|
214
|
+
_jsxs("button", {
|
|
215
|
+
onClick: handleStatusChange,
|
|
216
|
+
className:
|
|
217
|
+
"w-full px-4 py-2 rounded-lg bg-[var(--color-accent)] text-white font-medium hover:opacity-90 transition-opacity text-[var(--font-size)] font-[var(--font-family)]",
|
|
218
|
+
children: ["Change Status: ", status],
|
|
219
|
+
}),
|
|
220
|
+
],
|
|
221
|
+
}),
|
|
222
|
+
],
|
|
223
|
+
});
|
|
224
|
+
}
|
|
225
|
+
//# sourceMappingURL=ConfigPanel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConfigPanel.js","sourceRoot":"","sources":["../../../src/gui/components/ConfigPanel.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EACL,MAAM,EACN,aAAa,EACb,UAAU,EACV,aAAa,EACb,WAAW,GACZ,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAEnC,MAAM,WAAW,GAAG;IAClB,OAAO;IACP,OAAO;IACP,SAAS;IACT,aAAa;IACb,iBAAiB;IACjB,SAAS;CACV,CAAC;AAEF,MAAM,aAAa,GAAG;IACpB,QAAQ;IACR,WAAW;IACX,YAAY;IACZ,OAAO;IACP,YAAY;IACZ,QAAQ;CACT,CAAC;AAiBF,MAAM,UAAU,WAAW,CAAC,EAC1B,MAAM,EACN,MAAM,EACN,cAAc,EACd,cAAc,GACG;IACjB,MAAM,uBAAuB,GAAG,CAAC,SAA2B,EAAE,EAAE;QAC9D,cAAc,CAAC,EAAE,GAAG,MAAM,EAAE,WAAW,EAAE,SAAS,EAAE,CAAC,CAAC;IACxD,CAAC,CAAC;IAEF,MAAM,uBAAuB,GAAG,CAC9B,CAAsC,EACtC,EAAE;QACF,MAAM,QAAQ,GAAG,CAAC,CAAC,MAAM,CAAC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d,CAAC,GACY,IACT,IACL,EAEN,eAAK,SAAS,EAAC,MAAM,aACnB,KAAC,KAAK,IAAC,OAAO,EAAC,WAAW,EAAC,SAAS,EAAC,+BAA+B,+BAE5D,EACR,KAAC,KAAK,IACJ,IAAI,EAAC,QAAQ,EACb,EAAE,EAAC,WAAW,EACd,KAAK,EAAE,MAAM,CAAC,QAAQ,EACtB,QAAQ,EAAE,oBAAoB,EAC9B,GAAG,EAAC,GAAG,EACP,GAAG,EAAC,IAAI,EACR,SAAS,EAAC,sHAAsH,GAChI,IACE,EAEN,eAAK,SAAS,EAAC,MAAM,aACnB,KAAC,KAAK,IACJ,OAAO,EAAC,wBAAwB,EAChC,SAAS,EAAC,+BAA+B,uCAGnC,EACR,MAAC,MAAM,IACL,KAAK,EAAE,MAAM,CAAC,oBAAoB,IAAI,aAAa,EACnD,aAAa,EAAE,gCAAgC,aAE/C,KAAC,aAAa,IACZ,EAAE,EAAC,wBAAwB,EAC3B,SAAS,EAAC,sHAAsH,YAEhI,KAAC,WAAW,KAAG,GACD,EAChB,MAAC,aAAa,IAAC,SAAS,EAAC,mDAAmD,aAC1E,KAAC,UAAU,IAAC,KAAK,EAAC,aAAa,oCAAiC,EAChE,KAAC,UAAU,IAAC,KAAK,EAAC,QAAQ,uBAAoB,IAChC,IACT,IACL,EAEN,eAAK,SAAS,EAAC,MAAM,aACnB,KAAC,KAAK,IAAC,OAAO,EAAC,aAAa,EAAC,SAAS,EAAC,+BAA+B,4BAE9D,EACR,kBACE,OAAO,EAAE,kBAAkB,EAC3B,SAAS,EAAC,mKAAmK,gCAE7J,MAAM,IACf,IACL,IACF,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -3,18 +3,21 @@ import * as React from "react";
|
|
|
3
3
|
* Conversation component inspired by shadcn.io/ai
|
|
4
4
|
* Auto-scrolling chat container that maintains scroll position during streaming
|
|
5
5
|
*/
|
|
6
|
-
export interface ConversationProps
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
6
|
+
export interface ConversationProps
|
|
7
|
+
extends React.HTMLAttributes<HTMLDivElement> {
|
|
8
|
+
/** Whether to auto-scroll to bottom on new messages */
|
|
9
|
+
autoScroll?: boolean;
|
|
10
|
+
/** Whether content is currently streaming */
|
|
11
|
+
isStreaming?: boolean;
|
|
12
|
+
/** Scroll behavior type */
|
|
13
|
+
scrollBehavior?: ScrollBehavior;
|
|
14
|
+
/** Threshold for considering user at bottom (px from bottom) */
|
|
15
|
+
scrollThreshold?: number;
|
|
16
|
+
/** Show scroll-to-bottom button when not at bottom */
|
|
17
|
+
showScrollButton?: boolean;
|
|
18
|
+
/** Custom scroll button */
|
|
19
|
+
scrollButton?: React.ReactNode;
|
|
19
20
|
}
|
|
20
|
-
export declare const Conversation: React.ForwardRefExoticComponent<
|
|
21
|
+
export declare const Conversation: React.ForwardRefExoticComponent<
|
|
22
|
+
ConversationProps & React.RefAttributes<HTMLDivElement>
|
|
23
|
+
>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Conversation.d.ts","sourceRoot":"","sources":["../../../src/gui/components/Conversation.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B;;;GAGG;AAEH,MAAM,WAAW,iBACf,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IAC5C,uDAAuD;IACvD,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,6CAA6C;IAC7C,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,2BAA2B;IAC3B,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC,gEAAgE;IAChE,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,sDAAsD;IACtD,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,2BAA2B;IAC3B,YAAY,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAChC;AAED,eAAO,MAAM,YAAY,0FAsJxB,CAAC"}
|
|
@@ -1,87 +1,147 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
1
|
import * as React from "react";
|
|
3
2
|
import { useCallback, useEffect, useRef, useState } from "react";
|
|
3
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
4
4
|
import { cn } from "../lib/utils.js";
|
|
5
|
-
export const Conversation = React.forwardRef(
|
|
6
|
-
|
|
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
|
-
|
|
5
|
+
export const Conversation = React.forwardRef(
|
|
6
|
+
(
|
|
7
|
+
{
|
|
8
|
+
autoScroll = true,
|
|
9
|
+
isStreaming = false,
|
|
10
|
+
scrollBehavior = "smooth",
|
|
11
|
+
scrollThreshold = 100,
|
|
12
|
+
showScrollButton = true,
|
|
13
|
+
scrollButton,
|
|
14
|
+
className,
|
|
15
|
+
children,
|
|
16
|
+
...props
|
|
17
|
+
},
|
|
18
|
+
ref,
|
|
19
|
+
) => {
|
|
20
|
+
const containerRef = useRef(null);
|
|
21
|
+
const [isNearBottom, setIsNearBottom] = useState(true);
|
|
22
|
+
const [showButton, setShowButton] = useState(false);
|
|
23
|
+
const lastScrollTopRef = useRef(0);
|
|
24
|
+
// Combine refs
|
|
25
|
+
React.useImperativeHandle(ref, () => {
|
|
26
|
+
if (!containerRef.current) {
|
|
27
|
+
throw new Error("Container ref not initialized");
|
|
28
|
+
}
|
|
29
|
+
return containerRef.current;
|
|
30
|
+
});
|
|
31
|
+
// Check if user is near bottom of scroll area
|
|
32
|
+
const checkScrollPosition = useCallback(() => {
|
|
33
|
+
const container = containerRef.current;
|
|
34
|
+
if (!container) return;
|
|
35
|
+
const { scrollTop, scrollHeight, clientHeight } = container;
|
|
36
|
+
const distanceFromBottom = scrollHeight - scrollTop - clientHeight;
|
|
37
|
+
const nearBottom = distanceFromBottom < scrollThreshold;
|
|
38
|
+
setIsNearBottom(nearBottom);
|
|
39
|
+
setShowButton(!nearBottom && showScrollButton);
|
|
40
|
+
lastScrollTopRef.current = scrollTop;
|
|
41
|
+
}, [scrollThreshold, showScrollButton]);
|
|
42
|
+
// Scroll to bottom
|
|
43
|
+
const scrollToBottom = useCallback(
|
|
44
|
+
(behavior = scrollBehavior) => {
|
|
45
|
+
const container = containerRef.current;
|
|
46
|
+
if (!container) return;
|
|
47
|
+
container.scrollTo({
|
|
48
|
+
top: container.scrollHeight,
|
|
49
|
+
behavior,
|
|
50
|
+
});
|
|
51
|
+
},
|
|
52
|
+
[scrollBehavior],
|
|
53
|
+
);
|
|
54
|
+
// Auto-scroll when new content appears and user is near bottom
|
|
55
|
+
useEffect(() => {
|
|
56
|
+
if (!autoScroll) return;
|
|
57
|
+
const container = containerRef.current;
|
|
58
|
+
if (!container) return;
|
|
59
|
+
// Always scroll during streaming if user is near bottom
|
|
60
|
+
if (isStreaming && isNearBottom) {
|
|
61
|
+
scrollToBottom("auto");
|
|
62
|
+
}
|
|
63
|
+
// Scroll on new messages if near bottom
|
|
64
|
+
else if (!isStreaming && isNearBottom) {
|
|
65
|
+
scrollToBottom();
|
|
66
|
+
}
|
|
67
|
+
}, [autoScroll, isStreaming, isNearBottom, scrollToBottom]);
|
|
68
|
+
// Set up scroll listener
|
|
69
|
+
useEffect(() => {
|
|
70
|
+
const container = containerRef.current;
|
|
71
|
+
if (!container) return;
|
|
72
|
+
const handleScroll = () => {
|
|
73
|
+
checkScrollPosition();
|
|
74
|
+
};
|
|
75
|
+
container.addEventListener("scroll", handleScroll, { passive: true });
|
|
76
|
+
// Check initial position
|
|
77
|
+
checkScrollPosition();
|
|
78
|
+
return () => {
|
|
79
|
+
container.removeEventListener("scroll", handleScroll);
|
|
80
|
+
};
|
|
81
|
+
}, [checkScrollPosition]);
|
|
82
|
+
// Watch for resize events
|
|
83
|
+
useEffect(() => {
|
|
84
|
+
const container = containerRef.current;
|
|
85
|
+
if (!container) return;
|
|
86
|
+
const resizeObserver = new ResizeObserver(() => {
|
|
87
|
+
if (isNearBottom && autoScroll) {
|
|
88
|
+
scrollToBottom("auto");
|
|
89
|
+
}
|
|
90
|
+
});
|
|
91
|
+
resizeObserver.observe(container);
|
|
92
|
+
return () => {
|
|
93
|
+
resizeObserver.disconnect();
|
|
94
|
+
};
|
|
95
|
+
}, [isNearBottom, autoScroll, scrollToBottom]);
|
|
96
|
+
return _jsxs("div", {
|
|
97
|
+
className: "relative flex-1",
|
|
98
|
+
children: [
|
|
99
|
+
_jsx("div", {
|
|
100
|
+
ref: containerRef,
|
|
101
|
+
className: cn(
|
|
102
|
+
"h-full overflow-y-auto overflow-x-hidden",
|
|
103
|
+
"scrollbar-thin scrollbar-thumb-[border] scrollbar-track-transparent",
|
|
104
|
+
className,
|
|
105
|
+
),
|
|
106
|
+
...props,
|
|
107
|
+
children: _jsx("div", {
|
|
108
|
+
className: "flex flex-col gap-4 px-4 py-4",
|
|
109
|
+
children: children,
|
|
110
|
+
}),
|
|
111
|
+
}),
|
|
112
|
+
showButton &&
|
|
113
|
+
_jsx("div", {
|
|
114
|
+
className: "absolute bottom-4 left-1/2 -translate-x-1/2 z-10",
|
|
115
|
+
children:
|
|
116
|
+
scrollButton ||
|
|
117
|
+
_jsxs("button", {
|
|
118
|
+
type: "button",
|
|
119
|
+
onClick: () => scrollToBottom(),
|
|
120
|
+
className:
|
|
121
|
+
"px-4 py-2 rounded-full bg-card border border-border shadow-lg hover:shadow-xl hover:bg-card/90 transition-all text-sm font-medium text-foreground flex items-center gap-2",
|
|
122
|
+
"aria-label": "Scroll to bottom",
|
|
123
|
+
children: [
|
|
124
|
+
_jsx("svg", {
|
|
125
|
+
className: "w-4 h-4",
|
|
126
|
+
fill: "none",
|
|
127
|
+
stroke: "currentColor",
|
|
128
|
+
viewBox: "0 0 24 24",
|
|
129
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
130
|
+
role: "img",
|
|
131
|
+
"aria-label": "Down arrow",
|
|
132
|
+
children: _jsx("path", {
|
|
133
|
+
strokeLinecap: "round",
|
|
134
|
+
strokeLinejoin: "round",
|
|
135
|
+
strokeWidth: 2,
|
|
136
|
+
d: "M19 14l-7 7m0 0l-7-7m7 7V3",
|
|
137
|
+
}),
|
|
138
|
+
}),
|
|
139
|
+
"Scroll to bottom",
|
|
140
|
+
],
|
|
141
|
+
}),
|
|
142
|
+
}),
|
|
143
|
+
],
|
|
144
|
+
});
|
|
145
|
+
},
|
|
146
|
+
);
|
|
87
147
|
Conversation.displayName = "Conversation";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Conversation.js","sourceRoot":"","sources":["../../../src/gui/components/Conversation.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AACjE,OAAO,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAC;AAuBrC,MAAM,CAAC,MAAM,YAAY,GAAG,KAAK,CAAC,UAAU,CAC1C,CACE,EACE,UAAU,GAAG,IAAI,EACjB,WAAW,GAAG,KAAK,EACnB,cAAc,GAAG,QAAQ,EACzB,eAAe,GAAG,GAAG,EACrB,gBAAgB,GAAG,IAAI,EACvB,YAAY,EACZ,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACT,EACD,GAAG,EACH,EAAE;IACF,MAAM,YAAY,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAC;IAClD,MAAM,CAAC,YAAY,EAAE,eAAe,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC;IACvD,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IACpD,MAAM,gBAAgB,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;IAEnC,eAAe;IACf,KAAK,CAAC,mBAAmB,CAAC,GAAG,EAAE,GAAG,EAAE,CAAC,YAAY,CAAC,OAAQ,CAAC,CAAC;IAE5D,8CAA8C;IAC9C,MAAM,mBAAmB,GAAG,WAAW,CAAC,GAAG,EAAE;QAC3C,MAAM,SAAS,GAAG,YAAY,CAAC,OAAO,CAAC;QACvC,IAAI,CAAC,SAAS;YAAE,OAAO;QAEvB,MAAM,EAAE,SAAS,EAAE,YAAY,EAAE,YAAY,EAAE,GAAG,SAAS,CAAC;QAC5D,MAAM,kBAAkB,GAAG,YAAY,GAA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AC,SAAS,EACnB,IAAI,EAAC,MAAM,EACX,MAAM,EAAC,cAAc,EACrB,OAAO,EAAC,WAAW,EACnB,KAAK,EAAC,4BAA4B,YAElC,eACE,aAAa,EAAC,OAAO,EACrB,cAAc,EAAC,OAAO,EACtB,WAAW,EAAE,CAAC,EACd,CAAC,EAAC,4BAA4B,GAC9B,GACE,wBAEC,CACV,GACG,CACP,IACG,CACP,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,YAAY,CAAC,WAAW,GAAG,cAAc,CAAC"}
|
|
@@ -1,19 +1,65 @@
|
|
|
1
1
|
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
declare const Dialog: React.FC<DialogPrimitive.DialogProps>;
|
|
4
|
-
declare const DialogTrigger: React.ForwardRefExoticComponent<
|
|
4
|
+
declare const DialogTrigger: React.ForwardRefExoticComponent<
|
|
5
|
+
DialogPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>
|
|
6
|
+
>;
|
|
5
7
|
declare const DialogPortal: React.FC<DialogPrimitive.DialogPortalProps>;
|
|
6
|
-
declare const DialogClose: React.ForwardRefExoticComponent<
|
|
7
|
-
|
|
8
|
-
|
|
8
|
+
declare const DialogClose: React.ForwardRefExoticComponent<
|
|
9
|
+
DialogPrimitive.DialogCloseProps & React.RefAttributes<HTMLButtonElement>
|
|
10
|
+
>;
|
|
11
|
+
declare const DialogOverlay: React.ForwardRefExoticComponent<
|
|
12
|
+
Omit<
|
|
13
|
+
DialogPrimitive.DialogOverlayProps & React.RefAttributes<HTMLDivElement>,
|
|
14
|
+
"ref"
|
|
15
|
+
> &
|
|
16
|
+
React.RefAttributes<HTMLDivElement>
|
|
17
|
+
>;
|
|
18
|
+
declare const DialogContent: React.ForwardRefExoticComponent<
|
|
19
|
+
Omit<
|
|
20
|
+
DialogPrimitive.DialogContentProps & React.RefAttributes<HTMLDivElement>,
|
|
21
|
+
"ref"
|
|
22
|
+
> &
|
|
23
|
+
React.RefAttributes<HTMLDivElement>
|
|
24
|
+
>;
|
|
9
25
|
declare const DialogHeader: {
|
|
10
|
-
|
|
11
|
-
|
|
26
|
+
({
|
|
27
|
+
className,
|
|
28
|
+
...props
|
|
29
|
+
}: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
|
30
|
+
displayName: string;
|
|
12
31
|
};
|
|
13
32
|
declare const DialogFooter: {
|
|
14
|
-
|
|
15
|
-
|
|
33
|
+
({
|
|
34
|
+
className,
|
|
35
|
+
...props
|
|
36
|
+
}: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
|
37
|
+
displayName: string;
|
|
38
|
+
};
|
|
39
|
+
declare const DialogTitle: React.ForwardRefExoticComponent<
|
|
40
|
+
Omit<
|
|
41
|
+
DialogPrimitive.DialogTitleProps & React.RefAttributes<HTMLHeadingElement>,
|
|
42
|
+
"ref"
|
|
43
|
+
> &
|
|
44
|
+
React.RefAttributes<HTMLHeadingElement>
|
|
45
|
+
>;
|
|
46
|
+
declare const DialogDescription: React.ForwardRefExoticComponent<
|
|
47
|
+
Omit<
|
|
48
|
+
DialogPrimitive.DialogDescriptionProps &
|
|
49
|
+
React.RefAttributes<HTMLParagraphElement>,
|
|
50
|
+
"ref"
|
|
51
|
+
> &
|
|
52
|
+
React.RefAttributes<HTMLParagraphElement>
|
|
53
|
+
>;
|
|
54
|
+
export {
|
|
55
|
+
Dialog,
|
|
56
|
+
DialogPortal,
|
|
57
|
+
DialogOverlay,
|
|
58
|
+
DialogClose,
|
|
59
|
+
DialogTrigger,
|
|
60
|
+
DialogContent,
|
|
61
|
+
DialogHeader,
|
|
62
|
+
DialogFooter,
|
|
63
|
+
DialogTitle,
|
|
64
|
+
DialogDescription,
|
|
16
65
|
};
|
|
17
|
-
declare const DialogTitle: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
|
|
18
|
-
declare const DialogDescription: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
|
|
19
|
-
export { Dialog, DialogPortal, DialogOverlay, DialogClose, DialogTrigger, DialogContent, DialogHeader, DialogFooter, DialogTitle, DialogDescription, };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Dialog.d.ts","sourceRoot":"","sources":["../../../src/gui/components/Dialog.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAC;AAK1D,QAAA,MAAM,MAAM,uCAAuB,CAAC;AAEpC,QAAA,MAAM,aAAa,8GAA0B,CAAC;AAE9C,QAAA,MAAM,YAAY,6CAAyB,CAAC;AAE5C,QAAA,MAAM,WAAW,4GAAwB,CAAC;AAE1C,QAAA,MAAM,aAAa,8JAYjB,CAAC;AAGH,QAAA,MAAM,aAAa,8JAqBjB,CAAC;AAGH,QAAA,MAAM,YAAY;8BAGf,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;;CAQtC,CAAC;AAGF,QAAA,MAAM,YAAY;8BAGf,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;;CAQtC,CAAC;AAGF,QAAA,MAAM,WAAW,oKAYf,CAAC;AAGH,QAAA,MAAM,iBAAiB,8KASrB,CAAC;AAGH,OAAO,EACL,MAAM,EACN,YAAY,EACZ,aAAa,EACb,WAAW,EACX,aAAa,EACb,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,iBAAiB,GAClB,CAAC"}
|