@copilotkit/react-textarea 0.36.0-mme-fix-packaging-issues.0 → 0.36.0-mme-push-to-talk.0

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 (47) hide show
  1. package/.turbo/turbo-build.log +172 -172
  2. package/CHANGELOG.md +8 -2
  3. package/dist/{chunk-7R7KMN2G.mjs → chunk-COQISBP2.mjs} +2 -2
  4. package/dist/{chunk-GZPRBYKA.mjs → chunk-DMLXXOXD.mjs} +2 -2
  5. package/dist/{chunk-P4EI4H6Y.mjs → chunk-OGLVRSCO.mjs} +2 -2
  6. package/dist/{chunk-MMVI7IPP.mjs → chunk-PQIOU3E5.mjs} +2 -2
  7. package/dist/{chunk-O3QC2FT5.mjs → chunk-XU5Z5BWV.mjs} +2 -2
  8. package/dist/chunk-YNXNMCDX.mjs +51 -0
  9. package/dist/chunk-YNXNMCDX.mjs.map +1 -0
  10. package/dist/components/base-copilot-textarea/base-copilot-textarea.js +66 -116
  11. package/dist/components/base-copilot-textarea/base-copilot-textarea.js.map +1 -1
  12. package/dist/components/base-copilot-textarea/base-copilot-textarea.mjs +5 -5
  13. package/dist/components/copilot-textarea/copilot-textarea.js +73 -123
  14. package/dist/components/copilot-textarea/copilot-textarea.js.map +1 -1
  15. package/dist/components/copilot-textarea/copilot-textarea.mjs +6 -6
  16. package/dist/components/hovering-toolbar/hovering-toolbar.js +45 -95
  17. package/dist/components/hovering-toolbar/hovering-toolbar.js.map +1 -1
  18. package/dist/components/hovering-toolbar/hovering-toolbar.mjs +4 -4
  19. package/dist/components/hovering-toolbar/text-insertion-prompt-box/hovering-insertion-prompt-box-core.js +34 -84
  20. package/dist/components/hovering-toolbar/text-insertion-prompt-box/hovering-insertion-prompt-box-core.js.map +1 -1
  21. package/dist/components/hovering-toolbar/text-insertion-prompt-box/hovering-insertion-prompt-box-core.mjs +2 -2
  22. package/dist/components/hovering-toolbar/text-insertion-prompt-box/hovering-insertion-prompt-box.js +34 -84
  23. package/dist/components/hovering-toolbar/text-insertion-prompt-box/hovering-insertion-prompt-box.js.map +1 -1
  24. package/dist/components/hovering-toolbar/text-insertion-prompt-box/hovering-insertion-prompt-box.mjs +3 -3
  25. package/dist/components/hovering-toolbar/text-insertion-prompt-box/included-files-preview.d.ts +2 -1
  26. package/dist/components/hovering-toolbar/text-insertion-prompt-box/included-files-preview.js +19 -67
  27. package/dist/components/hovering-toolbar/text-insertion-prompt-box/included-files-preview.js.map +1 -1
  28. package/dist/components/hovering-toolbar/text-insertion-prompt-box/included-files-preview.mjs +3 -1
  29. package/dist/components/hovering-toolbar/text-insertion-prompt-box/index.js +34 -84
  30. package/dist/components/hovering-toolbar/text-insertion-prompt-box/index.js.map +1 -1
  31. package/dist/components/hovering-toolbar/text-insertion-prompt-box/index.mjs +3 -3
  32. package/dist/components/index.js +76 -126
  33. package/dist/components/index.js.map +1 -1
  34. package/dist/components/index.mjs +6 -6
  35. package/dist/index.js +76 -126
  36. package/dist/index.js.map +1 -1
  37. package/dist/index.mjs +7 -7
  38. package/package.json +7 -6
  39. package/src/components/hovering-toolbar/text-insertion-prompt-box/included-files-preview.tsx +13 -62
  40. package/typedoc.json +4 -0
  41. package/dist/chunk-JC6NGPO4.mjs +0 -100
  42. package/dist/chunk-JC6NGPO4.mjs.map +0 -1
  43. /package/dist/{chunk-7R7KMN2G.mjs.map → chunk-COQISBP2.mjs.map} +0 -0
  44. /package/dist/{chunk-GZPRBYKA.mjs.map → chunk-DMLXXOXD.mjs.map} +0 -0
  45. /package/dist/{chunk-P4EI4H6Y.mjs.map → chunk-OGLVRSCO.mjs.map} +0 -0
  46. /package/dist/{chunk-MMVI7IPP.mjs.map → chunk-PQIOU3E5.mjs.map} +0 -0
  47. /package/dist/{chunk-O3QC2FT5.mjs.map → chunk-XU5Z5BWV.mjs.map} +0 -0
package/dist/index.mjs CHANGED
@@ -4,7 +4,7 @@ import "./chunk-WADHCMPK.mjs";
4
4
  import "./chunk-MMVDU6DF.mjs";
5
5
  import {
6
6
  CopilotTextarea
7
- } from "./chunk-MMVI7IPP.mjs";
7
+ } from "./chunk-PQIOU3E5.mjs";
8
8
  import "./chunk-SJ2TM5GA.mjs";
9
9
  import "./chunk-QCPS6IYI.mjs";
10
10
  import "./chunk-RUV6NBIF.mjs";
@@ -16,7 +16,7 @@ import "./chunk-RKQ6RTZM.mjs";
16
16
  import "./chunk-KDVMG3XF.mjs";
17
17
  import {
18
18
  BaseCopilotTextarea
19
- } from "./chunk-O3QC2FT5.mjs";
19
+ } from "./chunk-XU5Z5BWV.mjs";
20
20
  import "./chunk-DRV2FOHZ.mjs";
21
21
  import "./chunk-4NHVQZ67.mjs";
22
22
  import "./chunk-FMQG2ZM3.mjs";
@@ -27,11 +27,11 @@ import "./chunk-QKS2IOUH.mjs";
27
27
  import "./chunk-JJLQVT7S.mjs";
28
28
  import "./chunk-LQ2OWQU7.mjs";
29
29
  import "./chunk-7LSRNPNI.mjs";
30
- import "./chunk-GZPRBYKA.mjs";
30
+ import "./chunk-DMLXXOXD.mjs";
31
31
  import "./chunk-L7VVZH4Q.mjs";
32
- import "./chunk-7R7KMN2G.mjs";
33
- import "./chunk-P4EI4H6Y.mjs";
34
- import "./chunk-JC6NGPO4.mjs";
32
+ import "./chunk-COQISBP2.mjs";
33
+ import "./chunk-OGLVRSCO.mjs";
34
+ import "./chunk-YNXNMCDX.mjs";
35
35
  import "./chunk-3PQ7GSFE.mjs";
36
36
  import "./chunk-WFTAAA7R.mjs";
37
37
  import "./chunk-YFK5BFEI.mjs";
@@ -48,8 +48,8 @@ import {
48
48
  } from "./chunk-LCDTIJSD.mjs";
49
49
  import "./chunk-224UKA7C.mjs";
50
50
  import "./chunk-XW3ICO4S.mjs";
51
- import "./chunk-IU3WTXLQ.mjs";
52
51
  import "./chunk-H4VKQGVU.mjs";
52
+ import "./chunk-IU3WTXLQ.mjs";
53
53
  import "./chunk-DFTV4TST.mjs";
54
54
  import "./chunk-T6MTDQZ7.mjs";
55
55
  import "./chunk-ECR45NSD.mjs";
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
7
- "version": "0.36.0-mme-fix-packaging-issues.0",
7
+ "version": "0.36.0-mme-push-to-talk.0",
8
8
  "sideEffects": [
9
9
  "**/*.css"
10
10
  ],
@@ -37,14 +37,15 @@
37
37
  "ts-jest": "^29.1.1",
38
38
  "tsup": "^6.7.0",
39
39
  "typescript": "^5.2.3",
40
- "tailwind-config": "0.9.0",
41
- "tsconfig": "0.14.0",
42
- "eslint-config-custom": "0.10.0"
40
+ "eslint-config-custom": "0.11.0-mme-push-to-talk.0",
41
+ "tailwind-config": "0.10.0-mme-push-to-talk.0",
42
+ "tsconfig": "0.15.0-mme-push-to-talk.0"
43
43
  },
44
44
  "dependencies": {
45
45
  "@emotion/css": "^11.11.2",
46
46
  "@emotion/react": "^11.11.1",
47
47
  "@emotion/styled": "^11.11.0",
48
+ "@mui/material": "^5.14.11",
48
49
  "@radix-ui/react-dialog": "^1.0.4",
49
50
  "@radix-ui/react-label": "^2.0.2",
50
51
  "@radix-ui/react-separator": "^1.0.3",
@@ -61,8 +62,8 @@
61
62
  "slate-history": "^0.93.0",
62
63
  "slate-react": "^0.98.1",
63
64
  "tailwind-merge": "^1.13.2",
64
- "@copilotkit/react-core": "0.25.0",
65
- "@copilotkit/shared": "0.9.0"
65
+ "@copilotkit/react-core": "0.36.0-mme-push-to-talk.0",
66
+ "@copilotkit/shared": "0.36.0-mme-push-to-talk.0"
66
67
  },
67
68
  "scripts": {
68
69
  "build": "tsup --clean",
@@ -1,6 +1,8 @@
1
1
  import { DocumentPointer } from "@copilotkit/react-core";
2
2
  import { Label } from "../../ui/label";
3
3
  import React from "react";
4
+ import Chip from "@mui/material/Chip/Chip.js";
5
+ import Avatar from "@mui/material/Avatar/Avatar.js";
4
6
 
5
7
  export interface IncludedFilesPreviewProps {
6
8
  includedFiles: DocumentPointer[];
@@ -36,69 +38,18 @@ export interface FileChipPreviewProps {
36
38
  onDelete: () => void;
37
39
  }
38
40
 
39
- function FileChipPreview({
40
- filePointer,
41
- onDelete,
42
- }: {
43
- filePointer: DocumentPointer;
44
- onDelete: () => void;
45
- }) {
46
- const CLOSE_BUTTON_COLOR = "rgba(0, 0, 0, 0.26)";
47
- const [color, setColor] = React.useState(CLOSE_BUTTON_COLOR);
41
+ export const FileChipPreview = ({ filePointer, onDelete }: FileChipPreviewProps) => {
48
42
  return (
49
- <div>
50
- <button
51
- style={{
52
- fontSize: "0.8125rem",
53
- display: "inline-flex",
54
- justifyContent: "center",
55
- alignItems: "center",
56
- height: "32px",
57
- color: "rgba(0, 0, 0, 0.87)",
58
- backgroundColor: "rgba(0, 0, 0, 0.08)",
59
- borderRadius: "16px",
60
- whiteSpace: "nowrap",
61
- boxSizing: "border-box",
62
- border: 0,
63
- verticalAlign: "middle",
64
- outline: 0,
65
- cursor: "default",
66
- }}
67
- >
68
- <img
69
- style={{
70
- marginLeft: "5px",
71
- width: "24px",
72
- height: "24px",
73
- backgroundColor: "transparent",
74
- borderRadius: "50%",
75
- }}
43
+ <Chip
44
+ label={filePointer.name}
45
+ onDelete={onDelete}
46
+ avatar={
47
+ <Avatar
76
48
  src={filePointer.iconImageUri}
77
49
  alt={filePointer.sourceApplication}
78
- />
79
- <span style={{ marginLeft: "5px" }}>{filePointer.name}</span>
80
- <svg
81
- style={{
82
- color: color,
83
- fontSize: "22px",
84
- cursor: "pointer",
85
- margin: "0 5px 0 5px",
86
- userSelect: "none",
87
- width: "1em",
88
- height: "1em",
89
- display: "inline-block",
90
- fill: "currentColor",
91
- flexShrink: 0,
92
- }}
93
- viewBox="0 0 24 24" // Defines the size of the original design space
94
- preserveAspectRatio="xMidYMid meet"
95
- onClick={onDelete}
96
- onMouseOver={() => setColor("rgba(0, 0, 0, 0.54)")}
97
- onMouseOut={() => setColor(CLOSE_BUTTON_COLOR)}
98
- >
99
- <path d="M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"></path>
100
- </svg>
101
- </button>
102
- </div>
50
+ sx={{ backgroundColor: "transparent" }}
51
+ ></Avatar>
52
+ }
53
+ />
103
54
  );
104
- }
55
+ };
package/typedoc.json ADDED
@@ -0,0 +1,4 @@
1
+ {
2
+ "extends": ["../../typedoc.base.json"],
3
+ "entryPoints": ["src/index.tsx"]
4
+ }
@@ -1,100 +0,0 @@
1
- import {
2
- Label
3
- } from "./chunk-YFK5BFEI.mjs";
4
-
5
- // src/components/hovering-toolbar/text-insertion-prompt-box/included-files-preview.tsx
6
- import React from "react";
7
- import { jsx, jsxs } from "react/jsx-runtime";
8
- var IncludedFilesPreview = ({
9
- includedFiles,
10
- setIncludedFiles
11
- }) => {
12
- return /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2 mt-2", children: [
13
- /* @__PURE__ */ jsx(Label, { className: "", children: "Included context:" }),
14
- /* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-2", children: includedFiles.map((filePointer, index) => {
15
- return /* @__PURE__ */ jsx(
16
- FileChipPreview,
17
- {
18
- filePointer,
19
- onDelete: () => {
20
- setIncludedFiles((prev) => prev.filter((fp) => fp !== filePointer));
21
- }
22
- },
23
- `file-${filePointer.sourceApplication}.${filePointer.name}`
24
- );
25
- }) })
26
- ] });
27
- };
28
- function FileChipPreview({
29
- filePointer,
30
- onDelete
31
- }) {
32
- const CLOSE_BUTTON_COLOR = "rgba(0, 0, 0, 0.26)";
33
- const [color, setColor] = React.useState(CLOSE_BUTTON_COLOR);
34
- return /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsxs(
35
- "button",
36
- {
37
- style: {
38
- fontSize: "0.8125rem",
39
- display: "inline-flex",
40
- justifyContent: "center",
41
- alignItems: "center",
42
- height: "32px",
43
- color: "rgba(0, 0, 0, 0.87)",
44
- backgroundColor: "rgba(0, 0, 0, 0.08)",
45
- borderRadius: "16px",
46
- whiteSpace: "nowrap",
47
- boxSizing: "border-box",
48
- border: 0,
49
- verticalAlign: "middle",
50
- outline: 0,
51
- cursor: "default"
52
- },
53
- children: [
54
- /* @__PURE__ */ jsx(
55
- "img",
56
- {
57
- style: {
58
- marginLeft: "5px",
59
- width: "24px",
60
- height: "24px",
61
- backgroundColor: "transparent",
62
- borderRadius: "50%"
63
- },
64
- src: filePointer.iconImageUri,
65
- alt: filePointer.sourceApplication
66
- }
67
- ),
68
- /* @__PURE__ */ jsx("span", { style: { marginLeft: "5px" }, children: filePointer.name }),
69
- /* @__PURE__ */ jsx(
70
- "svg",
71
- {
72
- style: {
73
- color,
74
- fontSize: "22px",
75
- cursor: "pointer",
76
- margin: "0 5px 0 5px",
77
- userSelect: "none",
78
- width: "1em",
79
- height: "1em",
80
- display: "inline-block",
81
- fill: "currentColor",
82
- flexShrink: 0
83
- },
84
- viewBox: "0 0 24 24",
85
- preserveAspectRatio: "xMidYMid meet",
86
- onClick: onDelete,
87
- onMouseOver: () => setColor("rgba(0, 0, 0, 0.54)"),
88
- onMouseOut: () => setColor(CLOSE_BUTTON_COLOR),
89
- children: /* @__PURE__ */ jsx("path", { d: "M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z" })
90
- }
91
- )
92
- ]
93
- }
94
- ) });
95
- }
96
-
97
- export {
98
- IncludedFilesPreview
99
- };
100
- //# sourceMappingURL=chunk-JC6NGPO4.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/components/hovering-toolbar/text-insertion-prompt-box/included-files-preview.tsx"],"sourcesContent":["import { DocumentPointer } from \"@copilotkit/react-core\";\nimport { Label } from \"../../ui/label\";\nimport React from \"react\";\n\nexport interface IncludedFilesPreviewProps {\n includedFiles: DocumentPointer[];\n setIncludedFiles: React.Dispatch<React.SetStateAction<DocumentPointer[]>>;\n}\n\nexport const IncludedFilesPreview = ({\n includedFiles,\n setIncludedFiles,\n}: IncludedFilesPreviewProps) => {\n return (\n <div className=\"flex flex-col gap-2 mt-2\">\n <Label className=\"\">Included context:</Label>\n <div className=\"flex flex-wrap gap-2\">\n {includedFiles.map((filePointer, index) => {\n return (\n <FileChipPreview\n key={`file-${filePointer.sourceApplication}.${filePointer.name}`}\n filePointer={filePointer}\n onDelete={() => {\n setIncludedFiles((prev) => prev.filter((fp) => fp !== filePointer));\n }}\n />\n );\n })}\n </div>\n </div>\n );\n};\n\nexport interface FileChipPreviewProps {\n filePointer: DocumentPointer;\n onDelete: () => void;\n}\n\nfunction FileChipPreview({\n filePointer,\n onDelete,\n}: {\n filePointer: DocumentPointer;\n onDelete: () => void;\n}) {\n const CLOSE_BUTTON_COLOR = \"rgba(0, 0, 0, 0.26)\";\n const [color, setColor] = React.useState(CLOSE_BUTTON_COLOR);\n return (\n <div>\n <button\n style={{\n fontSize: \"0.8125rem\",\n display: \"inline-flex\",\n justifyContent: \"center\",\n alignItems: \"center\",\n height: \"32px\",\n color: \"rgba(0, 0, 0, 0.87)\",\n backgroundColor: \"rgba(0, 0, 0, 0.08)\",\n borderRadius: \"16px\",\n whiteSpace: \"nowrap\",\n boxSizing: \"border-box\",\n border: 0,\n verticalAlign: \"middle\",\n outline: 0,\n cursor: \"default\",\n }}\n >\n <img\n style={{\n marginLeft: \"5px\",\n width: \"24px\",\n height: \"24px\",\n backgroundColor: \"transparent\",\n borderRadius: \"50%\",\n }}\n src={filePointer.iconImageUri}\n alt={filePointer.sourceApplication}\n />\n <span style={{ marginLeft: \"5px\" }}>{filePointer.name}</span>\n <svg\n style={{\n color: color,\n fontSize: \"22px\",\n cursor: \"pointer\",\n margin: \"0 5px 0 5px\",\n userSelect: \"none\",\n width: \"1em\",\n height: \"1em\",\n display: \"inline-block\",\n fill: \"currentColor\",\n flexShrink: 0,\n }}\n viewBox=\"0 0 24 24\" // Defines the size of the original design space\n preserveAspectRatio=\"xMidYMid meet\"\n onClick={onDelete}\n onMouseOver={() => setColor(\"rgba(0, 0, 0, 0.54)\")}\n onMouseOut={() => setColor(CLOSE_BUTTON_COLOR)}\n >\n <path d=\"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z\"></path>\n </svg>\n </button>\n </div>\n );\n}\n"],"mappings":";;;;;AAEA,OAAO,WAAW;AAYd,SACE,KADF;AALG,IAAM,uBAAuB,CAAC;AAAA,EACnC;AAAA,EACA;AACF,MAAiC;AAC/B,SACE,qBAAC,SAAI,WAAU,4BACb;AAAA,wBAAC,SAAM,WAAU,IAAG,+BAAiB;AAAA,IACrC,oBAAC,SAAI,WAAU,wBACZ,wBAAc,IAAI,CAAC,aAAa,UAAU;AACzC,aACE;AAAA,QAAC;AAAA;AAAA,UAEC;AAAA,UACA,UAAU,MAAM;AACd,6BAAiB,CAAC,SAAS,KAAK,OAAO,CAAC,OAAO,OAAO,WAAW,CAAC;AAAA,UACpE;AAAA;AAAA,QAJK,QAAQ,YAAY,qBAAqB,YAAY;AAAA,MAK5D;AAAA,IAEJ,CAAC,GACH;AAAA,KACF;AAEJ;AAOA,SAAS,gBAAgB;AAAA,EACvB;AAAA,EACA;AACF,GAGG;AACD,QAAM,qBAAqB;AAC3B,QAAM,CAAC,OAAO,QAAQ,IAAI,MAAM,SAAS,kBAAkB;AAC3D,SACE,oBAAC,SACC;AAAA,IAAC;AAAA;AAAA,MACC,OAAO;AAAA,QACL,UAAU;AAAA,QACV,SAAS;AAAA,QACT,gBAAgB;AAAA,QAChB,YAAY;AAAA,QACZ,QAAQ;AAAA,QACR,OAAO;AAAA,QACP,iBAAiB;AAAA,QACjB,cAAc;AAAA,QACd,YAAY;AAAA,QACZ,WAAW;AAAA,QACX,QAAQ;AAAA,QACR,eAAe;AAAA,QACf,SAAS;AAAA,QACT,QAAQ;AAAA,MACV;AAAA,MAEA;AAAA;AAAA,UAAC;AAAA;AAAA,YACC,OAAO;AAAA,cACL,YAAY;AAAA,cACZ,OAAO;AAAA,cACP,QAAQ;AAAA,cACR,iBAAiB;AAAA,cACjB,cAAc;AAAA,YAChB;AAAA,YACA,KAAK,YAAY;AAAA,YACjB,KAAK,YAAY;AAAA;AAAA,QACnB;AAAA,QACA,oBAAC,UAAK,OAAO,EAAE,YAAY,MAAM,GAAI,sBAAY,MAAK;AAAA,QACtD;AAAA,UAAC;AAAA;AAAA,YACC,OAAO;AAAA,cACL;AAAA,cACA,UAAU;AAAA,cACV,QAAQ;AAAA,cACR,QAAQ;AAAA,cACR,YAAY;AAAA,cACZ,OAAO;AAAA,cACP,QAAQ;AAAA,cACR,SAAS;AAAA,cACT,MAAM;AAAA,cACN,YAAY;AAAA,YACd;AAAA,YACA,SAAQ;AAAA,YACR,qBAAoB;AAAA,YACpB,SAAS;AAAA,YACT,aAAa,MAAM,SAAS,qBAAqB;AAAA,YACjD,YAAY,MAAM,SAAS,kBAAkB;AAAA,YAE7C,8BAAC,UAAK,GAAE,mLAAkL;AAAA;AAAA,QAC5L;AAAA;AAAA;AAAA,EACF,GACF;AAEJ;","names":[]}