@rolder/kit 3.0.0-alpha.2 → 3.0.0-alpha.20

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 (54) hide show
  1. package/dist/ai/index.d.ts +1 -0
  2. package/dist/ai/index.js +1 -0
  3. package/dist/ai/ui/conversation/FileIcon.js +26 -208
  4. package/dist/ai/ui/conversation/index.d.ts +2 -2
  5. package/dist/ai/ui/conversation/index.js +3 -2
  6. package/dist/ai/ui/index.d.ts +2 -0
  7. package/dist/ai/ui/index.js +2 -0
  8. package/dist/ai/ui/promptInput/File.js +7 -56
  9. package/dist/ai/ui/promptInput/FileIcon.js +26 -208
  10. package/dist/ai/ui/promptInput/Submit.js +4 -23
  11. package/dist/ai/ui/promptInput/index.d.ts +1 -1
  12. package/dist/ai/ui/promptInput/index.js +1 -0
  13. package/dist/app/index.d.ts +1 -0
  14. package/dist/app/index.js +1 -0
  15. package/dist/functions/index.d.ts +3 -1
  16. package/dist/functions/index.js +4 -1
  17. package/dist/index.d.ts +1 -3
  18. package/dist/index.js +1 -4
  19. package/dist/ui/AnimatedChevron.d.ts +2 -2
  20. package/dist/ui/AnimatedChevron.js +7 -25
  21. package/dist/ui/editor/Toolbar.js +4 -22
  22. package/dist/ui/error/index.d.ts +4 -4
  23. package/dist/ui/error/index.js +5 -4
  24. package/dist/ui/form/buttons/CancelButton.js +4 -26
  25. package/dist/ui/form/buttons/SubmitButton.js +4 -29
  26. package/dist/ui/form/fields/TextPassowrdField.js +4 -26
  27. package/dist/ui/form/index.d.ts +2 -2
  28. package/dist/ui/form/index.js +3 -3
  29. package/dist/ui/hoverPaper/index.d.ts +2 -2
  30. package/dist/ui/hoverPaper/index.js +3 -2
  31. package/dist/ui/scrollArea/ScrollArea.d.ts +1 -1
  32. package/dist/ui/scrollArea/ScrollAreaButton.d.ts +1 -1
  33. package/dist/ui/scrollArea/ScrollAreaButton.js +7 -28
  34. package/package.json +39 -33
  35. package/dist/functions/cookies/index.d.ts +0 -3
  36. package/dist/functions/cookies/index.js +0 -3
  37. package/dist/surreal/connection.d.ts +0 -9
  38. package/dist/surreal/connection.js +0 -49
  39. package/dist/surreal/deafaultCrud.d.ts +0 -2
  40. package/dist/surreal/deafaultCrud.js +0 -18
  41. package/dist/surreal/deserialize.d.ts +0 -17
  42. package/dist/surreal/deserialize.js +0 -46
  43. package/dist/surreal/encryption.d.ts +0 -6
  44. package/dist/surreal/encryption.js +0 -30
  45. package/dist/surreal/index.d.ts +0 -4
  46. package/dist/surreal/index.js +0 -5
  47. package/dist/ui/editor/styles.module.js +0 -7
  48. package/dist/ui/editor/styles_module.css +0 -16
  49. /package/dist/functions/{cookies/getCookie.d.ts → getCookie.d.ts} +0 -0
  50. /package/dist/functions/{cookies/getCookie.js → getCookie.js} +0 -0
  51. /package/dist/functions/{cookies/setCookie.d.ts → setCookie.d.ts} +0 -0
  52. /package/dist/functions/{cookies/setCookie.js → setCookie.js} +0 -0
  53. /package/dist/functions/{cookies/setCookies.d.ts → setCookies.d.ts} +0 -0
  54. /package/dist/functions/{cookies/setCookies.js → setCookies.js} +0 -0
@@ -1 +1,2 @@
1
+ export * from './ui';
1
2
  export * from './utils';
package/dist/ai/index.js CHANGED
@@ -1 +1,2 @@
1
+ export * from "./ui/index.js";
1
2
  export * from "./utils/index.js";
@@ -1,224 +1,42 @@
1
- import { jsx, jsxs } from "react/jsx-runtime";
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { IconFile, IconFileTypeDoc, IconFileTypePdf, IconFileTypePpt, IconFileTypeXls, IconPhoto } from "@tabler/icons-react";
2
3
  const FileIcon = ({ mimeType })=>{
3
4
  switch(true){
4
5
  case mimeType.includes('image/'):
5
- return /*#__PURE__*/ jsxs("svg", {
6
- xmlns: "http://www.w3.org/2000/svg",
7
- width: "36",
8
- height: "36",
9
- viewBox: "0 0 36 36",
10
- fill: "none",
11
- stroke: "var(--mantine-color-text)",
12
- "stroke-width": "1.5",
13
- "stroke-linecap": "round",
14
- "stroke-linejoin": "round",
15
- role: "img",
16
- "aria-label": "Image",
17
- children: [
18
- /*#__PURE__*/ jsx("path", {
19
- stroke: "none",
20
- d: "M0 0h24v24H0z",
21
- fill: "none"
22
- }),
23
- /*#__PURE__*/ jsx("path", {
24
- d: "M15 8h.01"
25
- }),
26
- /*#__PURE__*/ jsx("path", {
27
- d: "M3 6a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v12a3 3 0 0 1 -3 3h-12a3 3 0 0 1 -3 -3v-12"
28
- }),
29
- /*#__PURE__*/ jsx("path", {
30
- d: "M3 16l5 -5c.928 -.893 2.072 -.893 3 0l5 5"
31
- }),
32
- /*#__PURE__*/ jsx("path", {
33
- d: "M14 14l1 -1c.928 -.893 2.072 -.893 3 0l3 3"
34
- })
35
- ]
6
+ return /*#__PURE__*/ jsx(IconPhoto, {
7
+ size: 36,
8
+ stroke: 1.5,
9
+ color: "var(--mantine-color-text)"
36
10
  });
37
11
  case mimeType.includes('application/pdf'):
38
- return /*#__PURE__*/ jsxs("svg", {
39
- xmlns: "http://www.w3.org/2000/svg",
40
- width: "36",
41
- height: "36",
42
- viewBox: "0 0 36 36",
43
- fill: "none",
44
- stroke: "var(--mantine-color-text)",
45
- "stroke-width": "1.5",
46
- "stroke-linecap": "round",
47
- "stroke-linejoin": "round",
48
- role: "img",
49
- "aria-label": "FilePdf",
50
- children: [
51
- /*#__PURE__*/ jsx("path", {
52
- stroke: "none",
53
- d: "M0 0h24v24H0z",
54
- fill: "none"
55
- }),
56
- /*#__PURE__*/ jsx("path", {
57
- d: "M14 3v4a1 1 0 0 0 1 1h4"
58
- }),
59
- /*#__PURE__*/ jsx("path", {
60
- d: "M5 12v-7a2 2 0 0 1 2 -2h7l5 5v4"
61
- }),
62
- /*#__PURE__*/ jsx("path", {
63
- d: "M5 18h1.5a1.5 1.5 0 0 0 0 -3h-1.5v6"
64
- }),
65
- /*#__PURE__*/ jsx("path", {
66
- d: "M17 18h2"
67
- }),
68
- /*#__PURE__*/ jsx("path", {
69
- d: "M20 15h-3v6"
70
- }),
71
- /*#__PURE__*/ jsx("path", {
72
- d: "M11 15v6h1a2 2 0 0 0 2 -2v-2a2 2 0 0 0 -2 -2h-1"
73
- })
74
- ]
12
+ return /*#__PURE__*/ jsx(IconFileTypePdf, {
13
+ size: 36,
14
+ stroke: 1.5,
15
+ color: "var(--mantine-color-text)"
75
16
  });
76
17
  case 'word' === mimeType:
77
- return /*#__PURE__*/ jsxs("svg", {
78
- xmlns: "http://www.w3.org/2000/svg",
79
- width: "36",
80
- height: "36",
81
- viewBox: "0 0 36 36",
82
- fill: "none",
83
- stroke: "var(--mantine-color-text)",
84
- "stroke-width": "1.5",
85
- "stroke-linecap": "round",
86
- "stroke-linejoin": "round",
87
- role: "img",
88
- "aria-label": "FileDoc",
89
- children: [
90
- /*#__PURE__*/ jsx("path", {
91
- stroke: "none",
92
- d: "M0 0h24v24H0z",
93
- fill: "none"
94
- }),
95
- /*#__PURE__*/ jsx("path", {
96
- d: "M14 3v4a1 1 0 0 0 1 1h4"
97
- }),
98
- /*#__PURE__*/ jsx("path", {
99
- d: "M5 12v-7a2 2 0 0 1 2 -2h7l5 5v4"
100
- }),
101
- /*#__PURE__*/ jsx("path", {
102
- d: "M5 15v6h1a2 2 0 0 0 2 -2v-2a2 2 0 0 0 -2 -2h-1"
103
- }),
104
- /*#__PURE__*/ jsx("path", {
105
- d: "M20 16.5a1.5 1.5 0 0 0 -3 0v3a1.5 1.5 0 0 0 3 0"
106
- }),
107
- /*#__PURE__*/ jsx("path", {
108
- d: "M12.5 15a1.5 1.5 0 0 1 1.5 1.5v3a1.5 1.5 0 0 1 -3 0v-3a1.5 1.5 0 0 1 1.5 -1.5"
109
- })
110
- ]
18
+ return /*#__PURE__*/ jsx(IconFileTypeDoc, {
19
+ size: 36,
20
+ stroke: 1.5,
21
+ color: "var(--mantine-color-text)"
111
22
  });
112
23
  case 'excel' === mimeType:
113
- return /*#__PURE__*/ jsxs("svg", {
114
- xmlns: "http://www.w3.org/2000/svg",
115
- width: "36",
116
- height: "36",
117
- viewBox: "0 0 36 36",
118
- fill: "none",
119
- stroke: "var(--mantine-color-text)",
120
- "stroke-width": "1.5",
121
- "stroke-linecap": "round",
122
- "stroke-linejoin": "round",
123
- role: "img",
124
- "aria-label": "FileXls",
125
- children: [
126
- /*#__PURE__*/ jsx("path", {
127
- stroke: "none",
128
- d: "M0 0h24v24H0z",
129
- fill: "none"
130
- }),
131
- /*#__PURE__*/ jsx("path", {
132
- d: "M14 3v4a1 1 0 0 0 1 1h4"
133
- }),
134
- /*#__PURE__*/ jsx("path", {
135
- d: "M5 12v-7a2 2 0 0 1 2 -2h7l5 5v4"
136
- }),
137
- /*#__PURE__*/ jsx("path", {
138
- d: "M4 15l4 6"
139
- }),
140
- /*#__PURE__*/ jsx("path", {
141
- d: "M4 21l4 -6"
142
- }),
143
- /*#__PURE__*/ jsx("path", {
144
- d: "M17 20.25c0 .414 .336 .75 .75 .75h1.25a1 1 0 0 0 1 -1v-1a1 1 0 0 0 -1 -1h-1a1 1 0 0 1 -1 -1v-1a1 1 0 0 1 1 -1h1.25a.75 .75 0 0 1 .75 .75"
145
- }),
146
- /*#__PURE__*/ jsx("path", {
147
- d: "M11 15v6h3"
148
- })
149
- ]
24
+ return /*#__PURE__*/ jsx(IconFileTypeXls, {
25
+ size: 36,
26
+ stroke: 1.5,
27
+ color: "var(--mantine-color-text)"
150
28
  });
151
29
  case 'powerpoint' === mimeType:
152
- return /*#__PURE__*/ jsxs("svg", {
153
- xmlns: "http://www.w3.org/2000/svg",
154
- width: "36",
155
- height: "36",
156
- viewBox: "0 0 36 36",
157
- fill: "none",
158
- stroke: "var(--mantine-color-text)",
159
- "stroke-width": "1.5",
160
- "stroke-linecap": "round",
161
- "stroke-linejoin": "round",
162
- role: "img",
163
- "aria-label": "FilePpt",
164
- children: [
165
- /*#__PURE__*/ jsx("path", {
166
- stroke: "none",
167
- d: "M0 0h24v24H0z",
168
- fill: "none"
169
- }),
170
- /*#__PURE__*/ jsx("path", {
171
- d: "M14 3v4a1 1 0 0 0 1 1h4"
172
- }),
173
- /*#__PURE__*/ jsx("path", {
174
- d: "M14 3v4a1 1 0 0 0 1 1h4"
175
- }),
176
- /*#__PURE__*/ jsx("path", {
177
- d: "M5 18h1.5a1.5 1.5 0 0 0 0 -3h-1.5v6"
178
- }),
179
- /*#__PURE__*/ jsx("path", {
180
- d: "M11 18h1.5a1.5 1.5 0 0 0 0 -3h-1.5v6"
181
- }),
182
- /*#__PURE__*/ jsx("path", {
183
- d: "M16.5 15h3"
184
- }),
185
- /*#__PURE__*/ jsx("path", {
186
- d: "M18 15v6"
187
- }),
188
- /*#__PURE__*/ jsx("path", {
189
- d: "M5 12v-7a2 2 0 0 1 2 -2h7l5 5v4"
190
- })
191
- ]
30
+ return /*#__PURE__*/ jsx(IconFileTypePpt, {
31
+ size: 36,
32
+ stroke: 1.5,
33
+ color: "var(--mantine-color-text)"
192
34
  });
193
35
  default:
194
- return /*#__PURE__*/ jsxs("svg", {
195
- xmlns: "http://www.w3.org/2000/svg",
196
- width: "36",
197
- height: "36",
198
- viewBox: "0 0 36 36",
199
- fill: "none",
200
- stroke: "var(--mantine-color-text)",
201
- "stroke-width": "1.5",
202
- "stroke-linecap": "round",
203
- "stroke-linejoin": "round",
204
- role: "img",
205
- "aria-label": "File",
206
- children: [
207
- /*#__PURE__*/ jsx("path", {
208
- stroke: "none",
209
- d: "M0 0h24v24H0z",
210
- fill: "none"
211
- }),
212
- /*#__PURE__*/ jsx("path", {
213
- d: "M15 3v4a1 1 0 0 0 1 1h4"
214
- }),
215
- /*#__PURE__*/ jsx("path", {
216
- d: "M18 17h-7a2 2 0 0 1 -2 -2v-10a2 2 0 0 1 2 -2h4l5 5v7a2 2 0 0 1 -2 2"
217
- }),
218
- /*#__PURE__*/ jsx("path", {
219
- d: "M16 17v2a2 2 0 0 1 -2 2h-7a2 2 0 0 1 -2 -2v-10a2 2 0 0 1 2 -2h2"
220
- })
221
- ]
36
+ return /*#__PURE__*/ jsx(IconFile, {
37
+ size: 36,
38
+ stroke: 1.5,
39
+ color: "var(--mantine-color-text)"
222
40
  });
223
41
  }
224
42
  };
@@ -1,5 +1,5 @@
1
- export type { ConversationProps } from './types';
2
- export { useChatMessage } from './useChatMessage';
1
+ export * from './types';
2
+ export * from './useChatMessage';
3
3
  export declare const Conversation: {
4
4
  Root: ({ children, loading, streaming, empty, ...props }: import("./types").ConversationProps) => import("react/jsx-runtime").JSX.Element;
5
5
  Message: <T extends import("ai").UIMessage>({ message }: {
@@ -3,7 +3,8 @@ import { File } from "./File.js";
3
3
  import { Loader } from "./Loader.js";
4
4
  import { Message } from "./Message.js";
5
5
  import { Root } from "./Root.js";
6
- import { useChatMessage } from "./useChatMessage.js";
6
+ export * from "./types.js";
7
+ export * from "./useChatMessage.js";
7
8
  const Conversation = {
8
9
  Root: Root,
9
10
  Message: Message,
@@ -11,4 +12,4 @@ const Conversation = {
11
12
  Loader: Loader,
12
13
  Empty: Empty
13
14
  };
14
- export { Conversation, useChatMessage };
15
+ export { Conversation };
@@ -0,0 +1,2 @@
1
+ export * from './conversation';
2
+ export * from './promptInput';
@@ -0,0 +1,2 @@
1
+ export * from "./conversation/index.js";
2
+ export * from "./promptInput/index.js";
@@ -1,5 +1,6 @@
1
1
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
2
2
  import { ActionIcon, FileButton, Tooltip } from "@mantine/core";
3
+ import { IconPaperclip, IconTrash } from "@tabler/icons-react";
3
4
  import { useRef } from "react";
4
5
  import { FileIcon } from "./FileIcon.js";
5
6
  import { usePromptInput } from "./PromptInputContext.js";
@@ -25,28 +26,9 @@ const File = (props)=>{
25
26
  root: 'rolder-prompt-input-file-action-action'
26
27
  },
27
28
  ...props,
28
- children: /*#__PURE__*/ jsxs("svg", {
29
- xmlns: "http://www.w3.org/2000/svg",
30
- width: "24",
31
- height: "24",
32
- viewBox: "0 0 24 24",
33
- fill: "none",
34
- stroke: "currentColor",
35
- "stroke-width": "1.5",
36
- "stroke-linecap": "round",
37
- "stroke-linejoin": "round",
38
- role: "img",
39
- "aria-label": "Paperclip",
40
- children: [
41
- /*#__PURE__*/ jsx("path", {
42
- stroke: "none",
43
- d: "M0 0h24v24H0z",
44
- fill: "none"
45
- }),
46
- /*#__PURE__*/ jsx("path", {
47
- d: "M15 7l-6.5 6.5a1.5 1.5 0 0 0 3 3l6.5 -6.5a3 3 0 0 0 -6 -6l-6.5 6.5a4.5 4.5 0 0 0 9 9l6.5 -6.5"
48
- })
49
- ]
29
+ children: /*#__PURE__*/ jsx(IconPaperclip, {
30
+ size: 24,
31
+ stroke: 1.5
50
32
  })
51
33
  }),
52
34
  file && /*#__PURE__*/ jsxs(Fragment, {
@@ -72,40 +54,9 @@ const File = (props)=>{
72
54
  resetRef.current?.();
73
55
  setFile(void 0);
74
56
  },
75
- children: /*#__PURE__*/ jsxs("svg", {
76
- xmlns: "http://www.w3.org/2000/svg",
77
- width: "24",
78
- height: "24",
79
- viewBox: "0 0 24 24",
80
- fill: "none",
81
- stroke: "currentColor",
82
- "stroke-width": "1.5",
83
- "stroke-linecap": "round",
84
- "stroke-linejoin": "round",
85
- role: "img",
86
- "aria-label": "Trash",
87
- children: [
88
- /*#__PURE__*/ jsx("path", {
89
- stroke: "none",
90
- d: "M0 0h24v24H0z",
91
- fill: "none"
92
- }),
93
- /*#__PURE__*/ jsx("path", {
94
- d: "M4 7l16 0"
95
- }),
96
- /*#__PURE__*/ jsx("path", {
97
- d: "M10 11l0 6"
98
- }),
99
- /*#__PURE__*/ jsx("path", {
100
- d: "M14 11l0 6"
101
- }),
102
- /*#__PURE__*/ jsx("path", {
103
- d: "M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12"
104
- }),
105
- /*#__PURE__*/ jsx("path", {
106
- d: "M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3"
107
- })
108
- ]
57
+ children: /*#__PURE__*/ jsx(IconTrash, {
58
+ size: 24,
59
+ stroke: 1.5
109
60
  })
110
61
  })
111
62
  ]
@@ -1,224 +1,42 @@
1
- import { jsx, jsxs } from "react/jsx-runtime";
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { IconFile, IconFileTypeDoc, IconFileTypePdf, IconFileTypePpt, IconFileTypeXls, IconPhoto } from "@tabler/icons-react";
2
3
  const FileIcon = ({ mimeType })=>{
3
4
  switch(true){
4
5
  case mimeType.includes('image/'):
5
- return /*#__PURE__*/ jsxs("svg", {
6
- xmlns: "http://www.w3.org/2000/svg",
7
- width: "24",
8
- height: "24",
9
- viewBox: "0 0 24 24",
10
- fill: "none",
11
- stroke: "var(--mantine-color-dimmed)",
12
- "stroke-width": "1.5",
13
- "stroke-linecap": "round",
14
- "stroke-linejoin": "round",
15
- role: "img",
16
- "aria-label": "Image",
17
- children: [
18
- /*#__PURE__*/ jsx("path", {
19
- stroke: "none",
20
- d: "M0 0h24v24H0z",
21
- fill: "none"
22
- }),
23
- /*#__PURE__*/ jsx("path", {
24
- d: "M15 8h.01"
25
- }),
26
- /*#__PURE__*/ jsx("path", {
27
- d: "M3 6a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v12a3 3 0 0 1 -3 3h-12a3 3 0 0 1 -3 -3v-12"
28
- }),
29
- /*#__PURE__*/ jsx("path", {
30
- d: "M3 16l5 -5c.928 -.893 2.072 -.893 3 0l5 5"
31
- }),
32
- /*#__PURE__*/ jsx("path", {
33
- d: "M14 14l1 -1c.928 -.893 2.072 -.893 3 0l3 3"
34
- })
35
- ]
6
+ return /*#__PURE__*/ jsx(IconPhoto, {
7
+ size: 24,
8
+ stroke: 1.5,
9
+ color: "var(--mantine-color-dimmed)"
36
10
  });
37
11
  case mimeType.includes('application/pdf'):
38
- return /*#__PURE__*/ jsxs("svg", {
39
- xmlns: "http://www.w3.org/2000/svg",
40
- width: "24",
41
- height: "24",
42
- viewBox: "0 0 24 24",
43
- fill: "none",
44
- stroke: "var(--mantine-color-dimmed)",
45
- "stroke-width": "1.5",
46
- "stroke-linecap": "round",
47
- "stroke-linejoin": "round",
48
- role: "img",
49
- "aria-label": "FilePdf",
50
- children: [
51
- /*#__PURE__*/ jsx("path", {
52
- stroke: "none",
53
- d: "M0 0h24v24H0z",
54
- fill: "none"
55
- }),
56
- /*#__PURE__*/ jsx("path", {
57
- d: "M14 3v4a1 1 0 0 0 1 1h4"
58
- }),
59
- /*#__PURE__*/ jsx("path", {
60
- d: "M5 12v-7a2 2 0 0 1 2 -2h7l5 5v4"
61
- }),
62
- /*#__PURE__*/ jsx("path", {
63
- d: "M5 18h1.5a1.5 1.5 0 0 0 0 -3h-1.5v6"
64
- }),
65
- /*#__PURE__*/ jsx("path", {
66
- d: "M17 18h2"
67
- }),
68
- /*#__PURE__*/ jsx("path", {
69
- d: "M20 15h-3v6"
70
- }),
71
- /*#__PURE__*/ jsx("path", {
72
- d: "M11 15v6h1a2 2 0 0 0 2 -2v-2a2 2 0 0 0 -2 -2h-1"
73
- })
74
- ]
12
+ return /*#__PURE__*/ jsx(IconFileTypePdf, {
13
+ size: 24,
14
+ stroke: 1.5,
15
+ color: "var(--mantine-color-dimmed)"
75
16
  });
76
17
  case mimeType.includes('application/vnd.openxmlformats-officedocument.wordprocessingml.document'):
77
- return /*#__PURE__*/ jsxs("svg", {
78
- xmlns: "http://www.w3.org/2000/svg",
79
- width: "24",
80
- height: "24",
81
- viewBox: "0 0 24 24",
82
- fill: "none",
83
- stroke: "var(--mantine-color-dimmed)",
84
- "stroke-width": "1.5",
85
- "stroke-linecap": "round",
86
- "stroke-linejoin": "round",
87
- role: "img",
88
- "aria-label": "FileDoc",
89
- children: [
90
- /*#__PURE__*/ jsx("path", {
91
- stroke: "none",
92
- d: "M0 0h24v24H0z",
93
- fill: "none"
94
- }),
95
- /*#__PURE__*/ jsx("path", {
96
- d: "M14 3v4a1 1 0 0 0 1 1h4"
97
- }),
98
- /*#__PURE__*/ jsx("path", {
99
- d: "M5 12v-7a2 2 0 0 1 2 -2h7l5 5v4"
100
- }),
101
- /*#__PURE__*/ jsx("path", {
102
- d: "M5 15v6h1a2 2 0 0 0 2 -2v-2a2 2 0 0 0 -2 -2h-1"
103
- }),
104
- /*#__PURE__*/ jsx("path", {
105
- d: "M20 16.5a1.5 1.5 0 0 0 -3 0v3a1.5 1.5 0 0 0 3 0"
106
- }),
107
- /*#__PURE__*/ jsx("path", {
108
- d: "M12.5 15a1.5 1.5 0 0 1 1.5 1.5v3a1.5 1.5 0 0 1 -3 0v-3a1.5 1.5 0 0 1 1.5 -1.5"
109
- })
110
- ]
18
+ return /*#__PURE__*/ jsx(IconFileTypeDoc, {
19
+ size: 24,
20
+ stroke: 1.5,
21
+ color: "var(--mantine-color-dimmed)"
111
22
  });
112
23
  case mimeType.includes('application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'):
113
- return /*#__PURE__*/ jsxs("svg", {
114
- xmlns: "http://www.w3.org/2000/svg",
115
- width: "24",
116
- height: "24",
117
- viewBox: "0 0 24 24",
118
- fill: "none",
119
- stroke: "var(--mantine-color-dimmed)",
120
- "stroke-width": "1.5",
121
- "stroke-linecap": "round",
122
- "stroke-linejoin": "round",
123
- role: "img",
124
- "aria-label": "FileXls",
125
- children: [
126
- /*#__PURE__*/ jsx("path", {
127
- stroke: "none",
128
- d: "M0 0h24v24H0z",
129
- fill: "none"
130
- }),
131
- /*#__PURE__*/ jsx("path", {
132
- d: "M14 3v4a1 1 0 0 0 1 1h4"
133
- }),
134
- /*#__PURE__*/ jsx("path", {
135
- d: "M5 12v-7a2 2 0 0 1 2 -2h7l5 5v4"
136
- }),
137
- /*#__PURE__*/ jsx("path", {
138
- d: "M4 15l4 6"
139
- }),
140
- /*#__PURE__*/ jsx("path", {
141
- d: "M4 21l4 -6"
142
- }),
143
- /*#__PURE__*/ jsx("path", {
144
- d: "M17 20.25c0 .414 .336 .75 .75 .75h1.25a1 1 0 0 0 1 -1v-1a1 1 0 0 0 -1 -1h-1a1 1 0 0 1 -1 -1v-1a1 1 0 0 1 1 -1h1.25a.75 .75 0 0 1 .75 .75"
145
- }),
146
- /*#__PURE__*/ jsx("path", {
147
- d: "M11 15v6h3"
148
- })
149
- ]
24
+ return /*#__PURE__*/ jsx(IconFileTypeXls, {
25
+ size: 24,
26
+ stroke: 1.5,
27
+ color: "var(--mantine-color-dimmed)"
150
28
  });
151
29
  case mimeType.includes('application/vnd.openxmlformats-officedocument.presentationml.presentation'):
152
- return /*#__PURE__*/ jsxs("svg", {
153
- xmlns: "http://www.w3.org/2000/svg",
154
- width: "24",
155
- height: "24",
156
- viewBox: "0 0 24 24",
157
- fill: "none",
158
- stroke: "var(--mantine-color-dimmed)",
159
- "stroke-width": "1.5",
160
- "stroke-linecap": "round",
161
- "stroke-linejoin": "round",
162
- role: "img",
163
- "aria-label": "FilePpt",
164
- children: [
165
- /*#__PURE__*/ jsx("path", {
166
- stroke: "none",
167
- d: "M0 0h24v24H0z",
168
- fill: "none"
169
- }),
170
- /*#__PURE__*/ jsx("path", {
171
- d: "M14 3v4a1 1 0 0 0 1 1h4"
172
- }),
173
- /*#__PURE__*/ jsx("path", {
174
- d: "M14 3v4a1 1 0 0 0 1 1h4"
175
- }),
176
- /*#__PURE__*/ jsx("path", {
177
- d: "M5 18h1.5a1.5 1.5 0 0 0 0 -3h-1.5v6"
178
- }),
179
- /*#__PURE__*/ jsx("path", {
180
- d: "M11 18h1.5a1.5 1.5 0 0 0 0 -3h-1.5v6"
181
- }),
182
- /*#__PURE__*/ jsx("path", {
183
- d: "M16.5 15h3"
184
- }),
185
- /*#__PURE__*/ jsx("path", {
186
- d: "M18 15v6"
187
- }),
188
- /*#__PURE__*/ jsx("path", {
189
- d: "M5 12v-7a2 2 0 0 1 2 -2h7l5 5v4"
190
- })
191
- ]
30
+ return /*#__PURE__*/ jsx(IconFileTypePpt, {
31
+ size: 24,
32
+ stroke: 1.5,
33
+ color: "var(--mantine-color-dimmed)"
192
34
  });
193
35
  default:
194
- return /*#__PURE__*/ jsxs("svg", {
195
- xmlns: "http://www.w3.org/2000/svg",
196
- width: "24",
197
- height: "24",
198
- viewBox: "0 0 24 24",
199
- fill: "none",
200
- stroke: "var(--mantine-color-dimmed)",
201
- "stroke-width": "1.5",
202
- "stroke-linecap": "round",
203
- "stroke-linejoin": "round",
204
- role: "img",
205
- "aria-label": "File",
206
- children: [
207
- /*#__PURE__*/ jsx("path", {
208
- stroke: "none",
209
- d: "M0 0h24v24H0z",
210
- fill: "none"
211
- }),
212
- /*#__PURE__*/ jsx("path", {
213
- d: "M15 3v4a1 1 0 0 0 1 1h4"
214
- }),
215
- /*#__PURE__*/ jsx("path", {
216
- d: "M18 17h-7a2 2 0 0 1 -2 -2v-10a2 2 0 0 1 2 -2h4l5 5v7a2 2 0 0 1 -2 2"
217
- }),
218
- /*#__PURE__*/ jsx("path", {
219
- d: "M16 17v2a2 2 0 0 1 -2 2h-7a2 2 0 0 1 -2 -2v-10a2 2 0 0 1 2 -2h2"
220
- })
221
- ]
36
+ return /*#__PURE__*/ jsx(IconFile, {
37
+ size: 24,
38
+ stroke: 1.5,
39
+ color: "var(--mantine-color-dimmed)"
222
40
  });
223
41
  }
224
42
  };
@@ -1,29 +1,10 @@
1
- import { jsx, jsxs } from "react/jsx-runtime";
1
+ import { jsx } from "react/jsx-runtime";
2
2
  import { ActionIcon } from "@mantine/core";
3
+ import { IconArrowBigUp } from "@tabler/icons-react";
3
4
  import { usePromptInput } from "./PromptInputContext.js";
4
5
  const Submit = ({ children, ...props })=>{
5
- const Icon = /*#__PURE__*/ jsxs("svg", {
6
- xmlns: "http://www.w3.org/2000/svg",
7
- width: "24",
8
- height: "24",
9
- viewBox: "0 0 24 24",
10
- fill: "none",
11
- stroke: "currentColor",
12
- "stroke-width": "1.5",
13
- "stroke-linecap": "round",
14
- "stroke-linejoin": "round",
15
- role: "img",
16
- "aria-label": "Submit",
17
- children: [
18
- /*#__PURE__*/ jsx("path", {
19
- stroke: "none",
20
- d: "M0 0h24v24H0z",
21
- fill: "none"
22
- }),
23
- /*#__PURE__*/ jsx("path", {
24
- d: "M9 20v-8h-3.586a1 1 0 0 1 -.707 -1.707l6.586 -6.586a1 1 0 0 1 1.414 0l6.586 6.586a1 1 0 0 1 -.707 1.707h-3.586v8a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1"
25
- })
26
- ]
6
+ const Icon = /*#__PURE__*/ jsx(IconArrowBigUp, {
7
+ strokeWidth: 1.5
27
8
  });
28
9
  const { onSubmit, submiting, uploading } = usePromptInput();
29
10
  return /*#__PURE__*/ jsx(ActionIcon, {