@copilotkit/react-textarea 0.35.0-function-calling-fixes.1 → 0.35.0-mme-cloud.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.
- package/.turbo/turbo-build.log +428 -428
- package/CHANGELOG.md +4 -16
- package/dist/{chunk-VPEH6V7T.mjs → chunk-FMQG2ZM3.mjs} +1 -1
- package/dist/chunk-FMQG2ZM3.mjs.map +1 -0
- package/dist/{chunk-SP5HFO3H.mjs → chunk-HWM2CVKO.mjs} +2 -2
- package/dist/{chunk-22TYLEZZ.mjs → chunk-XU5Z5BWV.mjs} +2 -2
- package/dist/components/base-copilot-textarea/base-copilot-textarea.js.map +1 -1
- package/dist/components/base-copilot-textarea/base-copilot-textarea.mjs +2 -2
- package/dist/components/copilot-textarea/copilot-textarea.js.map +1 -1
- package/dist/components/copilot-textarea/copilot-textarea.mjs +3 -3
- package/dist/components/index.js.map +1 -1
- package/dist/components/index.mjs +3 -3
- package/dist/hooks/base-copilot-textarea-implementation/use-populate-copilot-textarea-ref.js.map +1 -1
- package/dist/hooks/base-copilot-textarea-implementation/use-populate-copilot-textarea-ref.mjs +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4 -4
- package/package.json +6 -6
- package/src/hooks/base-copilot-textarea-implementation/use-populate-copilot-textarea-ref.ts +4 -1
- package/dist/chunk-VPEH6V7T.mjs.map +0 -1
- /package/dist/{chunk-SP5HFO3H.mjs.map → chunk-HWM2CVKO.mjs.map} +0 -0
- /package/dist/{chunk-22TYLEZZ.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-
|
|
7
|
+
} from "./chunk-HWM2CVKO.mjs";
|
|
8
8
|
import "./chunk-RT4UTBH3.mjs";
|
|
9
9
|
import "./chunk-QCPS6IYI.mjs";
|
|
10
10
|
import "./chunk-RUV6NBIF.mjs";
|
|
@@ -16,10 +16,10 @@ import "./chunk-RKQ6RTZM.mjs";
|
|
|
16
16
|
import "./chunk-KDVMG3XF.mjs";
|
|
17
17
|
import {
|
|
18
18
|
BaseCopilotTextarea
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-XU5Z5BWV.mjs";
|
|
20
20
|
import "./chunk-DRV2FOHZ.mjs";
|
|
21
21
|
import "./chunk-4NHVQZ67.mjs";
|
|
22
|
-
import "./chunk-
|
|
22
|
+
import "./chunk-FMQG2ZM3.mjs";
|
|
23
23
|
import "./chunk-2C7O2EVM.mjs";
|
|
24
24
|
import "./chunk-GQN2HYFJ.mjs";
|
|
25
25
|
import "./chunk-5UNJXFUO.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.35.0-
|
|
7
|
+
"version": "0.35.0-mme-cloud.0",
|
|
8
8
|
"sideEffects": [
|
|
9
9
|
"**/*.css"
|
|
10
10
|
],
|
|
@@ -37,9 +37,9 @@
|
|
|
37
37
|
"ts-jest": "^29.1.1",
|
|
38
38
|
"tsup": "^6.7.0",
|
|
39
39
|
"typescript": "^5.2.3",
|
|
40
|
-
"
|
|
41
|
-
"
|
|
42
|
-
"
|
|
40
|
+
"eslint-config-custom": "0.10.0-mme-cloud.0",
|
|
41
|
+
"tailwind-config": "0.9.0-mme-cloud.0",
|
|
42
|
+
"tsconfig": "0.14.0-mme-cloud.0"
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
45
|
"@emotion/css": "^11.11.2",
|
|
@@ -62,8 +62,8 @@
|
|
|
62
62
|
"slate-history": "^0.93.0",
|
|
63
63
|
"slate-react": "^0.98.1",
|
|
64
64
|
"tailwind-merge": "^1.13.2",
|
|
65
|
-
"@copilotkit/react-core": "0.25.0-
|
|
66
|
-
"@copilotkit/shared": "0.9.0-
|
|
65
|
+
"@copilotkit/react-core": "0.25.0-mme-cloud.0",
|
|
66
|
+
"@copilotkit/shared": "0.9.0-mme-cloud.0"
|
|
67
67
|
},
|
|
68
68
|
"scripts": {
|
|
69
69
|
"build": "tsup --clean",
|
|
@@ -14,7 +14,10 @@ export function usePopulateCopilotTextareaRef(
|
|
|
14
14
|
ref,
|
|
15
15
|
() => {
|
|
16
16
|
class Combined {
|
|
17
|
-
constructor(
|
|
17
|
+
constructor(
|
|
18
|
+
private customMethods: CustomMethods,
|
|
19
|
+
private editorHtmlElement: HTMLElement,
|
|
20
|
+
) {}
|
|
18
21
|
|
|
19
22
|
[key: string]: any;
|
|
20
23
|
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/hooks/base-copilot-textarea-implementation/use-populate-copilot-textarea-ref.ts"],"sourcesContent":["import React from \"react\";\nimport { Editor } from \"slate\";\nimport { ReactEditor } from \"slate-react\";\nimport { getFullEditorTextWithNewlines } from \"../../lib/get-text-around-cursor\";\nimport { replaceEditorText } from \"../../lib/slatejs-edits/replace-text\";\nimport { HTMLCopilotTextAreaElement } from \"../../types\";\nimport { CustomEditor } from \"../../types/base/custom-editor\";\n\nexport function usePopulateCopilotTextareaRef(\n editor: Editor,\n ref: React.Ref<HTMLCopilotTextAreaElement>,\n) {\n React.useImperativeHandle(\n ref,\n () => {\n class Combined {\n constructor(private customMethods: CustomMethods, private editorHtmlElement: HTMLElement) {}\n\n [key: string]: any;\n\n get(target: any, propKey: string): any {\n if (this.isKeyOfCustomMethods(propKey)) {\n const value = this.customMethods[propKey];\n if (typeof value === \"function\") {\n return value.bind(this.customMethods);\n }\n return value;\n } else if (this.isKeyOfHTMLElement(propKey)) {\n const value = this.editorHtmlElement[propKey];\n if (typeof value === \"function\") {\n return value.bind(this.editorHtmlElement);\n }\n return value;\n }\n }\n\n set(target: any, propKey: string, value: any): boolean {\n if (this.isKeyOfCustomMethods(propKey)) {\n (this.customMethods as any)[propKey] = value;\n } else if (this.isKeyOfHTMLElement(propKey)) {\n (this.editorHtmlElement as any)[propKey] = value;\n } else {\n // Default behavior (optional)\n target[propKey] = value;\n }\n return true;\n }\n\n private isKeyOfCustomMethods(key: string): key is keyof CustomMethods {\n return key in this.customMethods;\n }\n\n private isKeyOfHTMLElement(key: string): key is keyof HTMLElement {\n return key in this.editorHtmlElement;\n }\n }\n\n const handler = {\n get(target: any, propKey: keyof CustomMethods | keyof HTMLElement) {\n return target.get(target, propKey);\n },\n set(target: any, propKey: keyof CustomMethods | keyof HTMLElement, value: any) {\n return target.set(target, propKey, value);\n },\n };\n\n class CustomMethods {\n constructor(private editor: CustomEditor) {}\n\n focus() {\n ReactEditor.focus(this.editor);\n }\n\n blur() {\n ReactEditor.blur(this.editor);\n }\n\n get value() {\n return getFullEditorTextWithNewlines(this.editor);\n }\n set value(value: string) {\n replaceEditorText(this.editor, value);\n }\n }\n\n const editorHtmlElement = ReactEditor.toDOMNode(editor, editor);\n const customMethods = new CustomMethods(editor);\n\n const combined = new Combined(customMethods, editorHtmlElement);\n return new Proxy(combined, handler);\n },\n [editor],\n );\n}\n"],"mappings":";;;;;;;;AAAA,OAAO,WAAW;AAElB,SAAS,mBAAmB;AAMrB,SAAS,8BACd,QACA,KACA;AACA,QAAM;AAAA,IACJ;AAA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