@rolder/kit 3.0.0-alpha-17 → 3.0.0-alpha.10
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/ui/conversation/FileIcon.js +18 -18
- package/dist/ai/ui/conversation/Root.js +1 -1
- package/dist/ai/ui/conversation/index.d.ts +2 -2
- package/dist/ai/ui/conversation/index.js +2 -3
- package/dist/ai/ui/conversation/useChatMessage.js +1 -1
- package/dist/ai/ui/promptInput/File.js +8 -9
- package/dist/ai/ui/promptInput/FileIcon.js +18 -18
- package/dist/ai/ui/promptInput/Root.js +1 -2
- package/dist/ai/ui/promptInput/Submit.js +3 -3
- package/dist/ai/ui/promptInput/Textarea.js +1 -2
- package/dist/ai/ui/promptInput/index.d.ts +1 -1
- package/dist/ai/ui/promptInput/index.js +0 -1
- package/dist/app/AppDefaults.js +1 -1
- package/dist/app/DefaultApp.js +1 -1
- package/dist/app/cookieColorSchemeManager.js +1 -1
- package/dist/index.d.ts +26 -6
- package/dist/index.js +26 -6
- package/dist/styles.css +74 -0
- package/dist/ui/JsonInput.js +1 -1
- package/dist/ui/{routerLink/RouterLink.js → RouterLink.js} +1 -2
- package/dist/ui/editor/Root.js +3 -4
- package/dist/ui/error/DefaultError.js +1 -1
- package/dist/ui/error/DefaultNotFound.js +1 -1
- package/dist/ui/error/Forbidden.js +1 -1
- package/dist/ui/error/index.d.ts +4 -4
- package/dist/ui/error/index.js +5 -4
- package/dist/ui/form/fields/TextPassowrdField.js +3 -3
- package/dist/ui/form/index.d.ts +2 -2
- package/dist/ui/form/index.js +3 -3
- package/dist/ui/hoverPaper/HoverPaper.js +1 -2
- package/dist/ui/hoverPaper/index.d.ts +2 -2
- package/dist/ui/hoverPaper/index.js +3 -2
- package/dist/ui/scrollArea/ScrollAreaContent.js +3 -4
- package/package.json +4 -5
- package/dist/ai/index.d.ts +0 -2
- package/dist/ai/index.js +0 -2
- package/dist/ai/ui/index.d.ts +0 -2
- package/dist/ai/ui/index.js +0 -2
- package/dist/ai/ui/promptInput/styles.module.js +0 -7
- package/dist/ai/ui/promptInput/styles_module.css +0 -24
- package/dist/ai/utils/index.d.ts +0 -2
- package/dist/ai/utils/index.js +0 -2
- package/dist/app/index.d.ts +0 -3
- package/dist/app/index.js +0 -3
- package/dist/functions/cookies/index.d.ts +0 -3
- package/dist/functions/cookies/index.js +0 -3
- package/dist/functions/index.d.ts +0 -1
- package/dist/functions/index.js +0 -1
- package/dist/hooks/index.d.ts +0 -2
- package/dist/hooks/index.js +0 -2
- 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/ui/hoverPaper/styles.module.js +0 -5
- package/dist/ui/hoverPaper/styles_module.css +0 -15
- package/dist/ui/index.d.ts +0 -9
- package/dist/ui/index.js +0 -9
- package/dist/ui/routerLink/index.d.ts +0 -1
- package/dist/ui/routerLink/index.js +0 -1
- package/dist/ui/routerLink/styles.module.js +0 -5
- package/dist/ui/routerLink/styles_module.css +0 -5
- package/dist/ui/scrollArea/styles.module.js +0 -7
- package/dist/ui/scrollArea/styles_module.css +0 -14
- /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/ui/{routerLink/RouterLink.d.ts → RouterLink.d.ts} +0 -0
|
@@ -9,9 +9,9 @@ const FileIcon = ({ mimeType })=>{
|
|
|
9
9
|
viewBox: "0 0 36 36",
|
|
10
10
|
fill: "none",
|
|
11
11
|
stroke: "var(--mantine-color-text)",
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
strokeWidth: "1.5",
|
|
13
|
+
strokeLinecap: "round",
|
|
14
|
+
strokeLinejoin: "round",
|
|
15
15
|
role: "img",
|
|
16
16
|
"aria-label": "Image",
|
|
17
17
|
children: [
|
|
@@ -42,9 +42,9 @@ const FileIcon = ({ mimeType })=>{
|
|
|
42
42
|
viewBox: "0 0 36 36",
|
|
43
43
|
fill: "none",
|
|
44
44
|
stroke: "var(--mantine-color-text)",
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
45
|
+
strokeWidth: "1.5",
|
|
46
|
+
strokeLinecap: "round",
|
|
47
|
+
strokeLinejoin: "round",
|
|
48
48
|
role: "img",
|
|
49
49
|
"aria-label": "FilePdf",
|
|
50
50
|
children: [
|
|
@@ -81,9 +81,9 @@ const FileIcon = ({ mimeType })=>{
|
|
|
81
81
|
viewBox: "0 0 36 36",
|
|
82
82
|
fill: "none",
|
|
83
83
|
stroke: "var(--mantine-color-text)",
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
84
|
+
strokeWidth: "1.5",
|
|
85
|
+
strokeLinecap: "round",
|
|
86
|
+
strokeLinejoin: "round",
|
|
87
87
|
role: "img",
|
|
88
88
|
"aria-label": "FileDoc",
|
|
89
89
|
children: [
|
|
@@ -117,9 +117,9 @@ const FileIcon = ({ mimeType })=>{
|
|
|
117
117
|
viewBox: "0 0 36 36",
|
|
118
118
|
fill: "none",
|
|
119
119
|
stroke: "var(--mantine-color-text)",
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
120
|
+
strokeWidth: "1.5",
|
|
121
|
+
strokeLinecap: "round",
|
|
122
|
+
strokeLinejoin: "round",
|
|
123
123
|
role: "img",
|
|
124
124
|
"aria-label": "FileXls",
|
|
125
125
|
children: [
|
|
@@ -156,9 +156,9 @@ const FileIcon = ({ mimeType })=>{
|
|
|
156
156
|
viewBox: "0 0 36 36",
|
|
157
157
|
fill: "none",
|
|
158
158
|
stroke: "var(--mantine-color-text)",
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
159
|
+
strokeWidth: "1.5",
|
|
160
|
+
strokeLinecap: "round",
|
|
161
|
+
strokeLinejoin: "round",
|
|
162
162
|
role: "img",
|
|
163
163
|
"aria-label": "FilePpt",
|
|
164
164
|
children: [
|
|
@@ -198,9 +198,9 @@ const FileIcon = ({ mimeType })=>{
|
|
|
198
198
|
viewBox: "0 0 36 36",
|
|
199
199
|
fill: "none",
|
|
200
200
|
stroke: "var(--mantine-color-text)",
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
201
|
+
strokeWidth: "1.5",
|
|
202
|
+
strokeLinecap: "round",
|
|
203
|
+
strokeLinejoin: "round",
|
|
204
204
|
role: "img",
|
|
205
205
|
"aria-label": "File",
|
|
206
206
|
children: [
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Paper, Stack } from "@mantine/core";
|
|
3
|
-
import { ScrollArea } from "../../../ui/index.js";
|
|
3
|
+
import { ScrollArea } from "../../../ui/scrollArea/index.js";
|
|
4
4
|
import { Provider } from "./ConversationProvider.js";
|
|
5
5
|
const Root = ({ children, loading, streaming, empty, ...props })=>/*#__PURE__*/ jsx(Provider, {
|
|
6
6
|
loading: loading,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
1
|
+
export type { ConversationProps } from './types';
|
|
2
|
+
export { useChatMessage } 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,8 +3,7 @@ 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
|
-
|
|
7
|
-
export * from "./useChatMessage.js";
|
|
6
|
+
import { useChatMessage } from "./useChatMessage.js";
|
|
8
7
|
const Conversation = {
|
|
9
8
|
Root: Root,
|
|
10
9
|
Message: Message,
|
|
@@ -12,4 +11,4 @@ const Conversation = {
|
|
|
12
11
|
Loader: Loader,
|
|
13
12
|
Empty: Empty
|
|
14
13
|
};
|
|
15
|
-
export { Conversation };
|
|
14
|
+
export { Conversation, useChatMessage };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useEffect, useState } from "react";
|
|
2
|
-
import { parseAiMessagePart } from "../../utils/
|
|
2
|
+
import { parseAiMessagePart } from "../../utils/parseAiMessagePart.js";
|
|
3
3
|
const useChatMessage = (part)=>{
|
|
4
4
|
const [parsedText, setParsedText] = useState('');
|
|
5
5
|
useEffect(()=>{
|
|
@@ -3,7 +3,6 @@ import { ActionIcon, FileButton, Tooltip } from "@mantine/core";
|
|
|
3
3
|
import { useRef } from "react";
|
|
4
4
|
import { FileIcon } from "./FileIcon.js";
|
|
5
5
|
import { usePromptInput } from "./PromptInputContext.js";
|
|
6
|
-
import styles_module from "./styles.module.js";
|
|
7
6
|
const File = (props)=>{
|
|
8
7
|
const resetRef = useRef(null);
|
|
9
8
|
const { file, setFile, accept, submiting, uploading } = usePromptInput();
|
|
@@ -23,7 +22,7 @@ const File = (props)=>{
|
|
|
23
22
|
disabled: submiting,
|
|
24
23
|
loading: uploading,
|
|
25
24
|
classNames: {
|
|
26
|
-
root:
|
|
25
|
+
root: 'rolder-prompt-input-file-action-action'
|
|
27
26
|
},
|
|
28
27
|
...props,
|
|
29
28
|
children: /*#__PURE__*/ jsxs("svg", {
|
|
@@ -33,9 +32,9 @@ const File = (props)=>{
|
|
|
33
32
|
viewBox: "0 0 24 24",
|
|
34
33
|
fill: "none",
|
|
35
34
|
stroke: "currentColor",
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
35
|
+
strokeWidth: "1.5",
|
|
36
|
+
strokeLinecap: "round",
|
|
37
|
+
strokeLinejoin: "round",
|
|
39
38
|
role: "img",
|
|
40
39
|
"aria-label": "Paperclip",
|
|
41
40
|
children: [
|
|
@@ -67,7 +66,7 @@ const File = (props)=>{
|
|
|
67
66
|
size: "lg",
|
|
68
67
|
variant: "default",
|
|
69
68
|
classNames: {
|
|
70
|
-
root:
|
|
69
|
+
root: 'rolder-prompt-input-file-action-action'
|
|
71
70
|
},
|
|
72
71
|
onClick: ()=>{
|
|
73
72
|
resetRef.current?.();
|
|
@@ -80,9 +79,9 @@ const File = (props)=>{
|
|
|
80
79
|
viewBox: "0 0 24 24",
|
|
81
80
|
fill: "none",
|
|
82
81
|
stroke: "currentColor",
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
82
|
+
strokeWidth: "1.5",
|
|
83
|
+
strokeLinecap: "round",
|
|
84
|
+
strokeLinejoin: "round",
|
|
86
85
|
role: "img",
|
|
87
86
|
"aria-label": "Trash",
|
|
88
87
|
children: [
|
|
@@ -9,9 +9,9 @@ const FileIcon = ({ mimeType })=>{
|
|
|
9
9
|
viewBox: "0 0 24 24",
|
|
10
10
|
fill: "none",
|
|
11
11
|
stroke: "var(--mantine-color-dimmed)",
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
strokeWidth: "1.5",
|
|
13
|
+
strokeLinecap: "round",
|
|
14
|
+
strokeLinejoin: "round",
|
|
15
15
|
role: "img",
|
|
16
16
|
"aria-label": "Image",
|
|
17
17
|
children: [
|
|
@@ -42,9 +42,9 @@ const FileIcon = ({ mimeType })=>{
|
|
|
42
42
|
viewBox: "0 0 24 24",
|
|
43
43
|
fill: "none",
|
|
44
44
|
stroke: "var(--mantine-color-dimmed)",
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
45
|
+
strokeWidth: "1.5",
|
|
46
|
+
strokeLinecap: "round",
|
|
47
|
+
strokeLinejoin: "round",
|
|
48
48
|
role: "img",
|
|
49
49
|
"aria-label": "FilePdf",
|
|
50
50
|
children: [
|
|
@@ -81,9 +81,9 @@ const FileIcon = ({ mimeType })=>{
|
|
|
81
81
|
viewBox: "0 0 24 24",
|
|
82
82
|
fill: "none",
|
|
83
83
|
stroke: "var(--mantine-color-dimmed)",
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
84
|
+
strokeWidth: "1.5",
|
|
85
|
+
strokeLinecap: "round",
|
|
86
|
+
strokeLinejoin: "round",
|
|
87
87
|
role: "img",
|
|
88
88
|
"aria-label": "FileDoc",
|
|
89
89
|
children: [
|
|
@@ -117,9 +117,9 @@ const FileIcon = ({ mimeType })=>{
|
|
|
117
117
|
viewBox: "0 0 24 24",
|
|
118
118
|
fill: "none",
|
|
119
119
|
stroke: "var(--mantine-color-dimmed)",
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
120
|
+
strokeWidth: "1.5",
|
|
121
|
+
strokeLinecap: "round",
|
|
122
|
+
strokeLinejoin: "round",
|
|
123
123
|
role: "img",
|
|
124
124
|
"aria-label": "FileXls",
|
|
125
125
|
children: [
|
|
@@ -156,9 +156,9 @@ const FileIcon = ({ mimeType })=>{
|
|
|
156
156
|
viewBox: "0 0 24 24",
|
|
157
157
|
fill: "none",
|
|
158
158
|
stroke: "var(--mantine-color-dimmed)",
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
159
|
+
strokeWidth: "1.5",
|
|
160
|
+
strokeLinecap: "round",
|
|
161
|
+
strokeLinejoin: "round",
|
|
162
162
|
role: "img",
|
|
163
163
|
"aria-label": "FilePpt",
|
|
164
164
|
children: [
|
|
@@ -198,9 +198,9 @@ const FileIcon = ({ mimeType })=>{
|
|
|
198
198
|
viewBox: "0 0 24 24",
|
|
199
199
|
fill: "none",
|
|
200
200
|
stroke: "var(--mantine-color-dimmed)",
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
201
|
+
strokeWidth: "1.5",
|
|
202
|
+
strokeLinecap: "round",
|
|
203
|
+
strokeLinejoin: "round",
|
|
204
204
|
role: "img",
|
|
205
205
|
"aria-label": "File",
|
|
206
206
|
children: [
|
|
@@ -2,7 +2,6 @@ import { jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { Paper } from "@mantine/core";
|
|
3
3
|
import clsx from "clsx";
|
|
4
4
|
import { Provider } from "./PromptInputProvider.js";
|
|
5
|
-
import styles_module from "./styles.module.js";
|
|
6
5
|
const Root = ({ className, onSubmit, submiting, uploading, accept, ...props })=>/*#__PURE__*/ jsx(Provider, {
|
|
7
6
|
onSubmit: onSubmit,
|
|
8
7
|
submiting: submiting,
|
|
@@ -11,7 +10,7 @@ const Root = ({ className, onSubmit, submiting, uploading, accept, ...props })=>
|
|
|
11
10
|
children: /*#__PURE__*/ jsx(Paper, {
|
|
12
11
|
radius: "md",
|
|
13
12
|
withBorder: true,
|
|
14
|
-
className: clsx(
|
|
13
|
+
className: clsx('rolder-prompt-input-root', className),
|
|
15
14
|
...props
|
|
16
15
|
})
|
|
17
16
|
});
|
|
@@ -9,9 +9,9 @@ const Submit = ({ children, ...props })=>{
|
|
|
9
9
|
viewBox: "0 0 24 24",
|
|
10
10
|
fill: "none",
|
|
11
11
|
stroke: "currentColor",
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
strokeWidth: "1.5",
|
|
13
|
+
strokeLinecap: "round",
|
|
14
|
+
strokeLinejoin: "round",
|
|
15
15
|
role: "img",
|
|
16
16
|
"aria-label": "Submit",
|
|
17
17
|
children: [
|
|
@@ -2,7 +2,6 @@ import { jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { Textarea } from "@mantine/core";
|
|
3
3
|
import { useState } from "react";
|
|
4
4
|
import { usePromptInput } from "./PromptInputContext.js";
|
|
5
|
-
import styles_module from "./styles.module.js";
|
|
6
5
|
const Textarea_Textarea = (props)=>{
|
|
7
6
|
const { text, setText, onSubmit, submiting, uploading } = usePromptInput();
|
|
8
7
|
const [isComposing, setIsComposing] = useState(false);
|
|
@@ -19,7 +18,7 @@ const Textarea_Textarea = (props)=>{
|
|
|
19
18
|
size: "md",
|
|
20
19
|
rows: 3,
|
|
21
20
|
classNames: {
|
|
22
|
-
input:
|
|
21
|
+
input: 'rolder-prompt-input-textarea'
|
|
23
22
|
},
|
|
24
23
|
placeholder: "Напишите сообщение",
|
|
25
24
|
onCompositionEnd: ()=>setIsComposing(false),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type { Accept, PromptInputProps } from './types';
|
|
2
2
|
export declare const PromptInput: {
|
|
3
3
|
Root: ({ className, onSubmit, submiting, uploading, accept, ...props }: import("@mantine/core").PaperProps & import("./types").PromptInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
Textarea: (props: import("@mantine/core").TextareaProps) => import("react/jsx-runtime").JSX.Element;
|
package/dist/app/AppDefaults.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useComputedColorScheme } from "@mantine/core";
|
|
2
2
|
import { useEffect } from "react";
|
|
3
|
-
import { setCookies } from "../functions/
|
|
3
|
+
import { setCookies } from "../functions/setCookies.js";
|
|
4
4
|
const AppDefaults = ({ saveColorScheme })=>{
|
|
5
5
|
const colorScheme = useComputedColorScheme();
|
|
6
6
|
useEffect(()=>{
|
package/dist/app/DefaultApp.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { ColorSchemeScript, MantineProvider } from "@mantine/core";
|
|
3
3
|
import { HeadContent, Scripts } from "@tanstack/react-router";
|
|
4
|
-
import { getCookie } from "../functions/
|
|
4
|
+
import { getCookie } from "../functions/getCookie.js";
|
|
5
5
|
import { AppDefaults } from "./AppDefaults.js";
|
|
6
6
|
import { cookieColorSchemeManager } from "./cookieColorSchemeManager.js";
|
|
7
7
|
import { defaultTheme } from "./defaultTheme.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { isMantineColorScheme } from "@mantine/core";
|
|
2
2
|
import { atom } from "nanostores";
|
|
3
|
-
import { setCookie } from "../functions/
|
|
3
|
+
import { setCookie } from "../functions/setCookie.js";
|
|
4
4
|
const $colorScheme = atom();
|
|
5
5
|
let unsubscribeSystemTheme;
|
|
6
6
|
const cookieColorSchemeManager = ({ key = 'colorScheme' } = {})=>({
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,26 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
1
|
+
/** biome-ignore-all assist/source/organizeImports: <> */
|
|
2
|
+
export { Conversation, type ConversationProps, useChatMessage, } from './ai/ui/conversation';
|
|
3
|
+
export { type Accept, PromptInput, type PromptInputProps, } from './ai/ui/promptInput';
|
|
4
|
+
export { convertFileUIPartBlobToDataURL } from './ai/utils/convertFileUIPartBlobToDataURL';
|
|
5
|
+
export { parseAiMessagePart } from './ai/utils/parseAiMessagePart';
|
|
6
|
+
export { DefaultApp } from './app/DefaultApp';
|
|
7
|
+
export { defaultRequestMiddlewares } from './app/defaultRequestMiddlewares';
|
|
8
|
+
export { defaultTheme } from './app/defaultTheme';
|
|
9
|
+
export { getCookie } from './functions/getCookie';
|
|
10
|
+
export { setCookie } from './functions/setCookie';
|
|
11
|
+
export { setCookies } from './functions/setCookies';
|
|
12
|
+
export { useMutation } from './hooks/useMutation';
|
|
13
|
+
export { useMutationWithInvalidate } from './hooks/useMutationWithInvalidate';
|
|
14
|
+
export { getDB } from './surreal/connection';
|
|
15
|
+
export { surrealDeleteFn, surrealUnsubscribeFn } from './surreal/deafaultCrud';
|
|
16
|
+
export { deserialize } from './surreal/deserialize';
|
|
17
|
+
export { encryptionFn } from './surreal/encryption';
|
|
18
|
+
export { Editor, useEditor } from './ui/editor';
|
|
19
|
+
export { DefaultError, DefaultNotFound, defaultErrorNotification, Forbidden, } from './ui/error';
|
|
20
|
+
export { AnimatedChevron } from './ui/AnimatedChevron';
|
|
21
|
+
export { useAppForm, useFieldContext, withForm, blurOnError, fieldsSchema, } from './ui/form';
|
|
22
|
+
export { HoverPaper, usePaperHover } from './ui/hoverPaper';
|
|
23
|
+
export { JsonInput } from './ui/JsonInput';
|
|
24
|
+
export { RouterLink } from './ui/RouterLink';
|
|
25
|
+
export { SaveInput } from './ui/saveInput';
|
|
26
|
+
export { ScrollArea, useScrollArea, type ScrollAreaContextValue, type ScrollAreaHook, type ScrollAreaProps, type ScrollAreaState, type ScrollButtonProps, type ScrollPosition, } from './ui/scrollArea';
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,26 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { Conversation, useChatMessage } from "./ai/ui/conversation/index.js";
|
|
2
|
+
import { PromptInput } from "./ai/ui/promptInput/index.js";
|
|
3
|
+
import { convertFileUIPartBlobToDataURL } from "./ai/utils/convertFileUIPartBlobToDataURL.js";
|
|
4
|
+
import { parseAiMessagePart } from "./ai/utils/parseAiMessagePart.js";
|
|
5
|
+
import { DefaultApp } from "./app/DefaultApp.js";
|
|
6
|
+
import { defaultRequestMiddlewares } from "./app/defaultRequestMiddlewares.js";
|
|
7
|
+
import { defaultTheme } from "./app/defaultTheme.js";
|
|
8
|
+
import { getCookie } from "./functions/getCookie.js";
|
|
9
|
+
import { setCookie } from "./functions/setCookie.js";
|
|
10
|
+
import { setCookies } from "./functions/setCookies.js";
|
|
11
|
+
import { useMutation } from "./hooks/useMutation.js";
|
|
12
|
+
import { useMutationWithInvalidate } from "./hooks/useMutationWithInvalidate.js";
|
|
13
|
+
import { getDB } from "./surreal/connection.js";
|
|
14
|
+
import { surrealDeleteFn, surrealUnsubscribeFn } from "./surreal/deafaultCrud.js";
|
|
15
|
+
import { deserialize } from "./surreal/deserialize.js";
|
|
16
|
+
import { encryptionFn } from "./surreal/encryption.js";
|
|
17
|
+
import { Editor, useEditor } from "./ui/editor/index.js";
|
|
18
|
+
import { DefaultError, DefaultNotFound, Forbidden, defaultErrorNotification } from "./ui/error/index.js";
|
|
19
|
+
import { AnimatedChevron } from "./ui/AnimatedChevron.js";
|
|
20
|
+
import { blurOnError, fieldsSchema, useAppForm, useFieldContext, withForm } from "./ui/form/index.js";
|
|
21
|
+
import { HoverPaper, usePaperHover } from "./ui/hoverPaper/index.js";
|
|
22
|
+
import { JsonInput } from "./ui/JsonInput.js";
|
|
23
|
+
import { RouterLink } from "./ui/RouterLink.js";
|
|
24
|
+
import { SaveInput } from "./ui/saveInput/index.js";
|
|
25
|
+
import { ScrollArea, useScrollArea } from "./ui/scrollArea/index.js";
|
|
26
|
+
export { AnimatedChevron, Conversation, DefaultApp, DefaultError, DefaultNotFound, Editor, Forbidden, HoverPaper, JsonInput, PromptInput, RouterLink, SaveInput, ScrollArea, blurOnError, convertFileUIPartBlobToDataURL, defaultErrorNotification, defaultRequestMiddlewares, defaultTheme, deserialize, encryptionFn, fieldsSchema, getCookie, getDB, parseAiMessagePart, setCookie, setCookies, surrealDeleteFn, surrealUnsubscribeFn, useAppForm, useChatMessage, useEditor, useFieldContext, useMutation, useMutationWithInvalidate, usePaperHover, useScrollArea, withForm };
|
package/dist/styles.css
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
.rolder-prompt-input-root {
|
|
2
|
+
background-color: light-dark(var(--mantine-color-white), var(--mantine-color-dark-6));
|
|
3
|
+
|
|
4
|
+
&:focus-within {
|
|
5
|
+
border-color: var(--mantine-primary-color-filled);
|
|
6
|
+
border-color: var(--mantine-primary-color-filled);
|
|
7
|
+
outline: none;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.rolder-prompt-input-textarea {
|
|
12
|
+
border: 0;
|
|
13
|
+
border-radius: 8px;
|
|
14
|
+
overflow: hidden;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.rolder-prompt-input-file-action-action {
|
|
18
|
+
color: light-dark(var(--mantine-color-gray-7), var(--mantine-color-dark-1));
|
|
19
|
+
|
|
20
|
+
&[data-disabled] {
|
|
21
|
+
color: light-dark(var(--mantine-color-gray-5), var(--mantine-color-dark-3));
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.rolder-editor-root {
|
|
26
|
+
--editor-border-color: light-dark(var(--mantine-color-gray-3), var(--mantine-color-dark-4));
|
|
27
|
+
border: rem(1px) solid var(--editor-border-color);
|
|
28
|
+
border-radius: var(--mantine-radius-md);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.rolder-editor-content {
|
|
32
|
+
border-radius: var(--mantine-radius-md);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.rolder-editor-toolbar {
|
|
36
|
+
border-color: var(--editor-border-color);
|
|
37
|
+
border-top-left-radius: var(--mantine-radius-md);
|
|
38
|
+
border-top-right-radius: var(--mantine-radius-md);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.rolder-hover-paper-root {
|
|
42
|
+
transition: background-color .2s ease-in-out;
|
|
43
|
+
|
|
44
|
+
&:hover {
|
|
45
|
+
background-color: light-dark(var(--mantine-color-gray-0), var(--mantine-color-dark-6));
|
|
46
|
+
cursor: pointer;
|
|
47
|
+
transition: background-color .2s ease-in-out;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
&[data-disabled] {
|
|
51
|
+
background-color: unset;
|
|
52
|
+
cursor: default;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.rolder-router-link-root {
|
|
57
|
+
color: inherit;
|
|
58
|
+
text-decoration: none;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.rolder-scroll-area-viewport {
|
|
62
|
+
border-radius: var(--radius);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.rolder-scroll-area-content {
|
|
66
|
+
width: 100%;
|
|
67
|
+
height: 100%;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.rolder-scroll-area-scrollbar {
|
|
71
|
+
border-top-right-radius: var(--radius);
|
|
72
|
+
border-bottom-right-radius: var(--radius);
|
|
73
|
+
}
|
|
74
|
+
|
package/dist/ui/JsonInput.js
CHANGED
|
@@ -5,7 +5,7 @@ import { linter } from "@codemirror/lint";
|
|
|
5
5
|
import { keymap } from "@codemirror/view";
|
|
6
6
|
import { vscodeDark, vscodeLight } from "@uiw/codemirror-theme-vscode";
|
|
7
7
|
import react_codemirror from "@uiw/react-codemirror";
|
|
8
|
-
import { getCookie } from "../functions/
|
|
8
|
+
import { getCookie } from "../functions/getCookie.js";
|
|
9
9
|
const formatJson = (view)=>{
|
|
10
10
|
try {
|
|
11
11
|
const text = view.state.doc.toString();
|
|
@@ -2,11 +2,10 @@ import { jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { ActionIcon, Anchor, Button, UnstyledButton } from "@mantine/core";
|
|
3
3
|
import { createLink } from "@tanstack/react-router";
|
|
4
4
|
import { forwardRef } from "react";
|
|
5
|
-
import styles_module from "./styles.module.js";
|
|
6
5
|
const MantineLinkComponent = /*#__PURE__*/ forwardRef(({ classNames, ...props }, ref)=>/*#__PURE__*/ jsx(Anchor, {
|
|
7
6
|
ref: ref,
|
|
8
7
|
classNames: {
|
|
9
|
-
root:
|
|
8
|
+
root: 'rolder-router-link-root',
|
|
10
9
|
...classNames
|
|
11
10
|
},
|
|
12
11
|
c: "inherit",
|
package/dist/ui/editor/Root.js
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { RichTextEditor } from "@mantine/tiptap";
|
|
3
3
|
import { useEditor } from "./Provider.js";
|
|
4
|
-
import styles_module from "./styles.module.js";
|
|
5
4
|
const Root = ({ children, classNames, ...props })=>{
|
|
6
5
|
const { editor } = useEditor();
|
|
7
6
|
return /*#__PURE__*/ jsx(RichTextEditor, {
|
|
8
7
|
editor: editor,
|
|
9
8
|
classNames: {
|
|
10
|
-
root:
|
|
11
|
-
content:
|
|
12
|
-
toolbar:
|
|
9
|
+
root: 'rolder-editor-root',
|
|
10
|
+
content: 'rolder-editor-content',
|
|
11
|
+
toolbar: 'rolder-editor-toolbar',
|
|
13
12
|
...classNames
|
|
14
13
|
},
|
|
15
14
|
...props,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Button, Group, Stack, Title } from "@mantine/core";
|
|
3
3
|
import { rootRouteId, useMatch, useRouter } from "@tanstack/react-router";
|
|
4
|
-
import { RouterLink } from "../
|
|
4
|
+
import { RouterLink } from "../RouterLink.js";
|
|
5
5
|
const DefaultError = ({ error })=>{
|
|
6
6
|
const router = useRouter();
|
|
7
7
|
const isRoot = useMatch({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Stack, Text, Title } from "@mantine/core";
|
|
3
|
-
import { RouterLink } from "../
|
|
3
|
+
import { RouterLink } from "../RouterLink.js";
|
|
4
4
|
const DefaultNotFound = ()=>/*#__PURE__*/ jsxs(Stack, {
|
|
5
5
|
align: "center",
|
|
6
6
|
justify: "center",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Stack, Title } from "@mantine/core";
|
|
3
|
-
import { RouterLink } from "../
|
|
3
|
+
import { RouterLink } from "../RouterLink.js";
|
|
4
4
|
const Forbidden = ()=>/*#__PURE__*/ jsxs(Stack, {
|
|
5
5
|
align: "center",
|
|
6
6
|
justify: "center",
|
package/dist/ui/error/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
1
|
+
export { DefaultError } from './DefaultError';
|
|
2
|
+
export { DefaultNotFound } from './DefaultNotFound';
|
|
3
|
+
export { defaultErrorNotification } from './defaultErrorNotification';
|
|
4
|
+
export { Forbidden } from './Forbidden';
|
package/dist/ui/error/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { DefaultError } from "./DefaultError.js";
|
|
2
|
+
import { DefaultNotFound } from "./DefaultNotFound.js";
|
|
3
|
+
import { defaultErrorNotification } from "./defaultErrorNotification.js";
|
|
4
|
+
import { Forbidden } from "./Forbidden.js";
|
|
5
|
+
export { DefaultError, DefaultNotFound, Forbidden, defaultErrorNotification };
|
|
@@ -20,9 +20,9 @@ const TextPassowrdField = (props)=>{
|
|
|
20
20
|
viewBox: "0 0 16 16",
|
|
21
21
|
fill: "none",
|
|
22
22
|
stroke: "currentColor",
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
strokeWidth: "2",
|
|
24
|
+
strokeLinecap: "round",
|
|
25
|
+
strokeLinejoin: "round",
|
|
26
26
|
role: "img",
|
|
27
27
|
"aria-label": "Refresh",
|
|
28
28
|
children: [
|
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,11 +1,10 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { Paper } from "@mantine/core";
|
|
3
3
|
import { forwardRef } from "react";
|
|
4
|
-
import styles_module from "./styles.module.js";
|
|
5
4
|
const HoverPaper = /*#__PURE__*/ forwardRef(({ disabled, classNames, ...props }, ref)=>/*#__PURE__*/ jsx(Paper, {
|
|
6
5
|
ref: ref,
|
|
7
6
|
classNames: {
|
|
8
|
-
root:
|
|
7
|
+
root: 'rolder-hover-paper-root',
|
|
9
8
|
...classNames
|
|
10
9
|
},
|
|
11
10
|
mod: {
|
|
@@ -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 };
|
|
@@ -2,16 +2,15 @@ import { jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { Box, ScrollArea, getRadius } from "@mantine/core";
|
|
3
3
|
import { useContext } from "react";
|
|
4
4
|
import { ScrollAreaContext } from "./context.js";
|
|
5
|
-
import styles_module from "./styles.module.js";
|
|
6
5
|
const ScrollAreaContent = ({ children })=>{
|
|
7
6
|
const fullContext = useContext(ScrollAreaContext);
|
|
8
7
|
if (!fullContext) throw new Error('ScrollAreaContent must be used within ScrollArea');
|
|
9
8
|
const { _callbackRef, mantineProps, radius, _contentResizeRef } = fullContext;
|
|
10
9
|
return /*#__PURE__*/ jsx(ScrollArea, {
|
|
11
10
|
classNames: {
|
|
12
|
-
viewport:
|
|
13
|
-
content:
|
|
14
|
-
scrollbar:
|
|
11
|
+
viewport: 'rolder-scroll-area-viewport',
|
|
12
|
+
content: 'rolder-scroll-area-content',
|
|
13
|
+
scrollbar: 'rolder-scroll-area-scrollbar'
|
|
15
14
|
},
|
|
16
15
|
style: {
|
|
17
16
|
'--radius': radius ? getRadius(radius) : void 0
|
package/package.json
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rolder/kit",
|
|
3
|
-
"version": "3.0.0-alpha
|
|
3
|
+
"version": "3.0.0-alpha.10",
|
|
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
|
},
|
|
11
12
|
"sideEffects": [
|
|
12
13
|
"*.css"
|
|
@@ -28,13 +29,11 @@
|
|
|
28
29
|
"@types/omgopass": "^3.2.3",
|
|
29
30
|
"@types/react": "^19.2.8",
|
|
30
31
|
"react": "^19.2.3",
|
|
31
|
-
"typescript": "^5.9.3"
|
|
32
|
-
"@tabler/icons": "^3.36.1"
|
|
32
|
+
"typescript": "^5.9.3"
|
|
33
33
|
},
|
|
34
34
|
"peerDependencies": {
|
|
35
35
|
"react": ">=16.9.0",
|
|
36
36
|
"react-dom": ">=16.9.0",
|
|
37
|
-
"@tabler/icons-react": "^3.36.1",
|
|
38
37
|
"clsx": "^2.1.1",
|
|
39
38
|
"@tiptap/extension-highlight": "^3.15.3",
|
|
40
39
|
"@tiptap/extension-placeholder": "^3.15.3",
|
package/dist/ai/index.d.ts
DELETED
package/dist/ai/index.js
DELETED
package/dist/ai/ui/index.d.ts
DELETED
package/dist/ai/ui/index.js
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
.root-gmXOO2 {
|
|
2
|
-
background-color: light-dark(var(--mantine-color-white), var(--mantine-color-dark-6));
|
|
3
|
-
|
|
4
|
-
&:focus-within {
|
|
5
|
-
border-color: var(--mantine-primary-color-filled);
|
|
6
|
-
border-color: var(--mantine-primary-color-filled);
|
|
7
|
-
outline: none;
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
.textarea-f3Dbtf {
|
|
12
|
-
border: 0;
|
|
13
|
-
border-radius: 8px;
|
|
14
|
-
overflow: hidden;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
.fileActionAction-w3KPzA {
|
|
18
|
-
color: light-dark(var(--mantine-color-gray-7), var(--mantine-color-dark-1));
|
|
19
|
-
|
|
20
|
-
&[data-disabled] {
|
|
21
|
-
color: light-dark(var(--mantine-color-gray-5), var(--mantine-color-dark-3));
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
|
package/dist/ai/utils/index.d.ts
DELETED
package/dist/ai/utils/index.js
DELETED
package/dist/app/index.d.ts
DELETED
package/dist/app/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './cookies';
|
package/dist/functions/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./cookies/index.js";
|
package/dist/hooks/index.d.ts
DELETED
package/dist/hooks/index.js
DELETED
package/dist/surreal/index.d.ts
DELETED
package/dist/surreal/index.js
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
.root-OYYJgs {
|
|
2
|
-
--editor-border-color: light-dark(var(--mantine-color-gray-3), var(--mantine-color-dark-4));
|
|
3
|
-
border: rem(1px) solid var(--editor-border-color);
|
|
4
|
-
border-radius: var(--mantine-radius-md);
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
.content-b5nnhz {
|
|
8
|
-
border-radius: var(--mantine-radius-md);
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
.toolbar-RksEGD {
|
|
12
|
-
border-color: var(--editor-border-color);
|
|
13
|
-
border-top-left-radius: var(--mantine-radius-md);
|
|
14
|
-
border-top-right-radius: var(--mantine-radius-md);
|
|
15
|
-
}
|
|
16
|
-
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
.root-aYPBH7 {
|
|
2
|
-
transition: background-color .2s ease-in-out;
|
|
3
|
-
|
|
4
|
-
&:hover {
|
|
5
|
-
background-color: light-dark(var(--mantine-color-gray-0), var(--mantine-color-dark-6));
|
|
6
|
-
cursor: pointer;
|
|
7
|
-
transition: background-color .2s ease-in-out;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
&[data-disabled] {
|
|
11
|
-
background-color: unset;
|
|
12
|
-
cursor: default;
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
|
package/dist/ui/index.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export * from './AnimatedChevron';
|
|
2
|
-
export * from './editor';
|
|
3
|
-
export * from './error';
|
|
4
|
-
export * from './form';
|
|
5
|
-
export * from './hoverPaper';
|
|
6
|
-
export * from './JsonInput';
|
|
7
|
-
export * from './routerLink';
|
|
8
|
-
export * from './saveInput';
|
|
9
|
-
export * from './scrollArea';
|
package/dist/ui/index.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export * from "./AnimatedChevron.js";
|
|
2
|
-
export * from "./editor/index.js";
|
|
3
|
-
export * from "./error/index.js";
|
|
4
|
-
export * from "./form/index.js";
|
|
5
|
-
export * from "./hoverPaper/index.js";
|
|
6
|
-
export * from "./JsonInput.js";
|
|
7
|
-
export * from "./routerLink/index.js";
|
|
8
|
-
export * from "./saveInput/index.js";
|
|
9
|
-
export * from "./scrollArea/index.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './RouterLink';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./RouterLink.js";
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|