@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.
Files changed (46) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/dist/{chunk-X3LV7OXQ.mjs → chunk-4HUXYD3B.mjs} +6 -3
  3. package/dist/chunk-4HUXYD3B.mjs.map +1 -0
  4. package/dist/{chunk-TSDSBNOS.mjs → chunk-ALIBUJML.mjs} +2 -2
  5. package/dist/{chunk-BP3RN6OE.mjs → chunk-H3EM63WS.mjs} +2 -2
  6. package/dist/{chunk-4RAYX7ZX.mjs → chunk-HKTWKCPS.mjs} +2 -2
  7. package/dist/{chunk-EQUUN7ZM.mjs → chunk-KN2GCKBE.mjs} +3 -3
  8. package/dist/{chunk-YQFVRDNC.mjs → chunk-QIOJXTIQ.mjs} +13 -2
  9. package/dist/chunk-QIOJXTIQ.mjs.map +1 -0
  10. package/dist/components/chat/Chat.js +16 -2
  11. package/dist/components/chat/Chat.js.map +1 -1
  12. package/dist/components/chat/Chat.mjs +3 -3
  13. package/dist/components/chat/Input.js +16 -2
  14. package/dist/components/chat/Input.js.map +1 -1
  15. package/dist/components/chat/Input.mjs +2 -2
  16. package/dist/components/chat/Modal.js +16 -2
  17. package/dist/components/chat/Modal.js.map +1 -1
  18. package/dist/components/chat/Modal.mjs +4 -4
  19. package/dist/components/chat/Popup.js +16 -2
  20. package/dist/components/chat/Popup.js.map +1 -1
  21. package/dist/components/chat/Popup.mjs +5 -5
  22. package/dist/components/chat/Sidebar.js +16 -2
  23. package/dist/components/chat/Sidebar.js.map +1 -1
  24. package/dist/components/chat/Sidebar.mjs +5 -5
  25. package/dist/components/chat/Textarea.d.ts +2 -0
  26. package/dist/components/chat/Textarea.js +12 -1
  27. package/dist/components/chat/Textarea.js.map +1 -1
  28. package/dist/components/chat/Textarea.mjs +1 -1
  29. package/dist/components/chat/index.js +16 -2
  30. package/dist/components/chat/index.js.map +1 -1
  31. package/dist/components/chat/index.mjs +6 -6
  32. package/dist/components/index.js +16 -2
  33. package/dist/components/index.js.map +1 -1
  34. package/dist/components/index.mjs +6 -6
  35. package/dist/index.js +16 -2
  36. package/dist/index.js.map +1 -1
  37. package/dist/index.mjs +6 -6
  38. package/package.json +4 -4
  39. package/src/components/chat/Input.tsx +4 -1
  40. package/src/components/chat/Textarea.tsx +17 -1
  41. package/dist/chunk-X3LV7OXQ.mjs.map +0 -1
  42. package/dist/chunk-YQFVRDNC.mjs.map +0 -1
  43. /package/dist/{chunk-TSDSBNOS.mjs.map → chunk-ALIBUJML.mjs.map} +0 -0
  44. /package/dist/{chunk-BP3RN6OE.mjs.map → chunk-H3EM63WS.mjs.map} +0 -0
  45. /package/dist/{chunk-4RAYX7ZX.mjs.map → chunk-HKTWKCPS.mjs.map} +0 -0
  46. /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-BP3RN6OE.mjs";
4
- import "../../chunk-EQUUN7ZM.mjs";
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-4RAYX7ZX.mjs";
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-X3LV7OXQ.mjs";
26
+ import "../../chunk-4HUXYD3B.mjs";
27
27
  import "../../chunk-CGEAG65D.mjs";
28
- import "../../chunk-YQFVRDNC.mjs";
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
- ({ maxRows = 1, placeholder, value, onChange, onKeyDown, autoFocus }, ref) => {
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();