@timbal-ai/timbal-react 0.7.0 → 0.8.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/CHANGELOG.md +32 -0
- package/README.md +11 -0
- package/dist/app.cjs +10 -4
- package/dist/app.d.cts +2 -2
- package/dist/app.d.ts +2 -2
- package/dist/app.esm.js +4 -4
- package/dist/{chart-artifact-bWUa-iSG.d.cts → chart-artifact-C2m891nx.d.cts} +1 -1
- package/dist/{chart-artifact-BFDz8Tf9.d.ts → chart-artifact-CqqhdSR9.d.ts} +1 -1
- package/dist/{chat-CWtQWDtJ.d.cts → chat-Bed4FQSl.d.cts} +10 -0
- package/dist/{chat-CWtQWDtJ.d.ts → chat-Bed4FQSl.d.ts} +10 -0
- package/dist/chat.cjs +5 -1
- package/dist/chat.d.cts +1 -1
- package/dist/chat.d.ts +1 -1
- package/dist/chat.esm.js +3 -3
- package/dist/{chunk-7O5VY3TP.esm.js → chunk-4AO3HCAR.esm.js} +4 -4
- package/dist/chunk-LSEUKTU5.esm.js +435 -0
- package/dist/{chunk-2XZ3S4OP.esm.js → chunk-QKO67F4V.esm.js} +39 -0
- package/dist/{chunk-TLUF2RUL.esm.js → chunk-VVTTLIGT.esm.js} +6 -2
- package/dist/{chunk-TDIJHV4I.esm.js → chunk-YNDXBN6C.esm.js} +1 -1
- package/dist/{chunk-533MK5EA.esm.js → chunk-ZEDE2TWQ.esm.js} +8 -6
- package/dist/{chunk-N3PYVTY5.esm.js → chunk-ZG5NBHOS.esm.js} +2 -2
- package/dist/index.cjs +509 -4
- package/dist/index.d.cts +5 -5
- package/dist/index.d.ts +5 -5
- package/dist/index.esm.js +70 -6
- package/dist/studio.cjs +5 -1
- package/dist/studio.d.cts +2 -2
- package/dist/studio.d.ts +2 -2
- package/dist/studio.esm.js +5 -5
- package/dist/styles.css +8 -4
- package/dist/ui.cjs +507 -8
- package/dist/ui.d.cts +45 -2
- package/dist/ui.d.ts +45 -2
- package/dist/ui.esm.js +66 -2
- package/dist/{welcome-C89Mgdaw.d.cts → welcome-COOb05a5.d.cts} +1 -1
- package/dist/{welcome-BBmB3tl7.d.ts → welcome-DE08m9ca.d.ts} +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,435 @@
|
|
|
1
|
+
import {
|
|
2
|
+
cn
|
|
3
|
+
} from "./chunk-QKO67F4V.esm.js";
|
|
4
|
+
|
|
5
|
+
// src/ui/dropdown-menu.tsx
|
|
6
|
+
import { DropdownMenu as DropdownMenuPrimitive } from "radix-ui";
|
|
7
|
+
import { CheckIcon, ChevronRightIcon, CircleIcon } from "lucide-react";
|
|
8
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
|
+
function DropdownMenu({
|
|
10
|
+
...props
|
|
11
|
+
}) {
|
|
12
|
+
return /* @__PURE__ */ jsx(DropdownMenuPrimitive.Root, { "data-slot": "dropdown-menu", ...props });
|
|
13
|
+
}
|
|
14
|
+
function DropdownMenuTrigger({
|
|
15
|
+
...props
|
|
16
|
+
}) {
|
|
17
|
+
return /* @__PURE__ */ jsx(
|
|
18
|
+
DropdownMenuPrimitive.Trigger,
|
|
19
|
+
{
|
|
20
|
+
"data-slot": "dropdown-menu-trigger",
|
|
21
|
+
...props
|
|
22
|
+
}
|
|
23
|
+
);
|
|
24
|
+
}
|
|
25
|
+
function DropdownMenuGroup({
|
|
26
|
+
...props
|
|
27
|
+
}) {
|
|
28
|
+
return /* @__PURE__ */ jsx(DropdownMenuPrimitive.Group, { "data-slot": "dropdown-menu-group", ...props });
|
|
29
|
+
}
|
|
30
|
+
function DropdownMenuContent({
|
|
31
|
+
className,
|
|
32
|
+
sideOffset = 4,
|
|
33
|
+
...props
|
|
34
|
+
}) {
|
|
35
|
+
return /* @__PURE__ */ jsx(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx(
|
|
36
|
+
DropdownMenuPrimitive.Content,
|
|
37
|
+
{
|
|
38
|
+
"data-slot": "dropdown-menu-content",
|
|
39
|
+
sideOffset,
|
|
40
|
+
className: cn(
|
|
41
|
+
"bg-popover text-popover-foreground 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 z-[80] max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[8rem] origin-[var(--radix-dropdown-menu-content-transform-origin)] overflow-x-hidden overflow-y-auto rounded-lg border border-border p-1 shadow-card",
|
|
42
|
+
className
|
|
43
|
+
),
|
|
44
|
+
...props
|
|
45
|
+
}
|
|
46
|
+
) });
|
|
47
|
+
}
|
|
48
|
+
function DropdownMenuItem({
|
|
49
|
+
className,
|
|
50
|
+
inset,
|
|
51
|
+
variant = "default",
|
|
52
|
+
...props
|
|
53
|
+
}) {
|
|
54
|
+
return /* @__PURE__ */ jsx(
|
|
55
|
+
DropdownMenuPrimitive.Item,
|
|
56
|
+
{
|
|
57
|
+
"data-slot": "dropdown-menu-item",
|
|
58
|
+
"data-inset": inset,
|
|
59
|
+
"data-variant": variant,
|
|
60
|
+
className: cn(
|
|
61
|
+
"relative flex cursor-default items-center gap-2 rounded-md px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground",
|
|
62
|
+
className
|
|
63
|
+
),
|
|
64
|
+
...props
|
|
65
|
+
}
|
|
66
|
+
);
|
|
67
|
+
}
|
|
68
|
+
function DropdownMenuCheckboxItem({
|
|
69
|
+
className,
|
|
70
|
+
children,
|
|
71
|
+
checked,
|
|
72
|
+
...props
|
|
73
|
+
}) {
|
|
74
|
+
return /* @__PURE__ */ jsxs(
|
|
75
|
+
DropdownMenuPrimitive.CheckboxItem,
|
|
76
|
+
{
|
|
77
|
+
"data-slot": "dropdown-menu-checkbox-item",
|
|
78
|
+
className: cn(
|
|
79
|
+
"relative flex cursor-default items-center gap-2 rounded-md py-1.5 pr-2 pl-8 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
80
|
+
className
|
|
81
|
+
),
|
|
82
|
+
checked,
|
|
83
|
+
...props,
|
|
84
|
+
children: [
|
|
85
|
+
/* @__PURE__ */ jsx("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon, { className: "size-4" }) }) }),
|
|
86
|
+
children
|
|
87
|
+
]
|
|
88
|
+
}
|
|
89
|
+
);
|
|
90
|
+
}
|
|
91
|
+
function DropdownMenuRadioGroup({
|
|
92
|
+
...props
|
|
93
|
+
}) {
|
|
94
|
+
return /* @__PURE__ */ jsx(
|
|
95
|
+
DropdownMenuPrimitive.RadioGroup,
|
|
96
|
+
{
|
|
97
|
+
"data-slot": "dropdown-menu-radio-group",
|
|
98
|
+
...props
|
|
99
|
+
}
|
|
100
|
+
);
|
|
101
|
+
}
|
|
102
|
+
function DropdownMenuRadioItem({
|
|
103
|
+
className,
|
|
104
|
+
children,
|
|
105
|
+
...props
|
|
106
|
+
}) {
|
|
107
|
+
return /* @__PURE__ */ jsxs(
|
|
108
|
+
DropdownMenuPrimitive.RadioItem,
|
|
109
|
+
{
|
|
110
|
+
"data-slot": "dropdown-menu-radio-item",
|
|
111
|
+
className: cn(
|
|
112
|
+
"relative flex cursor-default items-center gap-2 rounded-md py-1.5 pr-2 pl-8 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
113
|
+
className
|
|
114
|
+
),
|
|
115
|
+
...props,
|
|
116
|
+
children: [
|
|
117
|
+
/* @__PURE__ */ jsx("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(CircleIcon, { className: "size-2 fill-current" }) }) }),
|
|
118
|
+
children
|
|
119
|
+
]
|
|
120
|
+
}
|
|
121
|
+
);
|
|
122
|
+
}
|
|
123
|
+
function DropdownMenuLabel({
|
|
124
|
+
className,
|
|
125
|
+
inset,
|
|
126
|
+
...props
|
|
127
|
+
}) {
|
|
128
|
+
return /* @__PURE__ */ jsx(
|
|
129
|
+
DropdownMenuPrimitive.Label,
|
|
130
|
+
{
|
|
131
|
+
"data-slot": "dropdown-menu-label",
|
|
132
|
+
"data-inset": inset,
|
|
133
|
+
className: cn(
|
|
134
|
+
"px-2 py-1.5 text-xs font-medium text-muted-foreground data-[inset]:pl-8",
|
|
135
|
+
className
|
|
136
|
+
),
|
|
137
|
+
...props
|
|
138
|
+
}
|
|
139
|
+
);
|
|
140
|
+
}
|
|
141
|
+
function DropdownMenuSeparator({
|
|
142
|
+
className,
|
|
143
|
+
...props
|
|
144
|
+
}) {
|
|
145
|
+
return /* @__PURE__ */ jsx(
|
|
146
|
+
DropdownMenuPrimitive.Separator,
|
|
147
|
+
{
|
|
148
|
+
"data-slot": "dropdown-menu-separator",
|
|
149
|
+
className: cn("-mx-1 my-1 h-px bg-border", className),
|
|
150
|
+
...props
|
|
151
|
+
}
|
|
152
|
+
);
|
|
153
|
+
}
|
|
154
|
+
function DropdownMenuShortcut({
|
|
155
|
+
className,
|
|
156
|
+
...props
|
|
157
|
+
}) {
|
|
158
|
+
return /* @__PURE__ */ jsx(
|
|
159
|
+
"span",
|
|
160
|
+
{
|
|
161
|
+
"data-slot": "dropdown-menu-shortcut",
|
|
162
|
+
className: cn(
|
|
163
|
+
"ml-auto text-xs tracking-widest text-muted-foreground",
|
|
164
|
+
className
|
|
165
|
+
),
|
|
166
|
+
...props
|
|
167
|
+
}
|
|
168
|
+
);
|
|
169
|
+
}
|
|
170
|
+
function DropdownMenuSub({
|
|
171
|
+
...props
|
|
172
|
+
}) {
|
|
173
|
+
return /* @__PURE__ */ jsx(DropdownMenuPrimitive.Sub, { "data-slot": "dropdown-menu-sub", ...props });
|
|
174
|
+
}
|
|
175
|
+
function DropdownMenuSubTrigger({
|
|
176
|
+
className,
|
|
177
|
+
inset,
|
|
178
|
+
children,
|
|
179
|
+
...props
|
|
180
|
+
}) {
|
|
181
|
+
return /* @__PURE__ */ jsxs(
|
|
182
|
+
DropdownMenuPrimitive.SubTrigger,
|
|
183
|
+
{
|
|
184
|
+
"data-slot": "dropdown-menu-sub-trigger",
|
|
185
|
+
"data-inset": inset,
|
|
186
|
+
className: cn(
|
|
187
|
+
"flex cursor-default items-center rounded-md px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground data-[inset]:pl-8",
|
|
188
|
+
className
|
|
189
|
+
),
|
|
190
|
+
...props,
|
|
191
|
+
children: [
|
|
192
|
+
children,
|
|
193
|
+
/* @__PURE__ */ jsx(ChevronRightIcon, { className: "ml-auto size-4" })
|
|
194
|
+
]
|
|
195
|
+
}
|
|
196
|
+
);
|
|
197
|
+
}
|
|
198
|
+
function DropdownMenuSubContent({
|
|
199
|
+
className,
|
|
200
|
+
...props
|
|
201
|
+
}) {
|
|
202
|
+
return /* @__PURE__ */ jsx(
|
|
203
|
+
DropdownMenuPrimitive.SubContent,
|
|
204
|
+
{
|
|
205
|
+
"data-slot": "dropdown-menu-sub-content",
|
|
206
|
+
className: cn(
|
|
207
|
+
"bg-popover text-popover-foreground 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 z-[80] min-w-[8rem] origin-[var(--radix-dropdown-menu-content-transform-origin)] overflow-hidden rounded-lg border border-border p-1 shadow-card",
|
|
208
|
+
className
|
|
209
|
+
),
|
|
210
|
+
...props
|
|
211
|
+
}
|
|
212
|
+
);
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
// src/ui/popover.tsx
|
|
216
|
+
import { Popover as PopoverPrimitive } from "radix-ui";
|
|
217
|
+
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
218
|
+
function Popover({
|
|
219
|
+
...props
|
|
220
|
+
}) {
|
|
221
|
+
return /* @__PURE__ */ jsx2(PopoverPrimitive.Root, { "data-slot": "popover", ...props });
|
|
222
|
+
}
|
|
223
|
+
function PopoverTrigger({
|
|
224
|
+
...props
|
|
225
|
+
}) {
|
|
226
|
+
return /* @__PURE__ */ jsx2(PopoverPrimitive.Trigger, { "data-slot": "popover-trigger", ...props });
|
|
227
|
+
}
|
|
228
|
+
function PopoverAnchor({
|
|
229
|
+
...props
|
|
230
|
+
}) {
|
|
231
|
+
return /* @__PURE__ */ jsx2(PopoverPrimitive.Anchor, { "data-slot": "popover-anchor", ...props });
|
|
232
|
+
}
|
|
233
|
+
function PopoverContent({
|
|
234
|
+
className,
|
|
235
|
+
align = "center",
|
|
236
|
+
sideOffset = 4,
|
|
237
|
+
...props
|
|
238
|
+
}) {
|
|
239
|
+
return /* @__PURE__ */ jsx2(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsx2(
|
|
240
|
+
PopoverPrimitive.Content,
|
|
241
|
+
{
|
|
242
|
+
"data-slot": "popover-content",
|
|
243
|
+
align,
|
|
244
|
+
sideOffset,
|
|
245
|
+
className: cn(
|
|
246
|
+
"bg-popover text-popover-foreground 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 z-[80] w-72 origin-[var(--radix-popover-content-transform-origin)] rounded-xl border border-border p-4 shadow-card outline-hidden",
|
|
247
|
+
className
|
|
248
|
+
),
|
|
249
|
+
...props
|
|
250
|
+
}
|
|
251
|
+
) });
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
// src/ui/select.tsx
|
|
255
|
+
import { Select as SelectPrimitive } from "radix-ui";
|
|
256
|
+
import { CheckIcon as CheckIcon2, ChevronDownIcon, ChevronUpIcon } from "lucide-react";
|
|
257
|
+
import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
258
|
+
function Select({
|
|
259
|
+
...props
|
|
260
|
+
}) {
|
|
261
|
+
return /* @__PURE__ */ jsx3(SelectPrimitive.Root, { "data-slot": "select", ...props });
|
|
262
|
+
}
|
|
263
|
+
function SelectGroup({
|
|
264
|
+
...props
|
|
265
|
+
}) {
|
|
266
|
+
return /* @__PURE__ */ jsx3(SelectPrimitive.Group, { "data-slot": "select-group", ...props });
|
|
267
|
+
}
|
|
268
|
+
function SelectValue({
|
|
269
|
+
...props
|
|
270
|
+
}) {
|
|
271
|
+
return /* @__PURE__ */ jsx3(SelectPrimitive.Value, { "data-slot": "select-value", ...props });
|
|
272
|
+
}
|
|
273
|
+
function SelectTrigger({
|
|
274
|
+
className,
|
|
275
|
+
size = "default",
|
|
276
|
+
children,
|
|
277
|
+
...props
|
|
278
|
+
}) {
|
|
279
|
+
return /* @__PURE__ */ jsxs2(
|
|
280
|
+
SelectPrimitive.Trigger,
|
|
281
|
+
{
|
|
282
|
+
"data-slot": "select-trigger",
|
|
283
|
+
"data-size": size,
|
|
284
|
+
className: cn(
|
|
285
|
+
"flex w-fit items-center justify-between gap-2 rounded-lg border border-input bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/40 disabled:cursor-not-allowed disabled:opacity-50 data-[placeholder]:text-muted-foreground data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground",
|
|
286
|
+
className
|
|
287
|
+
),
|
|
288
|
+
...props,
|
|
289
|
+
children: [
|
|
290
|
+
children,
|
|
291
|
+
/* @__PURE__ */ jsx3(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ jsx3(ChevronDownIcon, { className: "size-4 opacity-50" }) })
|
|
292
|
+
]
|
|
293
|
+
}
|
|
294
|
+
);
|
|
295
|
+
}
|
|
296
|
+
function SelectContent({
|
|
297
|
+
className,
|
|
298
|
+
children,
|
|
299
|
+
position = "popper",
|
|
300
|
+
...props
|
|
301
|
+
}) {
|
|
302
|
+
return /* @__PURE__ */ jsx3(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsxs2(
|
|
303
|
+
SelectPrimitive.Content,
|
|
304
|
+
{
|
|
305
|
+
"data-slot": "select-content",
|
|
306
|
+
className: cn(
|
|
307
|
+
"bg-popover text-popover-foreground 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 relative z-[80] max-h-[var(--radix-select-content-available-height)] min-w-[8rem] origin-[var(--radix-select-content-transform-origin)] overflow-x-hidden overflow-y-auto rounded-lg border border-border shadow-card",
|
|
308
|
+
position === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
|
|
309
|
+
className
|
|
310
|
+
),
|
|
311
|
+
position,
|
|
312
|
+
...props,
|
|
313
|
+
children: [
|
|
314
|
+
/* @__PURE__ */ jsx3(SelectScrollUpButton, {}),
|
|
315
|
+
/* @__PURE__ */ jsx3(
|
|
316
|
+
SelectPrimitive.Viewport,
|
|
317
|
+
{
|
|
318
|
+
className: cn(
|
|
319
|
+
"p-1",
|
|
320
|
+
position === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"
|
|
321
|
+
),
|
|
322
|
+
children
|
|
323
|
+
}
|
|
324
|
+
),
|
|
325
|
+
/* @__PURE__ */ jsx3(SelectScrollDownButton, {})
|
|
326
|
+
]
|
|
327
|
+
}
|
|
328
|
+
) });
|
|
329
|
+
}
|
|
330
|
+
function SelectLabel({
|
|
331
|
+
className,
|
|
332
|
+
...props
|
|
333
|
+
}) {
|
|
334
|
+
return /* @__PURE__ */ jsx3(
|
|
335
|
+
SelectPrimitive.Label,
|
|
336
|
+
{
|
|
337
|
+
"data-slot": "select-label",
|
|
338
|
+
className: cn("px-2 py-1.5 text-xs font-medium text-muted-foreground", className),
|
|
339
|
+
...props
|
|
340
|
+
}
|
|
341
|
+
);
|
|
342
|
+
}
|
|
343
|
+
function SelectItem({
|
|
344
|
+
className,
|
|
345
|
+
children,
|
|
346
|
+
...props
|
|
347
|
+
}) {
|
|
348
|
+
return /* @__PURE__ */ jsxs2(
|
|
349
|
+
SelectPrimitive.Item,
|
|
350
|
+
{
|
|
351
|
+
"data-slot": "select-item",
|
|
352
|
+
className: cn(
|
|
353
|
+
"relative flex w-full cursor-default items-center gap-2 rounded-md py-1.5 pr-8 pl-2 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground",
|
|
354
|
+
className
|
|
355
|
+
),
|
|
356
|
+
...props,
|
|
357
|
+
children: [
|
|
358
|
+
/* @__PURE__ */ jsx3("span", { className: "absolute right-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsx3(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx3(CheckIcon2, { className: "size-4" }) }) }),
|
|
359
|
+
/* @__PURE__ */ jsx3(SelectPrimitive.ItemText, { children })
|
|
360
|
+
]
|
|
361
|
+
}
|
|
362
|
+
);
|
|
363
|
+
}
|
|
364
|
+
function SelectSeparator({
|
|
365
|
+
className,
|
|
366
|
+
...props
|
|
367
|
+
}) {
|
|
368
|
+
return /* @__PURE__ */ jsx3(
|
|
369
|
+
SelectPrimitive.Separator,
|
|
370
|
+
{
|
|
371
|
+
"data-slot": "select-separator",
|
|
372
|
+
className: cn("-mx-1 my-1 h-px bg-border", className),
|
|
373
|
+
...props
|
|
374
|
+
}
|
|
375
|
+
);
|
|
376
|
+
}
|
|
377
|
+
function SelectScrollUpButton({
|
|
378
|
+
className,
|
|
379
|
+
...props
|
|
380
|
+
}) {
|
|
381
|
+
return /* @__PURE__ */ jsx3(
|
|
382
|
+
SelectPrimitive.ScrollUpButton,
|
|
383
|
+
{
|
|
384
|
+
"data-slot": "select-scroll-up-button",
|
|
385
|
+
className: cn("flex cursor-default items-center justify-center py-1", className),
|
|
386
|
+
...props,
|
|
387
|
+
children: /* @__PURE__ */ jsx3(ChevronUpIcon, { className: "size-4" })
|
|
388
|
+
}
|
|
389
|
+
);
|
|
390
|
+
}
|
|
391
|
+
function SelectScrollDownButton({
|
|
392
|
+
className,
|
|
393
|
+
...props
|
|
394
|
+
}) {
|
|
395
|
+
return /* @__PURE__ */ jsx3(
|
|
396
|
+
SelectPrimitive.ScrollDownButton,
|
|
397
|
+
{
|
|
398
|
+
"data-slot": "select-scroll-down-button",
|
|
399
|
+
className: cn("flex cursor-default items-center justify-center py-1", className),
|
|
400
|
+
...props,
|
|
401
|
+
children: /* @__PURE__ */ jsx3(ChevronDownIcon, { className: "size-4" })
|
|
402
|
+
}
|
|
403
|
+
);
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
export {
|
|
407
|
+
DropdownMenu,
|
|
408
|
+
DropdownMenuTrigger,
|
|
409
|
+
DropdownMenuGroup,
|
|
410
|
+
DropdownMenuContent,
|
|
411
|
+
DropdownMenuItem,
|
|
412
|
+
DropdownMenuCheckboxItem,
|
|
413
|
+
DropdownMenuRadioGroup,
|
|
414
|
+
DropdownMenuRadioItem,
|
|
415
|
+
DropdownMenuLabel,
|
|
416
|
+
DropdownMenuSeparator,
|
|
417
|
+
DropdownMenuShortcut,
|
|
418
|
+
DropdownMenuSub,
|
|
419
|
+
DropdownMenuSubTrigger,
|
|
420
|
+
DropdownMenuSubContent,
|
|
421
|
+
Popover,
|
|
422
|
+
PopoverTrigger,
|
|
423
|
+
PopoverAnchor,
|
|
424
|
+
PopoverContent,
|
|
425
|
+
Select,
|
|
426
|
+
SelectGroup,
|
|
427
|
+
SelectValue,
|
|
428
|
+
SelectTrigger,
|
|
429
|
+
SelectContent,
|
|
430
|
+
SelectLabel,
|
|
431
|
+
SelectItem,
|
|
432
|
+
SelectSeparator,
|
|
433
|
+
SelectScrollUpButton,
|
|
434
|
+
SelectScrollDownButton
|
|
435
|
+
};
|
|
@@ -381,6 +381,42 @@ function DialogTitle({
|
|
|
381
381
|
}
|
|
382
382
|
);
|
|
383
383
|
}
|
|
384
|
+
function DialogDescription({
|
|
385
|
+
className,
|
|
386
|
+
...props
|
|
387
|
+
}) {
|
|
388
|
+
return /* @__PURE__ */ jsx3(
|
|
389
|
+
DialogPrimitive.Description,
|
|
390
|
+
{
|
|
391
|
+
"data-slot": "dialog-description",
|
|
392
|
+
className: cn("text-sm text-muted-foreground", className),
|
|
393
|
+
...props
|
|
394
|
+
}
|
|
395
|
+
);
|
|
396
|
+
}
|
|
397
|
+
function DialogHeader({ className, ...props }) {
|
|
398
|
+
return /* @__PURE__ */ jsx3(
|
|
399
|
+
"div",
|
|
400
|
+
{
|
|
401
|
+
"data-slot": "dialog-header",
|
|
402
|
+
className: cn("flex flex-col gap-1.5 text-center sm:text-left", className),
|
|
403
|
+
...props
|
|
404
|
+
}
|
|
405
|
+
);
|
|
406
|
+
}
|
|
407
|
+
function DialogFooter({ className, ...props }) {
|
|
408
|
+
return /* @__PURE__ */ jsx3(
|
|
409
|
+
"div",
|
|
410
|
+
{
|
|
411
|
+
"data-slot": "dialog-footer",
|
|
412
|
+
className: cn(
|
|
413
|
+
"flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",
|
|
414
|
+
className
|
|
415
|
+
),
|
|
416
|
+
...props
|
|
417
|
+
}
|
|
418
|
+
);
|
|
419
|
+
}
|
|
384
420
|
|
|
385
421
|
// src/ui/avatar.tsx
|
|
386
422
|
import { Avatar as AvatarPrimitive } from "radix-ui";
|
|
@@ -568,6 +604,9 @@ export {
|
|
|
568
604
|
DialogOverlay,
|
|
569
605
|
DialogContent,
|
|
570
606
|
DialogTitle,
|
|
607
|
+
DialogDescription,
|
|
608
|
+
DialogHeader,
|
|
609
|
+
DialogFooter,
|
|
571
610
|
Avatar,
|
|
572
611
|
AvatarImage,
|
|
573
612
|
AvatarFallback,
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
TooltipProvider,
|
|
19
19
|
TooltipTrigger,
|
|
20
20
|
cn
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-QKO67F4V.esm.js";
|
|
22
22
|
|
|
23
23
|
// src/chat/tooltip-icon-button.tsx
|
|
24
24
|
import { forwardRef } from "react";
|
|
@@ -3521,6 +3521,7 @@ var Thread = ({
|
|
|
3521
3521
|
maxWidth: maxWidthProp,
|
|
3522
3522
|
welcome,
|
|
3523
3523
|
suggestions,
|
|
3524
|
+
showWelcomeSuggestions,
|
|
3524
3525
|
composerPlaceholder,
|
|
3525
3526
|
components,
|
|
3526
3527
|
artifacts,
|
|
@@ -3569,6 +3570,7 @@ var Thread = ({
|
|
|
3569
3570
|
{
|
|
3570
3571
|
config: welcome,
|
|
3571
3572
|
suggestions,
|
|
3573
|
+
showWelcomeSuggestions,
|
|
3572
3574
|
Suggestions: SuggestionsSlot
|
|
3573
3575
|
}
|
|
3574
3576
|
),
|
|
@@ -3649,10 +3651,12 @@ var welcomeIcon = {
|
|
|
3649
3651
|
var ThreadWelcome = ({
|
|
3650
3652
|
config,
|
|
3651
3653
|
suggestions,
|
|
3654
|
+
showWelcomeSuggestions: showWelcomeSuggestionsProp,
|
|
3652
3655
|
Suggestions: SuggestionsSlot = Suggestions
|
|
3653
3656
|
}) => {
|
|
3654
3657
|
const isEmpty = useThread((s) => s.messages.length === 0);
|
|
3655
3658
|
const isPanel = useThreadVariant() === "panel";
|
|
3659
|
+
const showWelcomeSuggestions = showWelcomeSuggestionsProp ?? !isPanel;
|
|
3656
3660
|
if (!isEmpty) return null;
|
|
3657
3661
|
const defaultHeading = isPanel ? "Ask about this page" : "How can I help you today?";
|
|
3658
3662
|
const defaultSubheading = isPanel ? "The assistant can use dashboard context from your app." : "Send a message to start a conversation.";
|
|
@@ -3691,7 +3695,7 @@ var ThreadWelcome = ({
|
|
|
3691
3695
|
]
|
|
3692
3696
|
}
|
|
3693
3697
|
) }),
|
|
3694
|
-
|
|
3698
|
+
showWelcomeSuggestions && suggestions ? /* @__PURE__ */ jsx23("div", { className: "aui-thread-welcome-suggestions mx-auto w-full max-w-(--thread-max-width) px-2", children: /* @__PURE__ */ jsx23(SuggestionsSlot, { suggestions }) }) : null
|
|
3695
3699
|
] });
|
|
3696
3700
|
};
|
|
3697
3701
|
var MessageError = () => {
|
|
@@ -16,10 +16,10 @@ import {
|
|
|
16
16
|
studioSecondaryChromeClass,
|
|
17
17
|
studioTopbarPillHeightClass,
|
|
18
18
|
toNum
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-VVTTLIGT.esm.js";
|
|
20
20
|
import {
|
|
21
21
|
PillSegmentedTabs
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-YNDXBN6C.esm.js";
|
|
23
23
|
import {
|
|
24
24
|
Button,
|
|
25
25
|
Dialog,
|
|
@@ -31,7 +31,7 @@ import {
|
|
|
31
31
|
TIMBAL_V2_SWITCH_TRACK_OFF,
|
|
32
32
|
TimbalV2Button,
|
|
33
33
|
cn
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-QKO67F4V.esm.js";
|
|
35
35
|
|
|
36
36
|
// src/app/agent-instructions.ts
|
|
37
37
|
var APP_KIT_AGENT_INSTRUCTIONS = `
|
|
@@ -552,8 +552,7 @@ import { XIcon } from "lucide-react";
|
|
|
552
552
|
import { jsx as jsx8, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
553
553
|
var shellClass = "aui-app-chat-panel flex h-full min-h-0 flex-col overflow-hidden";
|
|
554
554
|
var chromeClass = cn(
|
|
555
|
-
"aui-app-chat-panel-chrome relative z-20 flex min-h-
|
|
556
|
-
"bg-card/90 px-2 pt-3 pb-3 backdrop-blur-sm"
|
|
555
|
+
"aui-app-chat-panel-chrome relative z-20 flex min-h-10 shrink-0 items-center justify-end px-2 pt-2"
|
|
557
556
|
);
|
|
558
557
|
var closeButtonClass = cn(
|
|
559
558
|
"aui-app-chat-panel-close flex size-8 shrink-0 items-center justify-center rounded-md",
|
|
@@ -570,8 +569,9 @@ var bodyClass = cn(
|
|
|
570
569
|
"[&_.aui-thread-viewport]:[scrollbar-gutter:stable_both-edges]",
|
|
571
570
|
// Tighter symmetric horizontal inset for panel + composer
|
|
572
571
|
"[&_.aui-thread-viewport]:!px-2",
|
|
573
|
-
"[&_.aui-thread-viewport]:!pt-
|
|
572
|
+
"[&_.aui-thread-viewport]:!pt-1",
|
|
574
573
|
"[&_.aui-user-message-root]:!px-0",
|
|
574
|
+
"[&_.aui-user-message-root]:!pe-1",
|
|
575
575
|
"[&_.aui-composer-input]:!px-2",
|
|
576
576
|
"[&_.aui-composer-action-wrapper]:!px-2"
|
|
577
577
|
);
|
|
@@ -586,6 +586,7 @@ var AppChatPanel = ({
|
|
|
586
586
|
debug,
|
|
587
587
|
welcome,
|
|
588
588
|
suggestions,
|
|
589
|
+
showWelcomeSuggestions,
|
|
589
590
|
composerPlaceholder,
|
|
590
591
|
components,
|
|
591
592
|
artifacts,
|
|
@@ -621,6 +622,7 @@ var AppChatPanel = ({
|
|
|
621
622
|
className: "aui-app-chat-panel-thread",
|
|
622
623
|
welcome,
|
|
623
624
|
suggestions,
|
|
625
|
+
showWelcomeSuggestions,
|
|
624
626
|
composerPlaceholder,
|
|
625
627
|
components,
|
|
626
628
|
artifacts,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
studioSecondaryChromeClass,
|
|
3
3
|
studioTopbarPillHeightClass
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-VVTTLIGT.esm.js";
|
|
5
5
|
import {
|
|
6
6
|
cn
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-QKO67F4V.esm.js";
|
|
8
8
|
|
|
9
9
|
// src/chat/workforce-selector.tsx
|
|
10
10
|
import { ChevronDownIcon } from "lucide-react";
|