@rolder/kit 3.0.0-alpha.4 → 3.0.0-alpha.41
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 +2 -0
- package/dist/ai/index.js +2 -0
- package/dist/ai/ui/{conversation → chat}/Empty.js +5 -4
- package/dist/ai/ui/chat/File.d.ts +3 -0
- package/dist/ai/ui/{conversation → chat}/File.js +10 -8
- package/dist/ai/ui/chat/FileIcon.js +43 -0
- package/dist/ai/ui/{conversation → chat}/Loader.js +4 -3
- package/dist/ai/ui/chat/Message.d.ts +3 -0
- package/dist/ai/ui/chat/Message.js +28 -0
- package/dist/ai/ui/chat/Messages.d.ts +2 -0
- package/dist/ai/ui/chat/Messages.js +9 -0
- package/dist/ai/ui/chat/Root.d.ts +8 -0
- package/dist/ai/ui/chat/Root.js +22 -0
- package/dist/ai/ui/chat/chatInput/File.js +72 -0
- package/dist/ai/ui/chat/chatInput/FileIcon.js +43 -0
- package/dist/ai/ui/{promptInput → chat/chatInput}/Footer.js +4 -1
- package/dist/ai/ui/chat/chatInput/Root.d.ts +9 -0
- package/dist/ai/ui/chat/chatInput/Root.js +25 -0
- package/dist/ai/ui/chat/chatInput/Submit.js +24 -0
- package/dist/ai/ui/{promptInput → chat/chatInput}/Textarea.js +9 -7
- package/dist/ai/ui/{promptInput → chat/chatInput}/index.d.ts +2 -3
- package/dist/ai/ui/{promptInput → chat/chatInput}/index.js +2 -2
- package/dist/ai/ui/chat/chatInput/store/file.d.ts +8 -0
- package/dist/ai/ui/chat/chatInput/store/file.js +32 -0
- package/dist/ai/ui/chat/chatInput/store/fileErrorNotificaton.d.ts +2 -0
- package/dist/ai/ui/chat/chatInput/store/fileErrorNotificaton.js +21 -0
- package/dist/ai/ui/chat/chatInput/store/index.d.ts +2 -0
- package/dist/ai/ui/chat/chatInput/store/index.js +2 -0
- package/dist/ai/ui/chat/chatInput/store/input.d.ts +13 -0
- package/dist/ai/ui/chat/chatInput/store/input.js +85 -0
- package/dist/ai/ui/chat/chatInput/store/parseFile.d.ts +2 -0
- package/dist/ai/ui/chat/chatInput/store/parseFile.js +23 -0
- package/dist/ai/ui/chat/index.d.ts +14 -0
- package/dist/ai/ui/{conversation → chat}/index.js +6 -3
- package/dist/ai/ui/chat/store/index.d.ts +2 -0
- package/dist/ai/ui/chat/store/index.js +2 -0
- package/dist/ai/ui/chat/store/messages.d.ts +18 -0
- package/dist/ai/ui/chat/store/messages.js +89 -0
- package/dist/ai/ui/chat/store/states.d.ts +11 -0
- package/dist/ai/ui/chat/store/states.js +17 -0
- package/dist/ai/ui/index.d.ts +1 -0
- package/dist/ai/ui/index.js +1 -0
- package/dist/ai/utils/index.d.ts +2 -0
- package/dist/ai/utils/index.js +2 -0
- package/dist/app/AppDefaults.js +1 -1
- package/dist/app/DefaultApp.js +1 -1
- package/dist/app/cookieColorSchemeManager.js +1 -1
- package/dist/app/defaultTheme.d.ts +1 -1
- package/dist/app/index.d.ts +4 -0
- package/dist/app/index.js +4 -0
- package/dist/hooks/index.d.ts +2 -0
- package/dist/hooks/index.js +2 -0
- package/dist/index.d.ts +4 -16
- package/dist/index.js +4 -17
- package/dist/styles.css +3 -3
- package/dist/tanstackFunctions/cookie/index.d.ts +3 -0
- package/dist/tanstackFunctions/cookie/index.js +4 -0
- package/dist/tanstackFunctions/index.d.ts +2 -0
- package/dist/tanstackFunctions/index.js +2 -0
- package/dist/tanstackFunctions/s3/getS3Client.d.ts +2 -0
- package/dist/tanstackFunctions/s3/getS3Client.js +18 -0
- package/dist/tanstackFunctions/s3/getSignedFileUrlFn.d.ts +4 -0
- package/dist/tanstackFunctions/s3/getSignedFileUrlFn.js +21 -0
- package/dist/tanstackFunctions/s3/index.d.ts +2 -0
- package/dist/tanstackFunctions/s3/index.js +2 -0
- package/dist/tanstackFunctions/s3/uploadRequest.d.ts +3 -0
- package/dist/tanstackFunctions/s3/uploadRequest.js +21 -0
- package/dist/ui/AnimatedChevron.d.ts +2 -2
- package/dist/ui/AnimatedChevron.js +7 -25
- package/dist/ui/JsonInput.js +1 -1
- 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 +40 -28
- package/dist/ai/ui/conversation/ConversationContext.d.ts +0 -7
- package/dist/ai/ui/conversation/ConversationContext.js +0 -8
- package/dist/ai/ui/conversation/ConversationProvider.d.ts +0 -2
- package/dist/ai/ui/conversation/ConversationProvider.js +0 -14
- package/dist/ai/ui/conversation/File.d.ts +0 -4
- package/dist/ai/ui/conversation/FileIcon.js +0 -225
- package/dist/ai/ui/conversation/Message.d.ts +0 -4
- package/dist/ai/ui/conversation/Message.js +0 -25
- package/dist/ai/ui/conversation/Root.d.ts +0 -2
- package/dist/ai/ui/conversation/Root.js +0 -26
- package/dist/ai/ui/conversation/index.d.ts +0 -13
- package/dist/ai/ui/conversation/types.d.ts +0 -7
- package/dist/ai/ui/conversation/types.js +0 -0
- package/dist/ai/ui/conversation/useChatMessage.d.ts +0 -2
- package/dist/ai/ui/conversation/useChatMessage.js +0 -12
- package/dist/ai/ui/promptInput/File.js +0 -117
- package/dist/ai/ui/promptInput/FileIcon.js +0 -225
- package/dist/ai/ui/promptInput/PromptInputContext.d.ts +0 -12
- package/dist/ai/ui/promptInput/PromptInputContext.js +0 -8
- package/dist/ai/ui/promptInput/PromptInputProvider.d.ts +0 -2
- package/dist/ai/ui/promptInput/PromptInputProvider.js +0 -50
- package/dist/ai/ui/promptInput/Root.d.ts +0 -3
- package/dist/ai/ui/promptInput/Root.js +0 -17
- package/dist/ai/ui/promptInput/Submit.js +0 -40
- package/dist/ai/ui/promptInput/types.d.ts +0 -11
- package/dist/ai/ui/promptInput/types.js +0 -0
- 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/ui/editor/styles.module.js +0 -7
- package/dist/ui/editor/styles_module.css +0 -16
- /package/dist/ai/ui/{conversation → chat}/Empty.d.ts +0 -0
- /package/dist/ai/ui/{conversation → chat}/FileIcon.d.ts +0 -0
- /package/dist/ai/ui/{conversation → chat}/Loader.d.ts +0 -0
- /package/dist/ai/ui/{promptInput → chat/chatInput}/File.d.ts +0 -0
- /package/dist/ai/ui/{promptInput → chat/chatInput}/FileIcon.d.ts +0 -0
- /package/dist/ai/ui/{promptInput → chat/chatInput}/Footer.d.ts +0 -0
- /package/dist/ai/ui/{promptInput → chat/chatInput}/Submit.d.ts +0 -0
- /package/dist/ai/ui/{promptInput → chat/chatInput}/Textarea.d.ts +0 -0
- /package/dist/{functions → tanstackFunctions/cookie}/getCookie.d.ts +0 -0
- /package/dist/{functions → tanstackFunctions/cookie}/getCookie.js +0 -0
- /package/dist/{functions → tanstackFunctions/cookie}/setCookie.d.ts +0 -0
- /package/dist/{functions → tanstackFunctions/cookie}/setCookie.js +0 -0
- /package/dist/{functions → tanstackFunctions/cookie}/setCookies.d.ts +0 -0
- /package/dist/{functions → tanstackFunctions/cookie}/setCookies.js +0 -0
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { jsx
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { Button } from "@mantine/core";
|
|
3
|
+
import { IconDeviceFloppy } from "@tabler/icons-react";
|
|
3
4
|
import { useFormContext } from "../context.js";
|
|
4
5
|
const SubmitButton = (props)=>{
|
|
5
6
|
const form = useFormContext();
|
|
@@ -8,34 +9,8 @@ const SubmitButton = (props)=>{
|
|
|
8
9
|
children: (state)=>/*#__PURE__*/ jsx(Button, {
|
|
9
10
|
type: "submit",
|
|
10
11
|
size: "xs",
|
|
11
|
-
leftSection: /*#__PURE__*/
|
|
12
|
-
|
|
13
|
-
width: "20",
|
|
14
|
-
height: "20",
|
|
15
|
-
viewBox: "0 0 20 20",
|
|
16
|
-
fill: "none",
|
|
17
|
-
stroke: "currentColor",
|
|
18
|
-
strokeWidth: "2",
|
|
19
|
-
strokeLinecap: "round",
|
|
20
|
-
strokeLinejoin: "round",
|
|
21
|
-
role: "img",
|
|
22
|
-
"aria-label": "Submit",
|
|
23
|
-
children: [
|
|
24
|
-
/*#__PURE__*/ jsx("path", {
|
|
25
|
-
stroke: "none",
|
|
26
|
-
d: "M0 0h24v24H0z",
|
|
27
|
-
fill: "none"
|
|
28
|
-
}),
|
|
29
|
-
/*#__PURE__*/ jsx("path", {
|
|
30
|
-
d: "M6 4h10l4 4v10a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2v-12a2 2 0 0 1 2 -2"
|
|
31
|
-
}),
|
|
32
|
-
/*#__PURE__*/ jsx("path", {
|
|
33
|
-
d: "M10 14a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"
|
|
34
|
-
}),
|
|
35
|
-
/*#__PURE__*/ jsx("path", {
|
|
36
|
-
d: "M14 4l0 4l-6 0l0 -4"
|
|
37
|
-
})
|
|
38
|
-
]
|
|
12
|
+
leftSection: /*#__PURE__*/ jsx(IconDeviceFloppy, {
|
|
13
|
+
size: 20
|
|
39
14
|
}),
|
|
40
15
|
loading: state.isSubmitting,
|
|
41
16
|
disabled: !state.isDirty,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { jsx
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { ActionIcon, TextInput } from "@mantine/core";
|
|
3
|
+
import { IconRefresh } from "@tabler/icons-react";
|
|
3
4
|
import omgopass from "omgopass";
|
|
4
5
|
import { useFieldContext } from "../context.js";
|
|
5
6
|
const TextPassowrdField = (props)=>{
|
|
@@ -13,31 +14,8 @@ const TextPassowrdField = (props)=>{
|
|
|
13
14
|
minSyllableLength: 2,
|
|
14
15
|
maxSyllableLength: 2
|
|
15
16
|
})),
|
|
16
|
-
children: /*#__PURE__*/
|
|
17
|
-
|
|
18
|
-
width: "16",
|
|
19
|
-
height: "16",
|
|
20
|
-
viewBox: "0 0 16 16",
|
|
21
|
-
fill: "none",
|
|
22
|
-
stroke: "currentColor",
|
|
23
|
-
"stroke-width": "2",
|
|
24
|
-
"stroke-linecap": "round",
|
|
25
|
-
"stroke-linejoin": "round",
|
|
26
|
-
role: "img",
|
|
27
|
-
"aria-label": "Refresh",
|
|
28
|
-
children: [
|
|
29
|
-
/*#__PURE__*/ jsx("path", {
|
|
30
|
-
stroke: "none",
|
|
31
|
-
d: "M0 0h24v24H0z",
|
|
32
|
-
fill: "none"
|
|
33
|
-
}),
|
|
34
|
-
/*#__PURE__*/ jsx("path", {
|
|
35
|
-
d: "M20 11a8.1 8.1 0 0 0 -15.5 -2m-.5 -4v4h4"
|
|
36
|
-
}),
|
|
37
|
-
/*#__PURE__*/ jsx("path", {
|
|
38
|
-
d: "M4 13a8.1 8.1 0 0 0 15.5 2m.5 4v-4h-4"
|
|
39
|
-
})
|
|
40
|
-
]
|
|
17
|
+
children: /*#__PURE__*/ jsx(IconRefresh, {
|
|
18
|
+
size: 16
|
|
41
19
|
})
|
|
42
20
|
}),
|
|
43
21
|
name: field.name,
|
package/dist/ui/form/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { blurOnError } from './blurOnError';
|
|
2
2
|
export { useAppForm, useFieldContext, withForm } from './context';
|
|
3
|
-
export
|
|
3
|
+
export { fieldsSchema } from './fieldsSchema';
|
package/dist/ui/form/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
+
import { blurOnError } from "./blurOnError.js";
|
|
1
2
|
import { useAppForm, useFieldContext, withForm } from "./context.js";
|
|
2
|
-
|
|
3
|
-
export
|
|
4
|
-
export { useAppForm, useFieldContext, withForm };
|
|
3
|
+
import { fieldsSchema } from "./fieldsSchema.js";
|
|
4
|
+
export { blurOnError, fieldsSchema, useAppForm, useFieldContext, withForm };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
1
|
+
export { HoverPaper } from './HoverPaper';
|
|
2
|
+
export { usePaperHover } from './usePaperHover';
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { HoverPaper } from "./HoverPaper.js";
|
|
2
|
+
import { usePaperHover } from "./usePaperHover.js";
|
|
3
|
+
export { HoverPaper, usePaperHover };
|
|
@@ -55,7 +55,7 @@ export declare const ScrollArea: {
|
|
|
55
55
|
displayName: string;
|
|
56
56
|
} & {
|
|
57
57
|
ScrollButton: {
|
|
58
|
-
({ className }: import("./types").ScrollButtonProps): import("react/jsx-runtime").JSX.Element | null;
|
|
58
|
+
({ className, upIcon, downIcon, }: import("./types").ScrollButtonProps): import("react/jsx-runtime").JSX.Element | null;
|
|
59
59
|
displayName: string;
|
|
60
60
|
};
|
|
61
61
|
Provider: import("react").Provider<ScrollAreaContextValue | null>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ScrollButtonProps } from './types';
|
|
2
2
|
export declare const ScrollAreaButton: {
|
|
3
|
-
({ className }: ScrollButtonProps): import("react/jsx-runtime").JSX.Element | null;
|
|
3
|
+
({ className, upIcon, downIcon, }: ScrollButtonProps): import("react/jsx-runtime").JSX.Element | null;
|
|
4
4
|
displayName: string;
|
|
5
5
|
};
|
|
@@ -1,36 +1,15 @@
|
|
|
1
|
-
import { jsx
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { ActionIcon } from "@mantine/core";
|
|
3
|
+
import { IconChevronDown, IconChevronUp } from "@tabler/icons-react";
|
|
3
4
|
import { useScrollArea } from "./context.js";
|
|
4
|
-
const ScrollAreaButton = ({ className })=>{
|
|
5
|
+
const ScrollAreaButton = ({ className, upIcon, downIcon })=>{
|
|
5
6
|
const { hasScrollableContent, isAboveCenter, scrollToTop, scrollToBottom } = useScrollArea();
|
|
6
7
|
if (!hasScrollableContent) return null;
|
|
7
8
|
const isScrollingDown = isAboveCenter;
|
|
8
|
-
const icon = /*#__PURE__*/
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
viewBox: "0 0 24 24",
|
|
13
|
-
fill: "none",
|
|
14
|
-
stroke: "currentColor",
|
|
15
|
-
strokeWidth: "1.5",
|
|
16
|
-
strokeLinecap: "round",
|
|
17
|
-
strokeLinejoin: "round",
|
|
18
|
-
role: "img",
|
|
19
|
-
"aria-label": "Chevron",
|
|
20
|
-
style: {
|
|
21
|
-
transition: 'transform 0.2s ease-in-out',
|
|
22
|
-
transform: isScrollingDown ? 'rotate(-180deg)' : 'rotate(0deg)'
|
|
23
|
-
},
|
|
24
|
-
children: [
|
|
25
|
-
/*#__PURE__*/ jsx("path", {
|
|
26
|
-
stroke: "none",
|
|
27
|
-
d: "M0 0h24v24H0z",
|
|
28
|
-
fill: "none"
|
|
29
|
-
}),
|
|
30
|
-
/*#__PURE__*/ jsx("path", {
|
|
31
|
-
d: "M6 9l6 6l6 -6"
|
|
32
|
-
})
|
|
33
|
-
]
|
|
9
|
+
const icon = isScrollingDown ? downIcon ?? /*#__PURE__*/ jsx(IconChevronDown, {
|
|
10
|
+
strokeWidth: 1.5
|
|
11
|
+
}) : upIcon ?? /*#__PURE__*/ jsx(IconChevronUp, {
|
|
12
|
+
strokeWidth: 1.5
|
|
34
13
|
});
|
|
35
14
|
const handleClick = ()=>{
|
|
36
15
|
if (isScrollingDown) scrollToBottom();
|
package/package.json
CHANGED
|
@@ -1,67 +1,79 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rolder/kit",
|
|
3
|
-
"version": "3.0.0-alpha.
|
|
3
|
+
"version": "3.0.0-alpha.41",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
7
7
|
"types": "./dist/index.d.ts",
|
|
8
8
|
"import": "./dist/index.js"
|
|
9
|
-
}
|
|
9
|
+
},
|
|
10
|
+
"./styles.css": "./dist/styles.css"
|
|
10
11
|
},
|
|
12
|
+
"sideEffects": false,
|
|
11
13
|
"files": [
|
|
12
14
|
"dist"
|
|
13
15
|
],
|
|
14
16
|
"scripts": {
|
|
15
17
|
"build": "rslib build",
|
|
16
18
|
"dev": "rslib build --watch",
|
|
17
|
-
"
|
|
19
|
+
"prepublishOnly": "bun run build",
|
|
20
|
+
"check": "biome check --write && tsgo --noEmit"
|
|
18
21
|
},
|
|
19
22
|
"devDependencies": {
|
|
20
|
-
"@
|
|
21
|
-
"@rsbuild/plugin-react": "^1.4.2",
|
|
23
|
+
"@rsbuild/plugin-react": "^1.4.3",
|
|
22
24
|
"@rslib/core": "^0.19.2",
|
|
23
|
-
"@types/bun": "^1.3.
|
|
25
|
+
"@types/bun": "^1.3.6",
|
|
24
26
|
"@types/js-cookie": "^3.0.6",
|
|
25
27
|
"@types/omgopass": "^3.2.3",
|
|
26
28
|
"@types/react": "^19.2.8",
|
|
27
|
-
"
|
|
28
|
-
"typescript": "^5.9.3"
|
|
29
|
-
"@tabler/icons": "^3.36.1"
|
|
29
|
+
"@typescript/native-preview": "^7.0.0-dev.20260117.1",
|
|
30
|
+
"typescript": "^5.9.3"
|
|
30
31
|
},
|
|
31
32
|
"peerDependencies": {
|
|
32
|
-
"react": "
|
|
33
|
-
"
|
|
34
|
-
"
|
|
33
|
+
"@ai-sdk/react": "^3.0.41",
|
|
34
|
+
"@better-upload/client": "^3.0.12",
|
|
35
|
+
"@better-upload/server": "^3.0.12",
|
|
36
|
+
"@codemirror/lang-json": "^6.0.2",
|
|
37
|
+
"@codemirror/lint": "^6.9.2",
|
|
38
|
+
"@mantine/core": "^8.3.12",
|
|
39
|
+
"@mantine/hooks": "^8.3.12",
|
|
40
|
+
"@mantine/notifications": "^8.3.12",
|
|
41
|
+
"@mantine/tiptap": "^8.3.12",
|
|
42
|
+
"@nanostores/react": "^1.0.0",
|
|
43
|
+
"@tanstack/react-form": "^1.27.7",
|
|
44
|
+
"@tanstack/react-query": "^5.90.18",
|
|
45
|
+
"@tanstack/react-router": "^1.150.0",
|
|
46
|
+
"@tanstack/react-router-ssr-query": "^1.150.0",
|
|
47
|
+
"@tanstack/react-start": "^1.150.0",
|
|
35
48
|
"@tiptap/extension-highlight": "^3.15.3",
|
|
36
49
|
"@tiptap/extension-placeholder": "^3.15.3",
|
|
37
50
|
"@tiptap/extension-table": "^3.15.3",
|
|
38
51
|
"@tiptap/extension-task-item": "^3.15.3",
|
|
39
52
|
"@tiptap/extension-task-list": "^3.15.3",
|
|
40
53
|
"@tiptap/extension-text-align": "^3.15.3",
|
|
54
|
+
"@tiptap/react": "^3.15.3",
|
|
41
55
|
"@tiptap/starter-kit": "^3.15.3",
|
|
42
|
-
"@codemirror/lang-json": "^6.0.2",
|
|
43
|
-
"@codemirror/lint": "^6.9.2",
|
|
44
56
|
"@uiw/codemirror-theme-vscode": "^4.25.4",
|
|
45
57
|
"@uiw/react-codemirror": "^4.25.4",
|
|
46
|
-
"
|
|
47
|
-
"
|
|
48
|
-
"@mantine/tiptap": "^8.3.11",
|
|
49
|
-
"@mantine/notifications": "^8.3.11",
|
|
50
|
-
"@tanstack/react-router": "1.147.3",
|
|
51
|
-
"@tanstack/react-form": "1.27.7",
|
|
52
|
-
"@tanstack/react-start": "^1.149.1",
|
|
53
|
-
"@tanstack/react-query": "^5.90.16",
|
|
54
|
-
"@tanstack/react-router-ssr-query": "^1.147.3",
|
|
55
|
-
"zod": "^4.3.5",
|
|
58
|
+
"ai": "^6.0.39",
|
|
59
|
+
"clsx": "^2.1.1",
|
|
56
60
|
"js-cookie": "^3.0.5",
|
|
61
|
+
"mammoth": "^1.11.0",
|
|
62
|
+
"nanoid": "^5.1.6",
|
|
57
63
|
"nanostores": "^1.1.0",
|
|
58
|
-
"surrealdb": "^2.0.0-alpha.16",
|
|
59
64
|
"omgopass": "^3.2.1",
|
|
60
|
-
"
|
|
61
|
-
"
|
|
65
|
+
"react": "^19.2.3",
|
|
66
|
+
"react-dom": "^19.2.3",
|
|
67
|
+
"streamdown": "^2.0.1",
|
|
68
|
+
"surrealdb": "^1.3.2",
|
|
69
|
+
"xlsx": "^0.18.5",
|
|
70
|
+
"zod": "^4.3.5"
|
|
62
71
|
},
|
|
63
72
|
"trustedDependencies": [
|
|
64
73
|
"core-js",
|
|
65
74
|
"esbuild"
|
|
66
|
-
]
|
|
75
|
+
],
|
|
76
|
+
"dependencies": {
|
|
77
|
+
"@tabler/icons-react": "^3.36.1"
|
|
78
|
+
}
|
|
67
79
|
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { createContext, useContext } from "react";
|
|
2
|
-
const ConversationContext = createContext(null);
|
|
3
|
-
const useConversation = ()=>{
|
|
4
|
-
const context = useContext(ConversationContext);
|
|
5
|
-
if (!context) throw new Error('useConversation must be used within a ConversationProvider');
|
|
6
|
-
return context;
|
|
7
|
-
};
|
|
8
|
-
export { ConversationContext, useConversation };
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { ConversationContext } from "./ConversationContext.js";
|
|
3
|
-
const Provider = ({ children, loading, streaming, empty })=>{
|
|
4
|
-
const value = {
|
|
5
|
-
loading,
|
|
6
|
-
streaming,
|
|
7
|
-
empty
|
|
8
|
-
};
|
|
9
|
-
return /*#__PURE__*/ jsx(ConversationContext.Provider, {
|
|
10
|
-
value: value,
|
|
11
|
-
children: children
|
|
12
|
-
});
|
|
13
|
-
};
|
|
14
|
-
export { Provider };
|
|
@@ -1,225 +0,0 @@
|
|
|
1
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
const FileIcon = ({ mimeType })=>{
|
|
3
|
-
switch(true){
|
|
4
|
-
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
|
-
]
|
|
36
|
-
});
|
|
37
|
-
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
|
-
]
|
|
75
|
-
});
|
|
76
|
-
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
|
-
]
|
|
111
|
-
});
|
|
112
|
-
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
|
-
]
|
|
150
|
-
});
|
|
151
|
-
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
|
-
]
|
|
192
|
-
});
|
|
193
|
-
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
|
-
]
|
|
222
|
-
});
|
|
223
|
-
}
|
|
224
|
-
};
|
|
225
|
-
export { FileIcon };
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { Paper } from "@mantine/core";
|
|
3
|
-
import { Streamdown } from "streamdown";
|
|
4
|
-
import { useConversation } from "./ConversationContext.js";
|
|
5
|
-
import { useChatMessage } from "./useChatMessage.js";
|
|
6
|
-
const Message = ({ message })=>{
|
|
7
|
-
const textParts = message?.parts?.filter((i)=>'text' === i.type);
|
|
8
|
-
const lastTextPart = textParts?.[textParts.length - 1];
|
|
9
|
-
const chatMessage = useChatMessage(lastTextPart);
|
|
10
|
-
const { streaming } = useConversation();
|
|
11
|
-
return chatMessage && 'system' !== message.role ? /*#__PURE__*/ jsx(Paper, {
|
|
12
|
-
radius: "md",
|
|
13
|
-
px: "md",
|
|
14
|
-
py: "sm",
|
|
15
|
-
maw: "80%",
|
|
16
|
-
ml: 'user' === message.role ? 'auto' : void 0,
|
|
17
|
-
bg: 'user' === message.role ? 'var(--mantine-color-default-hover)' : 'var(--mantine-primary-color-light)',
|
|
18
|
-
fz: "sm",
|
|
19
|
-
children: /*#__PURE__*/ jsx(Streamdown, {
|
|
20
|
-
isAnimating: streaming && 'assistant' === message.role,
|
|
21
|
-
children: chatMessage
|
|
22
|
-
})
|
|
23
|
-
}) : null;
|
|
24
|
-
};
|
|
25
|
-
export { Message };
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Paper, Stack } from "@mantine/core";
|
|
3
|
-
import { ScrollArea } from "../../../ui/index.js";
|
|
4
|
-
import { Provider } from "./ConversationProvider.js";
|
|
5
|
-
const Root = ({ children, loading, streaming, empty, ...props })=>/*#__PURE__*/ jsx(Provider, {
|
|
6
|
-
loading: loading,
|
|
7
|
-
streaming: streaming,
|
|
8
|
-
empty: empty,
|
|
9
|
-
children: /*#__PURE__*/ jsx(Paper, {
|
|
10
|
-
withBorder: true,
|
|
11
|
-
radius: "md",
|
|
12
|
-
...props,
|
|
13
|
-
children: /*#__PURE__*/ jsxs(ScrollArea, {
|
|
14
|
-
autoScroll: true,
|
|
15
|
-
scrollToBottomOnInit: true,
|
|
16
|
-
p: "md",
|
|
17
|
-
children: [
|
|
18
|
-
/*#__PURE__*/ jsx(Stack, {
|
|
19
|
-
children: children
|
|
20
|
-
}),
|
|
21
|
-
/*#__PURE__*/ jsx(ScrollArea.ScrollButton, {})
|
|
22
|
-
]
|
|
23
|
-
})
|
|
24
|
-
})
|
|
25
|
-
});
|
|
26
|
-
export { Root };
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export type { ConversationProps } from './types';
|
|
2
|
-
export { useChatMessage } from './useChatMessage';
|
|
3
|
-
export declare const Conversation: {
|
|
4
|
-
Root: ({ children, loading, streaming, empty, ...props }: import("./types").ConversationProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
-
Message: <T extends import("ai").UIMessage>({ message }: {
|
|
6
|
-
message: T;
|
|
7
|
-
}) => import("react/jsx-runtime").JSX.Element | null;
|
|
8
|
-
File: <T extends import("ai").UIMessage>({ message }: {
|
|
9
|
-
message: T;
|
|
10
|
-
}) => import("react/jsx-runtime").JSX.Element | null;
|
|
11
|
-
Loader: (props: import("@mantine/core").LoaderProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
12
|
-
Empty: () => import("react/jsx-runtime").JSX.Element | null;
|
|
13
|
-
};
|
|
File without changes
|