@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
|
@@ -2,12 +2,12 @@ import "../chunk-MMVDU6DF.mjs";
|
|
|
2
2
|
import "../chunk-SC6JRFAJ.mjs";
|
|
3
3
|
import {
|
|
4
4
|
CopilotSidebar
|
|
5
|
-
} from "../chunk-
|
|
5
|
+
} from "../chunk-ALIBUJML.mjs";
|
|
6
6
|
import "../chunk-WB3YULQ4.mjs";
|
|
7
7
|
import {
|
|
8
8
|
CopilotPopup
|
|
9
|
-
} from "../chunk-
|
|
10
|
-
import "../chunk-
|
|
9
|
+
} from "../chunk-H3EM63WS.mjs";
|
|
10
|
+
import "../chunk-KN2GCKBE.mjs";
|
|
11
11
|
import "../chunk-C3GSYRC3.mjs";
|
|
12
12
|
import "../chunk-GVKA7RQQ.mjs";
|
|
13
13
|
import "../chunk-V7W6IM2V.mjs";
|
|
@@ -24,7 +24,7 @@ import "../chunk-BH6PCAAL.mjs";
|
|
|
24
24
|
import "../chunk-UFN2VWSR.mjs";
|
|
25
25
|
import {
|
|
26
26
|
CopilotChat
|
|
27
|
-
} from "../chunk-
|
|
27
|
+
} from "../chunk-HKTWKCPS.mjs";
|
|
28
28
|
import "../chunk-53CVDVS5.mjs";
|
|
29
29
|
import "../chunk-2II3Q27P.mjs";
|
|
30
30
|
import {
|
|
@@ -45,9 +45,9 @@ import {
|
|
|
45
45
|
Suggestion
|
|
46
46
|
} from "../chunk-IMBPSLL4.mjs";
|
|
47
47
|
import "../chunk-PLHTVHUW.mjs";
|
|
48
|
-
import "../chunk-
|
|
48
|
+
import "../chunk-4HUXYD3B.mjs";
|
|
49
49
|
import "../chunk-CGEAG65D.mjs";
|
|
50
|
-
import "../chunk-
|
|
50
|
+
import "../chunk-QIOJXTIQ.mjs";
|
|
51
51
|
import {
|
|
52
52
|
Markdown
|
|
53
53
|
} from "../chunk-YTXEWDNC.mjs";
|
package/dist/index.js
CHANGED
|
@@ -1248,7 +1248,16 @@ var import_react9 = require("react");
|
|
|
1248
1248
|
var import_react7 = require("react");
|
|
1249
1249
|
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
1250
1250
|
var AutoResizingTextarea = (0, import_react7.forwardRef)(
|
|
1251
|
-
({
|
|
1251
|
+
({
|
|
1252
|
+
maxRows = 1,
|
|
1253
|
+
placeholder,
|
|
1254
|
+
value,
|
|
1255
|
+
onChange,
|
|
1256
|
+
onKeyDown,
|
|
1257
|
+
onCompositionStart,
|
|
1258
|
+
onCompositionEnd,
|
|
1259
|
+
autoFocus
|
|
1260
|
+
}, ref) => {
|
|
1252
1261
|
const internalTextareaRef = (0, import_react7.useRef)(null);
|
|
1253
1262
|
const [maxHeight, setMaxHeight] = (0, import_react7.useState)(0);
|
|
1254
1263
|
(0, import_react7.useImperativeHandle)(ref, () => internalTextareaRef.current);
|
|
@@ -1280,6 +1289,8 @@ var AutoResizingTextarea = (0, import_react7.forwardRef)(
|
|
|
1280
1289
|
value,
|
|
1281
1290
|
onChange,
|
|
1282
1291
|
onKeyDown,
|
|
1292
|
+
onCompositionStart,
|
|
1293
|
+
onCompositionEnd,
|
|
1283
1294
|
placeholder,
|
|
1284
1295
|
style: {
|
|
1285
1296
|
overflow: "auto",
|
|
@@ -1443,6 +1454,7 @@ var Input = ({
|
|
|
1443
1454
|
const showPoweredBy = !((_a = copilotContext.copilotApiConfig) == null ? void 0 : _a.publicApiKey);
|
|
1444
1455
|
const pushToTalkConfigured = copilotContext.copilotApiConfig.textToSpeechUrl !== void 0 && copilotContext.copilotApiConfig.transcribeAudioUrl !== void 0;
|
|
1445
1456
|
const textareaRef = (0, import_react9.useRef)(null);
|
|
1457
|
+
const [isComposing, setIsComposing] = (0, import_react9.useState)(false);
|
|
1446
1458
|
const handleDivClick = (event) => {
|
|
1447
1459
|
var _a2;
|
|
1448
1460
|
const target = event.target;
|
|
@@ -1489,8 +1501,10 @@ var Input = ({
|
|
|
1489
1501
|
maxRows: MAX_NEWLINES,
|
|
1490
1502
|
value: text,
|
|
1491
1503
|
onChange: (event) => setText(event.target.value),
|
|
1504
|
+
onCompositionStart: () => setIsComposing(true),
|
|
1505
|
+
onCompositionEnd: () => setIsComposing(false),
|
|
1492
1506
|
onKeyDown: (event) => {
|
|
1493
|
-
if (event.key === "Enter" && !event.shiftKey) {
|
|
1507
|
+
if (event.key === "Enter" && !event.shiftKey && !isComposing) {
|
|
1494
1508
|
event.preventDefault();
|
|
1495
1509
|
if (canSend) {
|
|
1496
1510
|
send();
|