@mieweb/ui 0.11.0-dev.0 → 0.11.0-dev.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ag-grid.cjs +11 -2
- package/dist/ag-grid.cjs.map +1 -1
- package/dist/ag-grid.d.cts +8 -0
- package/dist/ag-grid.d.ts +8 -0
- package/dist/ag-grid.js +11 -2
- package/dist/ag-grid.js.map +1 -1
- package/dist/brands/index.cjs +12 -12
- package/dist/brands/index.js +3 -3
- package/dist/{chunk-U2RS574O.cjs → chunk-2GBVJHWN.cjs} +120 -63
- package/dist/chunk-2GBVJHWN.cjs.map +1 -0
- package/dist/{chunk-7UTBDFFL.cjs → chunk-2S76TRBJ.cjs} +4 -4
- package/dist/{chunk-7UTBDFFL.cjs.map → chunk-2S76TRBJ.cjs.map} +1 -1
- package/dist/{chunk-IJYTASQQ.cjs → chunk-3AD4HFYI.cjs} +15 -7
- package/dist/chunk-3AD4HFYI.cjs.map +1 -0
- package/dist/{chunk-J2CKXXOW.js → chunk-4I6BW3FB.js} +8 -5
- package/dist/chunk-4I6BW3FB.js.map +1 -0
- package/dist/{chunk-CFI3TQMA.cjs → chunk-56C7K4MV.cjs} +9 -4
- package/dist/chunk-56C7K4MV.cjs.map +1 -0
- package/dist/{chunk-TNUL4LGG.js → chunk-5ILCNY74.js} +15 -7
- package/dist/chunk-5ILCNY74.js.map +1 -0
- package/dist/{chunk-ECYIDXG6.cjs → chunk-5K7PRPSV.cjs} +32 -2
- package/dist/chunk-5K7PRPSV.cjs.map +1 -0
- package/dist/{chunk-FBN2VHUV.cjs → chunk-5VA2HJ5B.cjs} +8 -8
- package/dist/{chunk-FBN2VHUV.cjs.map → chunk-5VA2HJ5B.cjs.map} +1 -1
- package/dist/{chunk-XHK5VZ4L.cjs → chunk-6ZA574PU.cjs} +8 -5
- package/dist/chunk-6ZA574PU.cjs.map +1 -0
- package/dist/{chunk-PJ6CC53R.cjs → chunk-AKMTPCLC.cjs} +13 -8
- package/dist/chunk-AKMTPCLC.cjs.map +1 -0
- package/dist/{chunk-OODVC2UD.cjs → chunk-AWSSWNJY.cjs} +2 -2
- package/dist/{chunk-OODVC2UD.cjs.map → chunk-AWSSWNJY.cjs.map} +1 -1
- package/dist/chunk-BFVYM6IT.cjs +345 -0
- package/dist/chunk-BFVYM6IT.cjs.map +1 -0
- package/dist/{chunk-VVDE4CHU.js → chunk-C4GEPUE7.js} +13 -8
- package/dist/chunk-C4GEPUE7.js.map +1 -0
- package/dist/{chunk-TJ4GWQPM.js → chunk-DAAJ3B2T.js} +121 -65
- package/dist/chunk-DAAJ3B2T.js.map +1 -0
- package/dist/{chunk-QJ2L5RU6.js → chunk-DSQCYX7L.js} +2 -2
- package/dist/{chunk-QJ2L5RU6.js.map → chunk-DSQCYX7L.js.map} +1 -1
- package/dist/{chunk-NUB5HRKS.js → chunk-DT3X3RBM.js} +3 -3
- package/dist/{chunk-NUB5HRKS.js.map → chunk-DT3X3RBM.js.map} +1 -1
- package/dist/{chunk-KVTKSPX5.js → chunk-EBQG3NGT.js} +32 -2
- package/dist/chunk-EBQG3NGT.js.map +1 -0
- package/dist/{chunk-OW3SQJ7P.js → chunk-EI4JU5JF.js} +3 -3
- package/dist/{chunk-OW3SQJ7P.js.map → chunk-EI4JU5JF.js.map} +1 -1
- package/dist/{chunk-MYAU2ZUC.cjs → chunk-GDKOYVX3.cjs} +14 -10
- package/dist/chunk-GDKOYVX3.cjs.map +1 -0
- package/dist/{chunk-JSXIB6EJ.cjs → chunk-GLG6UE2H.cjs} +12 -7
- package/dist/chunk-GLG6UE2H.cjs.map +1 -0
- package/dist/{chunk-JTSKPDPH.cjs → chunk-HIYQ3M5V.cjs} +4 -3
- package/dist/chunk-HIYQ3M5V.cjs.map +1 -0
- package/dist/{chunk-7IBZA7G6.js → chunk-I6Y2KLTZ.js} +5 -2
- package/dist/chunk-I6Y2KLTZ.js.map +1 -0
- package/dist/chunk-IZY4CMOO.js +715 -0
- package/dist/chunk-IZY4CMOO.js.map +1 -0
- package/dist/{chunk-753ENNB6.js → chunk-J3QEMZCH.js} +2 -2
- package/dist/{chunk-753ENNB6.js.map → chunk-J3QEMZCH.js.map} +1 -1
- package/dist/{chunk-S2JZL4JC.js → chunk-JM4YFLO4.js} +22 -15
- package/dist/chunk-JM4YFLO4.js.map +1 -0
- package/dist/{chunk-H3ROMJYI.cjs → chunk-KY67AMQ5.cjs} +4 -4
- package/dist/{chunk-H3ROMJYI.cjs.map → chunk-KY67AMQ5.cjs.map} +1 -1
- package/dist/{chunk-QX6AAVDE.cjs → chunk-L4APW65W.cjs} +15 -6
- package/dist/chunk-L4APW65W.cjs.map +1 -0
- package/dist/{chunk-OHKO5THF.cjs → chunk-MGFRGPWI.cjs} +3 -2
- package/dist/chunk-MGFRGPWI.cjs.map +1 -0
- package/dist/{chunk-RM2HPQIC.js → chunk-MQ5WJ3NO.js} +4 -4
- package/dist/chunk-MQ5WJ3NO.js.map +1 -0
- package/dist/{chunk-VNWJTCBQ.js → chunk-MQOYDQTF.js} +4 -3
- package/dist/chunk-MQOYDQTF.js.map +1 -0
- package/dist/chunk-MZA2LDS4.js +321 -0
- package/dist/chunk-MZA2LDS4.js.map +1 -0
- package/dist/{chunk-EBKE4DLU.js → chunk-N6XBE47W.js} +4 -4
- package/dist/{chunk-EBKE4DLU.js.map → chunk-N6XBE47W.js.map} +1 -1
- package/dist/{chunk-T5BBZQ66.js → chunk-OTIKWEFZ.js} +9 -4
- package/dist/chunk-OTIKWEFZ.js.map +1 -0
- package/dist/{chunk-YZCM7CXK.js → chunk-OZKJYLN6.js} +3 -3
- package/dist/{chunk-YZCM7CXK.js.map → chunk-OZKJYLN6.js.map} +1 -1
- package/dist/{chunk-ZSGEGISB.cjs → chunk-PHUTJKHL.cjs} +5 -2
- package/dist/chunk-PHUTJKHL.cjs.map +1 -0
- package/dist/{chunk-FMEA6WAY.cjs → chunk-Q6QLGCL7.cjs} +9 -9
- package/dist/{chunk-FMEA6WAY.cjs.map → chunk-Q6QLGCL7.cjs.map} +1 -1
- package/dist/{chunk-XOIIUO6O.js → chunk-QDNHN7R2.js} +3 -2
- package/dist/chunk-QDNHN7R2.js.map +1 -0
- package/dist/{chunk-XRVMYT5G.cjs → chunk-QKW2QCGI.cjs} +5 -5
- package/dist/chunk-QKW2QCGI.cjs.map +1 -0
- package/dist/{chunk-NAH65KPK.cjs → chunk-TOJ56HKQ.cjs} +2 -2
- package/dist/{chunk-NAH65KPK.cjs.map → chunk-TOJ56HKQ.cjs.map} +1 -1
- package/dist/chunk-TRZLN32I.cjs +740 -0
- package/dist/chunk-TRZLN32I.cjs.map +1 -0
- package/dist/{chunk-O6XDA3SI.js → chunk-UY2EZYIC.js} +15 -6
- package/dist/chunk-UY2EZYIC.js.map +1 -0
- package/dist/{chunk-2BPIVWAK.js → chunk-V5VPECJI.js} +14 -10
- package/dist/chunk-V5VPECJI.js.map +1 -0
- package/dist/{chunk-O6BJMVGT.cjs → chunk-XZNHS7YQ.cjs} +24 -17
- package/dist/chunk-XZNHS7YQ.cjs.map +1 -0
- package/dist/{chunk-7X6R3JIA.js → chunk-YFWDS6MX.js} +12 -7
- package/dist/chunk-YFWDS6MX.js.map +1 -0
- package/dist/components/AudioPlayer/index.cjs +7 -6
- package/dist/components/AudioPlayer/index.js +2 -1
- package/dist/components/CollabStatus/index.cjs +5 -4
- package/dist/components/CollabStatus/index.js +2 -1
- package/dist/components/CountryCodeDropdown/index.cjs +4 -4
- package/dist/components/CountryCodeDropdown/index.js +1 -1
- package/dist/components/DateInput/index.cjs +2 -2
- package/dist/components/DateInput/index.js +1 -1
- package/dist/components/DictationButton/index.cjs +23 -0
- package/dist/components/DictationButton/index.cjs.map +1 -0
- package/dist/components/DictationButton/index.d.cts +78 -0
- package/dist/components/DictationButton/index.d.ts +78 -0
- package/dist/components/DictationButton/index.js +6 -0
- package/dist/components/DictationButton/index.js.map +1 -0
- package/dist/components/Markdown/index.cjs +10 -10
- package/dist/components/Markdown/index.js +2 -2
- package/dist/components/MediaEditor/index.cjs +8 -7
- package/dist/components/MediaEditor/index.js +3 -2
- package/dist/components/MegaMenu/index.cjs +5 -4
- package/dist/components/MegaMenu/index.js +2 -1
- package/dist/components/PhoneInput/index.cjs +3 -3
- package/dist/components/PhoneInput/index.js +1 -1
- package/dist/components/RecordButton/index.cjs +4 -4
- package/dist/components/RecordButton/index.js +1 -1
- package/dist/components/Slider/index.cjs +6 -5
- package/dist/components/Slider/index.js +2 -1
- package/dist/components/SliderCalculator/index.cjs +5 -4
- package/dist/components/SliderCalculator/index.js +3 -2
- package/dist/components/SuperChat/index.cjs +14 -14
- package/dist/components/SuperChat/index.cjs.map +1 -1
- package/dist/components/SuperChat/index.d.cts +10 -6
- package/dist/components/SuperChat/index.d.ts +10 -6
- package/dist/components/SuperChat/index.js +4 -4
- package/dist/components/SuperChat/index.js.map +1 -1
- package/dist/components/SuperChat/plugins/index.cjs +3 -3
- package/dist/components/SuperChat/plugins/index.d.cts +2 -2
- package/dist/components/SuperChat/plugins/index.d.ts +2 -2
- package/dist/components/SuperChat/plugins/index.js +2 -2
- package/dist/components/Table/index.cjs +9 -9
- package/dist/components/Table/index.d.cts +17 -1
- package/dist/components/Table/index.d.ts +17 -1
- package/dist/components/Table/index.js +1 -1
- package/dist/components/ThemeProvider/index.cjs +9 -8
- package/dist/components/ThemeProvider/index.js +3 -2
- package/dist/components/Tooltip/index.cjs +3 -2
- package/dist/components/Tooltip/index.d.cts +6 -2
- package/dist/components/Tooltip/index.d.ts +6 -2
- package/dist/components/Tooltip/index.js +2 -1
- package/dist/deck.cjs +1 -1
- package/dist/deck.cjs.map +1 -1
- package/dist/deck.js +1 -1
- package/dist/deck.js.map +1 -1
- package/dist/esheet.cjs +6 -6
- package/dist/esheet.js +3 -3
- package/dist/index.cjs +629 -1163
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +160 -16
- package/dist/index.d.ts +160 -16
- package/dist/index.js +235 -839
- package/dist/index.js.map +1 -1
- package/dist/styles/init.css +39 -0
- package/dist/styles.css +1 -1
- package/dist/tailwind-preset.cjs +4 -4
- package/dist/tailwind-preset.js +1 -1
- package/dist/{types-Cx1FHLq2.d.cts → types-DSWbrVkM.d.cts} +1 -1
- package/dist/{types-Cx1FHLq2.d.ts → types-DSWbrVkM.d.ts} +1 -1
- package/dist/whisperTranscribe-AV752TZI.cjs +81 -0
- package/dist/whisperTranscribe-AV752TZI.cjs.map +1 -0
- package/dist/whisperTranscribe-UBNUWXUQ.js +4 -0
- package/dist/whisperTranscribe-UBNUWXUQ.js.map +1 -0
- package/package.json +1 -1
- package/dist/chunk-2BPIVWAK.js.map +0 -1
- package/dist/chunk-7IBZA7G6.js.map +0 -1
- package/dist/chunk-7X6R3JIA.js.map +0 -1
- package/dist/chunk-CFI3TQMA.cjs.map +0 -1
- package/dist/chunk-ECYIDXG6.cjs.map +0 -1
- package/dist/chunk-IJYTASQQ.cjs.map +0 -1
- package/dist/chunk-J2CKXXOW.js.map +0 -1
- package/dist/chunk-JSXIB6EJ.cjs.map +0 -1
- package/dist/chunk-JTSKPDPH.cjs.map +0 -1
- package/dist/chunk-KVTKSPX5.js.map +0 -1
- package/dist/chunk-MYAU2ZUC.cjs.map +0 -1
- package/dist/chunk-O6BJMVGT.cjs.map +0 -1
- package/dist/chunk-O6XDA3SI.js.map +0 -1
- package/dist/chunk-OHKO5THF.cjs.map +0 -1
- package/dist/chunk-PJ6CC53R.cjs.map +0 -1
- package/dist/chunk-QX6AAVDE.cjs.map +0 -1
- package/dist/chunk-RM2HPQIC.js.map +0 -1
- package/dist/chunk-S2JZL4JC.js.map +0 -1
- package/dist/chunk-T5BBZQ66.js.map +0 -1
- package/dist/chunk-TJ4GWQPM.js.map +0 -1
- package/dist/chunk-TNUL4LGG.js.map +0 -1
- package/dist/chunk-U2RS574O.cjs.map +0 -1
- package/dist/chunk-VNWJTCBQ.js.map +0 -1
- package/dist/chunk-VVDE4CHU.js.map +0 -1
- package/dist/chunk-XHK5VZ4L.cjs.map +0 -1
- package/dist/chunk-XOIIUO6O.js.map +0 -1
- package/dist/chunk-XRVMYT5G.cjs.map +0 -1
- package/dist/chunk-ZSGEGISB.cjs.map +0 -1
|
@@ -2,7 +2,7 @@ import { Dropdown, DropdownItem, DropdownSeparator } from './chunk-OYUIEJPN.js';
|
|
|
2
2
|
import { useEscapeKey } from './chunk-T4ME7QCT.js';
|
|
3
3
|
import { useClickOutside } from './chunk-62ZOA6PX.js';
|
|
4
4
|
import { useAnchoredPosition } from './chunk-WSNMQQ4P.js';
|
|
5
|
-
import { AlertTriangle, X2, Paperclip, Plus, Mic, Square, Loader2, ArrowUp,
|
|
5
|
+
import { AlertTriangle, X2, Paperclip, Plus, Mic, Square, Loader2, ArrowUp, Bot, Check, ChevronUp } from './chunk-BKSPDTX4.js';
|
|
6
6
|
import { isRtl } from './chunk-YVKBXNPK.js';
|
|
7
7
|
import { cn } from './chunk-TQONQSJO.js';
|
|
8
8
|
import * as React from 'react';
|
|
@@ -1073,6 +1073,96 @@ function CameraButton({
|
|
|
1073
1073
|
] });
|
|
1074
1074
|
}
|
|
1075
1075
|
CameraButton.displayName = "CameraButton";
|
|
1076
|
+
var selectorTriggerClasses = cn(
|
|
1077
|
+
"flex min-w-0 items-center gap-1 rounded-md px-2 py-1 text-xs",
|
|
1078
|
+
"text-neutral-600 dark:text-neutral-400",
|
|
1079
|
+
"transition-colors duration-150",
|
|
1080
|
+
"hover:bg-neutral-100 hover:text-neutral-900 dark:hover:bg-neutral-700 dark:hover:text-white",
|
|
1081
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-500",
|
|
1082
|
+
"disabled:pointer-events-none disabled:opacity-40"
|
|
1083
|
+
);
|
|
1084
|
+
function ComposerSelector({
|
|
1085
|
+
options,
|
|
1086
|
+
value,
|
|
1087
|
+
onChange,
|
|
1088
|
+
actions,
|
|
1089
|
+
label,
|
|
1090
|
+
triggerLabel,
|
|
1091
|
+
icon,
|
|
1092
|
+
disabled = false,
|
|
1093
|
+
triggerSlot = "composer-selector-trigger"
|
|
1094
|
+
}) {
|
|
1095
|
+
const [open, setOpen] = React.useState(false);
|
|
1096
|
+
if (disabled && open) setOpen(false);
|
|
1097
|
+
const selected = options.find((option) => option.id === value) ?? null;
|
|
1098
|
+
return /* @__PURE__ */ jsxs(
|
|
1099
|
+
Dropdown,
|
|
1100
|
+
{
|
|
1101
|
+
placement: "top-start",
|
|
1102
|
+
open: open && !disabled,
|
|
1103
|
+
onOpenChange: setOpen,
|
|
1104
|
+
disabled,
|
|
1105
|
+
trigger: /* @__PURE__ */ jsxs(
|
|
1106
|
+
"button",
|
|
1107
|
+
{
|
|
1108
|
+
type: "button",
|
|
1109
|
+
"data-slot": triggerSlot,
|
|
1110
|
+
"aria-label": selected ? `${label}: ${selected.label}` : label,
|
|
1111
|
+
disabled,
|
|
1112
|
+
className: selectorTriggerClasses,
|
|
1113
|
+
children: [
|
|
1114
|
+
selected?.icon ?? icon,
|
|
1115
|
+
/* @__PURE__ */ jsx("span", { className: "min-w-0 truncate", children: triggerLabel ?? selected?.label ?? label }),
|
|
1116
|
+
/* @__PURE__ */ jsx(ChevronUp, { className: "h-3 w-3 shrink-0", "aria-hidden": "true" })
|
|
1117
|
+
]
|
|
1118
|
+
}
|
|
1119
|
+
),
|
|
1120
|
+
children: [
|
|
1121
|
+
options.map((option) => /* @__PURE__ */ jsx(
|
|
1122
|
+
DropdownItem,
|
|
1123
|
+
{
|
|
1124
|
+
icon: option.icon,
|
|
1125
|
+
role: "menuitemradio",
|
|
1126
|
+
"aria-checked": option.id === value,
|
|
1127
|
+
onClick: () => {
|
|
1128
|
+
setOpen(false);
|
|
1129
|
+
onChange?.(option.id);
|
|
1130
|
+
},
|
|
1131
|
+
children: /* @__PURE__ */ jsxs("span", { className: "flex w-full items-center justify-between gap-2", children: [
|
|
1132
|
+
/* @__PURE__ */ jsxs("span", { className: "min-w-0", children: [
|
|
1133
|
+
/* @__PURE__ */ jsx("span", { className: "block truncate", children: option.label }),
|
|
1134
|
+
option.description && /* @__PURE__ */ jsx("span", { className: "block truncate text-xs text-neutral-500 dark:text-neutral-400", children: option.description })
|
|
1135
|
+
] }),
|
|
1136
|
+
option.id === value && /* @__PURE__ */ jsx(
|
|
1137
|
+
Check,
|
|
1138
|
+
{
|
|
1139
|
+
className: "text-primary-600 dark:text-primary-400 h-4 w-4 shrink-0",
|
|
1140
|
+
"aria-hidden": "true"
|
|
1141
|
+
}
|
|
1142
|
+
)
|
|
1143
|
+
] })
|
|
1144
|
+
},
|
|
1145
|
+
option.id
|
|
1146
|
+
)),
|
|
1147
|
+
actions && actions.length > 0 && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1148
|
+
/* @__PURE__ */ jsx(DropdownSeparator, {}),
|
|
1149
|
+
actions.map((action) => /* @__PURE__ */ jsx(
|
|
1150
|
+
DropdownItem,
|
|
1151
|
+
{
|
|
1152
|
+
icon: action.icon,
|
|
1153
|
+
onClick: () => {
|
|
1154
|
+
setOpen(false);
|
|
1155
|
+
action.onSelect();
|
|
1156
|
+
},
|
|
1157
|
+
children: action.label
|
|
1158
|
+
},
|
|
1159
|
+
action.id
|
|
1160
|
+
))
|
|
1161
|
+
] })
|
|
1162
|
+
]
|
|
1163
|
+
}
|
|
1164
|
+
);
|
|
1165
|
+
}
|
|
1076
1166
|
function activeMentionQuery(value, caret) {
|
|
1077
1167
|
const upToCaret = value.slice(0, caret);
|
|
1078
1168
|
const match = /(^|\s)@([^\s@]*)$/.exec(upToCaret);
|
|
@@ -1244,14 +1334,6 @@ var iconButtonClasses = cn(
|
|
|
1244
1334
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-500",
|
|
1245
1335
|
"disabled:pointer-events-none disabled:opacity-40"
|
|
1246
1336
|
);
|
|
1247
|
-
var selectorTriggerClasses = cn(
|
|
1248
|
-
"flex min-w-0 items-center gap-1 rounded-md px-2 py-1 text-xs",
|
|
1249
|
-
"text-neutral-600 dark:text-neutral-400",
|
|
1250
|
-
"transition-colors duration-150",
|
|
1251
|
-
"hover:bg-neutral-100 hover:text-neutral-900 dark:hover:bg-neutral-700 dark:hover:text-white",
|
|
1252
|
-
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-500",
|
|
1253
|
-
"disabled:pointer-events-none disabled:opacity-40"
|
|
1254
|
-
);
|
|
1255
1337
|
var MAX_INPUT_HEIGHT = 160;
|
|
1256
1338
|
var TOUCH_DEVICE_QUERY = "(hover: none) and (pointer: coarse)";
|
|
1257
1339
|
var subscribeTouchDevice = (onChange) => {
|
|
@@ -1309,6 +1391,7 @@ var ChatComposer = React.forwardRef(function ChatComposer2({
|
|
|
1309
1391
|
onAgentChange,
|
|
1310
1392
|
showModelSelector = false,
|
|
1311
1393
|
modelSelectorProps,
|
|
1394
|
+
selectorsEndSlot,
|
|
1312
1395
|
readOnly = false,
|
|
1313
1396
|
readOnlyMessage = "You have read-only access and cannot send messages.",
|
|
1314
1397
|
onError,
|
|
@@ -1337,7 +1420,6 @@ var ChatComposer = React.forwardRef(function ChatComposer2({
|
|
|
1337
1420
|
const textareaRef = React.useRef(null);
|
|
1338
1421
|
const fileInputRef = React.useRef(null);
|
|
1339
1422
|
const [addMenuOpen, setAddMenuOpen] = React.useState(false);
|
|
1340
|
-
const [agentMenuOpen, setAgentMenuOpen] = React.useState(false);
|
|
1341
1423
|
const isTouchDevice = React.useSyncExternalStore(
|
|
1342
1424
|
subscribeTouchDevice,
|
|
1343
1425
|
getTouchDeviceSnapshot,
|
|
@@ -1545,8 +1627,9 @@ var ChatComposer = React.forwardRef(function ChatComposer2({
|
|
|
1545
1627
|
}
|
|
1546
1628
|
const showAddMenu = allowAttachments || addMenuItems && addMenuItems.length > 0;
|
|
1547
1629
|
const micVisible = (showMic || onMicClick !== void 0 || micSlot !== void 0) && (micBehavior === "always" || !hasContent);
|
|
1548
|
-
const
|
|
1549
|
-
const
|
|
1630
|
+
const showModel = showModelSelector && modelSelectorProps != null;
|
|
1631
|
+
const showSelectorsEnd = showModel || selectorsEndSlot != null;
|
|
1632
|
+
const showSelectorRow = showAgentSelector || showModelSelector || selectorsEndSlot != null;
|
|
1550
1633
|
const cells = {
|
|
1551
1634
|
input: "col-span-3 col-start-1 row-start-1 px-1 pt-1 md:col-span-1 md:col-start-2 md:self-end md:px-0 md:py-1.5",
|
|
1552
1635
|
textarea: "px-2 pt-2 pb-1 md:py-1.5",
|
|
@@ -1851,60 +1934,33 @@ var ChatComposer = React.forwardRef(function ChatComposer2({
|
|
|
1851
1934
|
className: "flex items-center justify-between gap-2 px-2 pt-1",
|
|
1852
1935
|
children: [
|
|
1853
1936
|
showAgentSelector ? /* @__PURE__ */ jsx(
|
|
1854
|
-
|
|
1937
|
+
ComposerSelector,
|
|
1855
1938
|
{
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
"data-slot": "chat-composer-agent-trigger",
|
|
1864
|
-
"aria-label": selectedAgentOption ? `${agentSelectorLabel}: ${selectedAgentOption.label}` : agentSelectorLabel,
|
|
1865
|
-
disabled,
|
|
1866
|
-
className: selectorTriggerClasses,
|
|
1867
|
-
children: [
|
|
1868
|
-
selectedAgentOption?.icon ?? /* @__PURE__ */ jsx(Bot, { className: "h-3.5 w-3.5", "aria-hidden": "true" }),
|
|
1869
|
-
/* @__PURE__ */ jsx("span", { className: "min-w-0 truncate", children: selectedAgentOption?.label ?? agentSelectorLabel }),
|
|
1870
|
-
/* @__PURE__ */ jsx(ChevronUp, { className: "h-3 w-3 shrink-0", "aria-hidden": "true" })
|
|
1871
|
-
]
|
|
1872
|
-
}
|
|
1873
|
-
),
|
|
1874
|
-
children: agents.map((agent) => /* @__PURE__ */ jsx(
|
|
1875
|
-
DropdownItem,
|
|
1876
|
-
{
|
|
1877
|
-
icon: agent.icon,
|
|
1878
|
-
role: "menuitemradio",
|
|
1879
|
-
"aria-checked": agent.id === selectedAgent,
|
|
1880
|
-
onClick: () => {
|
|
1881
|
-
setAgentMenuOpen(false);
|
|
1882
|
-
onAgentChange?.(agent.id);
|
|
1883
|
-
},
|
|
1884
|
-
children: /* @__PURE__ */ jsxs("span", { className: "flex w-full items-center justify-between gap-2", children: [
|
|
1885
|
-
/* @__PURE__ */ jsxs("span", { className: "min-w-0", children: [
|
|
1886
|
-
/* @__PURE__ */ jsx("span", { className: "block truncate", children: agent.label }),
|
|
1887
|
-
agent.description && /* @__PURE__ */ jsx("span", { className: "block truncate text-xs text-neutral-500 dark:text-neutral-400", children: agent.description })
|
|
1888
|
-
] }),
|
|
1889
|
-
agent.id === selectedAgent && /* @__PURE__ */ jsx(
|
|
1890
|
-
Check,
|
|
1891
|
-
{
|
|
1892
|
-
className: "text-primary-600 dark:text-primary-400 h-4 w-4 shrink-0",
|
|
1893
|
-
"aria-hidden": "true"
|
|
1894
|
-
}
|
|
1895
|
-
)
|
|
1896
|
-
] })
|
|
1897
|
-
},
|
|
1898
|
-
agent.id
|
|
1899
|
-
))
|
|
1939
|
+
options: agents,
|
|
1940
|
+
value: selectedAgent,
|
|
1941
|
+
onChange: onAgentChange,
|
|
1942
|
+
label: agentSelectorLabel,
|
|
1943
|
+
icon: /* @__PURE__ */ jsx(Bot, { className: "h-3.5 w-3.5", "aria-hidden": "true" }),
|
|
1944
|
+
disabled,
|
|
1945
|
+
triggerSlot: "chat-composer-agent-trigger"
|
|
1900
1946
|
}
|
|
1901
1947
|
) : /* @__PURE__ */ jsx("span", { "aria-hidden": "true" }),
|
|
1902
|
-
|
|
1903
|
-
|
|
1948
|
+
showSelectorsEnd && /* @__PURE__ */ jsxs(
|
|
1949
|
+
"div",
|
|
1904
1950
|
{
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1951
|
+
"data-slot": "chat-composer-selectors-end",
|
|
1952
|
+
className: "flex min-w-0 items-center gap-1",
|
|
1953
|
+
children: [
|
|
1954
|
+
showModel && /* @__PURE__ */ jsx(
|
|
1955
|
+
ComposerModelSelector,
|
|
1956
|
+
{
|
|
1957
|
+
variant: "ghost",
|
|
1958
|
+
...modelSelectorProps,
|
|
1959
|
+
disabled: disabled || modelSelectorProps.disabled
|
|
1960
|
+
}
|
|
1961
|
+
),
|
|
1962
|
+
selectorsEndSlot
|
|
1963
|
+
]
|
|
1908
1964
|
}
|
|
1909
1965
|
)
|
|
1910
1966
|
]
|
|
@@ -1963,6 +2019,6 @@ function notifyComposerMigrationOnce(surface) {
|
|
|
1963
2019
|
);
|
|
1964
2020
|
}
|
|
1965
2021
|
|
|
1966
|
-
export { AttachmentPicker, AttachmentPreviewItem, CameraButton, ChatComposer, ComposerModelSelector, DEFAULT_ACCEPTED_FILE_TYPES, DEFAULT_MAX_FILE_SIZE, DragDropZone, generateAttachmentId, getFileType, notifyComposerMigrationOnce, validateFile };
|
|
1967
|
-
//# sourceMappingURL=chunk-
|
|
1968
|
-
//# sourceMappingURL=chunk-
|
|
2022
|
+
export { AttachmentPicker, AttachmentPreviewItem, CameraButton, ChatComposer, ComposerModelSelector, ComposerSelector, DEFAULT_ACCEPTED_FILE_TYPES, DEFAULT_MAX_FILE_SIZE, DragDropZone, generateAttachmentId, getFileType, notifyComposerMigrationOnce, validateFile };
|
|
2023
|
+
//# sourceMappingURL=chunk-DAAJ3B2T.js.map
|
|
2024
|
+
//# sourceMappingURL=chunk-DAAJ3B2T.js.map
|