@epicbagel/saas-kit 1.5.0 → 1.7.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/README.md +33 -1
- package/dist/{chunk-GFG2R5BZ.js → chunk-2V7AVB2U.js} +1 -1
- package/dist/{chunk-LI5EOSQG.js → chunk-43UMPZWD.js} +1 -1
- package/dist/{chunk-XABXUP6L.cjs → chunk-5VMKDVB6.cjs} +2 -2
- package/dist/{chunk-QNZYQLNP.js → chunk-6S6GD43V.js} +1 -1
- package/dist/{chunk-WQJKUKBL.cjs → chunk-6YXKFVZU.cjs} +4 -4
- package/dist/{chunk-RIWLAMME.cjs → chunk-7LDJAXRX.cjs} +2 -2
- package/dist/{chunk-FNDBM67K.cjs → chunk-7YCKII7G.cjs} +2 -2
- package/dist/{chunk-2TKLS73N.js → chunk-C3VZMTVB.js} +1 -1
- package/dist/{chunk-G54TQV2R.cjs → chunk-CLYAASFN.cjs} +2 -2
- package/dist/{chunk-SGW4FWBX.cjs → chunk-CRTH5GJ5.cjs} +13 -13
- package/dist/{chunk-EZCKWTH7.js → chunk-CYDICVH2.js} +1 -1
- package/dist/{chunk-J3GQXM37.js → chunk-EEHIMPD7.js} +1 -1
- package/dist/{chunk-4NN7EA3W.js → chunk-ET4THLFX.js} +1 -1
- package/dist/{chunk-PNWNU6JW.cjs → chunk-EUFV25KL.cjs} +4 -4
- package/dist/{chunk-HHV4G77I.js → chunk-F3B4M6DU.js} +1 -1
- package/dist/{chunk-32Q4XOTU.cjs → chunk-FYRQFEU4.cjs} +2 -2
- package/dist/{chunk-VLXPLKFR.cjs → chunk-GTVSRRE3.cjs} +2 -2
- package/dist/{chunk-RRRD5EUI.js → chunk-H2CCBRVG.js} +1 -1
- package/dist/{chunk-FGISSYXG.js → chunk-H4XH2PPU.js} +1 -1
- package/dist/{chunk-M7FYGAGO.js → chunk-HBRVOGLA.js} +1 -1
- package/dist/{chunk-NW3OWKBN.js → chunk-HREEZUKL.js} +1 -1
- package/dist/{chunk-THWIJG5C.js → chunk-IJG2B3Y2.js} +1 -1
- package/dist/{chunk-L4DH72UF.cjs → chunk-JDEXZGIY.cjs} +2 -1
- package/dist/{chunk-HRLP4BHJ.js → chunk-JN6JOSZG.js} +4 -4
- package/dist/{chunk-NE3ZVJ6G.cjs → chunk-KM5FHCXU.cjs} +8 -8
- package/dist/{chunk-MLHNYRFX.js → chunk-KNKV25WS.js} +2 -2
- package/dist/{chunk-23UMHZ4S.cjs → chunk-LIUYHYFN.cjs} +3 -3
- package/dist/{chunk-EOUO3ORO.cjs → chunk-LKPM6DQP.cjs} +3 -3
- package/dist/{chunk-SUB4BAYE.cjs → chunk-M4V7OJNF.cjs} +2 -2
- package/dist/{chunk-VKIGJNJR.cjs → chunk-MU4F3DSW.cjs} +2 -2
- package/dist/{chunk-LAN3K2JI.cjs → chunk-NWDPH2Z7.cjs} +2 -2
- package/dist/{chunk-MHYAVXOE.js → chunk-QTPPNK6F.js} +1 -1
- package/dist/{chunk-IH3COANJ.cjs → chunk-QTWJQQDH.cjs} +12 -12
- package/dist/chunk-QZBPZLAB.js +24 -0
- package/dist/{chunk-HAC32ALJ.js → chunk-TI57GAQP.js} +1 -1
- package/dist/{chunk-GRY77463.cjs → chunk-TP74SBRH.cjs} +3 -3
- package/dist/chunk-VMXKT67E.cjs +24 -0
- package/dist/{chunk-R5L4CM6V.cjs → chunk-VOTCYG3F.cjs} +4 -4
- package/dist/{chunk-HQRWRRZJ.js → chunk-W326GKML.js} +2 -1
- package/dist/{chunk-HYSWE75T.js → chunk-WL73DFE3.js} +1 -1
- package/dist/{chunk-KADJ56AH.cjs → chunk-Z3JJSNR5.cjs} +2 -2
- package/dist/{chunk-FLPYZNWZ.js → chunk-ZLU32SRP.js} +1 -1
- package/dist/primitives/activity-feed.cjs +3 -3
- package/dist/primitives/activity-feed.js +2 -2
- package/dist/primitives/activity-log.cjs +3 -3
- package/dist/primitives/activity-log.js +2 -2
- package/dist/primitives/alert-dialog.cjs +3 -3
- package/dist/primitives/alert-dialog.js +2 -2
- package/dist/primitives/alert.d.cts +1 -1
- package/dist/primitives/alert.d.ts +1 -1
- package/dist/primitives/archive-confirmation-dialog.cjs +4 -4
- package/dist/primitives/archive-confirmation-dialog.js +3 -3
- package/dist/primitives/attachment.cjs +3 -3
- package/dist/primitives/attachment.d.cts +1 -1
- package/dist/primitives/attachment.d.ts +1 -1
- package/dist/primitives/attachment.js +2 -2
- package/dist/primitives/badge.d.cts +1 -1
- package/dist/primitives/badge.d.ts +1 -1
- package/dist/primitives/board-view.cjs +7 -7
- package/dist/primitives/board-view.js +6 -6
- package/dist/primitives/bubble.d.cts +1 -1
- package/dist/primitives/bubble.d.ts +1 -1
- package/dist/primitives/button.cjs +2 -2
- package/dist/primitives/button.d.cts +3 -3
- package/dist/primitives/button.d.ts +3 -3
- package/dist/primitives/button.js +1 -1
- package/dist/primitives/calendar.cjs +3 -3
- package/dist/primitives/calendar.js +2 -2
- package/dist/primitives/chat.cjs +155 -80
- package/dist/primitives/chat.d.cts +32 -3
- package/dist/primitives/chat.d.ts +32 -3
- package/dist/primitives/chat.js +120 -45
- package/dist/primitives/code-block.cjs +4 -4
- package/dist/primitives/code-block.js +3 -3
- package/dist/primitives/confirm-bar.cjs +3 -3
- package/dist/primitives/confirm-bar.js +1 -1
- package/dist/primitives/connection-status-bar.cjs +4 -4
- package/dist/primitives/connection-status-bar.js +1 -1
- package/dist/primitives/connection.cjs +13 -13
- package/dist/primitives/connection.js +3 -3
- package/dist/primitives/copy-button.cjs +3 -3
- package/dist/primitives/copy-button.js +2 -2
- package/dist/primitives/decision-actions.cjs +2 -2
- package/dist/primitives/decision-actions.js +1 -1
- package/dist/primitives/delete-confirmation-dialog.cjs +4 -4
- package/dist/primitives/delete-confirmation-dialog.js +3 -3
- package/dist/primitives/document-preview.cjs +4 -4
- package/dist/primitives/document-preview.js +2 -2
- package/dist/primitives/editable-list.cjs +6 -6
- package/dist/primitives/editable-list.js +1 -1
- package/dist/primitives/empty-state.cjs +3 -3
- package/dist/primitives/empty-state.js +2 -2
- package/dist/primitives/file-dropzone.cjs +3 -3
- package/dist/primitives/file-dropzone.js +2 -2
- package/dist/primitives/file-preview-internals.cjs +3 -3
- package/dist/primitives/file-preview-internals.js +2 -2
- package/dist/primitives/file-preview.cjs +15 -15
- package/dist/primitives/file-preview.js +4 -4
- package/dist/primitives/filter-bar.cjs +4 -4
- package/dist/primitives/filter-bar.js +3 -3
- package/dist/primitives/input-group.cjs +3 -3
- package/dist/primitives/input-group.js +2 -2
- package/dist/primitives/item.d.cts +2 -2
- package/dist/primitives/item.d.ts +2 -2
- package/dist/primitives/load-more-button.cjs +3 -3
- package/dist/primitives/load-more-button.js +2 -2
- package/dist/primitives/message-scroller.cjs +3 -3
- package/dist/primitives/message-scroller.js +2 -2
- package/dist/primitives/message.cjs +3 -3
- package/dist/primitives/message.js +2 -2
- package/dist/primitives/page-header-actions.cjs +3 -3
- package/dist/primitives/page-header-actions.js +2 -2
- package/dist/primitives/quick-filters.cjs +3 -3
- package/dist/primitives/quick-filters.js +2 -2
- package/dist/primitives/resource-list.cjs +7 -7
- package/dist/primitives/resource-list.js +6 -6
- package/dist/primitives/search-input.cjs +101 -0
- package/dist/primitives/search-input.d.cts +23 -0
- package/dist/primitives/search-input.d.ts +23 -0
- package/dist/primitives/search-input.js +101 -0
- package/dist/primitives/section-header.d.cts +1 -1
- package/dist/primitives/section-header.d.ts +1 -1
- package/dist/primitives/spinner.cjs +3 -18
- package/dist/primitives/spinner.js +3 -18
- package/dist/primitives/split-action-button.cjs +3 -3
- package/dist/primitives/split-action-button.js +1 -1
- package/dist/primitives/suggestion.cjs +3 -3
- package/dist/primitives/suggestion.js +2 -2
- package/dist/primitives/tag-input.cjs +3 -3
- package/dist/primitives/tag-input.js +1 -1
- package/dist/primitives/toggle-group.d.cts +2 -2
- package/dist/primitives/toggle-group.d.ts +2 -2
- package/dist/primitives/toggle.d.cts +2 -2
- package/dist/primitives/toggle.d.ts +2 -2
- package/dist/primitives/voice-dictation-button.cjs +3 -3
- package/dist/primitives/voice-dictation-button.js +2 -2
- package/package.json +11 -1
package/dist/primitives/chat.cjs
CHANGED
|
@@ -7,11 +7,11 @@
|
|
|
7
7
|
var _chunk2BTDBZYNcjs = require('../chunk-2BTDBZYN.cjs');
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _chunkLKPM6DQPcjs = require('../chunk-LKPM6DQP.cjs');
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _chunkM4V7OJNFcjs = require('../chunk-M4V7OJNF.cjs');
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
|
|
@@ -19,13 +19,13 @@ var _chunkSUB4BAYEcjs = require('../chunk-SUB4BAYE.cjs');
|
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
|
|
22
|
-
var
|
|
22
|
+
var _chunk5VMKDVB6cjs = require('../chunk-5VMKDVB6.cjs');
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
|
|
27
27
|
|
|
28
|
-
var
|
|
28
|
+
var _chunkNWDPH2Z7cjs = require('../chunk-NWDPH2Z7.cjs');
|
|
29
29
|
|
|
30
30
|
|
|
31
31
|
|
|
@@ -34,12 +34,12 @@ var _chunkB765DSRGcjs = require('../chunk-B765DSRG.cjs');
|
|
|
34
34
|
|
|
35
35
|
|
|
36
36
|
|
|
37
|
-
var
|
|
37
|
+
var _chunk7LDJAXRXcjs = require('../chunk-7LDJAXRX.cjs');
|
|
38
38
|
require('../chunk-2HV2KKOE.cjs');
|
|
39
39
|
|
|
40
40
|
|
|
41
41
|
|
|
42
|
-
var
|
|
42
|
+
var _chunkZ3JJSNR5cjs = require('../chunk-Z3JJSNR5.cjs');
|
|
43
43
|
|
|
44
44
|
|
|
45
45
|
var _chunkKENBU3NVcjs = require('../chunk-KENBU3NV.cjs');
|
|
@@ -66,7 +66,7 @@ require('../chunk-W5HPHEE7.cjs');
|
|
|
66
66
|
|
|
67
67
|
|
|
68
68
|
|
|
69
|
-
var
|
|
69
|
+
var _chunkFYRQFEU4cjs = require('../chunk-FYRQFEU4.cjs');
|
|
70
70
|
require('../chunk-U2NES7VR.cjs');
|
|
71
71
|
|
|
72
72
|
|
|
@@ -74,7 +74,7 @@ var _chunk2KFZQJH5cjs = require('../chunk-2KFZQJH5.cjs');
|
|
|
74
74
|
require('../chunk-PQUSJEXL.cjs');
|
|
75
75
|
|
|
76
76
|
|
|
77
|
-
var
|
|
77
|
+
var _chunkJDEXZGIYcjs = require('../chunk-JDEXZGIY.cjs');
|
|
78
78
|
|
|
79
79
|
|
|
80
80
|
var _chunk4LXN6GLZcjs = require('../chunk-4LXN6GLZ.cjs');
|
|
@@ -149,7 +149,7 @@ function ChatRunningLine({
|
|
|
149
149
|
align = "start",
|
|
150
150
|
workspace
|
|
151
151
|
}) {
|
|
152
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
152
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNWDPH2Z7cjs.Message, { align, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNWDPH2Z7cjs.MessageContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2BTDBZYNcjs.Trace, { className: workspace ? void 0 : "px-3.5 py-2", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2BTDBZYNcjs.TraceLine, { status: "running", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2BTDBZYNcjs.TraceTitle, { children: label }) }) }) }) });
|
|
153
153
|
}
|
|
154
154
|
var ChatThread = _react.forwardRef.call(void 0,
|
|
155
155
|
function ChatThread2({
|
|
@@ -170,15 +170,15 @@ var ChatThread = _react.forwardRef.call(void 0,
|
|
|
170
170
|
const markers = timelineMarkers(messages, /* @__PURE__ */ new Date());
|
|
171
171
|
const anchorId = useArrivingUserTurnId(messages);
|
|
172
172
|
const workspace = appearance === "workspace";
|
|
173
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
174
|
-
|
|
173
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk5VMKDVB6cjs.MessageScrollerProvider, { autoScroll: true, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
174
|
+
_chunk5VMKDVB6cjs.MessageScroller,
|
|
175
175
|
{
|
|
176
176
|
ref,
|
|
177
177
|
style: { maxHeight },
|
|
178
178
|
className: _chunkKWLSBTB2cjs.cn.call(void 0, "min-h-0", className),
|
|
179
179
|
children: [
|
|
180
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
181
|
-
|
|
180
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk5VMKDVB6cjs.MessageScrollerViewport, { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
181
|
+
_chunk5VMKDVB6cjs.MessageScrollerContent,
|
|
182
182
|
{
|
|
183
183
|
className: _chunkKWLSBTB2cjs.cn.call(void 0,
|
|
184
184
|
workspace ? "mx-auto w-full max-w-3xl gap-10 px-4 py-6 md:px-6 md:py-8" : "gap-2.5 px-px py-px"
|
|
@@ -187,7 +187,7 @@ var ChatThread = _react.forwardRef.call(void 0,
|
|
|
187
187
|
messages.map((m, index) => {
|
|
188
188
|
const isUser = m.role === "user";
|
|
189
189
|
if (m.status === "running") {
|
|
190
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
190
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk5VMKDVB6cjs.MessageScrollerItem, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
191
191
|
ChatRunningLine,
|
|
192
192
|
{
|
|
193
193
|
label: m.text || pendingLabel,
|
|
@@ -200,14 +200,14 @@ var ChatThread = _react.forwardRef.call(void 0,
|
|
|
200
200
|
const marker = markers[index];
|
|
201
201
|
const actions = messageActions && offersActions(m) ? messageActions(m) : null;
|
|
202
202
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
203
|
-
|
|
203
|
+
_chunk5VMKDVB6cjs.MessageScrollerItem,
|
|
204
204
|
{
|
|
205
205
|
messageId: m.id,
|
|
206
206
|
scrollAnchor: m.id === anchorId,
|
|
207
207
|
className: _chunkKWLSBTB2cjs.cn.call(void 0, "flex flex-col", workspace ? "gap-5" : "gap-3"),
|
|
208
208
|
children: [
|
|
209
209
|
marker ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TimelineMarker, { label: marker }) : null,
|
|
210
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
210
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNWDPH2Z7cjs.Message, { align: isUser ? "end" : "start", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNWDPH2Z7cjs.MessageContent, { children: [
|
|
211
211
|
(m.content || m.text) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
212
212
|
_chunkV4YWTRLDcjs.Bubble,
|
|
213
213
|
{
|
|
@@ -241,7 +241,7 @@ var ChatThread = _react.forwardRef.call(void 0,
|
|
|
241
241
|
// button's inset, so the first icon lines up with
|
|
242
242
|
// the text above it.
|
|
243
243
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
244
|
-
|
|
244
|
+
_chunkNWDPH2Z7cjs.MessageActions,
|
|
245
245
|
{
|
|
246
246
|
className: _chunkKWLSBTB2cjs.cn.call(void 0,
|
|
247
247
|
workspace && (isUser ? "-me-2 pointer-coarse:-me-3.5" : "-ms-2 pointer-coarse:-ms-3.5")
|
|
@@ -256,15 +256,15 @@ var ChatThread = _react.forwardRef.call(void 0,
|
|
|
256
256
|
m.id
|
|
257
257
|
);
|
|
258
258
|
}),
|
|
259
|
-
pending && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
259
|
+
pending && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk5VMKDVB6cjs.MessageScrollerItem, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ChatRunningLine, { label: pendingLabel, workspace }) }),
|
|
260
260
|
footer && // Always painted: content-visibility:auto would contain the
|
|
261
261
|
// footer's paint and layout, clipping a ring or shadow at its
|
|
262
262
|
// edge and re-parenting anything fixed inside it.
|
|
263
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
263
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk5VMKDVB6cjs.MessageScrollerItem, { className: "[content-visibility:visible]", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNWDPH2Z7cjs.Message, { align: "start", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNWDPH2Z7cjs.MessageContent, { children: footer }) }) })
|
|
264
264
|
]
|
|
265
265
|
}
|
|
266
266
|
) }),
|
|
267
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
267
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk5VMKDVB6cjs.MessageScrollerButton, { variant: "outline", className: "rounded-full shadow-sm", children: [
|
|
268
268
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ArrowDown, { className: "h-4 w-4" }),
|
|
269
269
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "sr-only", children: scrollButtonLabel })
|
|
270
270
|
] })
|
|
@@ -284,7 +284,7 @@ function ChatCopyAction({
|
|
|
284
284
|
const text = message.text;
|
|
285
285
|
if (!text) return null;
|
|
286
286
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
287
|
-
|
|
287
|
+
_chunkNWDPH2Z7cjs.MessageAction,
|
|
288
288
|
{
|
|
289
289
|
tooltip: copied ? copiedLabel : label,
|
|
290
290
|
"data-copied": copied || void 0,
|
|
@@ -320,18 +320,18 @@ function ChatAttachmentList({
|
|
|
320
320
|
className
|
|
321
321
|
}) {
|
|
322
322
|
const { verb, icon: ActionIcon } = ATTACHMENT_ACTIONS[openAction];
|
|
323
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
323
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkFYRQFEU4cjs.AttachmentGroup, { className: _chunkKWLSBTB2cjs.cn.call(void 0, "gap-2 px-3 pt-3", className), children: attachments.map((attachment) => {
|
|
324
324
|
const state = _nullishCoalesce(attachment.state, () => ( "done"));
|
|
325
325
|
const opens = Boolean(onOpen) && state === "done";
|
|
326
326
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
327
|
-
|
|
327
|
+
_chunkFYRQFEU4cjs.Attachment,
|
|
328
328
|
{
|
|
329
329
|
state,
|
|
330
330
|
size: "sm",
|
|
331
331
|
className: "min-w-[12rem] rounded-xl p-2",
|
|
332
332
|
children: [
|
|
333
333
|
opens && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
334
|
-
|
|
334
|
+
_chunkFYRQFEU4cjs.AttachmentTrigger,
|
|
335
335
|
{
|
|
336
336
|
"aria-label": `${verb} ${attachment.name}`,
|
|
337
337
|
title: `${verb} ${attachment.name}`,
|
|
@@ -339,13 +339,13 @@ function ChatAttachmentList({
|
|
|
339
339
|
className: "rounded-xl focus-visible:ring-2 focus-visible:ring-ring/50"
|
|
340
340
|
}
|
|
341
341
|
),
|
|
342
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
343
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
344
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
345
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
342
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkFYRQFEU4cjs.AttachmentMedia, { variant: "icon", className: "h-9 w-9 rounded-lg bg-muted", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.FileText, { className: "h-4 w-4" }) }),
|
|
343
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkFYRQFEU4cjs.AttachmentContent, { className: "px-2", children: [
|
|
344
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkFYRQFEU4cjs.AttachmentTitle, { className: "text-xs font-medium", children: attachment.name }),
|
|
345
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkFYRQFEU4cjs.AttachmentDescription, { className: "text-[11px]", children: state === "uploading" ? uploadingLabel : opens ? `${formatFileSize(attachment.size)} \xB7 ${verb}` : formatFileSize(attachment.size) })
|
|
346
346
|
] }),
|
|
347
|
-
onRemove ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
348
|
-
|
|
347
|
+
onRemove ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkFYRQFEU4cjs.AttachmentActions, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
348
|
+
_chunkFYRQFEU4cjs.AttachmentAction,
|
|
349
349
|
{
|
|
350
350
|
type: "button",
|
|
351
351
|
"aria-label": `Remove ${attachment.name}`,
|
|
@@ -354,7 +354,7 @@ function ChatAttachmentList({
|
|
|
354
354
|
}
|
|
355
355
|
) }) : opens ? (
|
|
356
356
|
// The trigger covers the whole file; the icon only says what it does.
|
|
357
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
357
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkFYRQFEU4cjs.AttachmentActions, { "aria-hidden": true, className: "pointer-events-none pr-1 text-muted-foreground", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ActionIcon, { className: "h-4 w-4" }) })
|
|
358
358
|
) : null
|
|
359
359
|
]
|
|
360
360
|
},
|
|
@@ -385,12 +385,15 @@ function ChatInput({
|
|
|
385
385
|
multiple = true,
|
|
386
386
|
addFilesLabel = "Add files",
|
|
387
387
|
appearance = "default",
|
|
388
|
+
compactOnBlur = false,
|
|
388
389
|
helperText,
|
|
389
390
|
privacyNote
|
|
390
391
|
}) {
|
|
391
392
|
const internalRef = _react.useRef.call(void 0, null);
|
|
392
393
|
const ref = _nullishCoalesce(inputRef, () => ( internalRef));
|
|
393
394
|
const fileInputRef = _react.useRef.call(void 0, null);
|
|
395
|
+
const [editing, setEditing] = _react.useState.call(void 0, false);
|
|
396
|
+
const focusVersion = _react.useRef.call(void 0, 0);
|
|
394
397
|
const isDisabled = pending || disabled;
|
|
395
398
|
const attachmentsReady = attachments.length > 0 && attachments.every((item) => item.state !== "uploading");
|
|
396
399
|
const canSubmit = !isDisabled && (Boolean(value.trim()) || attachmentsReady);
|
|
@@ -401,13 +404,27 @@ function ChatInput({
|
|
|
401
404
|
};
|
|
402
405
|
const spacious = appearance === "spacious";
|
|
403
406
|
const composerSize = COMPOSER_SIZES[size];
|
|
407
|
+
const compact = compactOnBlur && !editing && value.length === 0 && attachments.length === 0;
|
|
404
408
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { "data-slot": "chat-input-container", className: "w-full", children: [
|
|
405
409
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
406
410
|
"form",
|
|
407
411
|
{
|
|
408
412
|
"data-slot": "chat-input",
|
|
409
413
|
"data-appearance": appearance,
|
|
414
|
+
"data-compact": compact || void 0,
|
|
410
415
|
className: "w-full",
|
|
416
|
+
onFocusCapture: (event) => {
|
|
417
|
+
focusVersion.current += 1;
|
|
418
|
+
if (event.nativeEvent.target === ref.current) setEditing(true);
|
|
419
|
+
},
|
|
420
|
+
onBlurCapture: (event) => {
|
|
421
|
+
if (event.currentTarget.contains(event.relatedTarget)) return;
|
|
422
|
+
const form = event.currentTarget;
|
|
423
|
+
const blurredAt = ++focusVersion.current;
|
|
424
|
+
queueMicrotask(() => {
|
|
425
|
+
if (form.isConnected && focusVersion.current === blurredAt) setEditing(false);
|
|
426
|
+
});
|
|
427
|
+
},
|
|
411
428
|
onSubmit: (event) => {
|
|
412
429
|
if (event.target !== event.currentTarget) return;
|
|
413
430
|
event.preventDefault();
|
|
@@ -430,7 +447,7 @@ function ChatInput({
|
|
|
430
447
|
}
|
|
431
448
|
),
|
|
432
449
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
433
|
-
|
|
450
|
+
_chunk7LDJAXRXcjs.InputGroup,
|
|
434
451
|
{
|
|
435
452
|
className: _chunkKWLSBTB2cjs.cn.call(void 0,
|
|
436
453
|
// Opaque in both modes: the input group's own dark:bg-input/30
|
|
@@ -450,7 +467,7 @@ function ChatInput({
|
|
|
450
467
|
}
|
|
451
468
|
),
|
|
452
469
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
453
|
-
|
|
470
|
+
_chunk7LDJAXRXcjs.InputGroupTextarea,
|
|
454
471
|
{
|
|
455
472
|
ref,
|
|
456
473
|
value,
|
|
@@ -462,39 +479,42 @@ function ChatInput({
|
|
|
462
479
|
submit();
|
|
463
480
|
},
|
|
464
481
|
placeholder,
|
|
465
|
-
rows: composerSize.rows,
|
|
482
|
+
rows: compact ? 1 : composerSize.rows,
|
|
483
|
+
wrap: compact ? "off" : void 0,
|
|
466
484
|
disabled: isDisabled,
|
|
467
485
|
autoFocus,
|
|
468
486
|
className: _chunkKWLSBTB2cjs.cn.call(void 0,
|
|
469
|
-
composerSize.minHeight,
|
|
487
|
+
compact ? "h-[44px] min-h-[44px] max-h-[44px] min-w-0 field-sizing-fixed overflow-hidden whitespace-nowrap text-ellipsis" : composerSize.minHeight,
|
|
470
488
|
// Grows with the text, then scrolls rather than pushing the thread away.
|
|
471
|
-
"
|
|
472
|
-
|
|
489
|
+
"leading-relaxed disabled:opacity-70 placeholder:text-sm",
|
|
490
|
+
!compact && "max-h-48",
|
|
491
|
+
compact ? "px-4 py-2" : spacious ? "px-6 pb-2 pt-6" : "px-4 py-3.5"
|
|
473
492
|
)
|
|
474
493
|
}
|
|
475
494
|
),
|
|
476
495
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
477
|
-
|
|
496
|
+
_chunk7LDJAXRXcjs.InputGroupAddon,
|
|
478
497
|
{
|
|
479
|
-
align: "block-end",
|
|
498
|
+
align: compact ? "inline-end" : "block-end",
|
|
480
499
|
"data-slot": "chat-input-actions",
|
|
481
500
|
onClick: (event) => {
|
|
482
501
|
if (!event.currentTarget.contains(event.target)) return;
|
|
483
502
|
if (!event.target.closest("button")) _optionalChain([ref, 'access', _3 => _3.current, 'optionalAccess', _4 => _4.focus, 'call', _5 => _5()]);
|
|
484
503
|
},
|
|
485
504
|
className: _chunkKWLSBTB2cjs.cn.call(void 0,
|
|
486
|
-
"gap-2",
|
|
487
|
-
spacious ? "px-5 pb-5 pt-1" : "border-t border-border px-3 py-2.5"
|
|
505
|
+
compact ? "shrink-0 gap-0 p-1" : "gap-2",
|
|
506
|
+
!compact && (spacious ? "px-5 pb-5 pt-1" : "border-t border-border px-3 py-2.5")
|
|
488
507
|
),
|
|
489
508
|
children: [
|
|
490
509
|
onFilesSelected && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkZAITUDYDcjs.DropdownMenu, { children: [
|
|
491
510
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZAITUDYDcjs.DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
492
|
-
|
|
511
|
+
_chunkJDEXZGIYcjs.Button,
|
|
493
512
|
{
|
|
494
513
|
type: "button",
|
|
495
|
-
size: spacious ? "icon-lg" : "icon",
|
|
514
|
+
size: spacious && !compact ? "icon-lg" : "icon",
|
|
496
515
|
variant: "ghost",
|
|
497
516
|
"aria-label": "Add to conversation",
|
|
517
|
+
className: compactOnBlur ? "min-h-[44px] min-w-[44px] shrink-0" : void 0,
|
|
498
518
|
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Plus, { className: _chunkKWLSBTB2cjs.cn.call(void 0, spacious && "h-5 w-5") })
|
|
499
519
|
}
|
|
500
520
|
) }),
|
|
@@ -504,44 +524,48 @@ function ChatInput({
|
|
|
504
524
|
] }) })
|
|
505
525
|
] }),
|
|
506
526
|
voice && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
507
|
-
|
|
527
|
+
_chunkLKPM6DQPcjs.VoiceDictationButton,
|
|
508
528
|
{
|
|
509
529
|
size: "icon",
|
|
510
530
|
title: voiceTitle,
|
|
511
531
|
lang: voiceLang,
|
|
512
532
|
onCommit: (text) => onSend(text),
|
|
513
|
-
className:
|
|
533
|
+
className: _chunkKWLSBTB2cjs.cn.call(void 0,
|
|
534
|
+
spacious && "border-transparent bg-transparent shadow-none hover:bg-muted",
|
|
535
|
+
spacious && !compact && "h-12 w-12",
|
|
536
|
+
compactOnBlur && "min-h-[44px] min-w-[44px] shrink-0"
|
|
537
|
+
)
|
|
514
538
|
}
|
|
515
539
|
),
|
|
516
540
|
helperText ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
517
541
|
"span",
|
|
518
542
|
{
|
|
519
543
|
"data-slot": "chat-input-helper",
|
|
520
|
-
className: "min-w-0 flex-1 truncate px-1 text-center text-xs font-normal text-muted-foreground sm:px-2 sm:text-sm",
|
|
544
|
+
className: _chunkKWLSBTB2cjs.cn.call(void 0, "min-w-0 flex-1 truncate px-1 text-center text-xs font-normal text-muted-foreground sm:px-2 sm:text-sm", compact && "hidden"),
|
|
521
545
|
children: helperText
|
|
522
546
|
}
|
|
523
|
-
) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex-1" }),
|
|
547
|
+
) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: compact ? "hidden" : "flex-1" }),
|
|
524
548
|
submitLabel ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
525
|
-
|
|
549
|
+
_chunkJDEXZGIYcjs.Button,
|
|
526
550
|
{
|
|
527
551
|
type: "submit",
|
|
528
552
|
disabled: !canSubmit,
|
|
529
553
|
"data-chat-action": "submit",
|
|
530
|
-
className: spacious
|
|
554
|
+
className: _chunkKWLSBTB2cjs.cn.call(void 0, spacious && "rounded-xl", compactOnBlur && "min-h-[44px] min-w-[44px] shrink-0"),
|
|
531
555
|
children: [
|
|
532
556
|
submitLabel,
|
|
533
557
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ArrowRight, { className: "ml-2 h-4 w-4" })
|
|
534
558
|
]
|
|
535
559
|
}
|
|
536
560
|
) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
537
|
-
|
|
561
|
+
_chunkJDEXZGIYcjs.Button,
|
|
538
562
|
{
|
|
539
563
|
type: "submit",
|
|
540
|
-
size: spacious ? "icon-lg" : "icon",
|
|
564
|
+
size: spacious && !compact ? "icon-lg" : "icon",
|
|
541
565
|
disabled: !canSubmit,
|
|
542
566
|
"aria-label": "Send",
|
|
543
567
|
"data-chat-action": "submit",
|
|
544
|
-
className: spacious
|
|
568
|
+
className: _chunkKWLSBTB2cjs.cn.call(void 0, spacious && "rounded-xl", compactOnBlur && "min-h-[44px] min-w-[44px] shrink-0"),
|
|
545
569
|
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ArrowUp, { className: _chunkKWLSBTB2cjs.cn.call(void 0, spacious && "h-5 w-5") })
|
|
546
570
|
}
|
|
547
571
|
)
|
|
@@ -577,7 +601,7 @@ function VoiceHero({
|
|
|
577
601
|
}) {
|
|
578
602
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col items-center gap-5 py-6", children: [
|
|
579
603
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
580
|
-
|
|
604
|
+
_chunkLKPM6DQPcjs.VoiceDictationButton,
|
|
581
605
|
{
|
|
582
606
|
size: "lg",
|
|
583
607
|
title: voiceTitle,
|
|
@@ -605,27 +629,40 @@ var EXAMPLE_PROMPT_LAYOUTS = {
|
|
|
605
629
|
row: "row",
|
|
606
630
|
cards: "grid"
|
|
607
631
|
};
|
|
608
|
-
function
|
|
609
|
-
|
|
632
|
+
function ChatSuggestions({
|
|
633
|
+
slot,
|
|
634
|
+
items,
|
|
610
635
|
onSelect,
|
|
611
|
-
label
|
|
636
|
+
label,
|
|
637
|
+
showLabel = true,
|
|
612
638
|
variant = "chips",
|
|
639
|
+
disabled = false,
|
|
613
640
|
className
|
|
614
641
|
}) {
|
|
615
642
|
const labelId = _react.useId.call(void 0, );
|
|
616
|
-
if (
|
|
643
|
+
if (items.length === 0) return null;
|
|
617
644
|
const cards = variant === "cards";
|
|
618
|
-
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { "data-slot":
|
|
619
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { id: labelId, "data-slot":
|
|
620
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
621
|
-
|
|
645
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { "data-slot": slot, "data-variant": variant, className, children: [
|
|
646
|
+
showLabel && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { id: labelId, "data-slot": `${slot}-label`, className: "mb-2 text-left text-xs text-muted-foreground", children: label }),
|
|
647
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
648
|
+
_chunkM4V7OJNFcjs.Suggestions,
|
|
622
649
|
{
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
650
|
+
role: "group",
|
|
651
|
+
"aria-labelledby": showLabel ? labelId : void 0,
|
|
652
|
+
"aria-label": showLabel ? void 0 : label,
|
|
653
|
+
layout: EXAMPLE_PROMPT_LAYOUTS[variant],
|
|
654
|
+
children: items.map((item) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
655
|
+
_chunkM4V7OJNFcjs.Suggestion,
|
|
656
|
+
{
|
|
657
|
+
suggestion: item,
|
|
658
|
+
onClick: onSelect,
|
|
659
|
+
disabled,
|
|
660
|
+
className: cards ? "h-auto min-h-12 px-3 py-2.5 text-xs" : void 0
|
|
661
|
+
},
|
|
662
|
+
item
|
|
663
|
+
))
|
|
664
|
+
}
|
|
665
|
+
)
|
|
629
666
|
] });
|
|
630
667
|
}
|
|
631
668
|
function ExamplePromptsLoading({ label, className }) {
|
|
@@ -669,6 +706,8 @@ var Chat = _react.forwardRef.call(void 0, function Chat2({
|
|
|
669
706
|
examplePromptsVariant = "chips",
|
|
670
707
|
examplePromptsLoading = false,
|
|
671
708
|
examplePromptsLoadingLabel = "Loading suggestions\u2026",
|
|
709
|
+
replySuggestions = [],
|
|
710
|
+
replySuggestionsLabel = "Suggested replies",
|
|
672
711
|
compactEmptyState = false,
|
|
673
712
|
defaultMode,
|
|
674
713
|
placeholder = "Type your message\u2026",
|
|
@@ -681,6 +720,7 @@ var Chat = _react.forwardRef.call(void 0, function Chat2({
|
|
|
681
720
|
addFilesLabel,
|
|
682
721
|
uploadingLabel,
|
|
683
722
|
composerAppearance = "default",
|
|
723
|
+
mobileCompactComposer = false,
|
|
684
724
|
composerHelperText,
|
|
685
725
|
composerPrivacyNote,
|
|
686
726
|
emptyFileDropzone = false,
|
|
@@ -714,6 +754,14 @@ var Chat = _react.forwardRef.call(void 0, function Chat2({
|
|
|
714
754
|
const conversationStarted = messages.length > 0;
|
|
715
755
|
const [userMode, setUserMode] = _react.useState.call(void 0, null);
|
|
716
756
|
const mode = _nullishCoalesce(_nullishCoalesce(userMode, () => ( defaultMode)), () => ( (isMobile ? "voice" : "text")));
|
|
757
|
+
const reportSendError = _react.useCallback.call(void 0,
|
|
758
|
+
(cause) => {
|
|
759
|
+
if (onSendError) onSendError(cause);
|
|
760
|
+
else if (typeof globalThis.reportError === "function") globalThis.reportError(cause);
|
|
761
|
+
else console.error(cause);
|
|
762
|
+
},
|
|
763
|
+
[onSendError]
|
|
764
|
+
);
|
|
717
765
|
const send = _react.useCallback.call(void 0,
|
|
718
766
|
async (text, sentAttachments = attachments) => {
|
|
719
767
|
const trimmed = text.trim();
|
|
@@ -726,18 +774,29 @@ var Chat = _react.forwardRef.call(void 0, function Chat2({
|
|
|
726
774
|
setInput((current) => current ? current : trimmed);
|
|
727
775
|
if (mode === "voice") setUserMode("text");
|
|
728
776
|
}
|
|
729
|
-
|
|
730
|
-
else if (typeof globalThis.reportError === "function") globalThis.reportError(cause);
|
|
731
|
-
else console.error(cause);
|
|
777
|
+
reportSendError(cause);
|
|
732
778
|
}
|
|
733
779
|
window.setTimeout(() => _optionalChain([inputRef, 'access', _9 => _9.current, 'optionalAccess', _10 => _10.focus, 'call', _11 => _11()]), 0);
|
|
734
780
|
},
|
|
735
|
-
[attachments, mode, onSend,
|
|
781
|
+
[attachments, mode, onSend, pending, reportSendError]
|
|
782
|
+
);
|
|
783
|
+
const sendSuggestion = _react.useCallback.call(void 0,
|
|
784
|
+
async (text) => {
|
|
785
|
+
const trimmed = text.trim();
|
|
786
|
+
if (!trimmed || pending) return;
|
|
787
|
+
try {
|
|
788
|
+
await onSend(trimmed, []);
|
|
789
|
+
} catch (cause) {
|
|
790
|
+
reportSendError(cause);
|
|
791
|
+
}
|
|
792
|
+
window.setTimeout(() => _optionalChain([inputRef, 'access', _12 => _12.current, 'optionalAccess', _13 => _13.focus, 'call', _14 => _14()]), 0);
|
|
793
|
+
},
|
|
794
|
+
[onSend, pending, reportSendError]
|
|
736
795
|
);
|
|
737
796
|
_react.useImperativeHandle.call(void 0,
|
|
738
797
|
ref,
|
|
739
798
|
() => ({
|
|
740
|
-
focusInput: () => _optionalChain([inputRef, 'access',
|
|
799
|
+
focusInput: () => _optionalChain([inputRef, 'access', _15 => _15.current, 'optionalAccess', _16 => _16.focus, 'call', _17 => _17()]),
|
|
741
800
|
clearInput: () => setInput("")
|
|
742
801
|
}),
|
|
743
802
|
[]
|
|
@@ -745,7 +804,7 @@ var Chat = _react.forwardRef.call(void 0, function Chat2({
|
|
|
745
804
|
const dropFiles = _react.useCallback.call(void 0,
|
|
746
805
|
(files) => {
|
|
747
806
|
if (!conversationStarted && mode === "voice") setUserMode("text");
|
|
748
|
-
return _optionalChain([onFilesSelected, 'optionalCall',
|
|
807
|
+
return _optionalChain([onFilesSelected, 'optionalCall', _18 => _18(files)]);
|
|
749
808
|
},
|
|
750
809
|
[conversationStarted, mode, onFilesSelected]
|
|
751
810
|
);
|
|
@@ -754,7 +813,7 @@ var Chat = _react.forwardRef.call(void 0, function Chat2({
|
|
|
754
813
|
const showEmptyFileDropzone = emptyFileDropzone && Boolean(onFilesSelected) && attachments.length === 0;
|
|
755
814
|
const showEmptyPending = !conversationStarted && pending && Boolean(emptyPendingContent);
|
|
756
815
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
757
|
-
|
|
816
|
+
_chunkZ3JJSNR5cjs.FileDropArea,
|
|
758
817
|
{
|
|
759
818
|
"data-slot": "chat",
|
|
760
819
|
"data-layout": layout,
|
|
@@ -822,7 +881,7 @@ var Chat = _react.forwardRef.call(void 0, function Chat2({
|
|
|
822
881
|
),
|
|
823
882
|
children: [
|
|
824
883
|
showEmptyFileDropzone && onFilesSelected && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
825
|
-
|
|
884
|
+
_chunkZ3JJSNR5cjs.FileDropzone,
|
|
826
885
|
{
|
|
827
886
|
multiple: true,
|
|
828
887
|
onFiles: onFilesSelected,
|
|
@@ -873,12 +932,14 @@ var Chat = _react.forwardRef.call(void 0, function Chat2({
|
|
|
873
932
|
error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ChatError, { children: error }),
|
|
874
933
|
!pending && examplePromptsLoading && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ExamplePromptsLoading, { label: examplePromptsLoadingLabel }),
|
|
875
934
|
!pending && !examplePromptsLoading && examplePrompts.length > 0 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
876
|
-
|
|
935
|
+
ChatSuggestions,
|
|
877
936
|
{
|
|
878
|
-
|
|
879
|
-
|
|
937
|
+
slot: "chat-examples",
|
|
938
|
+
items: examplePrompts,
|
|
939
|
+
onSelect: (prompt) => void sendSuggestion(prompt),
|
|
880
940
|
label: examplePromptsLabel,
|
|
881
|
-
variant: examplePromptsVariant
|
|
941
|
+
variant: examplePromptsVariant,
|
|
942
|
+
className: examplePromptsVariant === "cards" ? "mt-4" : "mt-3"
|
|
882
943
|
}
|
|
883
944
|
),
|
|
884
945
|
emptyFooter && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { "data-slot": "chat-empty-footer", className: "mt-5", children: emptyFooter })
|
|
@@ -917,9 +978,22 @@ var Chat = _react.forwardRef.call(void 0, function Chat2({
|
|
|
917
978
|
className: _chunkKWLSBTB2cjs.cn.call(void 0,
|
|
918
979
|
"pt-3",
|
|
919
980
|
application && "px-4 py-3 md:bg-transparent md:px-0 md:pb-0 md:backdrop-blur-none md:supports-backdrop-filter:bg-transparent",
|
|
920
|
-
workspace && "border-0 bg-gradient-to-t from-background via-background to-transparent px-4 pb-[max(1.25rem,env(safe-area-inset-bottom))] pt-8 backdrop-blur-none supports-[backdrop-filter]:bg-gradient-to-t"
|
|
981
|
+
workspace && "border-0 bg-gradient-to-t from-background via-background to-transparent px-4 pb-[max(1.25rem,env(safe-area-inset-bottom))] pt-8 backdrop-blur-none supports-[backdrop-filter]:bg-gradient-to-t",
|
|
982
|
+
workspace && mobileCompactComposer && "max-md:pb-[max(0.75rem,env(safe-area-inset-bottom))] max-md:pt-3"
|
|
921
983
|
),
|
|
922
984
|
children: [
|
|
985
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
986
|
+
ChatSuggestions,
|
|
987
|
+
{
|
|
988
|
+
slot: "chat-replies",
|
|
989
|
+
items: replySuggestions,
|
|
990
|
+
onSelect: (reply) => void sendSuggestion(reply),
|
|
991
|
+
label: replySuggestionsLabel,
|
|
992
|
+
showLabel: false,
|
|
993
|
+
disabled: pending,
|
|
994
|
+
className: _chunkKWLSBTB2cjs.cn.call(void 0, "mb-3", workspace && "mx-auto max-w-3xl")
|
|
995
|
+
}
|
|
996
|
+
),
|
|
923
997
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
924
998
|
ChatInput,
|
|
925
999
|
{
|
|
@@ -940,6 +1014,7 @@ var Chat = _react.forwardRef.call(void 0, function Chat2({
|
|
|
940
1014
|
addFilesLabel,
|
|
941
1015
|
uploadingLabel,
|
|
942
1016
|
appearance: composerAppearance,
|
|
1017
|
+
compactOnBlur: mobileCompactComposer && isMobile,
|
|
943
1018
|
helperText: composerHelperText,
|
|
944
1019
|
privacyNote: composerPrivacyNote,
|
|
945
1020
|
className: workspace ? "mx-auto max-w-3xl rounded-3xl shadow-sm" : void 0
|