@krak-stack/registry 0.1.0
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/README.md +29 -0
- package/dist/components/ui/alert-dialog.d.ts +18 -0
- package/dist/components/ui/app-brand.d.ts +26 -0
- package/dist/components/ui/app-brand.js +78 -0
- package/dist/components/ui/attachment.d.ts +23 -0
- package/dist/components/ui/badge.d.ts +7 -0
- package/dist/components/ui/button.d.ts +8 -0
- package/dist/components/ui/card.d.ts +11 -0
- package/dist/components/ui/checkbox.d.ts +3 -0
- package/dist/components/ui/code-block.d.ts +14 -0
- package/dist/components/ui/code-block.js +224 -0
- package/dist/components/ui/command.d.ts +18 -0
- package/dist/components/ui/copy-button.d.ts +18 -0
- package/dist/components/ui/copy-button.js +133 -0
- package/dist/components/ui/data-table.d.ts +264 -0
- package/dist/components/ui/data-table.js +3594 -0
- package/dist/components/ui/dialog.d.ts +13 -0
- package/dist/components/ui/dropdown-menu.d.ts +29 -0
- package/dist/components/ui/editing-locale-switcher.d.ts +7 -0
- package/dist/components/ui/editing-locale-switcher.js +626 -0
- package/dist/components/ui/effect-form.d.ts +137 -0
- package/dist/components/ui/effect-form.js +2330 -0
- package/dist/components/ui/field.d.ts +24 -0
- package/dist/components/ui/file-picker.d.ts +30 -0
- package/dist/components/ui/file-picker.js +811 -0
- package/dist/components/ui/form.d.ts +402 -0
- package/dist/components/ui/form.js +2245 -0
- package/dist/components/ui/google-map.d.ts +103 -0
- package/dist/components/ui/google-map.js +754 -0
- package/dist/components/ui/icon-input.d.ts +9 -0
- package/dist/components/ui/icon-input.js +971 -0
- package/dist/components/ui/input-group.d.ts +17 -0
- package/dist/components/ui/input.d.ts +3 -0
- package/dist/components/ui/label.d.ts +3 -0
- package/dist/components/ui/loading.d.ts +7 -0
- package/dist/components/ui/loading.js +467 -0
- package/dist/components/ui/locale-switcher.d.ts +7 -0
- package/dist/components/ui/locale-switcher.js +632 -0
- package/dist/components/ui/pagination.d.ts +43 -0
- package/dist/components/ui/pagination.js +787 -0
- package/dist/components/ui/popover.d.ts +9 -0
- package/dist/components/ui/scroll-area.d.ts +4 -0
- package/dist/components/ui/search-menu.d.ts +34 -0
- package/dist/components/ui/search-menu.js +839 -0
- package/dist/components/ui/select.d.ts +15 -0
- package/dist/components/ui/separator.d.ts +3 -0
- package/dist/components/ui/sheet.d.ts +14 -0
- package/dist/components/ui/sidebar-layout.d.ts +29 -0
- package/dist/components/ui/sidebar-layout.js +755 -0
- package/dist/components/ui/sidebar.d.ts +63 -0
- package/dist/components/ui/skeleton.d.ts +2 -0
- package/dist/components/ui/stats-card.d.ts +12 -0
- package/dist/components/ui/stats-card.js +125 -0
- package/dist/components/ui/table.d.ts +10 -0
- package/dist/components/ui/textarea.d.ts +3 -0
- package/dist/components/ui/theme-switcher.d.ts +29 -0
- package/dist/components/ui/theme-switcher.js +775 -0
- package/dist/components/ui/tooltip.d.ts +6 -0
- package/dist/components/ui/virtualized-combobox.d.ts +54 -0
- package/dist/components/ui/virtualized-combobox.js +821 -0
- package/dist/hooks/use-mobile.d.ts +1 -0
- package/dist/lib/query.d.ts +49 -0
- package/dist/lib/utils.d.ts +2 -0
- package/dist/paraglide/runtime.d.ts +978 -0
- package/dist/services/embedding.d.ts +2 -0
- package/dist/services/embedding.js +23 -0
- package/dist/services/notification/channels/index.d.ts +22 -0
- package/dist/services/notification/channels/index.js +11 -0
- package/dist/services/notification/channels/ses/index.d.ts +51 -0
- package/dist/services/notification/channels/ses/index.js +145 -0
- package/dist/services/notification/channels/ses/schema.d.ts +13 -0
- package/dist/services/notification/channels/ses/schema.js +35 -0
- package/dist/services/notification/index.d.ts +15 -0
- package/dist/services/notification/index.js +67 -0
- package/dist/services/notification/schema.d.ts +10 -0
- package/dist/services/notification/schema.js +30 -0
- package/dist/services/opentelemetry.d.ts +8 -0
- package/dist/services/opentelemetry.js +23 -0
- package/dist/services/s3/index.d.ts +62 -0
- package/dist/services/s3/index.js +208 -0
- package/dist/services/s3/schema.d.ts +18 -0
- package/dist/services/s3/schema.js +37 -0
- package/package.json +218 -0
- package/tailwind.css +1 -0
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import type { ComponentProps, JSX, ReactNode } from "react";
|
|
2
|
+
import { FormReact } from "@lucas-barake/effect-form-react";
|
|
3
|
+
import { Option } from "effect";
|
|
4
|
+
import { AsyncResult, Atom } from "effect/unstable/reactivity";
|
|
5
|
+
import { type VirtualizedComboboxMessageOverrides, type VirtualizedComboboxOption } from "./virtualized-combobox.js";
|
|
6
|
+
export type EffectFormMessages = {
|
|
7
|
+
add: string;
|
|
8
|
+
blockNavigationCancel: string;
|
|
9
|
+
blockNavigationConfirm: string;
|
|
10
|
+
blockNavigationDescription: string;
|
|
11
|
+
blockNavigationTitle: string;
|
|
12
|
+
delete: string;
|
|
13
|
+
description: string;
|
|
14
|
+
folder: string;
|
|
15
|
+
key: string;
|
|
16
|
+
name: string;
|
|
17
|
+
nameRequired: string;
|
|
18
|
+
revert: string;
|
|
19
|
+
submit: string;
|
|
20
|
+
suggestedImageSize: (width: string, height: string) => string;
|
|
21
|
+
value: string;
|
|
22
|
+
};
|
|
23
|
+
export type EffectFormMessageOverrides = Partial<EffectFormMessages>;
|
|
24
|
+
export declare const effectFormMessages: (overrides?: EffectFormMessageOverrides) => EffectFormMessages;
|
|
25
|
+
export type FieldOptions = {
|
|
26
|
+
label: JSX.Element | string;
|
|
27
|
+
description?: string;
|
|
28
|
+
children?: ReactNode;
|
|
29
|
+
};
|
|
30
|
+
export type FieldWrapperOptions = {
|
|
31
|
+
children: ReactNode;
|
|
32
|
+
description?: string;
|
|
33
|
+
editingLocale?: string;
|
|
34
|
+
legend?: string;
|
|
35
|
+
locales?: ReadonlyArray<{
|
|
36
|
+
label: string;
|
|
37
|
+
value: string;
|
|
38
|
+
}>;
|
|
39
|
+
localized?: boolean;
|
|
40
|
+
};
|
|
41
|
+
export declare const FieldWrapper: ({ children, description, editingLocale, legend, locales, localized, }: FieldWrapperOptions) => JSX.Element;
|
|
42
|
+
export declare const ErrorMessage: ({ text }: {
|
|
43
|
+
text: string;
|
|
44
|
+
}) => JSX.Element;
|
|
45
|
+
export declare const SubmitError: <A, E>({ result, }: {
|
|
46
|
+
result: AsyncResult.AsyncResult<A, E>;
|
|
47
|
+
}) => JSX.Element | null;
|
|
48
|
+
export type SubmitForm<A, E> = {
|
|
49
|
+
isDirty: Atom.Atom<boolean>;
|
|
50
|
+
hasChangedSinceSubmit: Atom.Atom<boolean>;
|
|
51
|
+
lastSubmittedValues: Atom.Atom<Option.Option<unknown>>;
|
|
52
|
+
submit: Atom.AtomResultFn<void, A, E>;
|
|
53
|
+
};
|
|
54
|
+
export declare const SubmitButton: <A, E>({ children, form, }: {
|
|
55
|
+
children?: ReactNode;
|
|
56
|
+
form: SubmitForm<A, E>;
|
|
57
|
+
}) => JSX.Element;
|
|
58
|
+
type TextFieldOptions = FieldOptions & Omit<ComponentProps<"input">, "children" | "defaultValue" | "id" | "name" | "onBlur" | "onChange" | "value"> & {
|
|
59
|
+
errorMessage?: string;
|
|
60
|
+
};
|
|
61
|
+
export declare const TextField: FormReact.FieldComponent<string, TextFieldOptions>;
|
|
62
|
+
type NameFieldOptions = Omit<TextFieldOptions, "label">;
|
|
63
|
+
export declare const NameField: FormReact.FieldComponent<string, NameFieldOptions>;
|
|
64
|
+
type TextAreaFieldOptions = FieldOptions & Omit<ComponentProps<"textarea">, "children" | "defaultValue" | "id" | "name" | "onBlur" | "onChange" | "value"> & {
|
|
65
|
+
original?: string;
|
|
66
|
+
};
|
|
67
|
+
export declare const TextAreaField: FormReact.FieldComponent<string, TextAreaFieldOptions>;
|
|
68
|
+
type DescriptionFieldOptions = Omit<TextAreaFieldOptions, "label">;
|
|
69
|
+
export declare const DescriptionField: FormReact.FieldComponent<string, DescriptionFieldOptions>;
|
|
70
|
+
type FileFieldOptions = FieldOptions & {
|
|
71
|
+
accept: ComponentProps<"input">["accept"];
|
|
72
|
+
onFileChange?: (file: File | undefined) => void;
|
|
73
|
+
required?: boolean;
|
|
74
|
+
};
|
|
75
|
+
export declare const FileField: FormReact.FieldComponent<File | undefined, FileFieldOptions>;
|
|
76
|
+
export declare const NullableTextAreaField: FormReact.FieldComponent<string | null | undefined, TextAreaFieldOptions>;
|
|
77
|
+
export declare const CheckboxField: FormReact.FieldComponent<boolean, FieldOptions>;
|
|
78
|
+
type SelectFieldOptions<T extends string> = FieldOptions & {
|
|
79
|
+
options: ReadonlyArray<{
|
|
80
|
+
label: string;
|
|
81
|
+
value: T;
|
|
82
|
+
}>;
|
|
83
|
+
placeholder?: string;
|
|
84
|
+
};
|
|
85
|
+
export declare const SelectField: <T extends string>({ field, props, }: FormReact.FieldComponentProps<T, SelectFieldOptions<T>>) => JSX.Element;
|
|
86
|
+
type FolderFieldOptions<T extends string> = Omit<SelectFieldOptions<T>, "label">;
|
|
87
|
+
export declare const FolderField: <T extends string>({ field, props, }: FormReact.FieldComponentProps<T, FolderFieldOptions<T>>) => JSX.Element;
|
|
88
|
+
type MultiSelectFieldOptions<T extends string> = FieldOptions & {
|
|
89
|
+
options: ReadonlyArray<{
|
|
90
|
+
label: string;
|
|
91
|
+
value: T;
|
|
92
|
+
}>;
|
|
93
|
+
placeholder?: string;
|
|
94
|
+
};
|
|
95
|
+
export declare const MultiSelectField: <T extends string>({ field, props, }: FormReact.FieldComponentProps<ReadonlyArray<T>, MultiSelectFieldOptions<T>>) => JSX.Element;
|
|
96
|
+
export declare const NullableMultiSelectField: <T extends string>({ field, props, }: FormReact.FieldComponentProps<ReadonlyArray<T> | null | undefined, MultiSelectFieldOptions<T>>) => JSX.Element;
|
|
97
|
+
type SearchableSelectFieldSharedOptions<TData> = FieldOptions & {
|
|
98
|
+
emptyLabel: ReactNode;
|
|
99
|
+
initialItems?: readonly VirtualizedComboboxOption<TData>[];
|
|
100
|
+
items: readonly VirtualizedComboboxOption<TData>[];
|
|
101
|
+
messages?: VirtualizedComboboxMessageOverrides;
|
|
102
|
+
onSearchValueChange?: (value: string) => void;
|
|
103
|
+
placeholder: ReactNode;
|
|
104
|
+
renderItem?: (item: VirtualizedComboboxOption<TData>) => ReactNode;
|
|
105
|
+
searchValue?: string;
|
|
106
|
+
};
|
|
107
|
+
export declare const SearchableSelectField: <TData>({ field, props, }: FormReact.FieldComponentProps<ReadonlyArray<string>, SearchableSelectFieldSharedOptions<TData> & {
|
|
108
|
+
multiple?: true;
|
|
109
|
+
}>) => JSX.Element;
|
|
110
|
+
export declare const SingleSearchableSelectField: <TData>({ field, props, }: FormReact.FieldComponentProps<string, SearchableSelectFieldSharedOptions<TData> & {
|
|
111
|
+
multiple?: false;
|
|
112
|
+
}>) => JSX.Element;
|
|
113
|
+
export declare const NullableKeyValueField: ({ field, props, }: FormReact.FieldComponentProps<Readonly<Record<string, string>> | null, FieldOptions>) => JSX.Element;
|
|
114
|
+
export declare const KeyValueField: ({ field, props, }: FormReact.FieldComponentProps<Readonly<Record<string, string>>, FieldOptions>) => JSX.Element;
|
|
115
|
+
export declare const RevertButton: ({ field, props, }: {
|
|
116
|
+
field: {
|
|
117
|
+
value: string;
|
|
118
|
+
onChange: (value: string) => void;
|
|
119
|
+
};
|
|
120
|
+
props: {
|
|
121
|
+
original: string;
|
|
122
|
+
};
|
|
123
|
+
}) => JSX.Element | null;
|
|
124
|
+
type ImageFieldOptions = {
|
|
125
|
+
label: string;
|
|
126
|
+
size: {
|
|
127
|
+
width: number;
|
|
128
|
+
height: number;
|
|
129
|
+
suggestedWidth?: number;
|
|
130
|
+
suggestedHeight?: number;
|
|
131
|
+
};
|
|
132
|
+
};
|
|
133
|
+
export declare const ImageField: FormReact.FieldComponent<File | string | null | undefined, ImageFieldOptions>;
|
|
134
|
+
export declare const BlockNavigation: <A, E>({ form }: {
|
|
135
|
+
form: SubmitForm<A, E>;
|
|
136
|
+
}) => JSX.Element;
|
|
137
|
+
export {};
|