@epicbagel/saas-kit 1.5.0 → 1.6.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 +22 -0
- 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.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 +85 -58
- package/dist/primitives/chat.d.cts +13 -1
- package/dist/primitives/chat.d.ts +13 -1
- package/dist/primitives/chat.js +50 -23
- 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/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/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/voice-dictation-button.cjs +3 -3
- package/dist/primitives/voice-dictation-button.js +2 -2
- package/package.json +11 -1
|
@@ -4,12 +4,12 @@ import * as class_variance_authority_types from 'class-variance-authority/types'
|
|
|
4
4
|
import { VariantProps } from 'class-variance-authority';
|
|
5
5
|
|
|
6
6
|
declare const buttonVariants: (props?: ({
|
|
7
|
-
variant?: "link" | "default" | "secondary" | "destructive" | "outline" | "outline-muted" | "
|
|
8
|
-
size?: "filter" | "status" | "toolbar" | "sm" | "lg" | "default" | "micro" | "compact" | "hero" | "icon" | "icon-lg" | "icon-sm" | "icon-md" | "icon-xs" | "icon-compact" | "icon-micro" | "bare" | "voice-sm" | "voice" | "suggestion" |
|
|
7
|
+
variant?: "link" | "default" | "ghost" | "secondary" | "destructive" | "outline" | "outline-muted" | "quiet" | "ghost-destructive" | "link-muted" | "inverted" | "status-error" | "status-warning" | "status-muted" | null | undefined;
|
|
8
|
+
size?: "filter" | "status" | "toolbar" | "sm" | "lg" | "default" | "micro" | "tone" | "compact" | "hero" | "icon" | "icon-lg" | "icon-sm" | "icon-md" | "icon-xs" | "icon-compact" | "icon-micro" | "bare" | "voice-sm" | "voice" | "suggestion" | null | undefined;
|
|
9
9
|
width?: "auto" | "full" | "responsive" | null | undefined;
|
|
10
10
|
align?: "center" | "start" | null | undefined;
|
|
11
11
|
shrink?: boolean | null | undefined;
|
|
12
|
-
shape?: "circle" | "default" | null | undefined;
|
|
12
|
+
shape?: "circle" | "default" | "pill" | null | undefined;
|
|
13
13
|
ring?: "none" | "surface" | null | undefined;
|
|
14
14
|
grow?: boolean | null | undefined;
|
|
15
15
|
minWidth?: "auto" | "zero" | null | undefined;
|
|
@@ -4,12 +4,12 @@ import * as class_variance_authority_types from 'class-variance-authority/types'
|
|
|
4
4
|
import { VariantProps } from 'class-variance-authority';
|
|
5
5
|
|
|
6
6
|
declare const buttonVariants: (props?: ({
|
|
7
|
-
variant?: "link" | "default" | "secondary" | "destructive" | "outline" | "outline-muted" | "
|
|
8
|
-
size?: "filter" | "status" | "toolbar" | "sm" | "lg" | "default" | "micro" | "compact" | "hero" | "icon" | "icon-lg" | "icon-sm" | "icon-md" | "icon-xs" | "icon-compact" | "icon-micro" | "bare" | "voice-sm" | "voice" | "suggestion" |
|
|
7
|
+
variant?: "link" | "default" | "ghost" | "secondary" | "destructive" | "outline" | "outline-muted" | "quiet" | "ghost-destructive" | "link-muted" | "inverted" | "status-error" | "status-warning" | "status-muted" | null | undefined;
|
|
8
|
+
size?: "filter" | "status" | "toolbar" | "sm" | "lg" | "default" | "micro" | "tone" | "compact" | "hero" | "icon" | "icon-lg" | "icon-sm" | "icon-md" | "icon-xs" | "icon-compact" | "icon-micro" | "bare" | "voice-sm" | "voice" | "suggestion" | null | undefined;
|
|
9
9
|
width?: "auto" | "full" | "responsive" | null | undefined;
|
|
10
10
|
align?: "center" | "start" | null | undefined;
|
|
11
11
|
shrink?: boolean | null | undefined;
|
|
12
|
-
shape?: "circle" | "default" | null | undefined;
|
|
12
|
+
shape?: "circle" | "default" | "pill" | null | undefined;
|
|
13
13
|
ring?: "none" | "surface" | null | undefined;
|
|
14
14
|
grow?: boolean | null | undefined;
|
|
15
15
|
minWidth?: "auto" | "zero" | null | undefined;
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
6
|
-
require('../chunk-
|
|
5
|
+
var _chunkVOTCYG3Fcjs = require('../chunk-VOTCYG3F.cjs');
|
|
6
|
+
require('../chunk-JDEXZGIY.cjs');
|
|
7
7
|
require('../chunk-KWLSBTB2.cjs');
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
exports.Calendar =
|
|
11
|
+
exports.Calendar = _chunkVOTCYG3Fcjs.Calendar; exports.CalendarDayButton = _chunkVOTCYG3Fcjs.CalendarDayButton;
|
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,
|
|
@@ -617,8 +641,8 @@ function ExamplePrompts({
|
|
|
617
641
|
const cards = variant === "cards";
|
|
618
642
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { "data-slot": "chat-examples", "data-variant": variant, className: _chunkKWLSBTB2cjs.cn.call(void 0, cards ? "mt-4" : "mt-3", className), children: [
|
|
619
643
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { id: labelId, "data-slot": "chat-examples-label", className: "mb-2 text-left text-xs text-muted-foreground", children: label }),
|
|
620
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
621
|
-
|
|
644
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM4V7OJNFcjs.Suggestions, { role: "group", "aria-labelledby": labelId, layout: EXAMPLE_PROMPT_LAYOUTS[variant], children: prompts.map((prompt) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
645
|
+
_chunkM4V7OJNFcjs.Suggestion,
|
|
622
646
|
{
|
|
623
647
|
suggestion: prompt,
|
|
624
648
|
onClick: onSelect,
|
|
@@ -681,6 +705,7 @@ var Chat = _react.forwardRef.call(void 0, function Chat2({
|
|
|
681
705
|
addFilesLabel,
|
|
682
706
|
uploadingLabel,
|
|
683
707
|
composerAppearance = "default",
|
|
708
|
+
mobileCompactComposer = false,
|
|
684
709
|
composerHelperText,
|
|
685
710
|
composerPrivacyNote,
|
|
686
711
|
emptyFileDropzone = false,
|
|
@@ -754,7 +779,7 @@ var Chat = _react.forwardRef.call(void 0, function Chat2({
|
|
|
754
779
|
const showEmptyFileDropzone = emptyFileDropzone && Boolean(onFilesSelected) && attachments.length === 0;
|
|
755
780
|
const showEmptyPending = !conversationStarted && pending && Boolean(emptyPendingContent);
|
|
756
781
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
757
|
-
|
|
782
|
+
_chunkZ3JJSNR5cjs.FileDropArea,
|
|
758
783
|
{
|
|
759
784
|
"data-slot": "chat",
|
|
760
785
|
"data-layout": layout,
|
|
@@ -822,7 +847,7 @@ var Chat = _react.forwardRef.call(void 0, function Chat2({
|
|
|
822
847
|
),
|
|
823
848
|
children: [
|
|
824
849
|
showEmptyFileDropzone && onFilesSelected && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
825
|
-
|
|
850
|
+
_chunkZ3JJSNR5cjs.FileDropzone,
|
|
826
851
|
{
|
|
827
852
|
multiple: true,
|
|
828
853
|
onFiles: onFilesSelected,
|
|
@@ -917,7 +942,8 @@ var Chat = _react.forwardRef.call(void 0, function Chat2({
|
|
|
917
942
|
className: _chunkKWLSBTB2cjs.cn.call(void 0,
|
|
918
943
|
"pt-3",
|
|
919
944
|
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"
|
|
945
|
+
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",
|
|
946
|
+
workspace && mobileCompactComposer && "max-md:pb-[max(0.75rem,env(safe-area-inset-bottom))] max-md:pt-3"
|
|
921
947
|
),
|
|
922
948
|
children: [
|
|
923
949
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -940,6 +966,7 @@ var Chat = _react.forwardRef.call(void 0, function Chat2({
|
|
|
940
966
|
addFilesLabel,
|
|
941
967
|
uploadingLabel,
|
|
942
968
|
appearance: composerAppearance,
|
|
969
|
+
compactOnBlur: mobileCompactComposer && isMobile,
|
|
943
970
|
helperText: composerHelperText,
|
|
944
971
|
privacyNote: composerPrivacyNote,
|
|
945
972
|
className: workspace ? "mx-auto max-w-3xl rounded-3xl shadow-sm" : void 0
|
|
@@ -183,6 +183,12 @@ interface ChatInputProps {
|
|
|
183
183
|
addFilesLabel?: string;
|
|
184
184
|
/** Visual density for the complete composer surface. */
|
|
185
185
|
appearance?: "default" | "spacious";
|
|
186
|
+
/**
|
|
187
|
+
* Fold an empty, unfocused composer into one row. Focusing its textarea
|
|
188
|
+
* expands it; drafts and staged files always keep it expanded. Chat enables
|
|
189
|
+
* this only for an active mobile conversation with `mobileCompactComposer`.
|
|
190
|
+
*/
|
|
191
|
+
compactOnBlur?: boolean;
|
|
186
192
|
/** Quiet contextual copy between the composer controls. */
|
|
187
193
|
helperText?: ReactNode;
|
|
188
194
|
/** Privacy or visibility reassurance rendered below the composer. */
|
|
@@ -204,7 +210,7 @@ interface ChatInputProps {
|
|
|
204
210
|
* `<Chat>` instead of composing `<ChatInput>` directly if you want
|
|
205
211
|
* device-aware default modes.
|
|
206
212
|
*/
|
|
207
|
-
declare function ChatInput({ value, onChange, onSend, pending, disabled, placeholder, size, uploadingLabel, voice, voiceTitle, voiceLang, submitLabel, autoFocus, className, inputRef, attachments, onFilesSelected, onRemoveAttachment, accept, multiple, addFilesLabel, appearance, helperText, privacyNote, }: ChatInputProps): react_jsx_runtime.JSX.Element;
|
|
213
|
+
declare function ChatInput({ value, onChange, onSend, pending, disabled, placeholder, size, uploadingLabel, voice, voiceTitle, voiceLang, submitLabel, autoFocus, className, inputRef, attachments, onFilesSelected, onRemoveAttachment, accept, multiple, addFilesLabel, appearance, compactOnBlur, helperText, privacyNote, }: ChatInputProps): react_jsx_runtime.JSX.Element;
|
|
208
214
|
interface ChatProps {
|
|
209
215
|
/** Conversation messages. */
|
|
210
216
|
messages: ChatMessage[];
|
|
@@ -299,6 +305,12 @@ interface ChatProps {
|
|
|
299
305
|
uploadingLabel?: string;
|
|
300
306
|
/** Visual treatment for both empty and active text composers. */
|
|
301
307
|
composerAppearance?: ChatInputProps["appearance"];
|
|
308
|
+
/**
|
|
309
|
+
* On phones (below 768px), fold an active conversation's empty composer
|
|
310
|
+
* into one row until its textarea is focused. Drafts and files stay
|
|
311
|
+
* expanded. Desktop and the new-conversation composer are unchanged.
|
|
312
|
+
*/
|
|
313
|
+
mobileCompactComposer?: boolean;
|
|
302
314
|
/** Quiet contextual copy inside the composer action row. */
|
|
303
315
|
composerHelperText?: ReactNode;
|
|
304
316
|
/** Privacy or visibility reassurance below the composer. */
|
|
@@ -183,6 +183,12 @@ interface ChatInputProps {
|
|
|
183
183
|
addFilesLabel?: string;
|
|
184
184
|
/** Visual density for the complete composer surface. */
|
|
185
185
|
appearance?: "default" | "spacious";
|
|
186
|
+
/**
|
|
187
|
+
* Fold an empty, unfocused composer into one row. Focusing its textarea
|
|
188
|
+
* expands it; drafts and staged files always keep it expanded. Chat enables
|
|
189
|
+
* this only for an active mobile conversation with `mobileCompactComposer`.
|
|
190
|
+
*/
|
|
191
|
+
compactOnBlur?: boolean;
|
|
186
192
|
/** Quiet contextual copy between the composer controls. */
|
|
187
193
|
helperText?: ReactNode;
|
|
188
194
|
/** Privacy or visibility reassurance rendered below the composer. */
|
|
@@ -204,7 +210,7 @@ interface ChatInputProps {
|
|
|
204
210
|
* `<Chat>` instead of composing `<ChatInput>` directly if you want
|
|
205
211
|
* device-aware default modes.
|
|
206
212
|
*/
|
|
207
|
-
declare function ChatInput({ value, onChange, onSend, pending, disabled, placeholder, size, uploadingLabel, voice, voiceTitle, voiceLang, submitLabel, autoFocus, className, inputRef, attachments, onFilesSelected, onRemoveAttachment, accept, multiple, addFilesLabel, appearance, helperText, privacyNote, }: ChatInputProps): react_jsx_runtime.JSX.Element;
|
|
213
|
+
declare function ChatInput({ value, onChange, onSend, pending, disabled, placeholder, size, uploadingLabel, voice, voiceTitle, voiceLang, submitLabel, autoFocus, className, inputRef, attachments, onFilesSelected, onRemoveAttachment, accept, multiple, addFilesLabel, appearance, compactOnBlur, helperText, privacyNote, }: ChatInputProps): react_jsx_runtime.JSX.Element;
|
|
208
214
|
interface ChatProps {
|
|
209
215
|
/** Conversation messages. */
|
|
210
216
|
messages: ChatMessage[];
|
|
@@ -299,6 +305,12 @@ interface ChatProps {
|
|
|
299
305
|
uploadingLabel?: string;
|
|
300
306
|
/** Visual treatment for both empty and active text composers. */
|
|
301
307
|
composerAppearance?: ChatInputProps["appearance"];
|
|
308
|
+
/**
|
|
309
|
+
* On phones (below 768px), fold an active conversation's empty composer
|
|
310
|
+
* into one row until its textarea is focused. Drafts and files stay
|
|
311
|
+
* expanded. Desktop and the new-conversation composer are unchanged.
|
|
312
|
+
*/
|
|
313
|
+
mobileCompactComposer?: boolean;
|
|
302
314
|
/** Quiet contextual copy inside the composer action row. */
|
|
303
315
|
composerHelperText?: ReactNode;
|
|
304
316
|
/** Privacy or visibility reassurance below the composer. */
|