@copilotkit/react-ui 1.9.3-next.2 → 1.9.3-next.4
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 +18 -0
- package/README.md +124 -29
- 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,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CopilotPopup
|
|
3
|
-
} from "../../chunk-
|
|
4
|
-
import "../../chunk-
|
|
3
|
+
} from "../../chunk-H3EM63WS.mjs";
|
|
4
|
+
import "../../chunk-KN2GCKBE.mjs";
|
|
5
5
|
import "../../chunk-C3GSYRC3.mjs";
|
|
6
6
|
import "../../chunk-GVKA7RQQ.mjs";
|
|
7
7
|
import "../../chunk-V7W6IM2V.mjs";
|
|
@@ -12,7 +12,7 @@ import "../../chunk-KXE2JCUH.mjs";
|
|
|
12
12
|
import "../../chunk-NRA3CFEE.mjs";
|
|
13
13
|
import "../../chunk-BH6PCAAL.mjs";
|
|
14
14
|
import "../../chunk-UFN2VWSR.mjs";
|
|
15
|
-
import "../../chunk-
|
|
15
|
+
import "../../chunk-HKTWKCPS.mjs";
|
|
16
16
|
import "../../chunk-53CVDVS5.mjs";
|
|
17
17
|
import "../../chunk-2II3Q27P.mjs";
|
|
18
18
|
import "../../chunk-ULDQXCED.mjs";
|
|
@@ -23,9 +23,9 @@ import "../../chunk-HWMFMBJC.mjs";
|
|
|
23
23
|
import "../../chunk-QGSPTXOV.mjs";
|
|
24
24
|
import "../../chunk-IMBPSLL4.mjs";
|
|
25
25
|
import "../../chunk-PLHTVHUW.mjs";
|
|
26
|
-
import "../../chunk-
|
|
26
|
+
import "../../chunk-4HUXYD3B.mjs";
|
|
27
27
|
import "../../chunk-CGEAG65D.mjs";
|
|
28
|
-
import "../../chunk-
|
|
28
|
+
import "../../chunk-QIOJXTIQ.mjs";
|
|
29
29
|
import "../../chunk-YTXEWDNC.mjs";
|
|
30
30
|
import "../../chunk-B3D7U7TJ.mjs";
|
|
31
31
|
import "../../chunk-IEMQ2SQW.mjs";
|
|
@@ -1236,7 +1236,16 @@ var import_react9 = require("react");
|
|
|
1236
1236
|
var import_react7 = require("react");
|
|
1237
1237
|
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
1238
1238
|
var AutoResizingTextarea = (0, import_react7.forwardRef)(
|
|
1239
|
-
({
|
|
1239
|
+
({
|
|
1240
|
+
maxRows = 1,
|
|
1241
|
+
placeholder,
|
|
1242
|
+
value,
|
|
1243
|
+
onChange,
|
|
1244
|
+
onKeyDown,
|
|
1245
|
+
onCompositionStart,
|
|
1246
|
+
onCompositionEnd,
|
|
1247
|
+
autoFocus
|
|
1248
|
+
}, ref) => {
|
|
1240
1249
|
const internalTextareaRef = (0, import_react7.useRef)(null);
|
|
1241
1250
|
const [maxHeight, setMaxHeight] = (0, import_react7.useState)(0);
|
|
1242
1251
|
(0, import_react7.useImperativeHandle)(ref, () => internalTextareaRef.current);
|
|
@@ -1268,6 +1277,8 @@ var AutoResizingTextarea = (0, import_react7.forwardRef)(
|
|
|
1268
1277
|
value,
|
|
1269
1278
|
onChange,
|
|
1270
1279
|
onKeyDown,
|
|
1280
|
+
onCompositionStart,
|
|
1281
|
+
onCompositionEnd,
|
|
1271
1282
|
placeholder,
|
|
1272
1283
|
style: {
|
|
1273
1284
|
overflow: "auto",
|
|
@@ -1431,6 +1442,7 @@ var Input = ({
|
|
|
1431
1442
|
const showPoweredBy = !((_a = copilotContext.copilotApiConfig) == null ? void 0 : _a.publicApiKey);
|
|
1432
1443
|
const pushToTalkConfigured = copilotContext.copilotApiConfig.textToSpeechUrl !== void 0 && copilotContext.copilotApiConfig.transcribeAudioUrl !== void 0;
|
|
1433
1444
|
const textareaRef = (0, import_react9.useRef)(null);
|
|
1445
|
+
const [isComposing, setIsComposing] = (0, import_react9.useState)(false);
|
|
1434
1446
|
const handleDivClick = (event) => {
|
|
1435
1447
|
var _a2;
|
|
1436
1448
|
const target = event.target;
|
|
@@ -1477,8 +1489,10 @@ var Input = ({
|
|
|
1477
1489
|
maxRows: MAX_NEWLINES,
|
|
1478
1490
|
value: text,
|
|
1479
1491
|
onChange: (event) => setText(event.target.value),
|
|
1492
|
+
onCompositionStart: () => setIsComposing(true),
|
|
1493
|
+
onCompositionEnd: () => setIsComposing(false),
|
|
1480
1494
|
onKeyDown: (event) => {
|
|
1481
|
-
if (event.key === "Enter" && !event.shiftKey) {
|
|
1495
|
+
if (event.key === "Enter" && !event.shiftKey && !isComposing) {
|
|
1482
1496
|
event.preventDefault();
|
|
1483
1497
|
if (canSend) {
|
|
1484
1498
|
send();
|