@copilotkit/react-ui 1.9.3-next.2 → 1.9.3-next.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +9 -0
- package/dist/{chunk-X3LV7OXQ.mjs → chunk-4HUXYD3B.mjs} +6 -3
- package/dist/chunk-4HUXYD3B.mjs.map +1 -0
- package/dist/{chunk-TSDSBNOS.mjs → chunk-ALIBUJML.mjs} +2 -2
- package/dist/{chunk-BP3RN6OE.mjs → chunk-H3EM63WS.mjs} +2 -2
- package/dist/{chunk-4RAYX7ZX.mjs → chunk-HKTWKCPS.mjs} +2 -2
- package/dist/{chunk-EQUUN7ZM.mjs → chunk-KN2GCKBE.mjs} +3 -3
- package/dist/{chunk-YQFVRDNC.mjs → chunk-QIOJXTIQ.mjs} +13 -2
- package/dist/chunk-QIOJXTIQ.mjs.map +1 -0
- package/dist/components/chat/Chat.js +16 -2
- package/dist/components/chat/Chat.js.map +1 -1
- package/dist/components/chat/Chat.mjs +3 -3
- package/dist/components/chat/Input.js +16 -2
- package/dist/components/chat/Input.js.map +1 -1
- package/dist/components/chat/Input.mjs +2 -2
- package/dist/components/chat/Modal.js +16 -2
- package/dist/components/chat/Modal.js.map +1 -1
- package/dist/components/chat/Modal.mjs +4 -4
- package/dist/components/chat/Popup.js +16 -2
- package/dist/components/chat/Popup.js.map +1 -1
- package/dist/components/chat/Popup.mjs +5 -5
- package/dist/components/chat/Sidebar.js +16 -2
- package/dist/components/chat/Sidebar.js.map +1 -1
- package/dist/components/chat/Sidebar.mjs +5 -5
- package/dist/components/chat/Textarea.d.ts +2 -0
- package/dist/components/chat/Textarea.js +12 -1
- package/dist/components/chat/Textarea.js.map +1 -1
- package/dist/components/chat/Textarea.mjs +1 -1
- package/dist/components/chat/index.js +16 -2
- package/dist/components/chat/index.js.map +1 -1
- package/dist/components/chat/index.mjs +6 -6
- package/dist/components/index.js +16 -2
- package/dist/components/index.js.map +1 -1
- package/dist/components/index.mjs +6 -6
- package/dist/index.js +16 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6 -6
- package/package.json +4 -4
- package/src/components/chat/Input.tsx +4 -1
- package/src/components/chat/Textarea.tsx +17 -1
- package/dist/chunk-X3LV7OXQ.mjs.map +0 -1
- package/dist/chunk-YQFVRDNC.mjs.map +0 -1
- /package/dist/{chunk-TSDSBNOS.mjs.map → chunk-ALIBUJML.mjs.map} +0 -0
- /package/dist/{chunk-BP3RN6OE.mjs.map → chunk-H3EM63WS.mjs.map} +0 -0
- /package/dist/{chunk-4RAYX7ZX.mjs.map → chunk-HKTWKCPS.mjs.map} +0 -0
- /package/dist/{chunk-EQUUN7ZM.mjs.map → chunk-KN2GCKBE.mjs.map} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CopilotModal
|
|
3
|
-
} from "../../chunk-
|
|
3
|
+
} from "../../chunk-KN2GCKBE.mjs";
|
|
4
4
|
import "../../chunk-C3GSYRC3.mjs";
|
|
5
5
|
import "../../chunk-GVKA7RQQ.mjs";
|
|
6
6
|
import "../../chunk-V7W6IM2V.mjs";
|
|
@@ -11,7 +11,7 @@ import "../../chunk-KXE2JCUH.mjs";
|
|
|
11
11
|
import "../../chunk-NRA3CFEE.mjs";
|
|
12
12
|
import "../../chunk-BH6PCAAL.mjs";
|
|
13
13
|
import "../../chunk-UFN2VWSR.mjs";
|
|
14
|
-
import "../../chunk-
|
|
14
|
+
import "../../chunk-HKTWKCPS.mjs";
|
|
15
15
|
import "../../chunk-53CVDVS5.mjs";
|
|
16
16
|
import "../../chunk-2II3Q27P.mjs";
|
|
17
17
|
import "../../chunk-ULDQXCED.mjs";
|
|
@@ -22,9 +22,9 @@ import "../../chunk-HWMFMBJC.mjs";
|
|
|
22
22
|
import "../../chunk-QGSPTXOV.mjs";
|
|
23
23
|
import "../../chunk-IMBPSLL4.mjs";
|
|
24
24
|
import "../../chunk-PLHTVHUW.mjs";
|
|
25
|
-
import "../../chunk-
|
|
25
|
+
import "../../chunk-4HUXYD3B.mjs";
|
|
26
26
|
import "../../chunk-CGEAG65D.mjs";
|
|
27
|
-
import "../../chunk-
|
|
27
|
+
import "../../chunk-QIOJXTIQ.mjs";
|
|
28
28
|
import "../../chunk-YTXEWDNC.mjs";
|
|
29
29
|
import "../../chunk-B3D7U7TJ.mjs";
|
|
30
30
|
import "../../chunk-IEMQ2SQW.mjs";
|
|
@@ -1235,7 +1235,16 @@ var import_react9 = require("react");
|
|
|
1235
1235
|
var import_react7 = require("react");
|
|
1236
1236
|
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
1237
1237
|
var AutoResizingTextarea = (0, import_react7.forwardRef)(
|
|
1238
|
-
({
|
|
1238
|
+
({
|
|
1239
|
+
maxRows = 1,
|
|
1240
|
+
placeholder,
|
|
1241
|
+
value,
|
|
1242
|
+
onChange,
|
|
1243
|
+
onKeyDown,
|
|
1244
|
+
onCompositionStart,
|
|
1245
|
+
onCompositionEnd,
|
|
1246
|
+
autoFocus
|
|
1247
|
+
}, ref) => {
|
|
1239
1248
|
const internalTextareaRef = (0, import_react7.useRef)(null);
|
|
1240
1249
|
const [maxHeight, setMaxHeight] = (0, import_react7.useState)(0);
|
|
1241
1250
|
(0, import_react7.useImperativeHandle)(ref, () => internalTextareaRef.current);
|
|
@@ -1267,6 +1276,8 @@ var AutoResizingTextarea = (0, import_react7.forwardRef)(
|
|
|
1267
1276
|
value,
|
|
1268
1277
|
onChange,
|
|
1269
1278
|
onKeyDown,
|
|
1279
|
+
onCompositionStart,
|
|
1280
|
+
onCompositionEnd,
|
|
1270
1281
|
placeholder,
|
|
1271
1282
|
style: {
|
|
1272
1283
|
overflow: "auto",
|
|
@@ -1430,6 +1441,7 @@ var Input = ({
|
|
|
1430
1441
|
const showPoweredBy = !((_a = copilotContext.copilotApiConfig) == null ? void 0 : _a.publicApiKey);
|
|
1431
1442
|
const pushToTalkConfigured = copilotContext.copilotApiConfig.textToSpeechUrl !== void 0 && copilotContext.copilotApiConfig.transcribeAudioUrl !== void 0;
|
|
1432
1443
|
const textareaRef = (0, import_react9.useRef)(null);
|
|
1444
|
+
const [isComposing, setIsComposing] = (0, import_react9.useState)(false);
|
|
1433
1445
|
const handleDivClick = (event) => {
|
|
1434
1446
|
var _a2;
|
|
1435
1447
|
const target = event.target;
|
|
@@ -1476,8 +1488,10 @@ var Input = ({
|
|
|
1476
1488
|
maxRows: MAX_NEWLINES,
|
|
1477
1489
|
value: text,
|
|
1478
1490
|
onChange: (event) => setText(event.target.value),
|
|
1491
|
+
onCompositionStart: () => setIsComposing(true),
|
|
1492
|
+
onCompositionEnd: () => setIsComposing(false),
|
|
1479
1493
|
onKeyDown: (event) => {
|
|
1480
|
-
if (event.key === "Enter" && !event.shiftKey) {
|
|
1494
|
+
if (event.key === "Enter" && !event.shiftKey && !isComposing) {
|
|
1481
1495
|
event.preventDefault();
|
|
1482
1496
|
if (canSend) {
|
|
1483
1497
|
send();
|