@stack-spot/ai-chat-widget 1.28.1 → 1.29.0-beta.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 (44) hide show
  1. package/CHANGELOG.md +0 -8
  2. package/dist/app-metadata.json +2 -2
  3. package/dist/components/AdaptiveTextArea.js +1 -1
  4. package/dist/components/AdaptiveTextArea.js.map +1 -1
  5. package/dist/components/Selector/index.js +1 -1
  6. package/dist/components/Selector/index.js.map +1 -1
  7. package/dist/components/Selector/styled.d.ts +1 -1
  8. package/dist/components/Selector/styled.d.ts.map +1 -1
  9. package/dist/components/Selector/styled.js +1 -1
  10. package/dist/components/Selector/styled.js.map +1 -1
  11. package/dist/layout.css +17 -0
  12. package/dist/utils/upload/UploadManager.d.ts +2 -0
  13. package/dist/utils/upload/UploadManager.d.ts.map +1 -1
  14. package/dist/utils/upload/UploadManager.js +32 -25
  15. package/dist/utils/upload/UploadManager.js.map +1 -1
  16. package/dist/utils/upload/use-paste-upload.d.ts +8 -0
  17. package/dist/utils/upload/use-paste-upload.d.ts.map +1 -0
  18. package/dist/utils/upload/use-paste-upload.js +19 -0
  19. package/dist/utils/upload/use-paste-upload.js.map +1 -0
  20. package/dist/views/MessageInput/UploadDragNDrop.d.ts +14 -0
  21. package/dist/views/MessageInput/UploadDragNDrop.d.ts.map +1 -0
  22. package/dist/views/MessageInput/UploadDragNDrop.js +52 -0
  23. package/dist/views/MessageInput/UploadDragNDrop.js.map +1 -0
  24. package/dist/views/MessageInput/dictionary.d.ts +1 -1
  25. package/dist/views/MessageInput/dictionary.d.ts.map +1 -1
  26. package/dist/views/MessageInput/dictionary.js +9 -0
  27. package/dist/views/MessageInput/dictionary.js.map +1 -1
  28. package/dist/views/MessageInput/index.d.ts.map +1 -1
  29. package/dist/views/MessageInput/index.js +11 -1
  30. package/dist/views/MessageInput/index.js.map +1 -1
  31. package/dist/views/MessageInput/styled.d.ts +1 -1
  32. package/dist/views/MessageInput/styled.js +1 -1
  33. package/package.json +1 -1
  34. package/src/app-metadata.json +2 -2
  35. package/src/components/AdaptiveTextArea.tsx +1 -1
  36. package/src/components/Selector/index.tsx +1 -1
  37. package/src/components/Selector/styled.ts +2 -2
  38. package/src/layout.css +17 -0
  39. package/src/utils/upload/UploadManager.ts +32 -23
  40. package/src/utils/upload/use-paste-upload.tsx +30 -0
  41. package/src/views/MessageInput/UploadDragNDrop.tsx +83 -0
  42. package/src/views/MessageInput/dictionary.ts +9 -0
  43. package/src/views/MessageInput/index.tsx +15 -1
  44. package/src/views/MessageInput/styled.ts +1 -1
package/CHANGELOG.md CHANGED
@@ -1,13 +1,5 @@
1
1
  # Changelog
2
2
 
3
- ## [1.28.1](https://github.com/stack-spot/portal-ai-chat-widget/compare/ai-chat-widget@v1.28.0...ai-chat-widget@v1.28.1) (2025-07-03)
4
-
5
-
6
- ### Bug Fixes
7
-
8
- * Adds attributes to AdaptiveTextArea and updates SelectorBox prop naming ([#194](https://github.com/stack-spot/portal-ai-chat-widget/issues/194)) ([ac34d4b](https://github.com/stack-spot/portal-ai-chat-widget/commit/ac34d4b4c11dcdca74ca1f6111a443282901fe01))
9
- * send button adjusts ([#195](https://github.com/stack-spot/portal-ai-chat-widget/issues/195)) ([a31fc1f](https://github.com/stack-spot/portal-ai-chat-widget/commit/a31fc1ff33c5ed511aa890fda856adc84e2e840b))
10
-
11
3
  ## [1.28.0](https://github.com/stack-spot/portal-ai-chat-widget/compare/ai-chat-widget@v1.27.1...ai-chat-widget@v1.28.0) (2025-07-01)
12
4
 
13
5
 
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stack-spot/ai-chat-widget",
3
- "version": "1.28.1",
4
- "date": "Thu Jul 03 2025 16:56:42 GMT+0000 (Coordinated Universal Time)",
3
+ "version": "1.29.0-beta.0",
4
+ "date": "Thu Jul 03 2025 09:44:54 GMT-0300 (Horário Padrão de Brasília)",
5
5
  "dependencies": [
6
6
  {
7
7
  "name": "@stack-spot/app-metadata",
@@ -34,6 +34,6 @@ export const AdaptiveTextArea = forwardRef(({ value, onIncreaseSize, onResetSize
34
34
  onResetSize?.();
35
35
  }
36
36
  }, [value, maxHeight]);
37
- return _jsx(Textarea, { id: "prompt-textarea", name: "prompt-textarea", ...props, ref: ref, value: value, style: { ...style, maxHeight } });
37
+ return _jsx(Textarea, { ...props, ref: ref, value: value, style: { ...style, maxHeight } });
38
38
  });
39
39
  //# sourceMappingURL=AdaptiveTextArea.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"AdaptiveTextArea.js","sourceRoot":"","sources":["../../src/components/AdaptiveTextArea.tsx"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;AACvC,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAA;AAkBrD;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,UAAU,CAA6B,CACrE,EAAE,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,SAAS,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,EAClE,WAAW,EACX,EAAE;IACF,MAAM,QAAQ,GAAG,MAAM,CAAsB,IAAI,CAAC,CAAA;IAClD,MAAM,GAAG,GAAG,WAAmD,IAAI,QAAQ,CAAA;IAE3E,MAAM,kBAAkB,GAAG,CAAC,SAAiB,EAAE,EAAE;QAC/C,cAAc,EAAE,EAAE,CAAA;QAClB,IAAI,SAAS,IAAI,SAAS,GAAG,SAAS,IAAI,GAAG,CAAC,OAAO,EAAE,CAAC;YACtD,GAAG,CAAC,OAAO,CAAC,KAAK,CAAC,SAAS,GAAG,MAAM,CAAA;QACtC,CAAC;IACH,CAAC,CAAA;IAED,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,CAAC,GAAG,CAAC,OAAO;YAAE,OAAM;QACxB,MAAM,MAAM,GAAG,GAAG,CAAC,OAAO,CAAC,YAAY,CAAA;QACvC,MAAM,MAAM,GAAG,G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CAAC,CAAA;IAEtB,OAAO,KAAC,QAAQ,OAAK,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,GAAG,KAAK,EAAE,SAAS,EAAE,GAAI,CAAA;AACxF,CAAC,CAAC,CAAA"}
@@ -109,7 +109,7 @@ export const Selector = ({ inputRef, selectorConfig, favorite }) => {
109
109
  document.addEventListener('click', onClickOut);
110
110
  return () => document.removeEventListener('click', onClickOut);
111
111
  }, [shouldRender]);
112
- return (_jsx(SelectorBox, { "$tabsCount": selectorConfig.sections.length, children: _jsx(Fading, { visible: shouldRender, ref: selectorRef, className: "box-selector", children: _jsx(SelectorContent, { favorite: favorite, selectorConfig: selectorConfig, filter: filter, onClose: () => setClosed(true), inputRef: inputRef }) }) }));
112
+ return (_jsx(SelectorBox, { tabsCount: selectorConfig.sections.length, children: _jsx(Fading, { visible: shouldRender, ref: selectorRef, className: "box-selector", children: _jsx(SelectorContent, { favorite: favorite, selectorConfig: selectorConfig, filter: filter, onClose: () => setClosed(true), inputRef: inputRef }) }) }));
113
113
  };
114
114
  const dictionary = {
115
115
  en: {
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Selector/index.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AACvC,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAA;AAEnE,OAAO,EAAc,WAAW,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;AACpF,OAAc,EAAM,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AACpF,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAA;AACzD,OA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;QACF,GAAG,EAAE,OAAO;QACZ,QAAQ,EAAE,SAAS;QACnB,OAAO,EAAE,OAAO;QAChB,MAAM,EAAE,eAAe;QACvB,SAAS,EAAE,MAAM;QACjB,UAAU,EAAE,UAAU;QACtB,KAAK,EAAE,mCAAmC;QAC1C,MAAM,EAAE,4BAA4B;QACpC,SAAS,EAAE,4BAA4B;QACvC,IAAI,EAAE,iDAAiD;QACvD,QAAQ,EAAE,WAAW;KACtB;CACmB,CAAA"}
@@ -1,4 +1,4 @@
1
1
  export declare const SelectorBox: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
2
- $tabsCount: number;
2
+ tabsCount: number;
3
3
  }>> & string;
4
4
  //# sourceMappingURL=styled.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"styled.d.ts","sourceRoot":"","sources":["../../../src/components/Selector/styled.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,WAAW;gBAA4B,MAAM;YAsJzD,CAAA"}
1
+ {"version":3,"file":"styled.d.ts","sourceRoot":"","sources":["../../../src/components/Selector/styled.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,WAAW;eAA0B,MAAM;YAsJvD,CAAA"}
@@ -52,7 +52,7 @@ export const SelectorBox = styled.div `
52
52
  flex-direction: row;
53
53
  align-items: center;
54
54
  align-items: flex-start;
55
- height: ${({ $tabsCount }) => 34 + ($tabsCount * 34)}px;
55
+ height: ${({ tabsCount }) => 34 + (tabsCount * 34)}px;
56
56
  }
57
57
 
58
58
  ul {
@@ -1 +1 @@
1
- {"version":3,"file":"styled.js","sourceRoot":"","sources":["../../../src/components/Selector/styled.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAA;AAChD,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAA;AAG1C,MAAM,CAAC,MAAM,WAAW,GAAG,MAAM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;;;;;;;;;;;0BAoCpB,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC;;;;;;;;gBAQhC,CAAC,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC,EAAE,GAAG,CAAC,SAAS,GAAG,EAAE,CAAC;;;;;;;;;;;;;;;;;;;;;iBAqBvC,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC;;;;;;;;;;;;;;;8BAeT,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC;;;;mCAIjB,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,YAAY;mBAC9C,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,YAAY;;;;;;;;;;;;;;;;;;;;;;8BAsBnB,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC;;;;;;;;;;;;;;;;;;;qBAmB/B,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,YAAY;;;;;;;;qBAQ9B,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC;;;;;;;;CAQ1C,CAAA"}
package/dist/layout.css CHANGED
@@ -94,6 +94,7 @@
94
94
  }
95
95
 
96
96
  .chat-container {
97
+ position: relative;
97
98
  padding: 20px;
98
99
  max-width: 1200px;
99
100
  width: calc(100% - 40px);
@@ -186,4 +187,20 @@
186
187
  border: 1px solid var(--primary-500);
187
188
  border-left: none;
188
189
  color: var(--light-contrastText);
190
+ }
191
+
192
+ .upload-drag-drop {
193
+ display: flex;
194
+ background: #00000090;
195
+ position: absolute;
196
+ width: 99%;
197
+ height: 99%;
198
+ top: 0;
199
+ left: 0;
200
+ flex-direction: column;
201
+ justify-content: center;
202
+ align-items: center;
203
+ border: 2px dashed var(--secondary-500);
204
+ z-index: 9999;
205
+ pointer-events: auto;
189
206
  }
@@ -24,12 +24,14 @@ export declare class UploadManager {
24
24
  private runChangeListeners;
25
25
  private runStatusListeners;
26
26
  private hasEquivalentFile;
27
+ private processFiles;
27
28
  private attachEventListeners;
28
29
  private createInput;
29
30
  private computeStatus;
30
31
  open(): void;
31
32
  get(): FileUpload[];
32
33
  reset(): void;
34
+ add(files?: File | File[]): void;
33
35
  remove(file: FileUpload): void;
34
36
  onChange(listener: UploadChangeListener): () => void;
35
37
  onChangeStatus(listener: UploadStatusChangeListener): () => void;
@@ -1 +1 @@
1
- {"version":3,"file":"UploadManager.d.ts","sourceRoot":"","sources":["../../../src/utils/upload/UploadManager.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAC5C,OAAO,EAAsD,WAAW,EAAE,MAAM,UAAU,CAAA;AAC1F,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAGzC,MAAM,MAAM,oBAAoB,GAAG,CAAC,KAAK,EAAE,UAAU,EAAE,KAAK,IAAI,CAAA;AAChE,MAAM,MAAM,0BAA0B,GAAG,CAAC,MAAM,EAAE,mBAAmB,KAAK,IAAI,CAAA;AAC9E,MAAM,MAAM,mBAAmB,GAAG,CAAC,MAAM,EAAE,WAAW,EAAE,KAAK,IAAI,CAAA;AACjE,MAAM,MAAM,mBAAmB,GAAG,MAAM,GAAG,WAAW,GAAG,OAAO,CAAA;AAEhE,qBAAa,aAAa;IACxB,OAAO,CAAC,eAAe,CAA6B;IACpD,OAAO,CAAC,eAAe,CAAmC;IAC1D,OAAO,CAAC,cAAc,CAA4B;IAClD,OAAO,CAAC,KAAK,CAAgC;IAC7C,OAAO,CAAC,KAAK,CAAmB;IAChC,OAAO,CAAC,OAAO,CAAC,CAAU;IAC1B,OAAO,CAAC,QAAQ,CAAQ;IACxB,OAAO,CAAC,MAAM,CAAU;IACxB,OAAO,CAAC,SAAS,CAAuB;IACxC,MAAM,EAAE,mBAAmB,CAAS;gBAExB,OAAO,CAAC,EAAE;QAAE,OAAO,CAAC,EAAE,QAAQ,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;QAAC,QAAQ,CAAC,EAA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AO,CAAC,MAAM,CAAU;IACxB,OAAO,CAAC,SAAS,CAAuB;IACxC,MAAM,EAAE,mBAAmB,CAAS;gBAExB,OAAO,CAAC,EAAE;QAAE,OAAO,CAAC,EAAE,QAAQ,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;KAAE;IAMlF,OAAO,CAAC,kBAAkB;IAI1B,OAAO,CAAC,kBAAkB;IAO1B,OAAO,CAAC,iBAAiB;IAKzB,OAAO,CAAC,YAAY;IA0BpB,OAAO,CAAC,oBAAoB;IAS5B,OAAO,CAAC,WAAW;IAUnB,OAAO,CAAC,aAAa;IASrB,IAAI;IAKJ,GAAG,IAAI,UAAU,EAAE;IAInB,KAAK;IAML,GAAG,CAAC,KAAK,GAAE,IAAI,GAAG,IAAI,EAAO;IAK7B,MAAM,CAAC,IAAI,EAAE,UAAU;IAOvB,QAAQ,CAAC,QAAQ,EAAE,oBAAoB;IAOvC,cAAc,CAAC,QAAQ,EAAE,0BAA0B;IAOnD,OAAO,CAAC,QAAQ,EAAE,mBAAmB;IAOrC,MAAM;IAIN,OAAO;CAIR"}
@@ -32,34 +32,37 @@ export class UploadManager {
32
32
  const id = getFileId(file);
33
33
  return this.value.some(f => id === f.id);
34
34
  }
35
- attachEventListeners() {
36
- const handleChange = () => {
37
- const newFiles = [];
38
- const errors = [];
39
- for (const f of this.input?.files ?? []) {
40
- if (this.maxSize && f.size > this.maxSize.value * Math.pow(1024, unitPower[this.maxSize?.unit])) {
41
- errors.push(new FileIsTooLarge(f.name, this.maxSize));
42
- }
43
- else if (this.maxItems && this.value.length + newFiles.length === this.maxItems) {
44
- errors.push(new MaxFilesReached(f.name, this.maxItems));
45
- }
46
- else if (this.hasEquivalentFile(f)) {
47
- errors.push(new FileAlreadyExists(f.name));
48
- }
49
- else {
50
- const upload = new FileUpload(f);
51
- newFiles.push(upload);
52
- upload.onChange(() => this.runStatusListeners());
53
- }
35
+ processFiles(files) {
36
+ const newFiles = [];
37
+ const errors = [];
38
+ for (const f of files ?? []) {
39
+ if (this.maxSize && f.size > this.maxSize.value * Math.pow(1024, unitPower[this.maxSize?.unit])) {
40
+ errors.push(new FileIsTooLarge(f.name, this.maxSize));
41
+ }
42
+ else if (this.maxItems && this.value.length + newFiles.length === this.maxItems) {
43
+ errors.push(new MaxFilesReached(f.name, this.maxItems));
54
44
  }
55
- if (newFiles.length) {
56
- this.value = [...this.value, ...newFiles];
57
- this.runChangeListeners();
58
- this.runStatusListeners();
45
+ else if (this.hasEquivalentFile(f)) {
46
+ errors.push(new FileAlreadyExists(f.name));
59
47
  }
60
- if (errors.length) {
61
- this.errorListeners.forEach(l => l(errors));
48
+ else {
49
+ const upload = new FileUpload(f);
50
+ newFiles.push(upload);
51
+ upload.onChange(() => this.runStatusListeners());
62
52
  }
53
+ }
54
+ if (newFiles.length) {
55
+ this.value = [...this.value, ...newFiles];
56
+ this.runChangeListeners();
57
+ this.runStatusListeners();
58
+ }
59
+ if (errors.length) {
60
+ this.errorListeners.forEach(l => l(errors));
61
+ }
62
+ }
63
+ attachEventListeners() {
64
+ const handleChange = () => {
65
+ this.processFiles(this.input?.files || []);
63
66
  this.destroy();
64
67
  };
65
68
  this.onDestroy = () => this.input?.removeEventListener('change', handleChange);
@@ -96,6 +99,10 @@ export class UploadManager {
96
99
  this.value = [];
97
100
  this.runChangeListeners();
98
101
  }
102
+ add(files = []) {
103
+ const fileList = Array.isArray(files) ? files : [files];
104
+ this.processFiles(fileList);
105
+ }
99
106
  remove(file) {
100
107
  file.destroy();
101
108
  this.value = this.value.filter(f => f !== file);
@@ -1 +1 @@
1
- {"version":3,"file":"UploadManager.js","sourceRoot":"","sources":["../../../src/utils/upload/UploadManager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAE7B,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,eAAe,EAAe,MAAM,UAAU,CAAA;AAC1F,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AC,QAA6B;QACnC,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA;QAClC,OAAO,GAAG,EAAE;YACV,IAAI,CAAC,IAAI,CAAC,cAAc,EAAE,QAAQ,CAAC,CAAA;QACrC,CAAC,CAAA;IACH,CAAC;IAED,MAAM;QACJ,OAAO,CAAC,CAAC,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,KAAK,IAAI,CAAC,QAAQ,CAAA;IAC/D,CAAC;IAED,OAAO;QACL,IAAI,CAAC,SAAS,EAAE,CAAA;QAChB,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,CAAA;IACtB,CAAC;CACF"}
@@ -0,0 +1,8 @@
1
+ interface UsePasteUploadProps {
2
+ textAreaRef: React.RefObject<HTMLTextAreaElement>;
3
+ onUploadFiles: (files: File[]) => void;
4
+ enabled?: boolean;
5
+ }
6
+ export declare const usePasteUpload: ({ textAreaRef, onUploadFiles, enabled, }: UsePasteUploadProps) => void;
7
+ export {};
8
+ //# sourceMappingURL=use-paste-upload.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-paste-upload.d.ts","sourceRoot":"","sources":["../../../src/utils/upload/use-paste-upload.tsx"],"names":[],"mappings":"AAEA,UAAU,mBAAmB;IAC3B,WAAW,EAAE,KAAK,CAAC,SAAS,CAAC,mBAAmB,CAAC,CAAC;IAClD,aAAa,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,KAAK,IAAI,CAAC;IACvC,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,eAAO,MAAM,cAAc,6CAIxB,mBAAmB,SAiBrB,CAAA"}
@@ -0,0 +1,19 @@
1
+ import { useEffect } from 'react';
2
+ export const usePasteUpload = ({ textAreaRef, onUploadFiles, enabled = true, }) => {
3
+ useEffect(() => {
4
+ const textarea = textAreaRef.current;
5
+ if (!textarea || !enabled)
6
+ return;
7
+ const handlePaste = (e) => {
8
+ if (e.clipboardData?.files?.length) {
9
+ onUploadFiles(Array.from(e.clipboardData.files));
10
+ e.preventDefault();
11
+ }
12
+ };
13
+ textarea.addEventListener('paste', handlePaste);
14
+ return () => {
15
+ textarea.removeEventListener('paste', handlePaste);
16
+ };
17
+ }, [onUploadFiles, textAreaRef, enabled]);
18
+ };
19
+ //# sourceMappingURL=use-paste-upload.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-paste-upload.js","sourceRoot":"","sources":["../../../src/utils/upload/use-paste-upload.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAQjC,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,EAC7B,WAAW,EACX,aAAa,EACb,OAAO,GAAG,IAAI,GACM,EAAE,EAAE;IACxB,SAAS,CAAC,GAAG,EAAE;QACb,MAAM,QAAQ,GAAG,WAAW,CAAC,OAAO,CAAA;QACpC,IAAI,CAAC,QAAQ,IAAI,CAAC,OAAO;YAAE,OAAM;QAEjC,MAAM,WAAW,GAAG,CAAC,CAAiB,EAAE,EAAE;YACxC,IAAI,CAAC,CAAC,aAAa,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC;gBACnC,aAAa,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,CAAA;gBAChD,CAAC,CAAC,cAAc,EAAE,CAAA;YACpB,CAAC;QACH,CAAC,CAAA;QAED,QAAQ,CAAC,gBAAgB,CAAC,OAAO,EAAE,WAAW,CAAC,CAAA;QAC/C,OAAO,GAAG,EAAE;YACV,QAAQ,CAAC,mBAAmB,CAAC,OAAO,EAAE,WAAW,CAAC,CAAA;QACpD,CAAC,CAAA;IACH,CAAC,EAAE,CAAC,aAAa,EAAE,WAAW,EAAE,OAAO,CAAC,CAAC,CAAA;AAC3C,CAAC,CAAA"}
@@ -0,0 +1,14 @@
1
+ import { DragEvent } from 'react';
2
+ export declare function useUploadDragDrop(containerSelector?: string): {
3
+ isDragging: boolean;
4
+ handleDrop: (e: DragEvent) => void;
5
+ handleDragLeave: (e: DragEvent) => void;
6
+ };
7
+ interface UploadDragNDropProps {
8
+ isDragging?: boolean;
9
+ onDrop?: (e: DragEvent) => void;
10
+ onDragLeave?: (e: DragEvent) => void;
11
+ }
12
+ export declare const UploadDragNDrop: ({ isDragging, onDrop, onDragLeave }: UploadDragNDropProps) => import("react/jsx-runtime").JSX.Element | null;
13
+ export {};
14
+ //# sourceMappingURL=UploadDragNDrop.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UploadDragNDrop.d.ts","sourceRoot":"","sources":["../../../src/views/MessageInput/UploadDragNDrop.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAoC,MAAM,OAAO,CAAA;AAInE,wBAAgB,iBAAiB,CAAC,iBAAiB,GAAE,MAA0B;;oBAI1C,SAAS;yBASJ,SAAS;EA2BlD;AAED,UAAU,oBAAoB;IAC5B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,MAAM,CAAC,EAAE,CAAC,CAAC,EAAE,SAAS,KAAK,IAAI,CAAC;IAChC,WAAW,CAAC,EAAE,CAAC,CAAC,EAAE,SAAS,KAAK,IAAI,CAAC;CACtC;AAED,eAAO,MAAM,eAAe,wCAAyC,oBAAoB,mDA4BxF,CAAA"}
@@ -0,0 +1,52 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { IconBox } from '@citric/core';
3
+ import { Document } from '@citric/icons';
4
+ import { useCallback, useEffect, useState } from 'react';
5
+ import { useCurrentChat } from '../../context/hooks.js';
6
+ import { useMessageInputDictionary } from './dictionary.js';
7
+ export function useUploadDragDrop(containerSelector = '.chat-container') {
8
+ const [isDragging, setIsDragging] = useState(false);
9
+ const chat = useCurrentChat();
10
+ const handleDrop = useCallback((e) => {
11
+ e.preventDefault();
12
+ e.stopPropagation();
13
+ setIsDragging(false);
14
+ if (e.dataTransfer?.files?.length) {
15
+ chat.uploadManager.add(Array.from(e.dataTransfer.files));
16
+ }
17
+ }, [chat]);
18
+ const handleDragLeave = useCallback((e) => {
19
+ e.preventDefault();
20
+ if (e.currentTarget && !e.currentTarget.contains(e.relatedTarget)) {
21
+ setIsDragging(false);
22
+ }
23
+ }, []);
24
+ useEffect(() => {
25
+ const container = document.querySelector(containerSelector);
26
+ if (!container)
27
+ return;
28
+ const nativeHandleDragEnter = (e) => {
29
+ e.preventDefault();
30
+ setIsDragging(true);
31
+ };
32
+ container.addEventListener('dragenter', nativeHandleDragEnter);
33
+ return () => {
34
+ container.removeEventListener('dragenter', nativeHandleDragEnter);
35
+ };
36
+ }, [containerSelector]);
37
+ return {
38
+ isDragging,
39
+ handleDrop,
40
+ handleDragLeave,
41
+ };
42
+ }
43
+ export const UploadDragNDrop = ({ isDragging, onDrop, onDragLeave }) => {
44
+ const t = useMessageInputDictionary();
45
+ if (!isDragging)
46
+ return null;
47
+ return (_jsxs("div", { className: "upload-drag-drop", "data-active": isDragging, role: "dialog", "aria-modal": "true", "aria-labelledby": "upload-drag-drop-title", "aria-describedby": "upload-drag-drop-description", onDrop: onDrop, onDragLeave: onDragLeave, onDragOver: e => {
48
+ e.preventDefault();
49
+ e.stopPropagation();
50
+ }, tabIndex: -1, children: [_jsx(IconBox, { size: "lg", "aria-hidden": true, children: _jsx(Document, {}) }), _jsx("h2", { id: "upload-drag-drop-title", children: t.uploadDragDropTitle }), _jsx("p", { id: "upload-drag-drop-description", children: t.uploadDragDropDescription })] }));
51
+ };
52
+ //# sourceMappingURL=UploadDragNDrop.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UploadDragNDrop.js","sourceRoot":"","sources":["../../../src/views/MessageInput/UploadDragNDrop.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AACtC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACxC,OAAO,EAAa,WAAW,EAAE,SAAS,EAAE,QAAQ,EAAE,MAA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,CAAC,IAAI,CAAC,CAAA;QACrB,CAAC,CAAA;QAED,SAAS,CAAC,gBAAgB,CAAC,WAAW,EAAE,qBAAqB,CAAC,CAAA;QAC9D,OAAO,GAAG,EAAE;YACV,SAAS,CAAC,mBAAmB,CAAC,WAAW,EAAE,qBAAqB,CAAC,CAAA;QACnE,CAAC,CAAA;IACH,CAAC,EAAE,CAAC,iBAAiB,CAAC,CAAC,CAAA;IAEvB,OAAO;QACL,UAAU;QACV,UAAU;QACV,eAAe;KAChB,CAAA;AACH,CAAC;AAQD,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,EAAE,UAAU,EAAE,MAAM,EAAE,WAAW,EAAwB,EAAE,EAAE;IAC3F,MAAM,CAAC,GAAG,yBAAyB,EAAE,CAAA;IAErC,IAAI,CAAC,UAAU;QAAE,OAAO,IAAI,CAAA;IAE5B,OAAO,CACL,eACE,SAAS,EAAC,kBAAkB,iBACf,UAAU,EACvB,IAAI,EAAC,QAAQ,gBACF,MAAM,qBACD,wBAAwB,sBACvB,8BAA8B,EAC/C,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,WAAW,EACxB,UAAU,EAAE,CAAC,CAAC,EAAE;YACd,CAAC,CAAC,cAAc,EAAE,CAAA;YAClB,CAAC,CAAC,eAAe,EAAE,CAAA;QACrB,CAAC,EACD,QAAQ,EAAE,CAAC,CAAC,aAEZ,KAAC,OAAO,IAAC,IAAI,EAAC,IAAI,iBAAc,IAAI,YAClC,KAAC,QAAQ,KAAG,GACJ,EACV,aAAI,EAAE,EAAC,wBAAwB,YAAE,CAAC,CAAC,mBAAmB,GAAM,EAC5D,YAAG,EAAE,EAAC,8BAA8B,YAAE,CAAC,CAAC,yBAAyB,GAAK,IAClE,CACP,CAAA;AACH,CAAC,CAAA"}
@@ -1,2 +1,2 @@
1
- export declare const useMessageInputDictionary: () => Record<"code" | "placeholder" | "selected" | "send" | "cancel" | "stack" | "knowledgeSource" | "agent" | "upload" | "remove" | "collapse" | "spot" | "removeConfig" | "removeStack" | "removeWorkspace" | "removeKS" | "removeSelection" | "expand" | "uploadSizeError" | "uploadItemLimitError" | "cantSendBecauseOfUploadError" | "cantSendBecauseOfUploadProgress" | "cantSendBecauseOfEmptyContent" | "chatAgent", string>;
1
+ export declare const useMessageInputDictionary: () => Record<"code" | "placeholder" | "selected" | "send" | "cancel" | "stack" | "knowledgeSource" | "agent" | "upload" | "remove" | "collapse" | "spot" | "typing" | "removeConfig" | "removeStack" | "removeWorkspace" | "removeKS" | "removeSelection" | "expand" | "uploadSizeError" | "uploadItemLimitError" | "uploadError" | "uploadDragging" | "uploadDragDropTitle" | "uploadDragDropDescription" | "cantSendBecauseOfUploadError" | "cantSendBecauseOfUploadProgress" | "cantSendBecauseOfEmptyContent" | "chatAgent", string>;
2
2
  //# sourceMappingURL=dictionary.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"dictionary.d.ts","sourceRoot":"","sources":["../../../src/views/MessageInput/dictionary.ts"],"names":[],"mappings":"AA2DA,eAAO,MAAM,yBAAyB,saAAiC,CAAA"}
1
+ {"version":3,"file":"dictionary.d.ts","sourceRoot":"","sources":["../../../src/views/MessageInput/dictionary.ts"],"names":[],"mappings":"AAoEA,eAAO,MAAM,yBAAyB,0gBAAiC,CAAA"}
@@ -8,6 +8,7 @@ const dictionary = {
8
8
  agent: 'Select agent',
9
9
  send: 'Send message',
10
10
  placeholder: 'Send a message to $0. For commands, use @ or /',
11
+ typing: 'Type your message...',
11
12
  cancel: 'Cancel',
12
13
  removeConfig: 'Remove all the configuration',
13
14
  removeStack: 'Stop using the current stack',
@@ -21,6 +22,10 @@ const dictionary = {
21
22
  collapse: 'Collapse options',
22
23
  uploadSizeError: 'The following files were not added to the upload list because they\'re larger than $1:',
23
24
  uploadItemLimitError: 'The following files were not added because no more than $1 items may be uploaded at a time:',
25
+ uploadError: 'An error occurred while uploading the file "$0".',
26
+ uploadDragging: 'Drop the file here to upload',
27
+ uploadDragDropTitle: 'Arraste e solte arquivos',
28
+ uploadDragDropDescription: 'Solte arquivos aqui para enviá-los na conversa',
24
29
  cantSendBecauseOfUploadError: 'Can\'t send the message because one of the files in the upload list could not be uploaded. Please, retry it or remove it from the list.',
25
30
  cantSendBecauseOfUploadProgress: 'Please wait until all files are uploaded before sending the message. You can also cancel the upload by removing it from the list of uploads.',
26
31
  cantSendBecauseOfEmptyContent: 'You can\'t send empty messages. Please write some text or upload a file.',
@@ -34,6 +39,7 @@ const dictionary = {
34
39
  agent: 'Selecionar agente',
35
40
  send: 'Enviar mensagem',
36
41
  placeholder: 'Envie uma mensagem para $0. Para comandos, use @ ou /',
42
+ typing: 'Digite sua mensagem...',
37
43
  cancel: 'Cancelar',
38
44
  removeConfig: 'Remover todas as configurações',
39
45
  removeStack: 'Parar de usar a stack atual',
@@ -48,6 +54,9 @@ const dictionary = {
48
54
  uploadSizeError: 'Os seguintes arquivos não foram adicionados à lista de upload porque eles são maiores que $0:',
49
55
  uploadItemLimitError: 'Os seguintes arquivos não foram adicionados à lista de upload porque é permitido enviar no máximo $0 arquivos por vez:',
50
56
  uploadError: 'Ocorreu um erro ao enviar o arquivo "$0".',
57
+ uploadDragging: 'Solte o arquivo aqui para fazer upload',
58
+ uploadDragDropTitle: 'Solte seus arquivos aqui',
59
+ uploadDragDropDescription: 'Arraste ou solte arquivos para compartilhar na conversa',
51
60
  unknownUploadError: 'Ocorreu um erro ao enviar os arquivos.',
52
61
  cantSendBecauseOfUploadError: 'Não é possível enviar a mensagem, pois um dos arquivos na lista de uploads não pôde ser enviado. Por favor, tente enviá-lo novamente ou remova-o da lista.',
53
62
  cantSendBecauseOfUploadProgress: 'Por favor aguarde todos os uploads de arquivos antes de enviar a mensagem. Você pode cancelar o upload removendo o arquivo da lista de uploads.',
@@ -1 +1 @@
1
- {"version":3,"file":"dictionary.js","sourceRoot":"","sources":["../../../src/views/MessageInput/dictionary.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,YAAY,EAAE,MAAM,8BAA8B,CAAA;AAEvE,MAA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AQ;KACpB;IACD,EAAE,EAAE;QACF,KAAK,EAAE,kBAAkB;QACzB,IAAI,EAAE,wBAAwB;QAC9B,IAAI,EAAE,iBAAiB;QACvB,eAAe,EAAE,8BAA8B;QAC/C,KAAK,EAAE,mBAAmB;QAC1B,IAAI,EAAE,iBAAiB;QACvB,WAAW,EAAE,uDAAuD;QACpE,MAAM,EAAE,wBAAwB;QAChC,MAAM,EAAE,UAAU;QAClB,YAAY,EAAE,gCAAgC;QAC9C,WAAW,EAAE,6BAA6B;QAC1C,eAAe,EAAE,4BAA4B;QAC7C,QAAQ,EAAE,qCAAqC;QAC/C,QAAQ,EAAE,aAAa;QACvB,eAAe,EAAE,4BAA4B;QAC7C,MAAM,EAAE,SAAS;QACjB,MAAM,EAAE,gBAAgB;QACxB,MAAM,EAAE,gBAAgB;QACxB,QAAQ,EAAE,iBAAiB;QAC3B,eAAe,EAAE,+FAA+F;QAChH,oBAAoB,EAAE,wHAAwH;QAC9I,WAAW,EAAE,2CAA2C;QACxD,cAAc,EAAE,wCAAwC;QACxD,mBAAmB,EAAE,0BAA0B;QAC/C,yBAAyB,EAAE,yDAAyD;QACpF,kBAAkB,EAAE,wCAAwC;QAC5D,4BAA4B,EAAE,4JAA4J;QAC1L,+BAA+B,EAAE,iJAAiJ;QAClL,6BAA6B,EAAE,6FAA6F;QAC5H,SAAS,EAAE,SAAS;KACrB;CACmB,CAAA;AAEtB,MAAM,CAAC,MAAM,yBAAyB,GAAG,GAAG,EAAE,CAAC,YAAY,CAAC,UAAU,CAAC,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/views/MessageInput/index.tsx"],"names":[],"mappings":"AAoBA;;;;GAIG;AACH,eAAO,MAAM,YAAY,+CA8GxB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/views/MessageInput/index.tsx"],"names":[],"mappings":"AAsBA;;;;GAIG;AACH,eAAO,MAAM,YAAY,+CA0HxB,CAAA"}
@@ -9,6 +9,7 @@ import { quickCommandRegex } from '../../regex.js';
9
9
  import { ChatEntry } from '../../state/ChatEntry.js';
10
10
  import { checkIsTrial } from '../../utils/check-is-trial.js';
11
11
  import { UploadProvider } from '../../utils/upload/context.js';
12
+ import { usePasteUpload } from '../../utils/upload/use-paste-upload.js';
12
13
  import { AgentSelector } from './AgentSelector.js';
13
14
  import { ButtonAgent } from './ButtonAgent.js';
14
15
  import { ButtonBar } from './ButtonBar.js';
@@ -18,6 +19,7 @@ import { useMessageInputDictionary } from './dictionary.js';
18
19
  import { QuickCommandSelector } from './QuickCommandSelector.js';
19
20
  import { MAX_INPUT_HEIGHT, MessageInputBox, MIN_INPUT_HEIGHT } from './styled.js';
20
21
  import { UploadBar } from './UploadBar.js';
22
+ import { UploadDragNDrop, useUploadDragDrop } from './UploadDragNDrop.js';
21
23
  /**
22
24
  * This renders the MessageInput part of the layout which includes the progress bar, the actual textarea, the badges telling what is
23
25
  * going to be used for the question and the buttons to send, cancel, set the workspace, among others. This also includes the Quick
@@ -36,6 +38,12 @@ export const MessageInput = () => {
36
38
  const agentLabel = useCurrentChatState('agent')?.label;
37
39
  const { handleKeyDown, handleKeyUp } = useUserEntryHistoryShortcut();
38
40
  const isTrial = checkIsTrial();
41
+ const { isDragging, handleDrop, handleDragLeave } = useUploadDragDrop();
42
+ usePasteUpload({
43
+ textAreaRef,
44
+ onUploadFiles: files => chat.uploadManager.add(files),
45
+ enabled: !isLoading,
46
+ });
39
47
  const checkSendRequirements = useCallback(() => {
40
48
  if (chat.uploadManager.status === 'error') {
41
49
  chat.pushMessage(new ChatEntry({
@@ -96,6 +104,8 @@ export const MessageInput = () => {
96
104
  if (!isLoading)
97
105
  textAreaRef.current?.focus();
98
106
  }, [isLoading]);
99
- return (_jsx(UploadProvider, { value: chat.uploadManager, children: _jsxs(MessageInputBox, { "aria-busy": isLoading, className: "message-input", "$inputFocused": focused, children: [_jsxs("div", { className: "wrapper-action", children: [_jsx(QuickCommandSelector, { inputRef: textAreaRef, isTrial: isTrial }), _jsx(AgentSelector, { inputRef: textAreaRef, isTrial: isTrial }), _jsxs("div", { className: listToClass(['action-box', focused && 'focused', isLoading && 'disabled']), children: [_jsx(ButtonAgent, {}), _jsx(AdaptiveTextArea, { ref: textAreaRef, placeholder: agentLabel && interpolate(t.placeholder, agentLabel), onChange: e => chat.set('nextMessage', e.target.value), value: value, onFocus: () => setFocused(true), onBlur: () => setFocused(false), onKeyDown: onKeyDown, onKeyUp: handleKeyUp, onIncreaseSize: () => setExpanded(false), onResetSize: () => !expansionLocked.current && setExpanded(true), maxHeight: isMinimized ? MIN_INPUT_HEIGHT : MAX_INPUT_HEIGHT })] })] }), _jsx(ProgressBar, { visible: true, animate: isLoading, backgroundColor: isLoading || !focused ? theme.color.light[500] : theme.color.primary[500] }), _jsx(ContextBar, {}), chat.get('features').upload && _jsx(UploadBar, {}), _jsx(ButtonBar, { onSend: onSend, isLoading: isLoading })] }) }));
107
+ return (_jsxs(UploadProvider, { value: chat.uploadManager, children: [_jsxs(MessageInputBox, { "aria-busy": isLoading, className: "message-input", "$inputFocused": focused, children: [_jsxs("div", { className: "wrapper-action", children: [_jsx(QuickCommandSelector, { inputRef: textAreaRef, isTrial: isTrial }), _jsx(AgentSelector, { inputRef: textAreaRef, isTrial: isTrial }), _jsxs("div", { className: listToClass(['action-box', focused && 'focused', isLoading && 'disabled']), children: [_jsx(ButtonAgent, {}), _jsx(AdaptiveTextArea, { ref: textAreaRef, placeholder: agentLabel
108
+ ? interpolate(t.placeholder, agentLabel)
109
+ : t.typing, onChange: e => chat.set('nextMessage', e.target.value), value: value, onFocus: () => setFocused(true), onBlur: () => setFocused(false), onKeyDown: onKeyDown, onKeyUp: handleKeyUp, onIncreaseSize: () => setExpanded(false), onResetSize: () => !expansionLocked.current && setExpanded(true), maxHeight: isMinimized ? MIN_INPUT_HEIGHT : MAX_INPUT_HEIGHT })] })] }), _jsx(ProgressBar, { visible: true, animate: isLoading, backgroundColor: isLoading || !focused ? theme.color.light[500] : theme.color.primary[500] }), _jsx(ContextBar, {}), chat.get('features').upload && _jsx(UploadBar, {}), _jsx(ButtonBar, { onSend: onSend, isLoading: isLoading })] }), _jsx(UploadDragNDrop, { isDragging: isDragging, onDrop: handleDrop, onDragLeave: handleDragLeave })] }));
100
110
  };
101
111
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/views/MessageInput/index.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAA;AAC7D,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAA;AAC1D,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAChE,OAAO,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAA;AACpE,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAA;AAC1D,OAAO,EAAE,cAAc,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AACzF,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAA;AAC/C,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAA;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAA;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AACvC,OAAO,EAAE,2BAA2B,EAAE,MAAM,sBAAsB,CAAA;AAClE,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACzC,OAAO,EAAE,yBAAyB,EAAE,MAAM,cAAc,CAAA;AACxD,OAAO,EAAE,oBAAoB,EA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,CAAC,UAAU,CAAC,IAAI,CAAC,EAC/B,MAAM,EAAE,GAAG,EAAE,CAAC,UAAU,CAAC,KAAK,CAAC,EAC/B,SAAS,EAAE,SAAS,EACpB,OAAO,EAAE,WAAW,EACpB,cAAc,EAAE,GAAG,EAAE,CAAC,WAAW,CAAC,KAAK,CAAC,EACxC,WAAW,EAAE,GAAG,EAAE,CAAC,CAAC,eAAe,CAAC,OAAO,IAAI,WAAW,CAAC,IAAI,CAAC,EAChE,SAAS,EAAE,WAAW,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,gBAAgB,GAC5D,IACE,IACF,EACN,KAAC,WAAW,IAAC,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,SAAS,EAC5C,eAAe,EAAE,SAAS,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,GAAI,EAChG,KAAC,UAAU,KAAG,EACb,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,MAAM,IAAI,KAAC,SAAS,KAAG,EAC7C,KAAC,SAAS,IAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,GAAI,IACnC,EAClB,KAAC,eAAe,IAAC,UAAU,EAAE,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,WAAW,EAAE,eAAe,GAAI,IAC9E,CAClB,CAAA;AACH,CAAC,CAAA"}
@@ -1,4 +1,4 @@
1
- export declare const MAX_INPUT_HEIGHT = 200;
1
+ export declare const MAX_INPUT_HEIGHT = 300;
2
2
  export declare const MIN_INPUT_HEIGHT = 24;
3
3
  export declare const SelectionBarWrapper: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
4
4
  export declare const MessageInputBox: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
@@ -5,7 +5,7 @@ const CONTEXT_BAR_HEIGHT = 38;
5
5
  const CONTEXT_BAR_DISPLACEMENT = 4;
6
6
  const UPLOAD_BAR_HEIGHT = 60;
7
7
  const UPLOAD_BAR_DISPLACEMENT = 4;
8
- export const MAX_INPUT_HEIGHT = 200;
8
+ export const MAX_INPUT_HEIGHT = 300;
9
9
  export const MIN_INPUT_HEIGHT = 24;
10
10
  export const SelectionBarWrapper = styled.div `
11
11
  display: inline-flex;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stack-spot/ai-chat-widget",
3
- "version": "1.28.1",
3
+ "version": "1.29.0-beta.0",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stack-spot/ai-chat-widget",
3
- "version": "1.28.1",
4
- "date": "Thu Jul 03 2025 16:56:42 GMT+0000 (Coordinated Universal Time)",
3
+ "version": "1.29.0-beta.0",
4
+ "date": "Thu Jul 03 2025 09:44:54 GMT-0300 (Horário Padrão de Brasília)",
5
5
  "dependencies": [
6
6
  {
7
7
  "name": "@stack-spot/app-metadata",
@@ -54,5 +54,5 @@ export const AdaptiveTextArea = forwardRef<HTMLTextAreaElement, Props>((
54
54
  }
55
55
  }, [value, maxHeight])
56
56
 
57
- return <Textarea id="prompt-textarea" name="prompt-textarea" {...props} ref={ref} value={value} style={{ ...style, maxHeight }} />
57
+ return <Textarea {...props} ref={ref} value={value} style={{ ...style, maxHeight }} />
58
58
  })
@@ -248,7 +248,7 @@ export const Selector = <T, >({ inputRef, selectorConfig, favorite }: SelectorPr
248
248
  }, [shouldRender])
249
249
 
250
250
  return (
251
- <SelectorBox $tabsCount={selectorConfig.sections.length}>
251
+ <SelectorBox tabsCount={selectorConfig.sections.length}>
252
252
  <Fading visible={shouldRender} ref={selectorRef} className="box-selector">
253
253
  <SelectorContent
254
254
  favorite={favorite}
@@ -2,7 +2,7 @@ import { theme } from '@stack-spot/portal-theme'
2
2
  import { styled } from 'styled-components'
3
3
 
4
4
 
5
- export const SelectorBox = styled.div<{ $tabsCount: number }>`
5
+ export const SelectorBox = styled.div<{tabsCount: number}>`
6
6
  position: absolute;
7
7
  bottom: 0;
8
8
 
@@ -54,7 +54,7 @@ export const SelectorBox = styled.div<{ $tabsCount: number }>`
54
54
  flex-direction: row;
55
55
  align-items: center;
56
56
  align-items: flex-start;
57
- height: ${({ $tabsCount }) => 34 + ($tabsCount * 34)}px;
57
+ height: ${({ tabsCount }) => 34 + (tabsCount * 34)}px;
58
58
  }
59
59
 
60
60
  ul {
package/src/layout.css CHANGED
@@ -94,6 +94,7 @@
94
94
  }
95
95
 
96
96
  .chat-container {
97
+ position: relative;
97
98
  padding: 20px;
98
99
  max-width: 1200px;
99
100
  width: calc(100% - 40px);
@@ -186,4 +187,20 @@
186
187
  border: 1px solid var(--primary-500);
187
188
  border-left: none;
188
189
  color: var(--light-contrastText);
190
+ }
191
+
192
+ .upload-drag-drop {
193
+ display: flex;
194
+ background: #00000090;
195
+ position: absolute;
196
+ width: 99%;
197
+ height: 99%;
198
+ top: 0;
199
+ left: 0;
200
+ flex-direction: column;
201
+ justify-content: center;
202
+ align-items: center;
203
+ border: 2px dashed var(--secondary-500);
204
+ z-index: 9999;
205
+ pointer-events: auto;
189
206
  }
@@ -43,31 +43,35 @@ export class UploadManager {
43
43
  return this.value.some(f => id === f.id)
44
44
  }
45
45
 
46
+ private processFiles(files: FileList | File[]) {
47
+ const newFiles: FileUpload[] = []
48
+ const errors: UploadError[] = []
49
+ for (const f of files ?? []) {
50
+ if (this.maxSize && f.size > this.maxSize.value * Math.pow(1024, unitPower[this.maxSize?.unit])) {
51
+ errors.push(new FileIsTooLarge(f.name, this.maxSize))
52
+ } else if (this.maxItems && this.value.length + newFiles.length === this.maxItems) {
53
+ errors.push(new MaxFilesReached(f.name, this.maxItems))
54
+ } else if (this.hasEquivalentFile(f)) {
55
+ errors.push(new FileAlreadyExists(f.name))
56
+ } else {
57
+ const upload = new FileUpload(f)
58
+ newFiles.push(upload)
59
+ upload.onChange(() => this.runStatusListeners())
60
+ }
61
+ }
62
+ if (newFiles.length) {
63
+ this.value = [...this.value, ...newFiles]
64
+ this.runChangeListeners()
65
+ this.runStatusListeners()
66
+ }
67
+ if (errors.length) {
68
+ this.errorListeners.forEach(l => l(errors))
69
+ }
70
+ }
71
+
46
72
  private attachEventListeners() {
47
73
  const handleChange = () => {
48
- const newFiles: FileUpload[] = []
49
- const errors: UploadError[] = []
50
- for (const f of this.input?.files ?? []) {
51
- if (this.maxSize && f.size > this.maxSize.value * Math.pow(1024, unitPower[this.maxSize?.unit])) {
52
- errors.push(new FileIsTooLarge(f.name, this.maxSize))
53
- } else if (this.maxItems && this.value.length + newFiles.length === this.maxItems) {
54
- errors.push(new MaxFilesReached(f.name, this.maxItems))
55
- } else if (this.hasEquivalentFile(f)) {
56
- errors.push(new FileAlreadyExists(f.name))
57
- } else {
58
- const upload = new FileUpload(f)
59
- newFiles.push(upload)
60
- upload.onChange(() => this.runStatusListeners())
61
- }
62
- }
63
- if (newFiles.length) {
64
- this.value = [...this.value, ...newFiles]
65
- this.runChangeListeners()
66
- this.runStatusListeners()
67
- }
68
- if (errors.length) {
69
- this.errorListeners.forEach(l => l(errors))
70
- }
74
+ this.processFiles(this.input?.files || [])
71
75
  this.destroy()
72
76
  }
73
77
  this.onDestroy = () => this.input?.removeEventListener('change', handleChange)
@@ -108,6 +112,11 @@ export class UploadManager {
108
112
  this.runChangeListeners()
109
113
  }
110
114
 
115
+ add(files: File | File[] = []) {
116
+ const fileList = Array.isArray(files) ? files : [files]
117
+ this.processFiles(fileList)
118
+ }
119
+
111
120
  remove(file: FileUpload) {
112
121
  file.destroy()
113
122
  this.value = this.value.filter(f => f !== file)
@@ -0,0 +1,30 @@
1
+ import { useEffect } from 'react'
2
+
3
+ interface UsePasteUploadProps {
4
+ textAreaRef: React.RefObject<HTMLTextAreaElement>,
5
+ onUploadFiles: (files: File[]) => void,
6
+ enabled?: boolean,
7
+ }
8
+
9
+ export const usePasteUpload = ({
10
+ textAreaRef,
11
+ onUploadFiles,
12
+ enabled = true,
13
+ }: UsePasteUploadProps) => {
14
+ useEffect(() => {
15
+ const textarea = textAreaRef.current
16
+ if (!textarea || !enabled) return
17
+
18
+ const handlePaste = (e: ClipboardEvent) => {
19
+ if (e.clipboardData?.files?.length) {
20
+ onUploadFiles(Array.from(e.clipboardData.files))
21
+ e.preventDefault()
22
+ }
23
+ }
24
+
25
+ textarea.addEventListener('paste', handlePaste)
26
+ return () => {
27
+ textarea.removeEventListener('paste', handlePaste)
28
+ }
29
+ }, [onUploadFiles, textAreaRef, enabled])
30
+ }
@@ -0,0 +1,83 @@
1
+ import { IconBox } from '@citric/core'
2
+ import { Document } from '@citric/icons'
3
+ import { DragEvent, useCallback, useEffect, useState } from 'react'
4
+ import { useCurrentChat } from '../../context/hooks'
5
+ import { useMessageInputDictionary } from './dictionary'
6
+
7
+ export function useUploadDragDrop(containerSelector: string = '.chat-container') {
8
+ const [isDragging, setIsDragging] = useState(false)
9
+ const chat = useCurrentChat()
10
+
11
+ const handleDrop = useCallback((e: DragEvent) => {
12
+ e.preventDefault()
13
+ e.stopPropagation()
14
+ setIsDragging(false)
15
+ if (e.dataTransfer?.files?.length) {
16
+ chat.uploadManager.add(Array.from(e.dataTransfer.files))
17
+ }
18
+ }, [chat])
19
+
20
+ const handleDragLeave = useCallback((e: DragEvent) => {
21
+ e.preventDefault()
22
+ if (e.currentTarget && !e.currentTarget.contains(e.relatedTarget as Node)) {
23
+ setIsDragging(false)
24
+ }
25
+ }, [])
26
+
27
+ useEffect(() => {
28
+ const container = document.querySelector(containerSelector) as HTMLDivElement | null
29
+ if (!container) return
30
+
31
+ const nativeHandleDragEnter = (e: Event) => {
32
+ e.preventDefault()
33
+ setIsDragging(true)
34
+ }
35
+
36
+ container.addEventListener('dragenter', nativeHandleDragEnter)
37
+ return () => {
38
+ container.removeEventListener('dragenter', nativeHandleDragEnter)
39
+ }
40
+ }, [containerSelector])
41
+
42
+ return {
43
+ isDragging,
44
+ handleDrop,
45
+ handleDragLeave,
46
+ }
47
+ }
48
+
49
+ interface UploadDragNDropProps {
50
+ isDragging?: boolean,
51
+ onDrop?: (e: DragEvent) => void,
52
+ onDragLeave?: (e: DragEvent) => void,
53
+ }
54
+
55
+ export const UploadDragNDrop = ({ isDragging, onDrop, onDragLeave }: UploadDragNDropProps) => {
56
+ const t = useMessageInputDictionary()
57
+
58
+ if (!isDragging) return null
59
+
60
+ return (
61
+ <div
62
+ className="upload-drag-drop"
63
+ data-active={isDragging}
64
+ role="dialog"
65
+ aria-modal="true"
66
+ aria-labelledby="upload-drag-drop-title"
67
+ aria-describedby="upload-drag-drop-description"
68
+ onDrop={onDrop}
69
+ onDragLeave={onDragLeave}
70
+ onDragOver={e => {
71
+ e.preventDefault()
72
+ e.stopPropagation()
73
+ }}
74
+ tabIndex={-1}
75
+ >
76
+ <IconBox size="lg" aria-hidden={true}>
77
+ <Document />
78
+ </IconBox>
79
+ <h2 id="upload-drag-drop-title">{t.uploadDragDropTitle}</h2>
80
+ <p id="upload-drag-drop-description">{t.uploadDragDropDescription}</p>
81
+ </div>
82
+ )
83
+ }
@@ -9,6 +9,7 @@ const dictionary = {
9
9
  agent: 'Select agent',
10
10
  send: 'Send message',
11
11
  placeholder: 'Send a message to $0. For commands, use @ or /',
12
+ typing: 'Type your message...',
12
13
  cancel: 'Cancel',
13
14
  removeConfig: 'Remove all the configuration',
14
15
  removeStack: 'Stop using the current stack',
@@ -22,6 +23,10 @@ const dictionary = {
22
23
  collapse: 'Collapse options',
23
24
  uploadSizeError: 'The following files were not added to the upload list because they\'re larger than $1:',
24
25
  uploadItemLimitError: 'The following files were not added because no more than $1 items may be uploaded at a time:',
26
+ uploadError: 'An error occurred while uploading the file "$0".',
27
+ uploadDragging: 'Drop the file here to upload',
28
+ uploadDragDropTitle: 'Arraste e solte arquivos',
29
+ uploadDragDropDescription: 'Solte arquivos aqui para enviá-los na conversa',
25
30
  cantSendBecauseOfUploadError: 'Can\'t send the message because one of the files in the upload list could not be uploaded. Please, retry it or remove it from the list.',
26
31
  cantSendBecauseOfUploadProgress: 'Please wait until all files are uploaded before sending the message. You can also cancel the upload by removing it from the list of uploads.',
27
32
  cantSendBecauseOfEmptyContent: 'You can\'t send empty messages. Please write some text or upload a file.',
@@ -35,6 +40,7 @@ const dictionary = {
35
40
  agent: 'Selecionar agente',
36
41
  send: 'Enviar mensagem',
37
42
  placeholder: 'Envie uma mensagem para $0. Para comandos, use @ ou /',
43
+ typing: 'Digite sua mensagem...',
38
44
  cancel: 'Cancelar',
39
45
  removeConfig: 'Remover todas as configurações',
40
46
  removeStack: 'Parar de usar a stack atual',
@@ -49,6 +55,9 @@ const dictionary = {
49
55
  uploadSizeError: 'Os seguintes arquivos não foram adicionados à lista de upload porque eles são maiores que $0:',
50
56
  uploadItemLimitError: 'Os seguintes arquivos não foram adicionados à lista de upload porque é permitido enviar no máximo $0 arquivos por vez:',
51
57
  uploadError: 'Ocorreu um erro ao enviar o arquivo "$0".',
58
+ uploadDragging: 'Solte o arquivo aqui para fazer upload',
59
+ uploadDragDropTitle: 'Solte seus arquivos aqui',
60
+ uploadDragDropDescription: 'Arraste ou solte arquivos para compartilhar na conversa',
52
61
  unknownUploadError: 'Ocorreu um erro ao enviar os arquivos.',
53
62
  cantSendBecauseOfUploadError: 'Não é possível enviar a mensagem, pois um dos arquivos na lista de uploads não pôde ser enviado. Por favor, tente enviá-lo novamente ou remova-o da lista.',
54
63
  cantSendBecauseOfUploadProgress: 'Por favor aguarde todos os uploads de arquivos antes de enviar a mensagem. Você pode cancelar o upload removendo o arquivo da lista de uploads.',
@@ -8,6 +8,7 @@ import { quickCommandRegex } from '../../regex'
8
8
  import { ChatEntry } from '../../state/ChatEntry'
9
9
  import { checkIsTrial } from '../../utils/check-is-trial'
10
10
  import { UploadProvider } from '../../utils/upload/context'
11
+ import { usePasteUpload } from '../../utils/upload/use-paste-upload'
11
12
  import { AgentSelector } from './AgentSelector'
12
13
  import { ButtonAgent } from './ButtonAgent'
13
14
  import { ButtonBar } from './ButtonBar'
@@ -17,6 +18,7 @@ import { useMessageInputDictionary } from './dictionary'
17
18
  import { QuickCommandSelector } from './QuickCommandSelector'
18
19
  import { MAX_INPUT_HEIGHT, MessageInputBox, MIN_INPUT_HEIGHT } from './styled'
19
20
  import { UploadBar } from './UploadBar'
21
+ import { UploadDragNDrop, useUploadDragDrop } from './UploadDragNDrop'
20
22
 
21
23
  /**
22
24
  * This renders the MessageInput part of the layout which includes the progress bar, the actual textarea, the badges telling what is
@@ -36,6 +38,13 @@ export const MessageInput = () => {
36
38
  const agentLabel = useCurrentChatState('agent')?.label
37
39
  const { handleKeyDown, handleKeyUp } = useUserEntryHistoryShortcut()
38
40
  const isTrial = checkIsTrial()
41
+ const { isDragging, handleDrop, handleDragLeave } = useUploadDragDrop()
42
+
43
+ usePasteUpload({
44
+ textAreaRef,
45
+ onUploadFiles: files => chat.uploadManager.add(files),
46
+ enabled: !isLoading,
47
+ })
39
48
 
40
49
  const checkSendRequirements = useCallback(() => {
41
50
  if (chat.uploadManager.status === 'error') {
@@ -112,7 +121,11 @@ export const MessageInput = () => {
112
121
  <ButtonAgent />
113
122
  <AdaptiveTextArea
114
123
  ref={textAreaRef}
115
- placeholder={agentLabel && interpolate(t.placeholder, agentLabel)}
124
+ placeholder={
125
+ agentLabel
126
+ ? interpolate(t.placeholder, agentLabel)
127
+ : t.typing
128
+ }
116
129
  onChange={e => chat.set('nextMessage', e.target.value)}
117
130
  value={value}
118
131
  onFocus={() => setFocused(true)}
@@ -131,6 +144,7 @@ export const MessageInput = () => {
131
144
  {chat.get('features').upload && <UploadBar />}
132
145
  <ButtonBar onSend={onSend} isLoading={isLoading} />
133
146
  </MessageInputBox>
147
+ <UploadDragNDrop isDragging={isDragging} onDrop={handleDrop} onDragLeave={handleDragLeave} />
134
148
  </UploadProvider>
135
149
  )
136
150
  }
@@ -6,7 +6,7 @@ const CONTEXT_BAR_HEIGHT = 38
6
6
  const CONTEXT_BAR_DISPLACEMENT = 4
7
7
  const UPLOAD_BAR_HEIGHT = 60
8
8
  const UPLOAD_BAR_DISPLACEMENT = 4
9
- export const MAX_INPUT_HEIGHT = 200
9
+ export const MAX_INPUT_HEIGHT = 300
10
10
  export const MIN_INPUT_HEIGHT = 24
11
11
 
12
12
  export const SelectionBarWrapper = styled.div`