@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.
- package/dist/ai/index.d.ts +1 -0
- package/dist/ai/index.js +1 -0
- package/dist/ai/ui/conversation/FileIcon.js +26 -208
- package/dist/ai/ui/conversation/index.d.ts +2 -2
- package/dist/ai/ui/conversation/index.js +3 -2
- package/dist/ai/ui/index.d.ts +2 -0
- package/dist/ai/ui/index.js +2 -0
- package/dist/ai/ui/promptInput/File.js +7 -56
- package/dist/ai/ui/promptInput/FileIcon.js +26 -208
- package/dist/ai/ui/promptInput/Submit.js +4 -23
- package/dist/ai/ui/promptInput/index.d.ts +1 -1
- package/dist/ai/ui/promptInput/index.js +1 -0
- package/dist/app/index.d.ts +1 -0
- package/dist/app/index.js +1 -0
- package/dist/functions/index.d.ts +3 -1
- package/dist/functions/index.js +4 -1
- package/dist/index.d.ts +1 -3
- package/dist/index.js +1 -4
- package/dist/ui/AnimatedChevron.d.ts +2 -2
- package/dist/ui/AnimatedChevron.js +7 -25
- package/dist/ui/editor/Toolbar.js +4 -22
- package/dist/ui/error/index.d.ts +4 -4
- package/dist/ui/error/index.js +5 -4
- package/dist/ui/form/buttons/CancelButton.js +4 -26
- package/dist/ui/form/buttons/SubmitButton.js +4 -29
- package/dist/ui/form/fields/TextPassowrdField.js +4 -26
- package/dist/ui/form/index.d.ts +2 -2
- package/dist/ui/form/index.js +3 -3
- package/dist/ui/hoverPaper/index.d.ts +2 -2
- package/dist/ui/hoverPaper/index.js +3 -2
- package/dist/ui/scrollArea/ScrollArea.d.ts +1 -1
- package/dist/ui/scrollArea/ScrollAreaButton.d.ts +1 -1
- package/dist/ui/scrollArea/ScrollAreaButton.js +7 -28
- package/package.json +39 -33
- package/dist/functions/cookies/index.d.ts +0 -3
- package/dist/functions/cookies/index.js +0 -3
- package/dist/surreal/connection.d.ts +0 -9
- package/dist/surreal/connection.js +0 -49
- package/dist/surreal/deafaultCrud.d.ts +0 -2
- package/dist/surreal/deafaultCrud.js +0 -18
- package/dist/surreal/deserialize.d.ts +0 -17
- package/dist/surreal/deserialize.js +0 -46
- package/dist/surreal/encryption.d.ts +0 -6
- package/dist/surreal/encryption.js +0 -30
- package/dist/surreal/index.d.ts +0 -4
- package/dist/surreal/index.js +0 -5
- package/dist/ui/editor/styles.module.js +0 -7
- package/dist/ui/editor/styles_module.css +0 -16
- /package/dist/functions/{cookies/getCookie.d.ts → getCookie.d.ts} +0 -0
- /package/dist/functions/{cookies/getCookie.js → getCookie.js} +0 -0
- /package/dist/functions/{cookies/setCookie.d.ts → setCookie.d.ts} +0 -0
- /package/dist/functions/{cookies/setCookie.js → setCookie.js} +0 -0
- /package/dist/functions/{cookies/setCookies.d.ts → setCookies.d.ts} +0 -0
- /package/dist/functions/{cookies/setCookies.js → setCookies.js} +0 -0
package/dist/ai/index.d.ts
CHANGED
package/dist/ai/index.js
CHANGED
|
@@ -1,224 +1,42 @@
|
|
|
1
|
-
import { jsx
|
|
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__*/
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
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__*/
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
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__*/
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
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__*/
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
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__*/
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
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__*/
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
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
|
|
2
|
-
export
|
|
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
|
-
|
|
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
|
|
15
|
+
export { Conversation };
|
|
@@ -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__*/
|
|
29
|
-
|
|
30
|
-
|
|
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__*/
|
|
76
|
-
|
|
77
|
-
|
|
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
|
|
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__*/
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
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__*/
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
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__*/
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
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__*/
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
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__*/
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
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__*/
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
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
|
|
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__*/
|
|
6
|
-
|
|
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, {
|