@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,12 +1,12 @@
|
|
|
1
1
|
import "../../chunk-SC6JRFAJ.mjs";
|
|
2
2
|
import {
|
|
3
3
|
CopilotSidebar
|
|
4
|
-
} from "../../chunk-
|
|
4
|
+
} from "../../chunk-ALIBUJML.mjs";
|
|
5
5
|
import "../../chunk-WB3YULQ4.mjs";
|
|
6
6
|
import {
|
|
7
7
|
CopilotPopup
|
|
8
|
-
} from "../../chunk-
|
|
9
|
-
import "../../chunk-
|
|
8
|
+
} from "../../chunk-H3EM63WS.mjs";
|
|
9
|
+
import "../../chunk-KN2GCKBE.mjs";
|
|
10
10
|
import "../../chunk-C3GSYRC3.mjs";
|
|
11
11
|
import "../../chunk-GVKA7RQQ.mjs";
|
|
12
12
|
import "../../chunk-V7W6IM2V.mjs";
|
|
@@ -19,7 +19,7 @@ import "../../chunk-BH6PCAAL.mjs";
|
|
|
19
19
|
import "../../chunk-UFN2VWSR.mjs";
|
|
20
20
|
import {
|
|
21
21
|
CopilotChat
|
|
22
|
-
} from "../../chunk-
|
|
22
|
+
} from "../../chunk-HKTWKCPS.mjs";
|
|
23
23
|
import "../../chunk-53CVDVS5.mjs";
|
|
24
24
|
import "../../chunk-2II3Q27P.mjs";
|
|
25
25
|
import {
|
|
@@ -40,9 +40,9 @@ import {
|
|
|
40
40
|
Suggestion
|
|
41
41
|
} from "../../chunk-IMBPSLL4.mjs";
|
|
42
42
|
import "../../chunk-PLHTVHUW.mjs";
|
|
43
|
-
import "../../chunk-
|
|
43
|
+
import "../../chunk-4HUXYD3B.mjs";
|
|
44
44
|
import "../../chunk-CGEAG65D.mjs";
|
|
45
|
-
import "../../chunk-
|
|
45
|
+
import "../../chunk-QIOJXTIQ.mjs";
|
|
46
46
|
import {
|
|
47
47
|
Markdown
|
|
48
48
|
} from "../../chunk-YTXEWDNC.mjs";
|
package/dist/components/index.js
CHANGED
|
@@ -1246,7 +1246,16 @@ var import_react9 = require("react");
|
|
|
1246
1246
|
var import_react7 = require("react");
|
|
1247
1247
|
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
1248
1248
|
var AutoResizingTextarea = (0, import_react7.forwardRef)(
|
|
1249
|
-
({
|
|
1249
|
+
({
|
|
1250
|
+
maxRows = 1,
|
|
1251
|
+
placeholder,
|
|
1252
|
+
value,
|
|
1253
|
+
onChange,
|
|
1254
|
+
onKeyDown,
|
|
1255
|
+
onCompositionStart,
|
|
1256
|
+
onCompositionEnd,
|
|
1257
|
+
autoFocus
|
|
1258
|
+
}, ref) => {
|
|
1250
1259
|
const internalTextareaRef = (0, import_react7.useRef)(null);
|
|
1251
1260
|
const [maxHeight, setMaxHeight] = (0, import_react7.useState)(0);
|
|
1252
1261
|
(0, import_react7.useImperativeHandle)(ref, () => internalTextareaRef.current);
|
|
@@ -1278,6 +1287,8 @@ var AutoResizingTextarea = (0, import_react7.forwardRef)(
|
|
|
1278
1287
|
value,
|
|
1279
1288
|
onChange,
|
|
1280
1289
|
onKeyDown,
|
|
1290
|
+
onCompositionStart,
|
|
1291
|
+
onCompositionEnd,
|
|
1281
1292
|
placeholder,
|
|
1282
1293
|
style: {
|
|
1283
1294
|
overflow: "auto",
|
|
@@ -1441,6 +1452,7 @@ var Input = ({
|
|
|
1441
1452
|
const showPoweredBy = !((_a = copilotContext.copilotApiConfig) == null ? void 0 : _a.publicApiKey);
|
|
1442
1453
|
const pushToTalkConfigured = copilotContext.copilotApiConfig.textToSpeechUrl !== void 0 && copilotContext.copilotApiConfig.transcribeAudioUrl !== void 0;
|
|
1443
1454
|
const textareaRef = (0, import_react9.useRef)(null);
|
|
1455
|
+
const [isComposing, setIsComposing] = (0, import_react9.useState)(false);
|
|
1444
1456
|
const handleDivClick = (event) => {
|
|
1445
1457
|
var _a2;
|
|
1446
1458
|
const target = event.target;
|
|
@@ -1487,8 +1499,10 @@ var Input = ({
|
|
|
1487
1499
|
maxRows: MAX_NEWLINES,
|
|
1488
1500
|
value: text,
|
|
1489
1501
|
onChange: (event) => setText(event.target.value),
|
|
1502
|
+
onCompositionStart: () => setIsComposing(true),
|
|
1503
|
+
onCompositionEnd: () => setIsComposing(false),
|
|
1490
1504
|
onKeyDown: (event) => {
|
|
1491
|
-
if (event.key === "Enter" && !event.shiftKey) {
|
|
1505
|
+
if (event.key === "Enter" && !event.shiftKey && !isComposing) {
|
|
1492
1506
|
event.preventDefault();
|
|
1493
1507
|
if (canSend) {
|
|
1494
1508
|
send();
|