@copilotkit/react-ui 1.51.0-next.1 → 1.51.0-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 (43) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/dist/{chunk-NGJ32FAP.mjs → chunk-6TWQUA2Q.mjs} +4 -3
  3. package/dist/chunk-6TWQUA2Q.mjs.map +1 -0
  4. package/dist/{chunk-7PR2KJDO.mjs → chunk-BVKKSSB2.mjs} +2 -2
  5. package/dist/{chunk-LQEFRHRT.mjs → chunk-DI7DDMRS.mjs} +2 -2
  6. package/dist/{chunk-QPQRLXN3.mjs → chunk-NSJWSIPR.mjs} +2 -2
  7. package/dist/{chunk-QB3GUN2N.mjs → chunk-VHKHX7GV.mjs} +2 -2
  8. package/dist/{chunk-ELUJRANC.mjs → chunk-VVCCMYGT.mjs} +2 -2
  9. package/dist/components/chat/Chat.js +3 -2
  10. package/dist/components/chat/Chat.js.map +1 -1
  11. package/dist/components/chat/Chat.mjs +3 -3
  12. package/dist/components/chat/Modal.js +3 -2
  13. package/dist/components/chat/Modal.js.map +1 -1
  14. package/dist/components/chat/Modal.mjs +4 -4
  15. package/dist/components/chat/Popup.js +3 -2
  16. package/dist/components/chat/Popup.js.map +1 -1
  17. package/dist/components/chat/Popup.mjs +5 -5
  18. package/dist/components/chat/Sidebar.js +3 -2
  19. package/dist/components/chat/Sidebar.js.map +1 -1
  20. package/dist/components/chat/Sidebar.mjs +5 -5
  21. package/dist/components/chat/Suggestion.js +3 -2
  22. package/dist/components/chat/Suggestion.js.map +1 -1
  23. package/dist/components/chat/Suggestion.mjs +1 -1
  24. package/dist/components/chat/Suggestions.js +3 -2
  25. package/dist/components/chat/Suggestions.js.map +1 -1
  26. package/dist/components/chat/Suggestions.mjs +2 -2
  27. package/dist/components/chat/index.js +3 -2
  28. package/dist/components/chat/index.js.map +1 -1
  29. package/dist/components/chat/index.mjs +6 -6
  30. package/dist/components/index.js +3 -2
  31. package/dist/components/index.js.map +1 -1
  32. package/dist/components/index.mjs +6 -6
  33. package/dist/index.js +3 -2
  34. package/dist/index.js.map +1 -1
  35. package/dist/index.mjs +6 -6
  36. package/package.json +7 -7
  37. package/src/components/chat/Suggestion.tsx +3 -2
  38. package/dist/chunk-NGJ32FAP.mjs.map +0 -1
  39. /package/dist/{chunk-7PR2KJDO.mjs.map → chunk-BVKKSSB2.mjs.map} +0 -0
  40. /package/dist/{chunk-LQEFRHRT.mjs.map → chunk-DI7DDMRS.mjs.map} +0 -0
  41. /package/dist/{chunk-QPQRLXN3.mjs.map → chunk-NSJWSIPR.mjs.map} +0 -0
  42. /package/dist/{chunk-QB3GUN2N.mjs.map → chunk-VHKHX7GV.mjs.map} +0 -0
  43. /package/dist/{chunk-ELUJRANC.mjs.map → chunk-VVCCMYGT.mjs.map} +0 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,22 @@
1
1
  # ui
2
2
 
3
+ ## 1.51.0-next.3
4
+
5
+ ### Patch Changes
6
+
7
+ - @copilotkit/runtime-client-gql@1.51.0-next.3
8
+ - @copilotkit/react-core@1.51.0-next.3
9
+ - @copilotkit/shared@1.51.0-next.3
10
+
11
+ ## 1.51.0-next.2
12
+
13
+ ### Patch Changes
14
+
15
+ - Updated dependencies [2afd4e3]
16
+ - @copilotkit/shared@1.51.0-next.2
17
+ - @copilotkit/react-core@1.51.0-next.2
18
+ - @copilotkit/runtime-client-gql@1.51.0-next.2
19
+
3
20
  ## 1.51.0-next.1
4
21
 
5
22
  ### Patch Changes
@@ -6,9 +6,9 @@ import {
6
6
  import { useCopilotChatInternal } from "@copilotkit/react-core";
7
7
  import { jsx } from "react/jsx-runtime";
8
8
  function Suggestion({ title, onClick, partial, className }) {
9
+ const { isLoading } = useCopilotChatInternal();
9
10
  if (!title)
10
11
  return null;
11
- const { isLoading } = useCopilotChatInternal();
12
12
  return /* @__PURE__ */ jsx(
13
13
  "button",
14
14
  {
@@ -17,8 +17,9 @@ function Suggestion({ title, onClick, partial, className }) {
17
17
  e.preventDefault();
18
18
  onClick();
19
19
  },
20
- className: className || (partial ? "suggestion loading" : "suggestion"),
20
+ className: `suggestion ${className != null ? className : ""} ${partial ? "loading" : ""}`,
21
21
  "data-test-id": "suggestion",
22
+ type: "button",
22
23
  children: partial ? SmallSpinnerIcon : /* @__PURE__ */ jsx("span", { children: title })
23
24
  }
24
25
  );
@@ -27,4 +28,4 @@ function Suggestion({ title, onClick, partial, className }) {
27
28
  export {
28
29
  Suggestion
29
30
  };
30
- //# sourceMappingURL=chunk-NGJ32FAP.mjs.map
31
+ //# sourceMappingURL=chunk-6TWQUA2Q.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/chat/Suggestion.tsx"],"sourcesContent":["import { useCopilotChatInternal } from \"@copilotkit/react-core\";\nimport { SmallSpinnerIcon } from \"./Icons\";\n\ninterface SuggestionsProps {\n title: string;\n message: string;\n partial?: boolean;\n className?: string;\n onClick: () => void;\n}\n\nexport function Suggestion({ title, onClick, partial, className }: SuggestionsProps) {\n const { isLoading } = useCopilotChatInternal();\n if (!title) return null;\n\n return (\n <button\n disabled={partial || isLoading}\n onClick={(e) => {\n e.preventDefault();\n onClick();\n }}\n className={`suggestion ${className ?? \"\"} ${partial ? \"loading\" : \"\"}`}\n data-test-id=\"suggestion\"\n type=\"button\"\n >\n {partial ? SmallSpinnerIcon : <span>{title}</span>}\n </button>\n );\n}\n"],"mappings":";;;;;AAAA,SAAS,8BAA8B;AA0BH;AAf7B,SAAS,WAAW,EAAE,OAAO,SAAS,SAAS,UAAU,GAAqB;AACnF,QAAM,EAAE,UAAU,IAAI,uBAAuB;AAC7C,MAAI,CAAC;AAAO,WAAO;AAEnB,SACE;AAAA,IAAC;AAAA;AAAA,MACC,UAAU,WAAW;AAAA,MACrB,SAAS,CAAC,MAAM;AACd,UAAE,eAAe;AACjB,gBAAQ;AAAA,MACV;AAAA,MACA,WAAW,cAAc,gCAAa,MAAM,UAAU,YAAY;AAAA,MAClE,gBAAa;AAAA,MACb,MAAK;AAAA,MAEJ,oBAAU,mBAAmB,oBAAC,UAAM,iBAAM;AAAA;AAAA,EAC7C;AAEJ;","names":[]}
@@ -9,7 +9,7 @@ import {
9
9
  } from "./chunk-UFN2VWSR.mjs";
10
10
  import {
11
11
  CopilotChat
12
- } from "./chunk-QPQRLXN3.mjs";
12
+ } from "./chunk-NSJWSIPR.mjs";
13
13
  import {
14
14
  Input
15
15
  } from "./chunk-3W6J75HS.mjs";
@@ -219,4 +219,4 @@ var CopilotModal = (_a) => {
219
219
  export {
220
220
  CopilotModal
221
221
  };
222
- //# sourceMappingURL=chunk-7PR2KJDO.mjs.map
222
+ //# sourceMappingURL=chunk-BVKKSSB2.mjs.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  CopilotModal
3
- } from "./chunk-7PR2KJDO.mjs";
3
+ } from "./chunk-BVKKSSB2.mjs";
4
4
  import {
5
5
  __spreadProps,
6
6
  __spreadValues
@@ -27,4 +27,4 @@ function CopilotSidebar(props) {
27
27
  export {
28
28
  CopilotSidebar
29
29
  };
30
- //# sourceMappingURL=chunk-LQEFRHRT.mjs.map
30
+ //# sourceMappingURL=chunk-DI7DDMRS.mjs.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Suggestions
3
- } from "./chunk-QB3GUN2N.mjs";
3
+ } from "./chunk-VHKHX7GV.mjs";
4
4
  import {
5
5
  ImageUploadQueue
6
6
  } from "./chunk-PLHTVHUW.mjs";
@@ -432,4 +432,4 @@ export {
432
432
  CopilotChat,
433
433
  WrappedCopilotChat
434
434
  };
435
- //# sourceMappingURL=chunk-QPQRLXN3.mjs.map
435
+ //# sourceMappingURL=chunk-NSJWSIPR.mjs.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Suggestion
3
- } from "./chunk-NGJ32FAP.mjs";
3
+ } from "./chunk-6TWQUA2Q.mjs";
4
4
 
5
5
  // src/components/chat/Suggestions.tsx
6
6
  import { jsx } from "react/jsx-runtime";
@@ -28,4 +28,4 @@ function Suggestions({
28
28
  export {
29
29
  Suggestions
30
30
  };
31
- //# sourceMappingURL=chunk-QB3GUN2N.mjs.map
31
+ //# sourceMappingURL=chunk-VHKHX7GV.mjs.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  CopilotModal
3
- } from "./chunk-7PR2KJDO.mjs";
3
+ } from "./chunk-BVKKSSB2.mjs";
4
4
  import {
5
5
  __spreadProps,
6
6
  __spreadValues
@@ -18,4 +18,4 @@ function CopilotPopup(props) {
18
18
  export {
19
19
  CopilotPopup
20
20
  };
21
- //# sourceMappingURL=chunk-ELUJRANC.mjs.map
21
+ //# sourceMappingURL=chunk-VVCCMYGT.mjs.map
@@ -1839,9 +1839,9 @@ var ImageUploadQueue = ({
1839
1839
  var import_react_core4 = require("@copilotkit/react-core");
1840
1840
  var import_jsx_runtime15 = require("react/jsx-runtime");
1841
1841
  function Suggestion({ title, onClick, partial, className }) {
1842
+ const { isLoading } = (0, import_react_core4.useCopilotChatInternal)();
1842
1843
  if (!title)
1843
1844
  return null;
1844
- const { isLoading } = (0, import_react_core4.useCopilotChatInternal)();
1845
1845
  return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
1846
1846
  "button",
1847
1847
  {
@@ -1850,8 +1850,9 @@ function Suggestion({ title, onClick, partial, className }) {
1850
1850
  e.preventDefault();
1851
1851
  onClick();
1852
1852
  },
1853
- className: className || (partial ? "suggestion loading" : "suggestion"),
1853
+ className: `suggestion ${className != null ? className : ""} ${partial ? "loading" : ""}`,
1854
1854
  "data-test-id": "suggestion",
1855
+ type: "button",
1855
1856
  children: partial ? SmallSpinnerIcon : /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { children: title })
1856
1857
  }
1857
1858
  );