@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,12 +1,12 @@
1
1
  import "../../chunk-SC6JRFAJ.mjs";
2
2
  import {
3
3
  CopilotSidebar
4
- } from "../../chunk-TSDSBNOS.mjs";
4
+ } from "../../chunk-ALIBUJML.mjs";
5
5
  import "../../chunk-WB3YULQ4.mjs";
6
6
  import {
7
7
  CopilotPopup
8
- } from "../../chunk-BP3RN6OE.mjs";
9
- import "../../chunk-EQUUN7ZM.mjs";
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-4RAYX7ZX.mjs";
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-X3LV7OXQ.mjs";
43
+ import "../../chunk-4HUXYD3B.mjs";
44
44
  import "../../chunk-CGEAG65D.mjs";
45
- import "../../chunk-YQFVRDNC.mjs";
45
+ import "../../chunk-QIOJXTIQ.mjs";
46
46
  import {
47
47
  Markdown
48
48
  } from "../../chunk-YTXEWDNC.mjs";
@@ -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
- ({ maxRows = 1, placeholder, value, onChange, onKeyDown, autoFocus }, ref) => {
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();