@copilotkit/react-textarea 0.35.0-mme-cloud.4 → 0.35.0-multi-feature-usecopilotreadable.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 (31) hide show
  1. package/.turbo/turbo-build.log +428 -428
  2. package/CHANGELOG.md +16 -28
  3. package/dist/{chunk-COQISBP2.mjs → chunk-3B3LGEDJ.mjs} +2 -2
  4. package/dist/{chunk-DMLXXOXD.mjs → chunk-FWZ23PN7.mjs} +2 -2
  5. package/dist/{chunk-HWM2CVKO.mjs → chunk-HXEH4QQL.mjs} +4 -4
  6. package/dist/{chunk-XU5Z5BWV.mjs → chunk-QFG55HEW.mjs} +20 -20
  7. package/dist/{chunk-FMQG2ZM3.mjs → chunk-VPEH6V7T.mjs} +1 -1
  8. package/dist/chunk-VPEH6V7T.mjs.map +1 -0
  9. package/dist/{chunk-OGLVRSCO.mjs → chunk-Y5LVLSUK.mjs} +7 -7
  10. package/dist/components/base-copilot-textarea/base-copilot-textarea.js.map +1 -1
  11. package/dist/components/base-copilot-textarea/base-copilot-textarea.mjs +16 -16
  12. package/dist/components/copilot-textarea/copilot-textarea.js.map +1 -1
  13. package/dist/components/copilot-textarea/copilot-textarea.mjs +22 -22
  14. package/dist/components/hovering-toolbar/hovering-toolbar.mjs +5 -5
  15. package/dist/components/hovering-toolbar/text-insertion-prompt-box/hovering-insertion-prompt-box-core.mjs +3 -3
  16. package/dist/components/hovering-toolbar/text-insertion-prompt-box/hovering-insertion-prompt-box.mjs +4 -4
  17. package/dist/components/hovering-toolbar/text-insertion-prompt-box/index.mjs +4 -4
  18. package/dist/components/index.js.map +1 -1
  19. package/dist/components/index.mjs +22 -22
  20. package/dist/hooks/base-copilot-textarea-implementation/use-populate-copilot-textarea-ref.js.map +1 -1
  21. package/dist/hooks/base-copilot-textarea-implementation/use-populate-copilot-textarea-ref.mjs +1 -1
  22. package/dist/index.js.map +1 -1
  23. package/dist/index.mjs +26 -26
  24. package/package.json +6 -6
  25. package/src/hooks/base-copilot-textarea-implementation/use-populate-copilot-textarea-ref.ts +1 -4
  26. package/dist/chunk-FMQG2ZM3.mjs.map +0 -1
  27. /package/dist/{chunk-COQISBP2.mjs.map → chunk-3B3LGEDJ.mjs.map} +0 -0
  28. /package/dist/{chunk-DMLXXOXD.mjs.map → chunk-FWZ23PN7.mjs.map} +0 -0
  29. /package/dist/{chunk-HWM2CVKO.mjs.map → chunk-HXEH4QQL.mjs.map} +0 -0
  30. /package/dist/{chunk-XU5Z5BWV.mjs.map → chunk-QFG55HEW.mjs.map} +0 -0
  31. /package/dist/{chunk-OGLVRSCO.mjs.map → chunk-Y5LVLSUK.mjs.map} +0 -0
package/CHANGELOG.md CHANGED
@@ -1,64 +1,52 @@
1
1
  # ui
2
2
 
3
- ## 0.35.0-mme-cloud.4
3
+ ## 0.35.0-multi-feature-usecopilotreadable.3
4
4
 
5
5
  ### Minor Changes
6
6
 
7
- - Include reason in guardrails response
7
+ - multiple new features, including new useCopilotReadable
8
8
 
9
9
  ### Patch Changes
10
10
 
11
11
  - Updated dependencies
12
- - @copilotkit/react-core@0.25.0-mme-cloud.4
13
- - @copilotkit/shared@0.9.0-mme-cloud.4
12
+ - @copilotkit/react-core@0.25.0-multi-feature-usecopilotreadable.3
13
+ - @copilotkit/shared@0.9.0-multi-feature-usecopilotreadable.3
14
14
 
15
- ## 0.35.0-mme-cloud.3
15
+ ## 0.35.0-function-calling-fixes.2
16
16
 
17
17
  ### Minor Changes
18
18
 
19
- - Retrieve public API key
19
+ - fix backend function calling return values
20
20
 
21
21
  ### Patch Changes
22
22
 
23
23
  - Updated dependencies
24
- - @copilotkit/react-core@0.25.0-mme-cloud.3
25
- - @copilotkit/shared@0.9.0-mme-cloud.3
24
+ - @copilotkit/react-core@0.25.0-function-calling-fixes.2
25
+ - @copilotkit/shared@0.9.0-function-calling-fixes.2
26
26
 
27
- ## 0.35.0-mme-cloud.2
27
+ ## 0.35.0-function-calling-fixes.1
28
28
 
29
29
  ### Minor Changes
30
30
 
31
- - streamline cloud configuration
31
+ - gpt-4-turbo-april-2024 function calling fixes
32
32
 
33
33
  ### Patch Changes
34
34
 
35
35
  - Updated dependencies
36
- - @copilotkit/react-core@0.25.0-mme-cloud.2
37
- - @copilotkit/shared@0.9.0-mme-cloud.2
36
+ - @copilotkit/react-core@0.25.0-function-calling-fixes.1
37
+ - @copilotkit/shared@0.9.0-function-calling-fixes.1
38
38
 
39
- ## 0.35.0-mme-cloud.1
39
+ ## 0.35.0-alpha.0
40
40
 
41
41
  ### Minor Changes
42
42
 
43
- - Unify api key handling
43
+ - gpt-4-turbo-april-2024
44
44
 
45
45
  ### Patch Changes
46
46
 
47
47
  - Updated dependencies
48
- - @copilotkit/react-core@0.25.0-mme-cloud.1
49
- - @copilotkit/shared@0.9.0-mme-cloud.1
50
-
51
- ## 0.35.0-mme-cloud.0
52
-
53
- ### Minor Changes
54
-
55
- - Support input guardrails (cloud)
56
-
57
- ### Patch Changes
58
-
59
- - Updated dependencies
60
- - @copilotkit/react-core@0.25.0-mme-cloud.0
61
- - @copilotkit/shared@0.9.0-mme-cloud.0
48
+ - @copilotkit/shared@0.9.0-alpha.0
49
+ - @copilotkit/react-core@0.25.0-alpha.0
62
50
 
63
51
  ## 0.34.0
64
52
 
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  HoveringInsertionPromptBoxCore
3
- } from "./chunk-OGLVRSCO.mjs";
3
+ } from "./chunk-Y5LVLSUK.mjs";
4
4
 
5
5
  // src/components/hovering-toolbar/text-insertion-prompt-box/hovering-insertion-prompt-box.tsx
6
6
  import { jsx } from "react/jsx-runtime";
@@ -28,4 +28,4 @@ var HoveringInsertionPromptBox = (props) => {
28
28
  export {
29
29
  HoveringInsertionPromptBox
30
30
  };
31
- //# sourceMappingURL=chunk-COQISBP2.mjs.map
31
+ //# sourceMappingURL=chunk-3B3LGEDJ.mjs.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  HoveringInsertionPromptBox
3
- } from "./chunk-COQISBP2.mjs";
3
+ } from "./chunk-3B3LGEDJ.mjs";
4
4
  import {
5
5
  useHoveringEditorContext
6
6
  } from "./chunk-LYB4B6MK.mjs";
@@ -121,4 +121,4 @@ function editorState(editor, selection) {
121
121
  export {
122
122
  HoveringToolbar
123
123
  };
124
- //# sourceMappingURL=chunk-DMLXXOXD.mjs.map
124
+ //# sourceMappingURL=chunk-FWZ23PN7.mjs.map
@@ -4,12 +4,12 @@ import {
4
4
  import {
5
5
  useMakeStandardInsertionOrEditingFunction
6
6
  } from "./chunk-QCPS6IYI.mjs";
7
+ import {
8
+ BaseCopilotTextarea
9
+ } from "./chunk-QFG55HEW.mjs";
7
10
  import {
8
11
  defaultAutosuggestionsConfig
9
12
  } from "./chunk-DKE57EAC.mjs";
10
- import {
11
- BaseCopilotTextarea
12
- } from "./chunk-XU5Z5BWV.mjs";
13
13
  import {
14
14
  __objRest,
15
15
  __spreadProps,
@@ -57,4 +57,4 @@ var CopilotTextarea = React.forwardRef(
57
57
  export {
58
58
  CopilotTextarea
59
59
  };
60
- //# sourceMappingURL=chunk-HWM2CVKO.mjs.map
60
+ //# sourceMappingURL=chunk-HXEH4QQL.mjs.map
@@ -1,43 +1,43 @@
1
- import {
2
- useCopilotTextareaEditor
3
- } from "./chunk-DRV2FOHZ.mjs";
4
- import {
5
- usePopulateCopilotTextareaRef
6
- } from "./chunk-FMQG2ZM3.mjs";
7
1
  import {
8
2
  addAutocompletionsToEditor
9
3
  } from "./chunk-2C7O2EVM.mjs";
10
4
  import {
11
5
  clearAutocompletionsFromEditor
12
6
  } from "./chunk-GQN2HYFJ.mjs";
13
- import {
14
- replaceEditorText
15
- } from "./chunk-5UNJXFUO.mjs";
16
- import {
17
- useAutosuggestions
18
- } from "./chunk-QKS2IOUH.mjs";
19
- import {
20
- TrackerTextEditedSinceLastCursorMovement
21
- } from "./chunk-LQ2OWQU7.mjs";
22
7
  import {
23
8
  useAddBrandingCss
24
9
  } from "./chunk-7LSRNPNI.mjs";
25
10
  import {
26
11
  HoveringToolbar
27
- } from "./chunk-DMLXXOXD.mjs";
12
+ } from "./chunk-FWZ23PN7.mjs";
28
13
  import {
29
14
  HoveringEditorProvider,
30
15
  useHoveringEditorContext
31
16
  } from "./chunk-LYB4B6MK.mjs";
32
- import {
33
- defaultBaseAutosuggestionsConfig
34
- } from "./chunk-LCDTIJSD.mjs";
35
17
  import {
36
18
  makeRenderElementFunction
37
19
  } from "./chunk-224UKA7C.mjs";
38
20
  import {
39
21
  makeRenderPlaceholderFunction
40
22
  } from "./chunk-XW3ICO4S.mjs";
23
+ import {
24
+ TrackerTextEditedSinceLastCursorMovement
25
+ } from "./chunk-LQ2OWQU7.mjs";
26
+ import {
27
+ defaultBaseAutosuggestionsConfig
28
+ } from "./chunk-LCDTIJSD.mjs";
29
+ import {
30
+ useAutosuggestions
31
+ } from "./chunk-QKS2IOUH.mjs";
32
+ import {
33
+ useCopilotTextareaEditor
34
+ } from "./chunk-DRV2FOHZ.mjs";
35
+ import {
36
+ usePopulateCopilotTextareaRef
37
+ } from "./chunk-VPEH6V7T.mjs";
38
+ import {
39
+ replaceEditorText
40
+ } from "./chunk-5UNJXFUO.mjs";
41
41
  import {
42
42
  getFullEditorTextWithNewlines,
43
43
  getTextAroundCollapsedCursor
@@ -256,4 +256,4 @@ function makeSemiFakeReactTextAreaEvent(currentText) {
256
256
  export {
257
257
  BaseCopilotTextarea
258
258
  };
259
- //# sourceMappingURL=chunk-XU5Z5BWV.mjs.map
259
+ //# sourceMappingURL=chunk-QFG55HEW.mjs.map
@@ -86,4 +86,4 @@ function usePopulateCopilotTextareaRef(editor, ref) {
86
86
  export {
87
87
  usePopulateCopilotTextareaRef
88
88
  };
89
- //# sourceMappingURL=chunk-FMQG2ZM3.mjs.map
89
+ //# sourceMappingURL=chunk-VPEH6V7T.mjs.map
@@ -0,0 +1 @@
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;AAAA,IACA,MAAM;AACJ,YAAM,SAAS;AAAA,QACb,YAAoBA,gBAAsCC,oBAAgC;AAAtE,+BAAAD;AAAsC,mCAAAC;AAAA,QAAiC;AAAA,QAI3F,IAAI,QAAa,SAAsB;AACrC,cAAI,KAAK,qBAAqB,OAAO,GAAG;AACtC,kBAAM,QAAQ,KAAK,cAAc,OAAO;AACxC,gBAAI,OAAO,UAAU,YAAY;AAC/B,qBAAO,MAAM,KAAK,KAAK,aAAa;AAAA,YACtC;AACA,mBAAO;AAAA,UACT,WAAW,KAAK,mBAAmB,OAAO,GAAG;AAC3C,kBAAM,QAAQ,KAAK,kBAAkB,OAAO;AAC5C,gBAAI,OAAO,UAAU,YAAY;AAC/B,qBAAO,MAAM,KAAK,KAAK,iBAAiB;AAAA,YAC1C;AACA,mBAAO;AAAA,UACT;AAAA,QACF;AAAA,QAEA,IAAI,QAAa,SAAiB,OAAqB;AACrD,cAAI,KAAK,qBAAqB,OAAO,GAAG;AACtC,YAAC,KAAK,cAAsB,OAAO,IAAI;AAAA,UACzC,WAAW,KAAK,mBAAmB,OAAO,GAAG;AAC3C,YAAC,KAAK,kBAA0B,OAAO,IAAI;AAAA,UAC7C,OAAO;AAEL,mBAAO,OAAO,IAAI;AAAA,UACpB;AACA,iBAAO;AAAA,QACT;AAAA,QAEQ,qBAAqB,KAAyC;AACpE,iBAAO,OAAO,KAAK;AAAA,QACrB;AAAA,QAEQ,mBAAmB,KAAuC;AAChE,iBAAO,OAAO,KAAK;AAAA,QACrB;AAAA,MACF;AAEA,YAAM,UAAU;AAAA,QACd,IAAI,QAAa,SAAkD;AACjE,iBAAO,OAAO,IAAI,QAAQ,OAAO;AAAA,QACnC;AAAA,QACA,IAAI,QAAa,SAAkD,OAAY;AAC7E,iBAAO,OAAO,IAAI,QAAQ,SAAS,KAAK;AAAA,QAC1C;AAAA,MACF;AAEA,YAAM,cAAc;AAAA,QAClB,YAAoBC,SAAsB;AAAtB,wBAAAA;AAAA,QAAuB;AAAA,QAE3C,QAAQ;AACN,sBAAY,MAAM,KAAK,MAAM;AAAA,QAC/B;AAAA,QAEA,OAAO;AACL,sBAAY,KAAK,KAAK,MAAM;AAAA,QAC9B;AAAA,QAEA,IAAI,QAAQ;AACV,iBAAO,8BAA8B,KAAK,MAAM;AAAA,QAClD;AAAA,QACA,IAAI,MAAM,OAAe;AACvB,4BAAkB,KAAK,QAAQ,KAAK;AAAA,QACtC;AAAA,MACF;AAEA,YAAM,oBAAoB,YAAY,UAAU,QAAQ,MAAM;AAC9D,YAAM,gBAAgB,IAAI,cAAc,MAAM;AAE9C,YAAM,WAAW,IAAI,SAAS,eAAe,iBAAiB;AAC9D,aAAO,IAAI,MAAM,UAAU,OAAO;AAAA,IACpC;AAAA,IACA,CAAC,MAAM;AAAA,EACT;AACF;","names":["customMethods","editorHtmlElement","editor"]}
@@ -1,12 +1,6 @@
1
1
  import {
2
2
  IncludedFilesPreview
3
3
  } from "./chunk-YNXNMCDX.mjs";
4
- import {
5
- use_autosize_textarea_default
6
- } from "./chunk-3PQ7GSFE.mjs";
7
- import {
8
- Button
9
- } from "./chunk-WFTAAA7R.mjs";
10
4
  import {
11
5
  Label
12
6
  } from "./chunk-YFK5BFEI.mjs";
@@ -16,6 +10,12 @@ import {
16
10
  import {
17
11
  SourceSearchBox
18
12
  } from "./chunk-4OZR65UB.mjs";
13
+ import {
14
+ Button
15
+ } from "./chunk-WFTAAA7R.mjs";
16
+ import {
17
+ use_autosize_textarea_default
18
+ } from "./chunk-3PQ7GSFE.mjs";
19
19
  import {
20
20
  streamPromiseFlatten
21
21
  } from "./chunk-2QDCE7PD.mjs";
@@ -222,4 +222,4 @@ var HoveringInsertionPromptBoxCore = ({
222
222
  export {
223
223
  HoveringInsertionPromptBoxCore
224
224
  };
225
- //# sourceMappingURL=chunk-OGLVRSCO.mjs.map
225
+ //# sourceMappingURL=chunk-Y5LVLSUK.mjs.map