@tulip-systems/core 0.9.0 → 0.10.1
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/commands.d.mts +3 -2
- package/dist/commands.mjs +2 -1
- package/dist/components/client.d.mts +2 -1
- package/dist/components/client.mjs +2 -1
- package/dist/components/editor/extensions/file-handler/extension.d.mts +1 -1
- package/dist/components/editor/extensions/image/extension.d.mts +1 -1
- package/dist/components/editor/extensions/skeleton/extension.mjs +1 -1
- package/dist/components/editor/lib/constants.d.mts +1 -1
- package/dist/components/editor/lib/extensions.d.mts +1 -1
- package/dist/components/editor/lib/helpers.d.mts +5 -1
- package/dist/components/editor/lib/helpers.mjs +8 -1
- package/dist/components/layouts/root-layout.server.d.mts +3 -2
- package/dist/components/layouts/root-layout.server.mjs +1 -3
- package/dist/components/server.d.mts +2 -2
- package/dist/components/themes/color-theme-provider.client.d.mts +27 -0
- package/dist/components/themes/color-theme-provider.client.mjs +59 -0
- package/dist/components/themes/color-theme.d.mts +29 -0
- package/dist/components/themes/color-theme.mjs +32 -0
- package/dist/components/ui/badge.d.mts +1 -1
- package/dist/components/ui/button.d.mts +1 -1
- package/dist/components/ui/item.d.mts +1 -1
- package/dist/components.d.mts +3 -2
- package/dist/components.mjs +3 -2
- package/dist/data-tables/client.d.mts +2 -1
- package/dist/data-tables/client.mjs +2 -1
- package/dist/modules/auth/handler/create-client.client.d.mts +4 -4
- package/dist/modules/commands/components/menus/context-menu.client.d.mts +6 -7
- package/dist/modules/commands/components/menus/dropdown-menu.client.d.mts +6 -7
- package/dist/modules/commands/components/menus/floating-menu.client.d.mts +6 -7
- package/dist/modules/commands/components/menus/inline-menu.client.d.mts +6 -7
- package/dist/modules/commands/components/menus/responsive-menu.client.d.mts +5 -6
- package/dist/modules/commands/components/render-command.mjs +3 -5
- package/dist/modules/commands/lib/builder.d.mts +114 -18
- package/dist/modules/commands/lib/builder.mjs +42 -7
- package/dist/modules/commands/lib/registery.d.mts +47 -14
- package/dist/modules/commands/lib/registery.mjs +76 -16
- package/dist/modules/commands/lib/utils.d.mts +11 -0
- package/dist/modules/commands/lib/utils.mjs +14 -0
- package/dist/modules/data-tables/components/footer.mjs +3 -0
- package/dist/modules/data-tables/hooks/use-context.client.d.mts +2 -2
- package/dist/modules/data-tables/lib/types.d.mts +3 -3
- package/dist/modules/data-tables/strategies/local/components.mjs +25 -0
- package/dist/modules/data-tables/strategies/local/strategy.d.mts +12 -0
- package/dist/modules/data-tables/strategies/local/strategy.mjs +31 -0
- package/dist/modules/inline/components/inputs/combobox-dropdown.client.d.mts +4 -3
- package/dist/modules/inline/components/inputs/combobox.client.d.mts +4 -3
- package/dist/modules/inline/components/inputs/date-time.client.d.mts +4 -3
- package/dist/modules/inline/components/inputs/editor.client.d.mts +4 -3
- package/dist/modules/inline/components/inputs/input.client.d.mts +7 -5
- package/dist/modules/inline/components/inputs/select.client.d.mts +4 -3
- package/dist/modules/inline/components/inputs/switch.client.d.mts +4 -3
- package/dist/modules/inline/lib/variants.d.mts +1 -1
- package/dist/modules/router/lib/query-client.d.mts +2 -1
- package/dist/modules/router/lib/query-client.mjs +2 -2
- package/dist/modules/storage/components/dropzone.client.d.mts +2 -2
- package/dist/modules/storage/lib/service.server.d.mts +21 -21
- package/dist/router.d.mts +2 -1
- package/dist/router.mjs +2 -1
- package/dist/src/components/editor/extensions/file-handler/extension.d.mts +1 -1
- package/dist/src/components/editor/extensions/image/extension.d.mts +1 -1
- package/dist/src/components/editor/extensions/skeleton/extension.mjs +1 -1
- package/dist/src/components/editor/lib/constants.d.mts +1 -1
- package/dist/src/components/editor/lib/extensions.d.mts +1 -1
- package/dist/src/components/editor/lib/helpers.d.mts +5 -1
- package/dist/src/components/editor/lib/helpers.mjs +8 -1
- package/dist/src/components/layouts/root-layout.server.d.mts +3 -2
- package/dist/src/components/layouts/root-layout.server.mjs +1 -3
- package/dist/src/components/themes/color-theme-provider.client.d.mts +27 -0
- package/dist/src/components/themes/color-theme-provider.client.mjs +59 -0
- package/dist/src/components/themes/color-theme.d.mts +29 -0
- package/dist/src/components/themes/color-theme.mjs +32 -0
- package/dist/src/components/ui/badge.d.mts +1 -1
- package/dist/src/components/ui/button-group.d.mts +1 -1
- package/dist/src/components/ui/button.d.mts +2 -2
- package/dist/src/components/ui/field.client.d.mts +1 -1
- package/dist/src/modules/commands/components/menus/context-menu.client.d.mts +6 -7
- package/dist/src/modules/commands/components/menus/dropdown-menu.client.d.mts +6 -7
- package/dist/src/modules/commands/components/menus/floating-menu.client.d.mts +6 -7
- package/dist/src/modules/commands/components/menus/inline-menu.client.d.mts +6 -7
- package/dist/src/modules/commands/components/menus/responsive-menu.client.d.mts +5 -6
- package/dist/src/modules/commands/components/render-command.mjs +3 -5
- package/dist/src/modules/commands/lib/builder.d.mts +114 -18
- package/dist/src/modules/commands/lib/builder.mjs +42 -7
- package/dist/src/modules/commands/lib/registery.d.mts +47 -14
- package/dist/src/modules/commands/lib/registery.mjs +76 -16
- package/dist/src/modules/commands/lib/utils.d.mts +11 -0
- package/dist/src/modules/commands/lib/utils.mjs +14 -0
- package/dist/src/modules/data-tables/components/footer.mjs +3 -0
- package/dist/src/modules/data-tables/hooks/use-context.client.d.mts +2 -2
- package/dist/src/modules/data-tables/lib/types.d.mts +3 -3
- package/dist/src/modules/data-tables/strategies/local/components.mjs +25 -0
- package/dist/src/modules/data-tables/strategies/local/strategy.d.mts +12 -0
- package/dist/src/modules/data-tables/strategies/local/strategy.mjs +31 -0
- package/dist/src/modules/inline/components/inputs/combobox-dropdown.client.d.mts +4 -3
- package/dist/src/modules/inline/components/inputs/combobox.client.d.mts +4 -3
- package/dist/src/modules/inline/components/inputs/date-time.client.d.mts +4 -3
- package/dist/src/modules/inline/components/inputs/editor.client.d.mts +4 -3
- package/dist/src/modules/inline/components/inputs/input.client.d.mts +7 -5
- package/dist/src/modules/inline/components/inputs/select.client.d.mts +4 -3
- package/dist/src/modules/inline/components/inputs/switch.client.d.mts +4 -3
- package/dist/src/modules/router/lib/query-client.d.mts +2 -1
- package/dist/src/modules/router/lib/query-client.mjs +2 -2
- package/package.json +1 -1
- package/src/components/editor/lib/helpers.ts +8 -0
- package/src/components/entry.client.ts +1 -1
- package/src/components/entry.ts +1 -1
- package/src/components/layouts/root-layout.server.tsx +4 -2
- package/src/components/themes/color-theme-provider.client.tsx +82 -0
- package/src/components/themes/color-theme.ts +32 -0
- package/src/modules/commands/components/menus/context-menu.client.tsx +11 -11
- package/src/modules/commands/components/menus/dropdown-menu.client.tsx +9 -10
- package/src/modules/commands/components/menus/floating-menu.client.tsx +9 -10
- package/src/modules/commands/components/menus/inline-menu.client.tsx +9 -10
- package/src/modules/commands/components/menus/responsive-menu.client.tsx +7 -8
- package/src/modules/commands/components/render-command.tsx +17 -13
- package/src/modules/commands/entry.ts +1 -0
- package/src/modules/commands/lib/builder.ts +216 -36
- package/src/modules/commands/lib/registery.ts +210 -47
- package/src/modules/commands/lib/utils.ts +10 -0
- package/src/modules/data-tables/components/footer.tsx +9 -0
- package/src/modules/data-tables/entry.client.ts +1 -0
- package/src/modules/data-tables/hooks/use-context.client.tsx +2 -2
- package/src/modules/data-tables/lib/types.ts +3 -3
- package/src/modules/data-tables/strategies/local/components.tsx +17 -0
- package/src/modules/data-tables/strategies/local/strategy.ts +33 -0
- package/src/modules/inline/components/inputs/combobox-dropdown.client.tsx +11 -5
- package/src/modules/inline/components/inputs/combobox.client.tsx +11 -5
- package/src/modules/inline/components/inputs/date-time.client.tsx +11 -5
- package/src/modules/inline/components/inputs/editor.client.tsx +11 -5
- package/src/modules/inline/components/inputs/input.client.tsx +21 -9
- package/src/modules/inline/components/inputs/select.client.tsx +11 -5
- package/src/modules/inline/components/inputs/switch.client.tsx +11 -5
- package/src/modules/router/entry.ts +1 -0
- package/src/modules/router/lib/query-client.ts +2 -2
- package/src/styles.css +317 -2
|
@@ -16,14 +16,19 @@ import { type InlineEditVariantsProps, inlineEditVariants } from "../../lib/vari
|
|
|
16
16
|
|
|
17
17
|
type EditorInlineTrigger = "change" | "blur";
|
|
18
18
|
|
|
19
|
+
type InlineEditorSchema =
|
|
20
|
+
| z.ZodType<EditorJSONContent | null, EditorJSONContent | null>
|
|
21
|
+
| z.ZodType<EditorJSONContent, EditorJSONContent>;
|
|
22
|
+
|
|
19
23
|
export type InlineEditorProps<
|
|
24
|
+
TSchema extends InlineEditorSchema = z.ZodType<EditorJSONContent | null, EditorJSONContent | null>,
|
|
20
25
|
TData = unknown,
|
|
21
26
|
TError = DefaultError,
|
|
22
27
|
TVariables = unknown,
|
|
23
28
|
TOnMutateResult = unknown,
|
|
24
29
|
> = useInlineEditOptions<
|
|
25
30
|
EditorInlineTrigger,
|
|
26
|
-
|
|
31
|
+
TSchema,
|
|
27
32
|
TData,
|
|
28
33
|
TError,
|
|
29
34
|
TVariables,
|
|
@@ -33,6 +38,7 @@ export type InlineEditorProps<
|
|
|
33
38
|
Omit<EditorProps, "value" | "onUpdate" | "onBlur" | "variant">;
|
|
34
39
|
|
|
35
40
|
export function InlineEditor<
|
|
41
|
+
TSchema extends InlineEditorSchema = z.ZodType<EditorJSONContent | null, EditorJSONContent | null>,
|
|
36
42
|
TData = unknown,
|
|
37
43
|
TError = DefaultError,
|
|
38
44
|
TVariables = unknown,
|
|
@@ -48,11 +54,11 @@ export function InlineEditor<
|
|
|
48
54
|
strategy,
|
|
49
55
|
className,
|
|
50
56
|
children,
|
|
51
|
-
}: InlineEditorProps<TData, TError, TVariables, TOnMutateResult>) {
|
|
57
|
+
}: InlineEditorProps<TSchema, TData, TError, TVariables, TOnMutateResult>) {
|
|
52
58
|
const state = useInlineState<EditorJSONContent | null>(initialValue);
|
|
53
59
|
const access = useInlineAccess({ permission, disabled });
|
|
54
60
|
const mutations = useInlineMutation<
|
|
55
|
-
|
|
61
|
+
TSchema,
|
|
56
62
|
EditorJSONContent | null,
|
|
57
63
|
TData,
|
|
58
64
|
TError,
|
|
@@ -67,7 +73,7 @@ export function InlineEditor<
|
|
|
67
73
|
|
|
68
74
|
const { handleTrigger } = useInlineStrategy<
|
|
69
75
|
EditorInlineTrigger,
|
|
70
|
-
|
|
76
|
+
TSchema,
|
|
71
77
|
EditorJSONContent | null
|
|
72
78
|
>({
|
|
73
79
|
strategy,
|
|
@@ -75,7 +81,7 @@ export function InlineEditor<
|
|
|
75
81
|
mutations,
|
|
76
82
|
parser: {
|
|
77
83
|
decode: (content) => content,
|
|
78
|
-
encode: (content) => content
|
|
84
|
+
encode: (content) => content as z.input<TSchema>,
|
|
79
85
|
},
|
|
80
86
|
});
|
|
81
87
|
|
|
@@ -16,6 +16,14 @@ import { type InlineEditVariantsProps, inlineEditVariants } from "../../lib/vari
|
|
|
16
16
|
|
|
17
17
|
type InputInlineTrigger = "change" | "blur";
|
|
18
18
|
|
|
19
|
+
type InlineStringSchema =
|
|
20
|
+
| z.ZodType<string | null, string | null>
|
|
21
|
+
| z.ZodType<string, string>;
|
|
22
|
+
|
|
23
|
+
type InlineNumberSchema =
|
|
24
|
+
| z.ZodType<number | null, number | null>
|
|
25
|
+
| z.ZodType<number, number>;
|
|
26
|
+
|
|
19
27
|
type InlineEditInputProps<
|
|
20
28
|
TSchema extends z.ZodType,
|
|
21
29
|
TData = unknown,
|
|
@@ -30,7 +38,7 @@ type InlineEditInputProps<
|
|
|
30
38
|
* The inline edit string input component.
|
|
31
39
|
*/
|
|
32
40
|
export function InlineStringInput<
|
|
33
|
-
TSchema extends z.ZodType<string | null, string | null>,
|
|
41
|
+
TSchema extends InlineStringSchema = z.ZodType<string | null, string | null>,
|
|
34
42
|
TData = unknown,
|
|
35
43
|
TError = DefaultError,
|
|
36
44
|
TVariables = unknown,
|
|
@@ -98,6 +106,7 @@ const parseValueAsNumber = (valueAsNumber: number): number | null =>
|
|
|
98
106
|
!Number.isNaN(Number(valueAsNumber)) ? valueAsNumber : null;
|
|
99
107
|
|
|
100
108
|
export function InlineNumberInput<
|
|
109
|
+
TSchema extends InlineNumberSchema = z.ZodType<number | null, number | null>,
|
|
101
110
|
TData = unknown,
|
|
102
111
|
TError = DefaultError,
|
|
103
112
|
TVariables = unknown,
|
|
@@ -113,7 +122,7 @@ export function InlineNumberInput<
|
|
|
113
122
|
disabled,
|
|
114
123
|
...props
|
|
115
124
|
}: InlineEditInputProps<
|
|
116
|
-
|
|
125
|
+
TSchema,
|
|
117
126
|
TData,
|
|
118
127
|
TError,
|
|
119
128
|
TVariables,
|
|
@@ -122,7 +131,7 @@ export function InlineNumberInput<
|
|
|
122
131
|
const state = useInlineState<number | null>(initialValue);
|
|
123
132
|
const access = useInlineAccess({ permission, disabled });
|
|
124
133
|
const mutations = useInlineMutation<
|
|
125
|
-
|
|
134
|
+
TSchema,
|
|
126
135
|
number | null,
|
|
127
136
|
TData,
|
|
128
137
|
TError,
|
|
@@ -137,7 +146,7 @@ export function InlineNumberInput<
|
|
|
137
146
|
|
|
138
147
|
const { handleTrigger } = useInlineStrategy<
|
|
139
148
|
InputInlineTrigger,
|
|
140
|
-
|
|
149
|
+
TSchema,
|
|
141
150
|
number | null
|
|
142
151
|
>({
|
|
143
152
|
strategy,
|
|
@@ -145,7 +154,7 @@ export function InlineNumberInput<
|
|
|
145
154
|
mutations,
|
|
146
155
|
parser: {
|
|
147
156
|
decode: (value) => value,
|
|
148
|
-
encode: (value) => value
|
|
157
|
+
encode: (value) => value as z.input<TSchema>,
|
|
149
158
|
},
|
|
150
159
|
});
|
|
151
160
|
|
|
@@ -172,6 +181,9 @@ export function InlineNumberInput<
|
|
|
172
181
|
* The inline edit decimal input component.
|
|
173
182
|
*/
|
|
174
183
|
export function InlineDecimalInput<
|
|
184
|
+
TSchema extends
|
|
185
|
+
| z.ZodType<string | null, string | null>
|
|
186
|
+
| z.ZodType<string, string> = z.ZodType<string | null, string | null>,
|
|
175
187
|
TData = unknown,
|
|
176
188
|
TError = DefaultError,
|
|
177
189
|
TVariables = unknown,
|
|
@@ -187,7 +199,7 @@ export function InlineDecimalInput<
|
|
|
187
199
|
disabled,
|
|
188
200
|
...props
|
|
189
201
|
}: InlineEditInputProps<
|
|
190
|
-
|
|
202
|
+
TSchema,
|
|
191
203
|
TData,
|
|
192
204
|
TError,
|
|
193
205
|
TVariables,
|
|
@@ -196,7 +208,7 @@ export function InlineDecimalInput<
|
|
|
196
208
|
const state = useInlineState<string | null>(initialValue);
|
|
197
209
|
const access = useInlineAccess({ permission, disabled });
|
|
198
210
|
const mutations = useInlineMutation<
|
|
199
|
-
|
|
211
|
+
TSchema,
|
|
200
212
|
string | null,
|
|
201
213
|
TData,
|
|
202
214
|
TError,
|
|
@@ -211,7 +223,7 @@ export function InlineDecimalInput<
|
|
|
211
223
|
|
|
212
224
|
const { handleTrigger } = useInlineStrategy<
|
|
213
225
|
InputInlineTrigger,
|
|
214
|
-
|
|
226
|
+
TSchema,
|
|
215
227
|
string | null
|
|
216
228
|
>({
|
|
217
229
|
strategy,
|
|
@@ -219,7 +231,7 @@ export function InlineDecimalInput<
|
|
|
219
231
|
mutations,
|
|
220
232
|
parser: {
|
|
221
233
|
decode: (value) => value,
|
|
222
|
-
encode: (value) => value
|
|
234
|
+
encode: (value) => value as z.input<TSchema>,
|
|
223
235
|
},
|
|
224
236
|
});
|
|
225
237
|
|
|
@@ -23,7 +23,12 @@ import { type InlineEditVariantsProps, inlineEditVariants } from "../../lib/vari
|
|
|
23
23
|
|
|
24
24
|
type SelectInlineTrigger = "commit";
|
|
25
25
|
|
|
26
|
+
type InlineStringSchema =
|
|
27
|
+
| z.ZodType<string | null, string | null>
|
|
28
|
+
| z.ZodType<string, string>;
|
|
29
|
+
|
|
26
30
|
type InlineSelectProps<
|
|
31
|
+
TSchema extends InlineStringSchema = z.ZodType<string | null, string | null>,
|
|
27
32
|
TData = unknown,
|
|
28
33
|
TError = DefaultError,
|
|
29
34
|
TVariables = unknown,
|
|
@@ -31,7 +36,7 @@ type InlineSelectProps<
|
|
|
31
36
|
> = Omit<ComponentProps<typeof Select>, "value" | "defaultValue"> &
|
|
32
37
|
useInlineEditOptions<
|
|
33
38
|
SelectInlineTrigger,
|
|
34
|
-
|
|
39
|
+
TSchema,
|
|
35
40
|
TData,
|
|
36
41
|
TError,
|
|
37
42
|
TVariables,
|
|
@@ -39,6 +44,7 @@ type InlineSelectProps<
|
|
|
39
44
|
>;
|
|
40
45
|
|
|
41
46
|
export function InlineSelect<
|
|
47
|
+
TSchema extends InlineStringSchema = z.ZodType<string | null, string | null>,
|
|
42
48
|
TData = unknown,
|
|
43
49
|
TError = DefaultError,
|
|
44
50
|
TVariables = unknown,
|
|
@@ -52,11 +58,11 @@ export function InlineSelect<
|
|
|
52
58
|
disabled,
|
|
53
59
|
onValueChange,
|
|
54
60
|
...props
|
|
55
|
-
}: InlineSelectProps<TData, TError, TVariables, TOnMutateResult>) {
|
|
61
|
+
}: InlineSelectProps<TSchema, TData, TError, TVariables, TOnMutateResult>) {
|
|
56
62
|
const state = useInlineState<string | null>(initialValue);
|
|
57
63
|
const access = useInlineAccess({ permission, disabled });
|
|
58
64
|
const mutations = useInlineMutation<
|
|
59
|
-
|
|
65
|
+
TSchema,
|
|
60
66
|
string | null,
|
|
61
67
|
TData,
|
|
62
68
|
TError,
|
|
@@ -71,7 +77,7 @@ export function InlineSelect<
|
|
|
71
77
|
|
|
72
78
|
const { handleTrigger } = useInlineStrategy<
|
|
73
79
|
SelectInlineTrigger,
|
|
74
|
-
|
|
80
|
+
TSchema,
|
|
75
81
|
string | null
|
|
76
82
|
>({
|
|
77
83
|
strategy,
|
|
@@ -79,7 +85,7 @@ export function InlineSelect<
|
|
|
79
85
|
mutations,
|
|
80
86
|
parser: {
|
|
81
87
|
decode: (value) => value,
|
|
82
|
-
encode: (value) => value
|
|
88
|
+
encode: (value) => value as z.input<TSchema>,
|
|
83
89
|
},
|
|
84
90
|
});
|
|
85
91
|
|
|
@@ -14,7 +14,12 @@ import {
|
|
|
14
14
|
|
|
15
15
|
type SwitchInlineTrigger = "commit";
|
|
16
16
|
|
|
17
|
+
type InlineBooleanSchema =
|
|
18
|
+
| z.ZodType<boolean | null, boolean | null>
|
|
19
|
+
| z.ZodType<boolean, boolean>;
|
|
20
|
+
|
|
17
21
|
type InlineSwitchProps<
|
|
22
|
+
TSchema extends InlineBooleanSchema = z.ZodType<boolean | null, boolean | null>,
|
|
18
23
|
TData = unknown,
|
|
19
24
|
TError = DefaultError,
|
|
20
25
|
TVariables = unknown,
|
|
@@ -22,7 +27,7 @@ type InlineSwitchProps<
|
|
|
22
27
|
> = ComponentProps<typeof Switch> &
|
|
23
28
|
useInlineEditOptions<
|
|
24
29
|
SwitchInlineTrigger,
|
|
25
|
-
|
|
30
|
+
TSchema,
|
|
26
31
|
TData,
|
|
27
32
|
TError,
|
|
28
33
|
TVariables,
|
|
@@ -30,6 +35,7 @@ type InlineSwitchProps<
|
|
|
30
35
|
>;
|
|
31
36
|
|
|
32
37
|
export function InlineSwitch<
|
|
38
|
+
TSchema extends InlineBooleanSchema = z.ZodType<boolean | null, boolean | null>,
|
|
33
39
|
TData = unknown,
|
|
34
40
|
TError = DefaultError,
|
|
35
41
|
TVariables = unknown,
|
|
@@ -42,11 +48,11 @@ export function InlineSwitch<
|
|
|
42
48
|
strategy,
|
|
43
49
|
disabled,
|
|
44
50
|
...props
|
|
45
|
-
}: InlineSwitchProps<TData, TError, TVariables, TOnMutateResult>) {
|
|
51
|
+
}: InlineSwitchProps<TSchema, TData, TError, TVariables, TOnMutateResult>) {
|
|
46
52
|
const state = useInlineState<boolean | null>(initialValue);
|
|
47
53
|
const access = useInlineAccess({ permission, disabled });
|
|
48
54
|
const mutations = useInlineMutation<
|
|
49
|
-
|
|
55
|
+
TSchema,
|
|
50
56
|
boolean | null,
|
|
51
57
|
TData,
|
|
52
58
|
TError,
|
|
@@ -61,7 +67,7 @@ export function InlineSwitch<
|
|
|
61
67
|
|
|
62
68
|
const { handleTrigger } = useInlineStrategy<
|
|
63
69
|
SwitchInlineTrigger,
|
|
64
|
-
|
|
70
|
+
TSchema,
|
|
65
71
|
boolean | null
|
|
66
72
|
>({
|
|
67
73
|
strategy,
|
|
@@ -69,7 +75,7 @@ export function InlineSwitch<
|
|
|
69
75
|
mutations,
|
|
70
76
|
parser: {
|
|
71
77
|
decode: (value) => value,
|
|
72
|
-
encode: (value) => value
|
|
78
|
+
encode: (value) => value as z.input<TSchema>,
|
|
73
79
|
},
|
|
74
80
|
});
|
|
75
81
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { environmentManager, MutationCache, QueryClient } from "@tanstack/react-query";
|
|
2
2
|
import { serializer } from "./helpers";
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -47,7 +47,7 @@ export function createQueryClient() {
|
|
|
47
47
|
let browserQueryClient: QueryClient;
|
|
48
48
|
|
|
49
49
|
export function getQueryClient() {
|
|
50
|
-
if (isServer) {
|
|
50
|
+
if (environmentManager.isServer()) {
|
|
51
51
|
// Server: always make a new query client
|
|
52
52
|
return createQueryClient();
|
|
53
53
|
}
|
package/src/styles.css
CHANGED
|
@@ -103,7 +103,7 @@
|
|
|
103
103
|
--accent-foreground: oklch(0.37 0 0);
|
|
104
104
|
|
|
105
105
|
--destructive: oklch(0.577 0.245 27.325);
|
|
106
|
-
--destructive-foreground: oklch(0.
|
|
106
|
+
--destructive-foreground: oklch(0.985 0 0);
|
|
107
107
|
|
|
108
108
|
--border: oklch(0.91 0 0);
|
|
109
109
|
--input: oklch(0.91 0 0);
|
|
@@ -157,7 +157,7 @@
|
|
|
157
157
|
--accent-foreground: oklch(0.87 0 0);
|
|
158
158
|
|
|
159
159
|
--destructive: oklch(0.396 0.141 25.723);
|
|
160
|
-
--destructive-foreground: oklch(0.
|
|
160
|
+
--destructive-foreground: oklch(0.985 0 0);
|
|
161
161
|
|
|
162
162
|
--border: oklch(0.27 0 0);
|
|
163
163
|
--input: oklch(0.27 0 0);
|
|
@@ -182,6 +182,230 @@
|
|
|
182
182
|
--sidebar-ring: oklch(0.47 0.14 37);
|
|
183
183
|
}
|
|
184
184
|
|
|
185
|
+
[data-theme="tulip"] {
|
|
186
|
+
--background: oklch(99.2% 0.004 84);
|
|
187
|
+
--card: oklch(99.4% 0.004 84);
|
|
188
|
+
--popover: oklch(99.4% 0.004 84);
|
|
189
|
+
--border: oklch(90.8% 0.006 84);
|
|
190
|
+
--input: oklch(90.8% 0.006 84);
|
|
191
|
+
--primary: oklch(81% 0.17 84);
|
|
192
|
+
--primary-foreground: oklch(30% 0.045 84);
|
|
193
|
+
--secondary: oklch(95% 0.025 84);
|
|
194
|
+
--secondary-foreground: oklch(34% 0.07 84);
|
|
195
|
+
--muted: oklch(96% 0.012 84);
|
|
196
|
+
--muted-foreground: oklch(46% 0.05 84);
|
|
197
|
+
--accent: oklch(93% 0.05 78);
|
|
198
|
+
--accent-foreground: oklch(31% 0.085 78);
|
|
199
|
+
--ring: oklch(76% 0.12 82);
|
|
200
|
+
--sidebar-primary: oklch(81% 0.17 84);
|
|
201
|
+
--sidebar-primary-foreground: oklch(30% 0.045 84);
|
|
202
|
+
--sidebar: oklch(98.8% 0.006 84);
|
|
203
|
+
--sidebar-accent: oklch(95.5% 0.014 84);
|
|
204
|
+
--sidebar-border: oklch(90.5% 0.008 84);
|
|
205
|
+
--sidebar-ring: oklch(76% 0.12 82);
|
|
206
|
+
--chart-1: oklch(85% 0.15 92);
|
|
207
|
+
--chart-2: oklch(81% 0.17 84);
|
|
208
|
+
--chart-3: oklch(73% 0.19 64);
|
|
209
|
+
--chart-4: oklch(66% 0.165 48);
|
|
210
|
+
--chart-5: oklch(77% 0.14 104);
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
.dark [data-theme="tulip"] {
|
|
214
|
+
--background: oklch(10.5% 0.004 84);
|
|
215
|
+
--card: oklch(11% 0.004 84);
|
|
216
|
+
--popover: oklch(11.5% 0.008 84);
|
|
217
|
+
--border: oklch(27% 0.006 84);
|
|
218
|
+
--input: oklch(27% 0.006 84);
|
|
219
|
+
--primary: oklch(82% 0.155 84);
|
|
220
|
+
--primary-foreground: oklch(20% 0.04 84);
|
|
221
|
+
--secondary: oklch(25% 0.012 84);
|
|
222
|
+
--secondary-foreground: oklch(88% 0.015 84);
|
|
223
|
+
--muted: oklch(23% 0.008 84);
|
|
224
|
+
--muted-foreground: oklch(78% 0.012 84);
|
|
225
|
+
--accent: oklch(27% 0.028 78);
|
|
226
|
+
--accent-foreground: oklch(88% 0.015 78);
|
|
227
|
+
--ring: oklch(62% 0.1 82);
|
|
228
|
+
--sidebar-primary: oklch(82% 0.155 84);
|
|
229
|
+
--sidebar-primary-foreground: oklch(20% 0.04 84);
|
|
230
|
+
--sidebar: oklch(15% 0.006 84);
|
|
231
|
+
--sidebar-accent: oklch(23% 0.01 84);
|
|
232
|
+
--sidebar-border: oklch(25% 0.006 84);
|
|
233
|
+
--sidebar-ring: oklch(62% 0.1 82);
|
|
234
|
+
--chart-1: oklch(83% 0.13 92);
|
|
235
|
+
--chart-2: oklch(78% 0.145 84);
|
|
236
|
+
--chart-3: oklch(71% 0.165 64);
|
|
237
|
+
--chart-4: oklch(64% 0.145 48);
|
|
238
|
+
--chart-5: oklch(74% 0.12 104);
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
[data-theme="rose"] {
|
|
242
|
+
--background: oklch(99.2% 0.005 18);
|
|
243
|
+
--card: oklch(99.4% 0.005 18);
|
|
244
|
+
--popover: oklch(99.4% 0.005 18);
|
|
245
|
+
--border: oklch(90.8% 0.008 18);
|
|
246
|
+
--input: oklch(90.8% 0.008 18);
|
|
247
|
+
--primary: oklch(62.5% 0.19 26);
|
|
248
|
+
--primary-foreground: oklch(14% 0.02 26);
|
|
249
|
+
--secondary: oklch(95% 0.022 18);
|
|
250
|
+
--secondary-foreground: oklch(34% 0.075 18);
|
|
251
|
+
--muted: oklch(96% 0.012 18);
|
|
252
|
+
--muted-foreground: oklch(46% 0.06 18);
|
|
253
|
+
--accent: oklch(93.5% 0.035 26);
|
|
254
|
+
--accent-foreground: oklch(31% 0.065 22);
|
|
255
|
+
--ring: oklch(62% 0.145 26);
|
|
256
|
+
--sidebar-primary: oklch(62.5% 0.19 26);
|
|
257
|
+
--sidebar-primary-foreground: oklch(14% 0.02 26);
|
|
258
|
+
--sidebar: oklch(98.8% 0.006 18);
|
|
259
|
+
--sidebar-accent: oklch(95.5% 0.013 18);
|
|
260
|
+
--sidebar-border: oklch(90.5% 0.009 18);
|
|
261
|
+
--sidebar-ring: oklch(62% 0.145 26);
|
|
262
|
+
--chart-1: oklch(79% 0.11 30);
|
|
263
|
+
--chart-2: oklch(72% 0.13 22);
|
|
264
|
+
--chart-3: oklch(62.5% 0.19 26);
|
|
265
|
+
--chart-4: oklch(57% 0.145 10);
|
|
266
|
+
--chart-5: oklch(70% 0.12 38);
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
.dark [data-theme="rose"] {
|
|
270
|
+
--background: oklch(10.5% 0.005 18);
|
|
271
|
+
--card: oklch(11% 0.005 18);
|
|
272
|
+
--popover: oklch(11.5% 0.01 18);
|
|
273
|
+
--border: oklch(27% 0.007 18);
|
|
274
|
+
--input: oklch(27% 0.007 18);
|
|
275
|
+
--primary: oklch(70% 0.17 26);
|
|
276
|
+
--primary-foreground: oklch(14% 0.02 26);
|
|
277
|
+
--secondary: oklch(24% 0.016 18);
|
|
278
|
+
--secondary-foreground: oklch(88% 0.018 18);
|
|
279
|
+
--muted: oklch(22% 0.009 18);
|
|
280
|
+
--muted-foreground: oklch(78% 0.018 18);
|
|
281
|
+
--accent: oklch(27% 0.03 28);
|
|
282
|
+
--accent-foreground: oklch(88% 0.018 28);
|
|
283
|
+
--ring: oklch(58% 0.12 26);
|
|
284
|
+
--sidebar-primary: oklch(70% 0.17 26);
|
|
285
|
+
--sidebar-primary-foreground: oklch(14% 0.02 26);
|
|
286
|
+
--sidebar: oklch(15% 0.007 18);
|
|
287
|
+
--sidebar-accent: oklch(23% 0.011 18);
|
|
288
|
+
--sidebar-border: oklch(25% 0.007 18);
|
|
289
|
+
--sidebar-ring: oklch(58% 0.12 26);
|
|
290
|
+
--chart-1: oklch(80% 0.1 30);
|
|
291
|
+
--chart-2: oklch(73% 0.12 22);
|
|
292
|
+
--chart-3: oklch(69% 0.17 26);
|
|
293
|
+
--chart-4: oklch(60% 0.12 10);
|
|
294
|
+
--chart-5: oklch(72% 0.1 38);
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
[data-theme="iris"] {
|
|
298
|
+
--background: oklch(99.2% 0.004 248);
|
|
299
|
+
--card: oklch(99.4% 0.004 248);
|
|
300
|
+
--popover: oklch(99.4% 0.004 248);
|
|
301
|
+
--border: oklch(90.8% 0.006 248);
|
|
302
|
+
--input: oklch(90.8% 0.006 248);
|
|
303
|
+
--primary: oklch(62% 0.145 246);
|
|
304
|
+
--primary-foreground: oklch(20% 0.04 246);
|
|
305
|
+
--secondary: oklch(95% 0.02 248);
|
|
306
|
+
--secondary-foreground: oklch(33% 0.065 246);
|
|
307
|
+
--muted: oklch(96% 0.011 248);
|
|
308
|
+
--muted-foreground: oklch(45% 0.05 246);
|
|
309
|
+
--accent: oklch(93.5% 0.03 268);
|
|
310
|
+
--accent-foreground: oklch(31% 0.07 266);
|
|
311
|
+
--ring: oklch(69% 0.1 246);
|
|
312
|
+
--sidebar-primary: oklch(62% 0.145 246);
|
|
313
|
+
--sidebar-primary-foreground: oklch(20% 0.04 246);
|
|
314
|
+
--sidebar: oklch(98.8% 0.006 248);
|
|
315
|
+
--sidebar-accent: oklch(95.5% 0.012 248);
|
|
316
|
+
--sidebar-border: oklch(90.5% 0.008 248);
|
|
317
|
+
--sidebar-ring: oklch(69% 0.1 246);
|
|
318
|
+
--chart-1: oklch(78% 0.09 268);
|
|
319
|
+
--chart-2: oklch(72% 0.11 246);
|
|
320
|
+
--chart-3: oklch(66% 0.13 228);
|
|
321
|
+
--chart-4: oklch(60% 0.11 286);
|
|
322
|
+
--chart-5: oklch(69% 0.08 216);
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
.dark [data-theme="iris"] {
|
|
326
|
+
--background: oklch(10.5% 0.004 248);
|
|
327
|
+
--card: oklch(11% 0.004 248);
|
|
328
|
+
--popover: oklch(11.5% 0.009 248);
|
|
329
|
+
--border: oklch(27% 0.006 248);
|
|
330
|
+
--input: oklch(27% 0.006 248);
|
|
331
|
+
--primary: oklch(72% 0.12 246);
|
|
332
|
+
--primary-foreground: oklch(19% 0.035 246);
|
|
333
|
+
--secondary: oklch(24% 0.013 248);
|
|
334
|
+
--secondary-foreground: oklch(88% 0.014 248);
|
|
335
|
+
--muted: oklch(22% 0.009 248);
|
|
336
|
+
--muted-foreground: oklch(78% 0.014 248);
|
|
337
|
+
--accent: oklch(26% 0.022 268);
|
|
338
|
+
--accent-foreground: oklch(88% 0.015 268);
|
|
339
|
+
--ring: oklch(58% 0.1 246);
|
|
340
|
+
--sidebar-primary: oklch(72% 0.12 246);
|
|
341
|
+
--sidebar-primary-foreground: oklch(19% 0.035 246);
|
|
342
|
+
--sidebar: oklch(15% 0.006 248);
|
|
343
|
+
--sidebar-accent: oklch(23% 0.01 248);
|
|
344
|
+
--sidebar-border: oklch(25% 0.006 248);
|
|
345
|
+
--sidebar-ring: oklch(58% 0.1 246);
|
|
346
|
+
--chart-1: oklch(79% 0.08 268);
|
|
347
|
+
--chart-2: oklch(73% 0.1 246);
|
|
348
|
+
--chart-3: oklch(67% 0.12 228);
|
|
349
|
+
--chart-4: oklch(61% 0.1 286);
|
|
350
|
+
--chart-5: oklch(70% 0.07 216);
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
[data-theme="sage"] {
|
|
354
|
+
--background: oklch(99.2% 0.004 145);
|
|
355
|
+
--card: oklch(99.4% 0.004 145);
|
|
356
|
+
--popover: oklch(99.4% 0.004 145);
|
|
357
|
+
--border: oklch(90.8% 0.006 145);
|
|
358
|
+
--input: oklch(90.8% 0.006 145);
|
|
359
|
+
--primary: oklch(69% 0.12 145);
|
|
360
|
+
--primary-foreground: oklch(18% 0.03 145);
|
|
361
|
+
--secondary: oklch(95% 0.018 145);
|
|
362
|
+
--secondary-foreground: oklch(33% 0.055 145);
|
|
363
|
+
--muted: oklch(96% 0.009 145);
|
|
364
|
+
--muted-foreground: oklch(45% 0.042 145);
|
|
365
|
+
--accent: oklch(93.5% 0.03 110);
|
|
366
|
+
--accent-foreground: oklch(30% 0.055 118);
|
|
367
|
+
--ring: oklch(73% 0.08 145);
|
|
368
|
+
--sidebar-primary: oklch(69% 0.12 145);
|
|
369
|
+
--sidebar-primary-foreground: oklch(18% 0.03 145);
|
|
370
|
+
--sidebar: oklch(98.8% 0.006 145);
|
|
371
|
+
--sidebar-accent: oklch(95.5% 0.012 145);
|
|
372
|
+
--sidebar-border: oklch(90.5% 0.008 145);
|
|
373
|
+
--sidebar-ring: oklch(73% 0.08 145);
|
|
374
|
+
--chart-1: oklch(82% 0.08 160);
|
|
375
|
+
--chart-2: oklch(76% 0.1 145);
|
|
376
|
+
--chart-3: oklch(69% 0.11 128);
|
|
377
|
+
--chart-4: oklch(63% 0.1 112);
|
|
378
|
+
--chart-5: oklch(77% 0.09 95);
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
.dark [data-theme="sage"] {
|
|
382
|
+
--background: oklch(10.5% 0.004 145);
|
|
383
|
+
--card: oklch(11% 0.004 145);
|
|
384
|
+
--popover: oklch(11.5% 0.009 145);
|
|
385
|
+
--border: oklch(27% 0.006 145);
|
|
386
|
+
--input: oklch(27% 0.006 145);
|
|
387
|
+
--primary: oklch(75% 0.11 145);
|
|
388
|
+
--primary-foreground: oklch(18% 0.03 145);
|
|
389
|
+
--secondary: oklch(26% 0.01 145);
|
|
390
|
+
--secondary-foreground: oklch(88% 0.014 145);
|
|
391
|
+
--muted: oklch(24% 0.007 145);
|
|
392
|
+
--muted-foreground: oklch(78% 0.014 145);
|
|
393
|
+
--accent: oklch(28% 0.018 112);
|
|
394
|
+
--accent-foreground: oklch(88% 0.014 112);
|
|
395
|
+
--ring: oklch(60% 0.08 145);
|
|
396
|
+
--sidebar-primary: oklch(75% 0.11 145);
|
|
397
|
+
--sidebar-primary-foreground: oklch(18% 0.03 145);
|
|
398
|
+
--sidebar: oklch(15% 0.006 145);
|
|
399
|
+
--sidebar-accent: oklch(23% 0.009 145);
|
|
400
|
+
--sidebar-border: oklch(25% 0.006 145);
|
|
401
|
+
--sidebar-ring: oklch(60% 0.08 145);
|
|
402
|
+
--chart-1: oklch(83% 0.07 160);
|
|
403
|
+
--chart-2: oklch(77% 0.09 145);
|
|
404
|
+
--chart-3: oklch(70% 0.1 128);
|
|
405
|
+
--chart-4: oklch(64% 0.09 112);
|
|
406
|
+
--chart-5: oklch(78% 0.08 95);
|
|
407
|
+
}
|
|
408
|
+
|
|
185
409
|
@layer base {
|
|
186
410
|
* {
|
|
187
411
|
@apply border-border;
|
|
@@ -190,3 +414,94 @@
|
|
|
190
414
|
@apply bg-background text-foreground;
|
|
191
415
|
}
|
|
192
416
|
}
|
|
417
|
+
|
|
418
|
+
/* ejected from shadcn */
|
|
419
|
+
@theme inline {
|
|
420
|
+
@keyframes accordion-down {
|
|
421
|
+
from {
|
|
422
|
+
height: 0;
|
|
423
|
+
}
|
|
424
|
+
to {
|
|
425
|
+
height: var(--radix-accordion-content-height, var(--accordion-panel-height, auto));
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
@keyframes accordion-up {
|
|
430
|
+
from {
|
|
431
|
+
height: var(--radix-accordion-content-height, var(--accordion-panel-height, auto));
|
|
432
|
+
}
|
|
433
|
+
to {
|
|
434
|
+
height: 0;
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
/* Custom variants */
|
|
440
|
+
@custom-variant data-open {
|
|
441
|
+
&:where([data-state="open"]),
|
|
442
|
+
&:where([data-open]:not([data-open="false"])) {
|
|
443
|
+
@slot;
|
|
444
|
+
}
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
@custom-variant data-closed {
|
|
448
|
+
&:where([data-state="closed"]),
|
|
449
|
+
&:where([data-closed]:not([data-closed="false"])) {
|
|
450
|
+
@slot;
|
|
451
|
+
}
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
@custom-variant data-checked {
|
|
455
|
+
&:where([data-state="checked"]),
|
|
456
|
+
&:where([data-checked]:not([data-checked="false"])) {
|
|
457
|
+
@slot;
|
|
458
|
+
}
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
@custom-variant data-unchecked {
|
|
462
|
+
&:where([data-state="unchecked"]),
|
|
463
|
+
&:where([data-unchecked]:not([data-unchecked="false"])) {
|
|
464
|
+
@slot;
|
|
465
|
+
}
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
@custom-variant data-selected {
|
|
469
|
+
&:where([data-selected="true"]) {
|
|
470
|
+
@slot;
|
|
471
|
+
}
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
@custom-variant data-disabled {
|
|
475
|
+
&:where([data-disabled="true"]),
|
|
476
|
+
&:where([data-disabled]:not([data-disabled="false"])) {
|
|
477
|
+
@slot;
|
|
478
|
+
}
|
|
479
|
+
}
|
|
480
|
+
|
|
481
|
+
@custom-variant data-active {
|
|
482
|
+
&:where([data-state="active"]),
|
|
483
|
+
&:where([data-active]:not([data-active="false"])) {
|
|
484
|
+
@slot;
|
|
485
|
+
}
|
|
486
|
+
}
|
|
487
|
+
|
|
488
|
+
@custom-variant data-horizontal {
|
|
489
|
+
&:where([data-orientation="horizontal"]) {
|
|
490
|
+
@slot;
|
|
491
|
+
}
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
@custom-variant data-vertical {
|
|
495
|
+
&:where([data-orientation="vertical"]) {
|
|
496
|
+
@slot;
|
|
497
|
+
}
|
|
498
|
+
}
|
|
499
|
+
|
|
500
|
+
@utility no-scrollbar {
|
|
501
|
+
-ms-overflow-style: none;
|
|
502
|
+
scrollbar-width: none;
|
|
503
|
+
|
|
504
|
+
&::-webkit-scrollbar {
|
|
505
|
+
display: none;
|
|
506
|
+
}
|
|
507
|
+
}
|