@epicbagel/saas-kit 1.4.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.
Files changed (130) hide show
  1. package/README.md +57 -0
  2. package/dist/{chunk-GFG2R5BZ.js → chunk-2V7AVB2U.js} +1 -1
  3. package/dist/{chunk-LI5EOSQG.js → chunk-43UMPZWD.js} +1 -1
  4. package/dist/{chunk-XABXUP6L.cjs → chunk-5VMKDVB6.cjs} +2 -2
  5. package/dist/{chunk-QNZYQLNP.js → chunk-6S6GD43V.js} +1 -1
  6. package/dist/{chunk-WQJKUKBL.cjs → chunk-6YXKFVZU.cjs} +4 -4
  7. package/dist/{chunk-RIWLAMME.cjs → chunk-7LDJAXRX.cjs} +2 -2
  8. package/dist/{chunk-FNDBM67K.cjs → chunk-7YCKII7G.cjs} +2 -2
  9. package/dist/{chunk-2TKLS73N.js → chunk-C3VZMTVB.js} +1 -1
  10. package/dist/{chunk-G54TQV2R.cjs → chunk-CLYAASFN.cjs} +2 -2
  11. package/dist/{chunk-SGW4FWBX.cjs → chunk-CRTH5GJ5.cjs} +13 -13
  12. package/dist/{chunk-EZCKWTH7.js → chunk-CYDICVH2.js} +1 -1
  13. package/dist/{chunk-J3GQXM37.js → chunk-EEHIMPD7.js} +1 -1
  14. package/dist/{chunk-4NN7EA3W.js → chunk-ET4THLFX.js} +1 -1
  15. package/dist/{chunk-PNWNU6JW.cjs → chunk-EUFV25KL.cjs} +4 -4
  16. package/dist/{chunk-HHV4G77I.js → chunk-F3B4M6DU.js} +1 -1
  17. package/dist/{chunk-32Q4XOTU.cjs → chunk-FYRQFEU4.cjs} +2 -2
  18. package/dist/{chunk-VLXPLKFR.cjs → chunk-GTVSRRE3.cjs} +2 -2
  19. package/dist/{chunk-RRRD5EUI.js → chunk-H2CCBRVG.js} +1 -1
  20. package/dist/{chunk-JZOBIPFC.js → chunk-H4XH2PPU.js} +61 -2
  21. package/dist/{chunk-M7FYGAGO.js → chunk-HBRVOGLA.js} +1 -1
  22. package/dist/{chunk-NW3OWKBN.js → chunk-HREEZUKL.js} +1 -1
  23. package/dist/{chunk-THWIJG5C.js → chunk-IJG2B3Y2.js} +1 -1
  24. package/dist/{chunk-L4DH72UF.cjs → chunk-JDEXZGIY.cjs} +2 -1
  25. package/dist/{chunk-HRLP4BHJ.js → chunk-JN6JOSZG.js} +4 -4
  26. package/dist/{chunk-NE3ZVJ6G.cjs → chunk-KM5FHCXU.cjs} +8 -8
  27. package/dist/{chunk-MLHNYRFX.js → chunk-KNKV25WS.js} +2 -2
  28. package/dist/{chunk-23UMHZ4S.cjs → chunk-LIUYHYFN.cjs} +3 -3
  29. package/dist/{chunk-EOUO3ORO.cjs → chunk-LKPM6DQP.cjs} +3 -3
  30. package/dist/{chunk-SUB4BAYE.cjs → chunk-M4V7OJNF.cjs} +2 -2
  31. package/dist/{chunk-VKIGJNJR.cjs → chunk-MU4F3DSW.cjs} +2 -2
  32. package/dist/{chunk-2AU7ZRGX.cjs → chunk-NWDPH2Z7.cjs} +61 -2
  33. package/dist/{chunk-MHYAVXOE.js → chunk-QTPPNK6F.js} +1 -1
  34. package/dist/{chunk-IH3COANJ.cjs → chunk-QTWJQQDH.cjs} +12 -12
  35. package/dist/chunk-QZBPZLAB.js +24 -0
  36. package/dist/{chunk-HAC32ALJ.js → chunk-TI57GAQP.js} +1 -1
  37. package/dist/{chunk-GRY77463.cjs → chunk-TP74SBRH.cjs} +3 -3
  38. package/dist/chunk-VMXKT67E.cjs +24 -0
  39. package/dist/{chunk-R5L4CM6V.cjs → chunk-VOTCYG3F.cjs} +4 -4
  40. package/dist/{chunk-HQRWRRZJ.js → chunk-W326GKML.js} +2 -1
  41. package/dist/{chunk-HYSWE75T.js → chunk-WL73DFE3.js} +1 -1
  42. package/dist/{chunk-KADJ56AH.cjs → chunk-Z3JJSNR5.cjs} +2 -2
  43. package/dist/{chunk-FLPYZNWZ.js → chunk-ZLU32SRP.js} +1 -1
  44. package/dist/primitives/activity-feed.cjs +3 -3
  45. package/dist/primitives/activity-feed.js +2 -2
  46. package/dist/primitives/activity-log.cjs +3 -3
  47. package/dist/primitives/activity-log.js +2 -2
  48. package/dist/primitives/alert-dialog.cjs +3 -3
  49. package/dist/primitives/alert-dialog.js +2 -2
  50. package/dist/primitives/alert.d.cts +1 -1
  51. package/dist/primitives/alert.d.ts +1 -1
  52. package/dist/primitives/archive-confirmation-dialog.cjs +4 -4
  53. package/dist/primitives/archive-confirmation-dialog.js +3 -3
  54. package/dist/primitives/attachment.cjs +3 -3
  55. package/dist/primitives/attachment.js +2 -2
  56. package/dist/primitives/badge.d.cts +1 -1
  57. package/dist/primitives/badge.d.ts +1 -1
  58. package/dist/primitives/board-view.cjs +7 -7
  59. package/dist/primitives/board-view.js +6 -6
  60. package/dist/primitives/bubble.d.cts +1 -1
  61. package/dist/primitives/bubble.d.ts +1 -1
  62. package/dist/primitives/button.cjs +2 -2
  63. package/dist/primitives/button.d.cts +3 -3
  64. package/dist/primitives/button.d.ts +3 -3
  65. package/dist/primitives/button.js +1 -1
  66. package/dist/primitives/calendar.cjs +3 -3
  67. package/dist/primitives/calendar.js +2 -2
  68. package/dist/primitives/chat.cjs +144 -64
  69. package/dist/primitives/chat.d.cts +59 -3
  70. package/dist/primitives/chat.d.ts +59 -3
  71. package/dist/primitives/chat.js +104 -24
  72. package/dist/primitives/code-block.cjs +4 -4
  73. package/dist/primitives/code-block.js +3 -3
  74. package/dist/primitives/confirm-bar.cjs +3 -3
  75. package/dist/primitives/confirm-bar.js +1 -1
  76. package/dist/primitives/connection-status-bar.cjs +4 -4
  77. package/dist/primitives/connection-status-bar.js +1 -1
  78. package/dist/primitives/connection.cjs +13 -13
  79. package/dist/primitives/connection.js +3 -3
  80. package/dist/primitives/copy-button.cjs +3 -3
  81. package/dist/primitives/copy-button.js +2 -2
  82. package/dist/primitives/decision-actions.cjs +2 -2
  83. package/dist/primitives/decision-actions.js +1 -1
  84. package/dist/primitives/delete-confirmation-dialog.cjs +4 -4
  85. package/dist/primitives/delete-confirmation-dialog.js +3 -3
  86. package/dist/primitives/document-preview.cjs +4 -4
  87. package/dist/primitives/document-preview.js +2 -2
  88. package/dist/primitives/editable-list.cjs +6 -6
  89. package/dist/primitives/editable-list.js +1 -1
  90. package/dist/primitives/empty-state.cjs +3 -3
  91. package/dist/primitives/empty-state.js +2 -2
  92. package/dist/primitives/file-dropzone.cjs +3 -3
  93. package/dist/primitives/file-dropzone.js +2 -2
  94. package/dist/primitives/file-preview-internals.cjs +3 -3
  95. package/dist/primitives/file-preview-internals.js +2 -2
  96. package/dist/primitives/file-preview.cjs +15 -15
  97. package/dist/primitives/file-preview.js +4 -4
  98. package/dist/primitives/filter-bar.cjs +4 -4
  99. package/dist/primitives/filter-bar.js +3 -3
  100. package/dist/primitives/input-group.cjs +3 -3
  101. package/dist/primitives/input-group.js +2 -2
  102. package/dist/primitives/load-more-button.cjs +3 -3
  103. package/dist/primitives/load-more-button.js +2 -2
  104. package/dist/primitives/message-scroller.cjs +3 -3
  105. package/dist/primitives/message-scroller.js +2 -2
  106. package/dist/primitives/message.cjs +8 -2
  107. package/dist/primitives/message.d.cts +35 -1
  108. package/dist/primitives/message.d.ts +35 -1
  109. package/dist/primitives/message.js +7 -1
  110. package/dist/primitives/page-header-actions.cjs +3 -3
  111. package/dist/primitives/page-header-actions.js +2 -2
  112. package/dist/primitives/quick-filters.cjs +3 -3
  113. package/dist/primitives/quick-filters.js +2 -2
  114. package/dist/primitives/resource-list.cjs +7 -7
  115. package/dist/primitives/resource-list.js +6 -6
  116. package/dist/primitives/search-input.cjs +101 -0
  117. package/dist/primitives/search-input.d.cts +23 -0
  118. package/dist/primitives/search-input.d.ts +23 -0
  119. package/dist/primitives/search-input.js +101 -0
  120. package/dist/primitives/spinner.cjs +3 -18
  121. package/dist/primitives/spinner.js +3 -18
  122. package/dist/primitives/split-action-button.cjs +3 -3
  123. package/dist/primitives/split-action-button.js +1 -1
  124. package/dist/primitives/suggestion.cjs +3 -3
  125. package/dist/primitives/suggestion.js +2 -2
  126. package/dist/primitives/tag-input.cjs +3 -3
  127. package/dist/primitives/tag-input.js +1 -1
  128. package/dist/primitives/voice-dictation-button.cjs +3 -3
  129. package/dist/primitives/voice-dictation-button.js +2 -2
  130. package/package.json +11 -1
@@ -7,11 +7,11 @@
7
7
  var _chunk2BTDBZYNcjs = require('../chunk-2BTDBZYN.cjs');
8
8
 
9
9
 
10
- var _chunkEOUO3OROcjs = require('../chunk-EOUO3ORO.cjs');
10
+ var _chunkLKPM6DQPcjs = require('../chunk-LKPM6DQP.cjs');
11
11
 
12
12
 
13
13
 
14
- var _chunkSUB4BAYEcjs = require('../chunk-SUB4BAYE.cjs');
14
+ var _chunkM4V7OJNFcjs = require('../chunk-M4V7OJNF.cjs');
15
15
 
16
16
 
17
17
 
@@ -19,11 +19,13 @@ var _chunkSUB4BAYEcjs = require('../chunk-SUB4BAYE.cjs');
19
19
 
20
20
 
21
21
 
22
- var _chunkXABXUP6Lcjs = require('../chunk-XABXUP6L.cjs');
22
+ var _chunk5VMKDVB6cjs = require('../chunk-5VMKDVB6.cjs');
23
23
 
24
24
 
25
25
 
26
- var _chunk2AU7ZRGXcjs = require('../chunk-2AU7ZRGX.cjs');
26
+
27
+
28
+ var _chunkNWDPH2Z7cjs = require('../chunk-NWDPH2Z7.cjs');
27
29
 
28
30
 
29
31
 
@@ -32,12 +34,12 @@ var _chunkB765DSRGcjs = require('../chunk-B765DSRG.cjs');
32
34
 
33
35
 
34
36
 
35
- var _chunkRIWLAMMEcjs = require('../chunk-RIWLAMME.cjs');
37
+ var _chunk7LDJAXRXcjs = require('../chunk-7LDJAXRX.cjs');
36
38
  require('../chunk-2HV2KKOE.cjs');
37
39
 
38
40
 
39
41
 
40
- var _chunkKADJ56AHcjs = require('../chunk-KADJ56AH.cjs');
42
+ var _chunkZ3JJSNR5cjs = require('../chunk-Z3JJSNR5.cjs');
41
43
 
42
44
 
43
45
  var _chunkKENBU3NVcjs = require('../chunk-KENBU3NV.cjs');
@@ -64,7 +66,7 @@ require('../chunk-W5HPHEE7.cjs');
64
66
 
65
67
 
66
68
 
67
- var _chunk32Q4XOTUcjs = require('../chunk-32Q4XOTU.cjs');
69
+ var _chunkFYRQFEU4cjs = require('../chunk-FYRQFEU4.cjs');
68
70
  require('../chunk-U2NES7VR.cjs');
69
71
 
70
72
 
@@ -72,7 +74,10 @@ var _chunk2KFZQJH5cjs = require('../chunk-2KFZQJH5.cjs');
72
74
  require('../chunk-PQUSJEXL.cjs');
73
75
 
74
76
 
75
- var _chunkL4DH72UFcjs = require('../chunk-L4DH72UF.cjs');
77
+ var _chunkJDEXZGIYcjs = require('../chunk-JDEXZGIY.cjs');
78
+
79
+
80
+ var _chunk4LXN6GLZcjs = require('../chunk-4LXN6GLZ.cjs');
76
81
 
77
82
 
78
83
  var _chunkR35FT53Gcjs = require('../chunk-R35FT53G.cjs');
@@ -104,8 +109,14 @@ var _react = require('react');
104
109
 
105
110
 
106
111
 
112
+
113
+
107
114
  var _lucidereact = require('lucide-react');
108
115
  var _jsxruntime = require('react/jsx-runtime');
116
+ function offersActions(message) {
117
+ if (message.status) return false;
118
+ return _nullishCoalesce(message.actions, () => ( message.role === "assistant"));
119
+ }
109
120
  function useArrivingUserTurnId(messages) {
110
121
  const seen = _react.useRef.call(void 0, null);
111
122
  seen.current ??= new Set(messages.map((m) => m.id));
@@ -138,7 +149,7 @@ function ChatRunningLine({
138
149
  align = "start",
139
150
  workspace
140
151
  }) {
141
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2AU7ZRGXcjs.Message, { align, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2AU7ZRGXcjs.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 }) }) }) }) });
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 }) }) }) }) });
142
153
  }
143
154
  var ChatThread = _react.forwardRef.call(void 0,
144
155
  function ChatThread2({
@@ -153,20 +164,21 @@ var ChatThread = _react.forwardRef.call(void 0,
153
164
  markdownComponents,
154
165
  onOpenAttachment,
155
166
  attachmentAction = "open",
167
+ messageActions,
156
168
  className
157
169
  }, ref) {
158
170
  const markers = timelineMarkers(messages, /* @__PURE__ */ new Date());
159
171
  const anchorId = useArrivingUserTurnId(messages);
160
172
  const workspace = appearance === "workspace";
161
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXABXUP6Lcjs.MessageScrollerProvider, { autoScroll: true, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
162
- _chunkXABXUP6Lcjs.MessageScroller,
173
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk5VMKDVB6cjs.MessageScrollerProvider, { autoScroll: true, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
174
+ _chunk5VMKDVB6cjs.MessageScroller,
163
175
  {
164
176
  ref,
165
177
  style: { maxHeight },
166
178
  className: _chunkKWLSBTB2cjs.cn.call(void 0, "min-h-0", className),
167
179
  children: [
168
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXABXUP6Lcjs.MessageScrollerViewport, { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
169
- _chunkXABXUP6Lcjs.MessageScrollerContent,
180
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk5VMKDVB6cjs.MessageScrollerViewport, { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
181
+ _chunk5VMKDVB6cjs.MessageScrollerContent,
170
182
  {
171
183
  className: _chunkKWLSBTB2cjs.cn.call(void 0,
172
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"
@@ -175,7 +187,7 @@ var ChatThread = _react.forwardRef.call(void 0,
175
187
  messages.map((m, index) => {
176
188
  const isUser = m.role === "user";
177
189
  if (m.status === "running") {
178
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXABXUP6Lcjs.MessageScrollerItem, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
190
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk5VMKDVB6cjs.MessageScrollerItem, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
179
191
  ChatRunningLine,
180
192
  {
181
193
  label: m.text || pendingLabel,
@@ -186,15 +198,16 @@ var ChatThread = _react.forwardRef.call(void 0,
186
198
  }
187
199
  const isFullWidth = m.width === "full";
188
200
  const marker = markers[index];
201
+ const actions = messageActions && offersActions(m) ? messageActions(m) : null;
189
202
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
190
- _chunkXABXUP6Lcjs.MessageScrollerItem,
203
+ _chunk5VMKDVB6cjs.MessageScrollerItem,
191
204
  {
192
205
  messageId: m.id,
193
206
  scrollAnchor: m.id === anchorId,
194
207
  className: _chunkKWLSBTB2cjs.cn.call(void 0, "flex flex-col", workspace ? "gap-5" : "gap-3"),
195
208
  children: [
196
209
  marker ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TimelineMarker, { label: marker }) : null,
197
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2AU7ZRGXcjs.Message, { align: isUser ? "end" : "start", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk2AU7ZRGXcjs.MessageContent, { children: [
210
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNWDPH2Z7cjs.Message, { align: isUser ? "end" : "start", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNWDPH2Z7cjs.MessageContent, { children: [
198
211
  (m.content || m.text) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
199
212
  _chunkV4YWTRLDcjs.Bubble,
200
213
  {
@@ -222,22 +235,36 @@ var ChatThread = _react.forwardRef.call(void 0,
222
235
  uploadingLabel,
223
236
  className: "px-0 pt-0"
224
237
  }
225
- )
238
+ ),
239
+ actions != null && actions !== false ? (
240
+ // Unboxed workspace turns pull the row out by the
241
+ // button's inset, so the first icon lines up with
242
+ // the text above it.
243
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
244
+ _chunkNWDPH2Z7cjs.MessageActions,
245
+ {
246
+ className: _chunkKWLSBTB2cjs.cn.call(void 0,
247
+ workspace && (isUser ? "-me-2 pointer-coarse:-me-3.5" : "-ms-2 pointer-coarse:-ms-3.5")
248
+ ),
249
+ children: actions
250
+ }
251
+ )
252
+ ) : null
226
253
  ] }) })
227
254
  ]
228
255
  },
229
256
  m.id
230
257
  );
231
258
  }),
232
- pending && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXABXUP6Lcjs.MessageScrollerItem, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ChatRunningLine, { label: pendingLabel, workspace }) }),
259
+ pending && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk5VMKDVB6cjs.MessageScrollerItem, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ChatRunningLine, { label: pendingLabel, workspace }) }),
233
260
  footer && // Always painted: content-visibility:auto would contain the
234
261
  // footer's paint and layout, clipping a ring or shadow at its
235
262
  // edge and re-parenting anything fixed inside it.
236
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXABXUP6Lcjs.MessageScrollerItem, { className: "[content-visibility:visible]", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2AU7ZRGXcjs.Message, { align: "start", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2AU7ZRGXcjs.MessageContent, { children: footer }) }) })
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 }) }) })
237
264
  ]
238
265
  }
239
266
  ) }),
240
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkXABXUP6Lcjs.MessageScrollerButton, { variant: "outline", className: "rounded-full shadow-sm", children: [
267
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk5VMKDVB6cjs.MessageScrollerButton, { variant: "outline", className: "rounded-full shadow-sm", children: [
241
268
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ArrowDown, { className: "h-4 w-4" }),
242
269
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "sr-only", children: scrollButtonLabel })
243
270
  ] })
@@ -246,6 +273,29 @@ var ChatThread = _react.forwardRef.call(void 0,
246
273
  ) });
247
274
  }
248
275
  );
276
+ function ChatCopyAction({
277
+ message,
278
+ label = "Copy",
279
+ copiedLabel = "Copied",
280
+ onCopy,
281
+ resetAfter = 2e3
282
+ }) {
283
+ const { copied, copy } = _chunk4LXN6GLZcjs.useCopyToClipboard.call(void 0, { resetAfter });
284
+ const text = message.text;
285
+ if (!text) return null;
286
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
287
+ _chunkNWDPH2Z7cjs.MessageAction,
288
+ {
289
+ tooltip: copied ? copiedLabel : label,
290
+ "data-copied": copied || void 0,
291
+ onClick: async () => {
292
+ const ok = await copy(text);
293
+ _optionalChain([onCopy, 'optionalCall', _ => _(ok)]);
294
+ },
295
+ children: copied ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Check, {}) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Copy, {})
296
+ }
297
+ );
298
+ }
249
299
  function formatFileSize(size) {
250
300
  if (size === void 0) return "File";
251
301
  if (size < 1024) return `${size} B`;
@@ -270,32 +320,32 @@ function ChatAttachmentList({
270
320
  className
271
321
  }) {
272
322
  const { verb, icon: ActionIcon } = ATTACHMENT_ACTIONS[openAction];
273
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk32Q4XOTUcjs.AttachmentGroup, { className: _chunkKWLSBTB2cjs.cn.call(void 0, "gap-2 px-3 pt-3", className), children: attachments.map((attachment) => {
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) => {
274
324
  const state = _nullishCoalesce(attachment.state, () => ( "done"));
275
325
  const opens = Boolean(onOpen) && state === "done";
276
326
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
277
- _chunk32Q4XOTUcjs.Attachment,
327
+ _chunkFYRQFEU4cjs.Attachment,
278
328
  {
279
329
  state,
280
330
  size: "sm",
281
331
  className: "min-w-[12rem] rounded-xl p-2",
282
332
  children: [
283
333
  opens && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
284
- _chunk32Q4XOTUcjs.AttachmentTrigger,
334
+ _chunkFYRQFEU4cjs.AttachmentTrigger,
285
335
  {
286
336
  "aria-label": `${verb} ${attachment.name}`,
287
337
  title: `${verb} ${attachment.name}`,
288
- onClick: () => _optionalChain([onOpen, 'optionalCall', _ => _(attachment)]),
338
+ onClick: () => _optionalChain([onOpen, 'optionalCall', _2 => _2(attachment)]),
289
339
  className: "rounded-xl focus-visible:ring-2 focus-visible:ring-ring/50"
290
340
  }
291
341
  ),
292
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk32Q4XOTUcjs.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" }) }),
293
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk32Q4XOTUcjs.AttachmentContent, { className: "px-2", children: [
294
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk32Q4XOTUcjs.AttachmentTitle, { className: "text-xs font-medium", children: attachment.name }),
295
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk32Q4XOTUcjs.AttachmentDescription, { className: "text-[11px]", children: state === "uploading" ? uploadingLabel : opens ? `${formatFileSize(attachment.size)} \xB7 ${verb}` : formatFileSize(attachment.size) })
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) })
296
346
  ] }),
297
- onRemove ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk32Q4XOTUcjs.AttachmentActions, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
298
- _chunk32Q4XOTUcjs.AttachmentAction,
347
+ onRemove ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkFYRQFEU4cjs.AttachmentActions, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
348
+ _chunkFYRQFEU4cjs.AttachmentAction,
299
349
  {
300
350
  type: "button",
301
351
  "aria-label": `Remove ${attachment.name}`,
@@ -304,7 +354,7 @@ function ChatAttachmentList({
304
354
  }
305
355
  ) }) : opens ? (
306
356
  // The trigger covers the whole file; the icon only says what it does.
307
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk32Q4XOTUcjs.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" }) })
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" }) })
308
358
  ) : null
309
359
  ]
310
360
  },
@@ -335,12 +385,15 @@ function ChatInput({
335
385
  multiple = true,
336
386
  addFilesLabel = "Add files",
337
387
  appearance = "default",
388
+ compactOnBlur = false,
338
389
  helperText,
339
390
  privacyNote
340
391
  }) {
341
392
  const internalRef = _react.useRef.call(void 0, null);
342
393
  const ref = _nullishCoalesce(inputRef, () => ( internalRef));
343
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);
344
397
  const isDisabled = pending || disabled;
345
398
  const attachmentsReady = attachments.length > 0 && attachments.every((item) => item.state !== "uploading");
346
399
  const canSubmit = !isDisabled && (Boolean(value.trim()) || attachmentsReady);
@@ -351,13 +404,27 @@ function ChatInput({
351
404
  };
352
405
  const spacious = appearance === "spacious";
353
406
  const composerSize = COMPOSER_SIZES[size];
407
+ const compact = compactOnBlur && !editing && value.length === 0 && attachments.length === 0;
354
408
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { "data-slot": "chat-input-container", className: "w-full", children: [
355
409
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
356
410
  "form",
357
411
  {
358
412
  "data-slot": "chat-input",
359
413
  "data-appearance": appearance,
414
+ "data-compact": compact || void 0,
360
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
+ },
361
428
  onSubmit: (event) => {
362
429
  if (event.target !== event.currentTarget) return;
363
430
  event.preventDefault();
@@ -380,7 +447,7 @@ function ChatInput({
380
447
  }
381
448
  ),
382
449
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
383
- _chunkRIWLAMMEcjs.InputGroup,
450
+ _chunk7LDJAXRXcjs.InputGroup,
384
451
  {
385
452
  className: _chunkKWLSBTB2cjs.cn.call(void 0,
386
453
  // Opaque in both modes: the input group's own dark:bg-input/30
@@ -400,7 +467,7 @@ function ChatInput({
400
467
  }
401
468
  ),
402
469
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
403
- _chunkRIWLAMMEcjs.InputGroupTextarea,
470
+ _chunk7LDJAXRXcjs.InputGroupTextarea,
404
471
  {
405
472
  ref,
406
473
  value,
@@ -412,86 +479,93 @@ function ChatInput({
412
479
  submit();
413
480
  },
414
481
  placeholder,
415
- rows: composerSize.rows,
482
+ rows: compact ? 1 : composerSize.rows,
483
+ wrap: compact ? "off" : void 0,
416
484
  disabled: isDisabled,
417
485
  autoFocus,
418
486
  className: _chunkKWLSBTB2cjs.cn.call(void 0,
419
- 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,
420
488
  // Grows with the text, then scrolls rather than pushing the thread away.
421
- "max-h-48 leading-relaxed disabled:opacity-70 placeholder:text-sm",
422
- spacious ? "px-6 pb-2 pt-6" : "px-4 py-3.5"
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"
423
492
  )
424
493
  }
425
494
  ),
426
495
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
427
- _chunkRIWLAMMEcjs.InputGroupAddon,
496
+ _chunk7LDJAXRXcjs.InputGroupAddon,
428
497
  {
429
- align: "block-end",
498
+ align: compact ? "inline-end" : "block-end",
430
499
  "data-slot": "chat-input-actions",
431
500
  onClick: (event) => {
432
501
  if (!event.currentTarget.contains(event.target)) return;
433
- if (!event.target.closest("button")) _optionalChain([ref, 'access', _2 => _2.current, 'optionalAccess', _3 => _3.focus, 'call', _4 => _4()]);
502
+ if (!event.target.closest("button")) _optionalChain([ref, 'access', _3 => _3.current, 'optionalAccess', _4 => _4.focus, 'call', _5 => _5()]);
434
503
  },
435
504
  className: _chunkKWLSBTB2cjs.cn.call(void 0,
436
- "gap-2",
437
- 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")
438
507
  ),
439
508
  children: [
440
509
  onFilesSelected && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkZAITUDYDcjs.DropdownMenu, { children: [
441
510
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZAITUDYDcjs.DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
442
- _chunkL4DH72UFcjs.Button,
511
+ _chunkJDEXZGIYcjs.Button,
443
512
  {
444
513
  type: "button",
445
- size: spacious ? "icon-lg" : "icon",
514
+ size: spacious && !compact ? "icon-lg" : "icon",
446
515
  variant: "ghost",
447
516
  "aria-label": "Add to conversation",
517
+ className: compactOnBlur ? "min-h-[44px] min-w-[44px] shrink-0" : void 0,
448
518
  children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Plus, { className: _chunkKWLSBTB2cjs.cn.call(void 0, spacious && "h-5 w-5") })
449
519
  }
450
520
  ) }),
451
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZAITUDYDcjs.DropdownMenuContent, { align: "start", side: "top", className: "min-w-52", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkZAITUDYDcjs.DropdownMenuItem, { onSelect: () => _optionalChain([fileInputRef, 'access', _5 => _5.current, 'optionalAccess', _6 => _6.click, 'call', _7 => _7()]), children: [
521
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZAITUDYDcjs.DropdownMenuContent, { align: "start", side: "top", className: "min-w-52", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkZAITUDYDcjs.DropdownMenuItem, { onSelect: () => _optionalChain([fileInputRef, 'access', _6 => _6.current, 'optionalAccess', _7 => _7.click, 'call', _8 => _8()]), children: [
452
522
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Paperclip, { className: "h-4 w-4" }),
453
523
  addFilesLabel
454
524
  ] }) })
455
525
  ] }),
456
526
  voice && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
457
- _chunkEOUO3OROcjs.VoiceDictationButton,
527
+ _chunkLKPM6DQPcjs.VoiceDictationButton,
458
528
  {
459
529
  size: "icon",
460
530
  title: voiceTitle,
461
531
  lang: voiceLang,
462
532
  onCommit: (text) => onSend(text),
463
- className: spacious ? "h-12 w-12 border-transparent bg-transparent shadow-none hover:bg-muted" : void 0
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
+ )
464
538
  }
465
539
  ),
466
540
  helperText ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
467
541
  "span",
468
542
  {
469
543
  "data-slot": "chat-input-helper",
470
- 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"),
471
545
  children: helperText
472
546
  }
473
- ) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex-1" }),
547
+ ) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: compact ? "hidden" : "flex-1" }),
474
548
  submitLabel ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
475
- _chunkL4DH72UFcjs.Button,
549
+ _chunkJDEXZGIYcjs.Button,
476
550
  {
477
551
  type: "submit",
478
552
  disabled: !canSubmit,
479
553
  "data-chat-action": "submit",
480
- className: spacious ? "rounded-xl" : void 0,
554
+ className: _chunkKWLSBTB2cjs.cn.call(void 0, spacious && "rounded-xl", compactOnBlur && "min-h-[44px] min-w-[44px] shrink-0"),
481
555
  children: [
482
556
  submitLabel,
483
557
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ArrowRight, { className: "ml-2 h-4 w-4" })
484
558
  ]
485
559
  }
486
560
  ) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
487
- _chunkL4DH72UFcjs.Button,
561
+ _chunkJDEXZGIYcjs.Button,
488
562
  {
489
563
  type: "submit",
490
- size: spacious ? "icon-lg" : "icon",
564
+ size: spacious && !compact ? "icon-lg" : "icon",
491
565
  disabled: !canSubmit,
492
566
  "aria-label": "Send",
493
567
  "data-chat-action": "submit",
494
- className: spacious ? "rounded-xl" : void 0,
568
+ className: _chunkKWLSBTB2cjs.cn.call(void 0, spacious && "rounded-xl", compactOnBlur && "min-h-[44px] min-w-[44px] shrink-0"),
495
569
  children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ArrowUp, { className: _chunkKWLSBTB2cjs.cn.call(void 0, spacious && "h-5 w-5") })
496
570
  }
497
571
  )
@@ -527,7 +601,7 @@ function VoiceHero({
527
601
  }) {
528
602
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col items-center gap-5 py-6", children: [
529
603
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
530
- _chunkEOUO3OROcjs.VoiceDictationButton,
604
+ _chunkLKPM6DQPcjs.VoiceDictationButton,
531
605
  {
532
606
  size: "lg",
533
607
  title: voiceTitle,
@@ -567,8 +641,8 @@ function ExamplePrompts({
567
641
  const cards = variant === "cards";
568
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: [
569
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 }),
570
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkSUB4BAYEcjs.Suggestions, { role: "group", "aria-labelledby": labelId, layout: EXAMPLE_PROMPT_LAYOUTS[variant], children: prompts.map((prompt) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
571
- _chunkSUB4BAYEcjs.Suggestion,
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,
572
646
  {
573
647
  suggestion: prompt,
574
648
  onClick: onSelect,
@@ -631,6 +705,7 @@ var Chat = _react.forwardRef.call(void 0, function Chat2({
631
705
  addFilesLabel,
632
706
  uploadingLabel,
633
707
  composerAppearance = "default",
708
+ mobileCompactComposer = false,
634
709
  composerHelperText,
635
710
  composerPrivacyNote,
636
711
  emptyFileDropzone = false,
@@ -655,6 +730,7 @@ var Chat = _react.forwardRef.call(void 0, function Chat2({
655
730
  markdownComponents,
656
731
  onOpenAttachment,
657
732
  attachmentAction,
733
+ messageActions,
658
734
  className
659
735
  }, ref) {
660
736
  const isMobile = _chunkR35FT53Gcjs.useIsMobile.call(void 0, );
@@ -679,14 +755,14 @@ var Chat = _react.forwardRef.call(void 0, function Chat2({
679
755
  else if (typeof globalThis.reportError === "function") globalThis.reportError(cause);
680
756
  else console.error(cause);
681
757
  }
682
- window.setTimeout(() => _optionalChain([inputRef, 'access', _8 => _8.current, 'optionalAccess', _9 => _9.focus, 'call', _10 => _10()]), 0);
758
+ window.setTimeout(() => _optionalChain([inputRef, 'access', _9 => _9.current, 'optionalAccess', _10 => _10.focus, 'call', _11 => _11()]), 0);
683
759
  },
684
760
  [attachments, mode, onSend, onSendError, pending]
685
761
  );
686
762
  _react.useImperativeHandle.call(void 0,
687
763
  ref,
688
764
  () => ({
689
- focusInput: () => _optionalChain([inputRef, 'access', _11 => _11.current, 'optionalAccess', _12 => _12.focus, 'call', _13 => _13()]),
765
+ focusInput: () => _optionalChain([inputRef, 'access', _12 => _12.current, 'optionalAccess', _13 => _13.focus, 'call', _14 => _14()]),
690
766
  clearInput: () => setInput("")
691
767
  }),
692
768
  []
@@ -694,7 +770,7 @@ var Chat = _react.forwardRef.call(void 0, function Chat2({
694
770
  const dropFiles = _react.useCallback.call(void 0,
695
771
  (files) => {
696
772
  if (!conversationStarted && mode === "voice") setUserMode("text");
697
- return _optionalChain([onFilesSelected, 'optionalCall', _14 => _14(files)]);
773
+ return _optionalChain([onFilesSelected, 'optionalCall', _15 => _15(files)]);
698
774
  },
699
775
  [conversationStarted, mode, onFilesSelected]
700
776
  );
@@ -703,7 +779,7 @@ var Chat = _react.forwardRef.call(void 0, function Chat2({
703
779
  const showEmptyFileDropzone = emptyFileDropzone && Boolean(onFilesSelected) && attachments.length === 0;
704
780
  const showEmptyPending = !conversationStarted && pending && Boolean(emptyPendingContent);
705
781
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
706
- _chunkKADJ56AHcjs.FileDropArea,
782
+ _chunkZ3JJSNR5cjs.FileDropArea,
707
783
  {
708
784
  "data-slot": "chat",
709
785
  "data-layout": layout,
@@ -771,7 +847,7 @@ var Chat = _react.forwardRef.call(void 0, function Chat2({
771
847
  ),
772
848
  children: [
773
849
  showEmptyFileDropzone && onFilesSelected && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
774
- _chunkKADJ56AHcjs.FileDropzone,
850
+ _chunkZ3JJSNR5cjs.FileDropzone,
775
851
  {
776
852
  multiple: true,
777
853
  onFiles: onFilesSelected,
@@ -851,6 +927,7 @@ var Chat = _react.forwardRef.call(void 0, function Chat2({
851
927
  markdownComponents,
852
928
  onOpenAttachment,
853
929
  attachmentAction,
930
+ messageActions,
854
931
  className: _chunkKWLSBTB2cjs.cn.call(void 0,
855
932
  "mb-3",
856
933
  application && "min-h-0 flex-1 px-4 py-4 md:px-0 md:py-0",
@@ -865,7 +942,8 @@ var Chat = _react.forwardRef.call(void 0, function Chat2({
865
942
  className: _chunkKWLSBTB2cjs.cn.call(void 0,
866
943
  "pt-3",
867
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",
868
- 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"
869
947
  ),
870
948
  children: [
871
949
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
@@ -888,6 +966,7 @@ var Chat = _react.forwardRef.call(void 0, function Chat2({
888
966
  addFilesLabel,
889
967
  uploadingLabel,
890
968
  appearance: composerAppearance,
969
+ compactOnBlur: mobileCompactComposer && isMobile,
891
970
  helperText: composerHelperText,
892
971
  privacyNote: composerPrivacyNote,
893
972
  className: workspace ? "mx-auto max-w-3xl rounded-3xl shadow-sm" : void 0
@@ -905,4 +984,5 @@ var Chat = _react.forwardRef.call(void 0, function Chat2({
905
984
 
906
985
 
907
986
 
908
- exports.Chat = Chat; exports.ChatInput = ChatInput; exports.ChatThread = ChatThread;
987
+
988
+ exports.Chat = Chat; exports.ChatCopyAction = ChatCopyAction; exports.ChatInput = ChatInput; exports.ChatThread = ChatThread;