@rolder/kit 3.0.0-alpha.14 → 3.0.0-alpha.16

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 (129) hide show
  1. package/dist/TestIcon.d.ts +1 -0
  2. package/dist/TestIcon.js +4 -0
  3. package/dist/index.d.ts +1 -9
  4. package/dist/index.js +2 -0
  5. package/package.json +8 -32
  6. package/dist/ai/ui/conversation/ConversationContext.d.ts +0 -7
  7. package/dist/ai/ui/conversation/ConversationContext.js +0 -8
  8. package/dist/ai/ui/conversation/ConversationProvider.d.ts +0 -2
  9. package/dist/ai/ui/conversation/ConversationProvider.js +0 -14
  10. package/dist/ai/ui/conversation/Empty.d.ts +0 -1
  11. package/dist/ai/ui/conversation/Empty.js +0 -21
  12. package/dist/ai/ui/conversation/File.d.ts +0 -4
  13. package/dist/ai/ui/conversation/File.js +0 -42
  14. package/dist/ai/ui/conversation/FileIcon.d.ts +0 -3
  15. package/dist/ai/ui/conversation/FileIcon.js +0 -225
  16. package/dist/ai/ui/conversation/Loader.d.ts +0 -2
  17. package/dist/ai/ui/conversation/Loader.js +0 -12
  18. package/dist/ai/ui/conversation/Message.d.ts +0 -4
  19. package/dist/ai/ui/conversation/Message.js +0 -25
  20. package/dist/ai/ui/conversation/Root.d.ts +0 -2
  21. package/dist/ai/ui/conversation/Root.js +0 -26
  22. package/dist/ai/ui/conversation/index.d.ts +0 -13
  23. package/dist/ai/ui/conversation/index.js +0 -14
  24. package/dist/ai/ui/conversation/types.d.ts +0 -7
  25. package/dist/ai/ui/conversation/types.js +0 -0
  26. package/dist/ai/ui/conversation/useChatMessage.d.ts +0 -2
  27. package/dist/ai/ui/conversation/useChatMessage.js +0 -12
  28. package/dist/ai/ui/promptInput/File.d.ts +0 -2
  29. package/dist/ai/ui/promptInput/File.js +0 -117
  30. package/dist/ai/ui/promptInput/FileIcon.d.ts +0 -3
  31. package/dist/ai/ui/promptInput/FileIcon.js +0 -225
  32. package/dist/ai/ui/promptInput/Footer.d.ts +0 -2
  33. package/dist/ai/ui/promptInput/Footer.js +0 -8
  34. package/dist/ai/ui/promptInput/PromptInputContext.d.ts +0 -12
  35. package/dist/ai/ui/promptInput/PromptInputContext.js +0 -8
  36. package/dist/ai/ui/promptInput/PromptInputProvider.d.ts +0 -2
  37. package/dist/ai/ui/promptInput/PromptInputProvider.js +0 -50
  38. package/dist/ai/ui/promptInput/Root.d.ts +0 -3
  39. package/dist/ai/ui/promptInput/Root.js +0 -17
  40. package/dist/ai/ui/promptInput/Submit.d.ts +0 -2
  41. package/dist/ai/ui/promptInput/Submit.js +0 -40
  42. package/dist/ai/ui/promptInput/Textarea.d.ts +0 -2
  43. package/dist/ai/ui/promptInput/Textarea.js +0 -33
  44. package/dist/ai/ui/promptInput/index.d.ts +0 -8
  45. package/dist/ai/ui/promptInput/index.js +0 -13
  46. package/dist/ai/ui/promptInput/types.d.ts +0 -11
  47. package/dist/ai/ui/promptInput/types.js +0 -0
  48. package/dist/ai/utils/convertFileUIPartBlobToDataURL.d.ts +0 -5
  49. package/dist/ai/utils/convertFileUIPartBlobToDataURL.js +0 -21
  50. package/dist/ai/utils/parseAiMessagePart.d.ts +0 -2
  51. package/dist/ai/utils/parseAiMessagePart.js +0 -12
  52. package/dist/app/AppDefaults.d.ts +0 -3
  53. package/dist/app/AppDefaults.js +0 -27
  54. package/dist/app/DefaultApp.d.ts +0 -6
  55. package/dist/app/DefaultApp.js +0 -43
  56. package/dist/app/cookieColorSchemeManager.d.ts +0 -6
  57. package/dist/app/cookieColorSchemeManager.js +0 -46
  58. package/dist/app/defaultRequestMiddlewares.d.ts +0 -4
  59. package/dist/app/defaultRequestMiddlewares.js +0 -24
  60. package/dist/app/defaultTheme.d.ts +0 -141
  61. package/dist/app/defaultTheme.js +0 -24
  62. package/dist/functions/getCookie.d.ts +0 -3
  63. package/dist/functions/setCookie.d.ts +0 -10
  64. package/dist/functions/setCookies.d.ts +0 -14
  65. package/dist/hooks/useMutation.d.ts +0 -4
  66. package/dist/hooks/useMutationWithInvalidate.d.ts +0 -4
  67. package/dist/styles.css +0 -74
  68. package/dist/surreal/connection.d.ts +0 -9
  69. package/dist/surreal/deafaultCrud.d.ts +0 -2
  70. package/dist/surreal/deserialize.d.ts +0 -17
  71. package/dist/surreal/encryption.d.ts +0 -6
  72. package/dist/ui/AnimatedChevron.d.ts +0 -6
  73. package/dist/ui/JsonInput.d.ts +0 -2
  74. package/dist/ui/RouterLink.d.ts +0 -16
  75. package/dist/ui/editor/Content.d.ts +0 -3
  76. package/dist/ui/editor/Provider.d.ts +0 -17
  77. package/dist/ui/editor/Root.d.ts +0 -2
  78. package/dist/ui/editor/Toolbar.d.ts +0 -5
  79. package/dist/ui/editor/index.d.ts +0 -12
  80. package/dist/ui/editor/types.d.ts +0 -7
  81. package/dist/ui/error/DefaultError.d.ts +0 -2
  82. package/dist/ui/error/DefaultNotFound.d.ts +0 -1
  83. package/dist/ui/error/Forbidden.d.ts +0 -1
  84. package/dist/ui/error/defaultErrorNotification.d.ts +0 -1
  85. package/dist/ui/error/index.d.ts +0 -4
  86. package/dist/ui/form/blurOnError.d.ts +0 -4
  87. package/dist/ui/form/buttons/CancelButton.d.ts +0 -5
  88. package/dist/ui/form/buttons/SubmitButton.d.ts +0 -5
  89. package/dist/ui/form/buttons/SubscribeActionIcon.d.ts +0 -4
  90. package/dist/ui/form/buttons/SubscribeButton.d.ts +0 -5
  91. package/dist/ui/form/buttons/index.d.ts +0 -4
  92. package/dist/ui/form/context.d.ts +0 -83
  93. package/dist/ui/form/fields/JsonField.d.ts +0 -2
  94. package/dist/ui/form/fields/MultiSelectField.d.ts +0 -2
  95. package/dist/ui/form/fields/NumberField.d.ts +0 -2
  96. package/dist/ui/form/fields/PassowrdField.d.ts +0 -2
  97. package/dist/ui/form/fields/SelectField.d.ts +0 -2
  98. package/dist/ui/form/fields/SwitchField.d.ts +0 -2
  99. package/dist/ui/form/fields/TextField.d.ts +0 -2
  100. package/dist/ui/form/fields/TextPassowrdField.d.ts +0 -2
  101. package/dist/ui/form/fields/TextareaField.d.ts +0 -2
  102. package/dist/ui/form/fields/index.d.ts +0 -9
  103. package/dist/ui/form/fieldsSchema.d.ts +0 -12
  104. package/dist/ui/form/index.d.ts +0 -3
  105. package/dist/ui/hoverPaper/HoverPaper.d.ts +0 -6
  106. package/dist/ui/hoverPaper/index.d.ts +0 -2
  107. package/dist/ui/hoverPaper/usePaperHover.d.ts +0 -4
  108. package/dist/ui/saveInput/JsonInput.d.ts +0 -6
  109. package/dist/ui/saveInput/NumberInput.d.ts +0 -6
  110. package/dist/ui/saveInput/SaveInput.d.ts +0 -36
  111. package/dist/ui/saveInput/Select.d.ts +0 -6
  112. package/dist/ui/saveInput/Switch.d.ts +0 -6
  113. package/dist/ui/saveInput/TextInput.d.ts +0 -6
  114. package/dist/ui/saveInput/Textarea.d.ts +0 -6
  115. package/dist/ui/saveInput/index.d.ts +0 -1
  116. package/dist/ui/scrollArea/ScrollArea.d.ts +0 -62
  117. package/dist/ui/scrollArea/ScrollArea.js +0 -30
  118. package/dist/ui/scrollArea/ScrollAreaButton.d.ts +0 -5
  119. package/dist/ui/scrollArea/ScrollAreaButton.js +0 -51
  120. package/dist/ui/scrollArea/ScrollAreaContent.d.ts +0 -6
  121. package/dist/ui/scrollArea/ScrollAreaContent.js +0 -29
  122. package/dist/ui/scrollArea/context.d.ts +0 -28
  123. package/dist/ui/scrollArea/context.js +0 -10
  124. package/dist/ui/scrollArea/index.d.ts +0 -3
  125. package/dist/ui/scrollArea/index.js +0 -3
  126. package/dist/ui/scrollArea/types.d.ts +0 -65
  127. package/dist/ui/scrollArea/types.js +0 -0
  128. package/dist/ui/scrollArea/useScrollArea.d.ts +0 -9
  129. package/dist/ui/scrollArea/useScrollArea.js +0 -146
@@ -1,27 +0,0 @@
1
- import { useComputedColorScheme } from "@mantine/core";
2
- import { useEffect } from "react";
3
- import { setCookies } from "../functions/setCookies.js";
4
- const AppDefaults = ({ saveColorScheme })=>{
5
- const colorScheme = useComputedColorScheme();
6
- useEffect(()=>{
7
- const tz = Intl.DateTimeFormat().resolvedOptions().timeZone;
8
- const cookies = [
9
- {
10
- name: 'tz',
11
- value: tz,
12
- expires: 365
13
- }
14
- ];
15
- if (saveColorScheme) cookies.push({
16
- name: 'colorScheme',
17
- value: colorScheme,
18
- expires: 365
19
- });
20
- setCookies(cookies);
21
- }, [
22
- colorScheme,
23
- saveColorScheme
24
- ]);
25
- return null;
26
- };
27
- export { AppDefaults };
@@ -1,6 +0,0 @@
1
- import { type MantineProviderProps } from '@mantine/core';
2
- interface Props extends MantineProviderProps {
3
- saveColorScheme?: boolean;
4
- }
5
- export declare const DefaultApp: ({ children, saveColorScheme, defaultColorScheme, ...props }: Props) => import("react/jsx-runtime").JSX.Element;
6
- export {};
@@ -1,43 +0,0 @@
1
- import { jsx, jsxs } from "react/jsx-runtime";
2
- import { ColorSchemeScript, MantineProvider } from "@mantine/core";
3
- import { HeadContent, Scripts } from "@tanstack/react-router";
4
- import { getCookie } from "../functions/getCookie.js";
5
- import { AppDefaults } from "./AppDefaults.js";
6
- import { cookieColorSchemeManager } from "./cookieColorSchemeManager.js";
7
- import { defaultTheme } from "./defaultTheme.js";
8
- const colorSchemeManager = cookieColorSchemeManager();
9
- const DefaultApp = ({ children, saveColorScheme = true, defaultColorScheme = 'auto', ...props })=>{
10
- const colorScheme = saveColorScheme ? getCookie('colorScheme', defaultColorScheme) : defaultColorScheme;
11
- return /*#__PURE__*/ jsxs("html", {
12
- lang: "ru",
13
- suppressHydrationWarning: true,
14
- children: [
15
- /*#__PURE__*/ jsxs("head", {
16
- children: [
17
- /*#__PURE__*/ jsx(HeadContent, {}),
18
- /*#__PURE__*/ jsx(ColorSchemeScript, {
19
- defaultColorScheme: colorScheme
20
- })
21
- ]
22
- }),
23
- /*#__PURE__*/ jsxs("body", {
24
- children: [
25
- /*#__PURE__*/ jsxs(MantineProvider, {
26
- defaultColorScheme: colorScheme,
27
- theme: defaultTheme,
28
- colorSchemeManager: colorSchemeManager,
29
- ...props,
30
- children: [
31
- /*#__PURE__*/ jsx(AppDefaults, {
32
- saveColorScheme: saveColorScheme
33
- }),
34
- children
35
- ]
36
- }),
37
- /*#__PURE__*/ jsx(Scripts, {})
38
- ]
39
- })
40
- ]
41
- });
42
- };
43
- export { DefaultApp };
@@ -1,6 +0,0 @@
1
- import { type MantineColorSchemeManager } from '@mantine/core';
2
- export interface CookieColorSchemeManager {
3
- /** Название куки, `colorScheme` по умолчанию */
4
- key?: string;
5
- }
6
- export declare const cookieColorSchemeManager: ({ key, }?: CookieColorSchemeManager) => MantineColorSchemeManager;
@@ -1,46 +0,0 @@
1
- import { isMantineColorScheme } from "@mantine/core";
2
- import { atom } from "nanostores";
3
- import { setCookie } from "../functions/setCookie.js";
4
- const $colorScheme = atom();
5
- let unsubscribeSystemTheme;
6
- const cookieColorSchemeManager = ({ key = 'colorScheme' } = {})=>({
7
- get: (defaultValue)=>{
8
- try {
9
- return $colorScheme.get() || defaultValue;
10
- } catch {
11
- return defaultValue;
12
- }
13
- },
14
- set: (value)=>{
15
- try {
16
- setCookie(key, value);
17
- $colorScheme.set(value);
18
- } catch (error) {
19
- console.warn('[cookieColorSchemeManager] Ошибка при сохранении цветовой схемы в куки.', error);
20
- }
21
- },
22
- subscribe: (onUpdate)=>{
23
- $colorScheme.listen((newValue)=>{
24
- if (isMantineColorScheme(newValue)) {
25
- setCookie(key, newValue);
26
- onUpdate(newValue);
27
- }
28
- });
29
- const mediaQuery = window.matchMedia('(prefers-color-scheme: dark)');
30
- const handleSystemThemeChange = ()=>onUpdate('auto');
31
- mediaQuery.addEventListener('change', handleSystemThemeChange);
32
- unsubscribeSystemTheme = ()=>mediaQuery.removeEventListener('change', handleSystemThemeChange);
33
- },
34
- unsubscribe: ()=>{
35
- $colorScheme.off();
36
- if (unsubscribeSystemTheme) {
37
- unsubscribeSystemTheme();
38
- unsubscribeSystemTheme = void 0;
39
- }
40
- },
41
- clear: ()=>{
42
- setCookie(key);
43
- $colorScheme.set(void 0);
44
- }
45
- });
46
- export { cookieColorSchemeManager };
@@ -1,4 +0,0 @@
1
- export declare const defaultRequestMiddlewares: import("@tanstack/start-client-core").RequestMiddlewareAfterServer<{}, undefined, {
2
- locale: string;
3
- timeZone: string;
4
- }>[];
@@ -1,24 +0,0 @@
1
- import { createMiddleware } from "@tanstack/react-start";
2
- import { getCookie, getRequestHeader, setCookie } from "@tanstack/react-start/server";
3
- const defaultRequestMiddlewares_locale = createMiddleware().server(async ({ next })=>{
4
- const header = getRequestHeader('accept-language');
5
- const headerLocale = header?.split(',')[0] || 'ru-RU';
6
- const cookieLocale = getCookie('locale');
7
- const cookieTz = getCookie('tz');
8
- const locale = cookieLocale || headerLocale;
9
- const timeZone = cookieTz || 'UTC';
10
- setCookie('locale', locale, {
11
- path: '/',
12
- maxAge: 31536000
13
- });
14
- return next({
15
- context: {
16
- locale,
17
- timeZone
18
- }
19
- });
20
- });
21
- const defaultRequestMiddlewares = [
22
- defaultRequestMiddlewares_locale
23
- ];
24
- export { defaultRequestMiddlewares };
@@ -1,141 +0,0 @@
1
- export declare const defaultTheme: {
2
- focusRing?: "auto" | "always" | "never" | undefined;
3
- scale?: number | undefined;
4
- fontSmoothing?: boolean | undefined;
5
- white?: string | undefined;
6
- black?: string | undefined;
7
- colors?: {
8
- [x: string & {}]: import("@mantine/core").MantineColorsTuple | undefined;
9
- dark?: import("@mantine/core").MantineColorsTuple | undefined;
10
- gray?: import("@mantine/core").MantineColorsTuple | undefined;
11
- red?: import("@mantine/core").MantineColorsTuple | undefined;
12
- pink?: import("@mantine/core").MantineColorsTuple | undefined;
13
- grape?: import("@mantine/core").MantineColorsTuple | undefined;
14
- violet?: import("@mantine/core").MantineColorsTuple | undefined;
15
- indigo?: import("@mantine/core").MantineColorsTuple | undefined;
16
- blue?: import("@mantine/core").MantineColorsTuple | undefined;
17
- cyan?: import("@mantine/core").MantineColorsTuple | undefined;
18
- green?: import("@mantine/core").MantineColorsTuple | undefined;
19
- lime?: import("@mantine/core").MantineColorsTuple | undefined;
20
- yellow?: import("@mantine/core").MantineColorsTuple | undefined;
21
- orange?: import("@mantine/core").MantineColorsTuple | undefined;
22
- teal?: import("@mantine/core").MantineColorsTuple | undefined;
23
- } | undefined;
24
- primaryShade?: import("@mantine/core").MantineColorShade | {
25
- light?: import("@mantine/core").MantineColorShade | undefined;
26
- dark?: import("@mantine/core").MantineColorShade | undefined;
27
- } | undefined;
28
- primaryColor?: string | undefined;
29
- variantColorResolver?: import("@mantine/core").VariantColorsResolver | undefined;
30
- autoContrast?: boolean | undefined;
31
- luminanceThreshold?: number | undefined;
32
- fontFamily?: string | undefined;
33
- fontFamilyMonospace?: string | undefined;
34
- headings?: {
35
- fontFamily?: string | undefined;
36
- fontWeight?: string | undefined;
37
- textWrap?: "balance" | "nowrap" | "wrap" | "stable" | "pretty" | undefined;
38
- sizes?: {
39
- h1?: {
40
- fontSize?: string | undefined;
41
- fontWeight?: string | undefined;
42
- lineHeight?: string | undefined;
43
- } | undefined;
44
- h2?: {
45
- fontSize?: string | undefined;
46
- fontWeight?: string | undefined;
47
- lineHeight?: string | undefined;
48
- } | undefined;
49
- h3?: {
50
- fontSize?: string | undefined;
51
- fontWeight?: string | undefined;
52
- lineHeight?: string | undefined;
53
- } | undefined;
54
- h4?: {
55
- fontSize?: string | undefined;
56
- fontWeight?: string | undefined;
57
- lineHeight?: string | undefined;
58
- } | undefined;
59
- h5?: {
60
- fontSize?: string | undefined;
61
- fontWeight?: string | undefined;
62
- lineHeight?: string | undefined;
63
- } | undefined;
64
- h6?: {
65
- fontSize?: string | undefined;
66
- fontWeight?: string | undefined;
67
- lineHeight?: string | undefined;
68
- } | undefined;
69
- } | undefined;
70
- } | undefined;
71
- radius?: {
72
- [x: string & {}]: string | undefined;
73
- xs?: string | undefined;
74
- sm?: string | undefined;
75
- md?: string | undefined;
76
- lg?: string | undefined;
77
- xl?: string | undefined;
78
- } | undefined;
79
- defaultRadius?: import("@mantine/core").MantineRadius | undefined;
80
- spacing?: {
81
- [x: number]: string | undefined;
82
- [x: string & {}]: string | undefined;
83
- xs?: string | undefined;
84
- sm?: string | undefined;
85
- md?: string | undefined;
86
- lg?: string | undefined;
87
- xl?: string | undefined;
88
- } | undefined;
89
- fontSizes?: {
90
- [x: string & {}]: string | undefined;
91
- xs?: string | undefined;
92
- sm?: string | undefined;
93
- md?: string | undefined;
94
- lg?: string | undefined;
95
- xl?: string | undefined;
96
- } | undefined;
97
- lineHeights?: {
98
- [x: string & {}]: string | undefined;
99
- xs?: string | undefined;
100
- sm?: string | undefined;
101
- md?: string | undefined;
102
- lg?: string | undefined;
103
- xl?: string | undefined;
104
- } | undefined;
105
- breakpoints?: {
106
- [x: string & {}]: string | undefined;
107
- xs?: string | undefined;
108
- sm?: string | undefined;
109
- md?: string | undefined;
110
- lg?: string | undefined;
111
- xl?: string | undefined;
112
- } | undefined;
113
- shadows?: {
114
- [x: string & {}]: string | undefined;
115
- xs?: string | undefined;
116
- sm?: string | undefined;
117
- md?: string | undefined;
118
- lg?: string | undefined;
119
- xl?: string | undefined;
120
- } | undefined;
121
- respectReducedMotion?: boolean | undefined;
122
- cursorType?: "default" | "pointer" | undefined;
123
- defaultGradient?: {
124
- from?: string | undefined;
125
- to?: string | undefined;
126
- deg?: number | undefined;
127
- } | undefined;
128
- activeClassName?: string | undefined;
129
- focusClassName?: string | undefined;
130
- components?: {
131
- [x: string]: {
132
- classNames?: any;
133
- styles?: any;
134
- vars?: any;
135
- defaultProps?: any;
136
- } | undefined;
137
- } | undefined;
138
- other?: {
139
- [x: string]: any;
140
- } | undefined;
141
- };
@@ -1,24 +0,0 @@
1
- import { Modal, createTheme } from "@mantine/core";
2
- const defaultTheme = createTheme({
3
- components: {
4
- Modal: Modal.extend({
5
- defaultProps: {
6
- centered: true,
7
- padding: 'lg'
8
- }
9
- }),
10
- ModalTitle: Modal.Title.extend({
11
- defaultProps: {
12
- pr: 24
13
- }
14
- }),
15
- ModalCloseButton: Modal.CloseButton.extend({
16
- defaultProps: {
17
- pos: 'absolute',
18
- top: 4,
19
- right: 4
20
- }
21
- })
22
- }
23
- });
24
- export { defaultTheme };
@@ -1,3 +0,0 @@
1
- export declare function getCookie<T extends string>(name: string, defaultValue: T): T;
2
- export declare function getCookie(name: string, defaultValue: string): string;
3
- export declare function getCookie(name: string, defaultValue?: undefined): string | undefined;
@@ -1,10 +0,0 @@
1
- /**
2
- * Изоморфная функция для установки значения куки.
3
- * На клиенте использует библиотеку js-cookie для работы с куками.
4
- * На сервере использует функции getCookie и setCookie из tanstack start.
5
- *
6
- * @param {string} name - Имя куки
7
- * @param {string} value - Значение куки, если не указано, кука будет удалена
8
- * @param {number} [expires=7] - Количество дней до истечения срока действия куки (по умолчанию 7 дней)
9
- */
10
- export declare const setCookie: import("@tanstack/start-fn-stubs").IsomorphicFn<[name: string, value?: string | undefined, expires?: number | undefined], void, void>;
@@ -1,14 +0,0 @@
1
- interface Cookie {
2
- name: string;
3
- value?: string;
4
- expires?: number;
5
- }
6
- /**
7
- * Клиентская функция для установки значения нескольких куки.
8
- * На клиенте использует библиотеку js-cookie для работы с куками.
9
- * На сервере использует функции getCookie и setCookie из tanstack start.
10
- *
11
- * @param {Cookie[]} cookies - Массив объектов с данными куки *
12
- */
13
- export declare const setCookies: (cookies: Cookie[]) => void;
14
- export {};
@@ -1,4 +0,0 @@
1
- import { type UseMutationOptions } from '@tanstack/react-query';
2
- export declare const useMutation: <T, K = void>(fn: ({ data }: {
3
- data: T;
4
- }) => Promise<K>, options?: Omit<UseMutationOptions<K, Error, T>, "mutationFn">) => import("@tanstack/react-query").UseMutationResult<K, Error, T, unknown>;
@@ -1,4 +0,0 @@
1
- import { type UseMutationOptions } from '@tanstack/react-query';
2
- export declare const useMutationWithInvalidate: <T, K = void>(fn: ({ data }: {
3
- data: T;
4
- }) => Promise<K>, queryKey: string[], options?: Omit<UseMutationOptions<K, Error, T>, "mutationFn" | "onSettled">) => import("@tanstack/react-query").UseMutationResult<K, Error, T, unknown>;
package/dist/styles.css DELETED
@@ -1,74 +0,0 @@
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
-
@@ -1,9 +0,0 @@
1
- import { type CodecOptions, Surreal } from 'surrealdb';
2
- export declare const getDB: (params?: {
3
- url?: string;
4
- namespace?: string;
5
- database?: string;
6
- username?: string;
7
- password?: string;
8
- codecOptions?: CodecOptions;
9
- } | undefined) => Promise<Surreal>;
@@ -1,2 +0,0 @@
1
- export declare const surrealDeleteFn: import("@tanstack/start-client-core").RequiredFetcher<undefined, (data: string) => string, Promise<void>>;
2
- export declare const surrealUnsubscribeFn: import("@tanstack/start-client-core").RequiredFetcher<undefined, (data: string) => string, Promise<void>>;
@@ -1,17 +0,0 @@
1
- import { RecordId } from 'surrealdb';
2
- /**
3
- * Type that converts specified string paths to RecordId, others stay as their original types
4
- */
5
- type DeserializeResult<T, IdPaths extends string = never> = T extends string ? RecordId<string> : T extends (infer U)[] ? U extends object ? {
6
- [K in keyof U]: K extends IdPaths ? RecordId<string> : U[K];
7
- }[] : DeserializeResult<U, IdPaths>[] : T extends object ? T extends Date ? T : {
8
- [K in keyof T]: K extends IdPaths ? RecordId<string> : T[K];
9
- } : T;
10
- /**
11
- * Deserializes DTO back to SurrealDB Record recursively based on specified ID paths
12
- */
13
- export declare function deserialize<T, K extends keyof T & string>(dto: T[], idPaths: K[]): DeserializeResult<T, K>[];
14
- export declare function deserialize<T, K extends keyof T & string>(dto: T, idPaths: K[]): DeserializeResult<T, K>;
15
- export declare function deserialize<T>(dto: T[]): DeserializeResult<T>[];
16
- export declare function deserialize<T>(dto: T): DeserializeResult<T>;
17
- export {};
@@ -1,6 +0,0 @@
1
- type EncryptionInstance = {
2
- encrypt(text: string): string;
3
- decrypt(encryptedText: string): string;
4
- };
5
- export declare const encryptionFn: (secretHash: string) => EncryptionInstance;
6
- export {};
@@ -1,6 +0,0 @@
1
- import type { SVGProps } from 'react';
2
- interface Props extends SVGProps<SVGSVGElement> {
3
- expanded?: boolean;
4
- }
5
- export declare const AnimatedChevron: ({ expanded, style, ...props }: Props) => import("react/jsx-runtime").JSX.Element;
6
- export {};
@@ -1,2 +0,0 @@
1
- import { type ReactCodeMirrorProps } from '@uiw/react-codemirror';
2
- export declare const JsonInput: (props: ReactCodeMirrorProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,16 +0,0 @@
1
- import { type ActionIconProps, type AnchorProps, type ButtonProps, type UnstyledButtonProps } from '@mantine/core';
2
- import { type LinkComponent } from '@tanstack/react-router';
3
- interface MantineAnchorProps extends Omit<AnchorProps, 'href'> {
4
- }
5
- interface MantineButtonProps extends Omit<ButtonProps, 'href'> {
6
- }
7
- interface MantineActionIconProps extends Omit<ActionIconProps, 'href'> {
8
- }
9
- interface MantineUnstyledButtonProps extends Omit<UnstyledButtonProps, 'href'> {
10
- }
11
- export declare const RouterLink: LinkComponent<import("react").ForwardRefExoticComponent<MantineAnchorProps & import("react").RefAttributes<HTMLAnchorElement>>> & {
12
- Button: LinkComponent<import("react").ForwardRefExoticComponent<MantineButtonProps & import("react").RefAttributes<HTMLButtonElement>>>;
13
- ActionIcon: LinkComponent<import("react").ForwardRefExoticComponent<MantineActionIconProps & import("react").RefAttributes<HTMLButtonElement>>>;
14
- UnstyledButton: LinkComponent<import("react").ForwardRefExoticComponent<MantineUnstyledButtonProps & import("react").RefAttributes<HTMLButtonElement>>>;
15
- };
16
- export {};
@@ -1,3 +0,0 @@
1
- export declare const Content: ({ height }: {
2
- height: string;
3
- }) => import("react/jsx-runtime").JSX.Element;
@@ -1,17 +0,0 @@
1
- import type { Editor } from '@tiptap/react';
2
- import type { EditorProps } from './types';
3
- interface EditorContext {
4
- editor: Editor | null;
5
- editable?: boolean;
6
- setEditable: (value: boolean) => void;
7
- disabledToolbar: boolean;
8
- setDisabledToolbar: (value: boolean) => void;
9
- focused: boolean;
10
- setFocused: (value: boolean) => void;
11
- editedByUser: boolean;
12
- setEditedByUser: (value: boolean) => void;
13
- }
14
- declare const EditorContext: import("react").Context<EditorContext | null>;
15
- export declare const Provider: ({ children, initialContent, initialEditable, initialDisabledToolbar, onChange, }: EditorProps) => import("react/jsx-runtime").JSX.Element;
16
- export declare const useEditor: () => EditorContext;
17
- export {};
@@ -1,2 +0,0 @@
1
- import { type RichTextEditorProps } from '@mantine/tiptap';
2
- export declare const Root: ({ children, classNames, ...props }: Omit<RichTextEditorProps, "editor">) => import("react/jsx-runtime").JSX.Element;
@@ -1,5 +0,0 @@
1
- import type { ReactNode } from 'react';
2
- export declare const Toolbar: ({ saving, children, }: {
3
- saving?: boolean;
4
- children?: ReactNode;
5
- }) => import("react/jsx-runtime").JSX.Element | null;
@@ -1,12 +0,0 @@
1
- export declare const Editor: {
2
- Root: ({ children, classNames, ...props }: Omit<import("@mantine/tiptap").RichTextEditorProps, "editor">) => import("react/jsx-runtime").JSX.Element;
3
- Content: ({ height }: {
4
- height: string;
5
- }) => import("react/jsx-runtime").JSX.Element;
6
- Toolbar: ({ saving, children, }: {
7
- saving?: boolean;
8
- children?: import("react").ReactNode;
9
- }) => import("react/jsx-runtime").JSX.Element | null;
10
- Provider: ({ children, initialContent, initialEditable, initialDisabledToolbar, onChange, }: import("./types").EditorProps) => import("react/jsx-runtime").JSX.Element;
11
- };
12
- export { useEditor } from './Provider';
@@ -1,7 +0,0 @@
1
- export interface EditorProps {
2
- children: React.ReactNode;
3
- initialContent?: string;
4
- initialEditable?: boolean;
5
- initialDisabledToolbar?: boolean;
6
- onChange?: (value: string) => void;
7
- }
@@ -1,2 +0,0 @@
1
- import type { ErrorComponentProps } from '@tanstack/react-router';
2
- export declare const DefaultError: ({ error }: ErrorComponentProps) => import("react/jsx-runtime").JSX.Element;
@@ -1 +0,0 @@
1
- export declare const DefaultNotFound: () => import("react/jsx-runtime").JSX.Element;
@@ -1 +0,0 @@
1
- export declare const Forbidden: () => import("react/jsx-runtime").JSX.Element;
@@ -1 +0,0 @@
1
- export declare const defaultErrorNotification: (error: Error) => string;
@@ -1,4 +0,0 @@
1
- export { DefaultError } from './DefaultError';
2
- export { DefaultNotFound } from './DefaultNotFound';
3
- export { defaultErrorNotification } from './defaultErrorNotification';
4
- export { Forbidden } from './Forbidden';
@@ -1,4 +0,0 @@
1
- import type { AnyFormApi } from '@tanstack/react-form';
2
- export declare const blurOnError: ({ formApi }: {
3
- formApi: AnyFormApi;
4
- }) => void;
@@ -1,5 +0,0 @@
1
- import { type ButtonProps } from '@mantine/core';
2
- export declare const CancelButton: (props: ButtonProps & {
3
- label?: string;
4
- onClick?: () => void;
5
- }) => import("react/jsx-runtime").JSX.Element;
@@ -1,5 +0,0 @@
1
- import { type ButtonProps } from '@mantine/core';
2
- export declare const SubmitButton: (props: ButtonProps & {
3
- label?: string;
4
- onClick?: () => void;
5
- }) => import("react/jsx-runtime").JSX.Element;
@@ -1,4 +0,0 @@
1
- import { type ActionIconProps } from '@mantine/core';
2
- export declare const SubscribeActionIcon: (props: ActionIconProps & {
3
- onClick?: () => void;
4
- }) => import("react/jsx-runtime").JSX.Element;
@@ -1,5 +0,0 @@
1
- import { type ButtonProps } from '@mantine/core';
2
- export declare const SubscribeButton: (props: ButtonProps & {
3
- label: string;
4
- onClick?: () => void;
5
- }) => import("react/jsx-runtime").JSX.Element;
@@ -1,4 +0,0 @@
1
- export * from './CancelButton';
2
- export * from './SubmitButton';
3
- export * from './SubscribeActionIcon';
4
- export * from './SubscribeButton';