lutra 0.0.33 → 0.1.4
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 +4 -24
- package/dist/components/AspectRatio.svelte +26 -0
- package/dist/components/AspectRatio.svelte.d.ts +8 -0
- package/dist/components/Avatar.svelte +105 -0
- package/dist/components/Avatar.svelte.d.ts +14 -0
- package/dist/{display → components}/Close.svelte +25 -7
- package/dist/components/Close.svelte.d.ts +7 -0
- package/dist/components/ContextTip.svelte +41 -0
- package/dist/components/ContextTip.svelte.d.ts +7 -0
- package/dist/components/Dialog.svelte +78 -0
- package/dist/components/Dialog.svelte.d.ts +14 -0
- package/dist/components/Icon.svelte +62 -0
- package/dist/components/Icon.svelte.d.ts +8 -0
- package/dist/{display → components}/IconButton.svelte +43 -14
- package/dist/components/IconButton.svelte.d.ts +16 -0
- package/dist/components/Image.svelte +172 -0
- package/dist/components/Image.svelte.d.ts +56 -0
- package/dist/{display → components}/Indicator.svelte +44 -9
- package/dist/components/Indicator.svelte.d.ts +12 -0
- package/dist/{display → components}/Inset.svelte +8 -3
- package/dist/components/Inset.svelte.d.ts +7 -0
- package/dist/components/Layout.svelte +33 -0
- package/dist/components/Layout.svelte.d.ts +11 -0
- package/dist/components/MenuDropdown.svelte +195 -0
- package/dist/components/MenuDropdown.svelte.d.ts +16 -0
- package/dist/{nav → components}/MenuItem.svelte +46 -38
- package/dist/components/MenuItem.svelte.d.ts +11 -0
- package/dist/components/MenuItemContent.svelte +25 -0
- package/dist/components/MenuItemContent.svelte.d.ts +10 -0
- package/dist/{nav → components}/MenuTypes.d.ts +19 -5
- package/dist/components/Modal.svelte +149 -0
- package/dist/components/Modal.svelte.d.ts +16 -0
- package/dist/{display → components}/Notification.svelte +33 -22
- package/dist/components/Notification.svelte.d.ts +12 -0
- package/dist/components/Overlay.svelte +31 -0
- package/dist/components/Overlay.svelte.d.ts +14 -0
- package/dist/{layout → components}/OverlayContainer.svelte +6 -3
- package/dist/{layout → components}/OverlayContainer.svelte.d.ts +4 -1
- package/dist/components/OverlayLayer.svelte +168 -0
- package/dist/components/OverlayLayer.svelte.d.ts +8 -0
- package/dist/components/PageContent.svelte +108 -0
- package/dist/components/PageContent.svelte.d.ts +38 -0
- package/dist/components/TabbedContent.svelte +74 -0
- package/dist/components/TabbedContent.svelte.d.ts +11 -0
- package/dist/components/TabbedContentItem.svelte +33 -0
- package/dist/components/TabbedContentItem.svelte.d.ts +10 -0
- package/dist/components/Table.svelte +41 -0
- package/dist/components/Table.svelte.d.ts +13 -0
- package/dist/{nav → components}/Tabs.svelte +99 -41
- package/dist/components/Tabs.svelte.d.ts +20 -0
- package/dist/components/Tag.svelte +120 -0
- package/dist/components/Tag.svelte.d.ts +21 -0
- package/dist/components/Theme.svelte +105 -0
- package/dist/components/Theme.svelte.d.ts +17 -0
- package/dist/{display → components}/Tooltip.svelte +41 -16
- package/dist/components/Tooltip.svelte.d.ts +12 -0
- package/dist/components/UIContent.svelte +19 -0
- package/dist/components/UIContent.svelte.d.ts +7 -0
- package/dist/components/index.d.ts +28 -0
- package/dist/components/index.js +29 -0
- package/dist/{display → components}/notifications.svelte.d.ts +1 -1
- package/dist/{display → components}/notifications.svelte.js +3 -4
- package/dist/{layout → components}/overlays.svelte.d.ts +4 -2
- package/dist/config.d.ts +30 -0
- package/dist/config.js +18 -0
- package/dist/css/1-props.css +440 -0
- package/dist/css/2-base.css +343 -0
- package/dist/css/3-typo.css +106 -0
- package/dist/css/4-layout.css +368 -0
- package/dist/css/5-media.css +116 -0
- package/dist/css/lutra.css +7 -0
- package/dist/css/themes/DefaultTheme.css +209 -0
- package/dist/form/Button.svelte +35 -16
- package/dist/form/Button.svelte.d.ts +8 -19
- package/dist/form/Datepicker.svelte +311 -0
- package/dist/form/Datepicker.svelte.d.ts +9 -0
- package/dist/form/FieldContent.svelte +69 -44
- package/dist/form/FieldContent.svelte.d.ts +7 -17
- package/dist/form/FieldError.svelte +16 -6
- package/dist/form/FieldError.svelte.d.ts +4 -15
- package/dist/form/Fieldset.svelte +48 -13
- package/dist/form/Fieldset.svelte.d.ts +5 -16
- package/dist/form/Form.svelte +158 -74
- package/dist/form/Form.svelte.d.ts +17 -17
- package/dist/form/{FieldActions.svelte → FormActions.svelte} +29 -17
- package/dist/form/FormActions.svelte.d.ts +9 -0
- package/dist/form/FormSection.svelte +96 -0
- package/dist/form/FormSection.svelte.d.ts +9 -0
- package/dist/form/ImageUpload.svelte +134 -94
- package/dist/form/ImageUpload.svelte.d.ts +5 -16
- package/dist/form/Input.svelte +254 -136
- package/dist/form/Input.svelte.d.ts +12 -21
- package/dist/form/InputLength.svelte +15 -5
- package/dist/form/InputLength.svelte.d.ts +4 -15
- package/dist/form/Label.svelte +55 -11
- package/dist/form/Label.svelte.d.ts +6 -15
- package/dist/form/LogoUpload.svelte +36 -21
- package/dist/form/LogoUpload.svelte.d.ts +4 -15
- package/dist/form/Select.svelte +100 -50
- package/dist/form/Select.svelte.d.ts +5 -16
- package/dist/form/Textarea.svelte +200 -98
- package/dist/form/Textarea.svelte.d.ts +11 -24
- package/dist/form/Toggle.svelte +3 -1
- package/dist/form/Toggle.svelte.d.ts +4 -1
- package/dist/form/client.svelte.d.ts +1 -0
- package/dist/form/client.svelte.js +6 -2
- package/dist/form/form.d.ts +10 -9
- package/dist/form/form.js +37 -32
- package/dist/form/index.d.ts +3 -4
- package/dist/form/index.js +3 -4
- package/dist/form/types.d.ts +9 -16
- package/dist/icons/IconAlert.svelte.d.ts +4 -1
- package/dist/icons/IconCopy.svelte.d.ts +4 -1
- package/dist/icons/IconDone.svelte.d.ts +4 -1
- package/dist/icons/IconError.svelte.d.ts +4 -1
- package/dist/icons/IconHelp.svelte.d.ts +4 -1
- package/dist/icons/IconHide.svelte.d.ts +4 -1
- package/dist/icons/IconInfo.svelte.d.ts +4 -1
- package/dist/icons/IconLink.svelte.d.ts +4 -1
- package/dist/icons/IconMenuBurger.svelte.d.ts +4 -1
- package/dist/icons/IconMenuDots.svelte.d.ts +4 -1
- package/dist/icons/IconSearch.svelte.d.ts +4 -1
- package/dist/icons/IconShow.svelte.d.ts +4 -1
- package/dist/icons/IconSuccess.svelte.d.ts +4 -1
- package/dist/icons/IconWarning.svelte.d.ts +4 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +3 -2
- package/dist/types.d.ts +39 -0
- package/dist/types.js +25 -0
- package/dist/util/StringOrComponent.svelte +20 -0
- package/dist/util/StringOrComponent.svelte.d.ts +8 -0
- package/dist/util/StringOrSnippet.svelte +16 -0
- package/dist/util/StringOrSnippet.svelte.d.ts +8 -0
- package/dist/{utils → util}/dom.js +1 -2
- package/dist/util/locale.d.ts +1 -0
- package/dist/util/locale.js +47 -0
- package/dist/util/settings.d.ts +4 -0
- package/package.json +35 -79
- package/dist/color.css +0 -0
- package/dist/display/Avatar.svelte +0 -61
- package/dist/display/Avatar.svelte.d.ts +0 -19
- package/dist/display/Badge.svelte +0 -91
- package/dist/display/Badge.svelte.d.ts +0 -30
- package/dist/display/Callout.svelte +0 -109
- package/dist/display/Callout.svelte.d.ts +0 -28
- package/dist/display/Close.svelte.d.ts +0 -18
- package/dist/display/Code.svelte +0 -190
- package/dist/display/Code.svelte.d.ts +0 -32
- package/dist/display/ContextTip.svelte +0 -23
- package/dist/display/ContextTip.svelte.d.ts +0 -18
- package/dist/display/DataList.svelte +0 -16
- package/dist/display/DataList.svelte.d.ts +0 -21
- package/dist/display/Details.svelte +0 -49
- package/dist/display/Details.svelte.d.ts +0 -27
- package/dist/display/Hero.svelte +0 -50
- package/dist/display/Hero.svelte.d.ts +0 -26
- package/dist/display/Icon.svelte +0 -39
- package/dist/display/Icon.svelte.d.ts +0 -19
- package/dist/display/IconButton.svelte.d.ts +0 -27
- package/dist/display/Image.svelte +0 -91
- package/dist/display/Image.svelte.d.ts +0 -26
- package/dist/display/Indicator.svelte.d.ts +0 -23
- package/dist/display/Inset.svelte.d.ts +0 -18
- package/dist/display/LineChart.svelte +0 -385
- package/dist/display/LineChart.svelte.d.ts +0 -24
- package/dist/display/LoadingIndicator.svelte +0 -33
- package/dist/display/LoadingIndicator.svelte.d.ts +0 -15
- package/dist/display/Modal.svelte +0 -116
- package/dist/display/Modal.svelte.d.ts +0 -27
- package/dist/display/Notification.svelte.d.ts +0 -23
- package/dist/display/Panel.svelte +0 -23
- package/dist/display/Panel.svelte.d.ts +0 -19
- package/dist/display/Popup.svelte +0 -111
- package/dist/display/Popup.svelte.d.ts +0 -25
- package/dist/display/Stat.svelte +0 -81
- package/dist/display/Stat.svelte.d.ts +0 -30
- package/dist/display/Table.svelte +0 -28
- package/dist/display/Table.svelte.d.ts +0 -24
- package/dist/display/TablePaginator.svelte +0 -51
- package/dist/display/TablePaginator.svelte.d.ts +0 -21
- package/dist/display/Tag.svelte +0 -90
- package/dist/display/Tag.svelte.d.ts +0 -32
- package/dist/display/Tooltip.svelte.d.ts +0 -23
- package/dist/display/chart.d.ts +0 -78
- package/dist/display/chart.js +0 -212
- package/dist/display/index.d.ts +0 -24
- package/dist/display/index.js +0 -24
- package/dist/form/FieldActions.svelte.d.ts +0 -20
- package/dist/form/FieldContainer.svelte +0 -37
- package/dist/form/FieldContainer.svelte.d.ts +0 -19
- package/dist/form/FieldSection.svelte +0 -86
- package/dist/form/FieldSection.svelte.d.ts +0 -20
- package/dist/layout/Layout.svelte +0 -47
- package/dist/layout/Layout.svelte.d.ts +0 -22
- package/dist/layout/LayoutFooter.svelte +0 -21
- package/dist/layout/LayoutFooter.svelte.d.ts +0 -18
- package/dist/layout/LayoutGrid.svelte +0 -51
- package/dist/layout/LayoutGrid.svelte.d.ts +0 -27
- package/dist/layout/LayoutHeader.svelte +0 -97
- package/dist/layout/LayoutHeader.svelte.d.ts +0 -34
- package/dist/layout/LayoutSideMenu.svelte +0 -55
- package/dist/layout/LayoutSideMenu.svelte.d.ts +0 -21
- package/dist/layout/LayoutTypes.d.ts +0 -15
- package/dist/layout/LayoutTypes.js +0 -9
- package/dist/layout/Overlay.svelte +0 -20
- package/dist/layout/Overlay.svelte.d.ts +0 -25
- package/dist/layout/OverlayLayer.svelte +0 -140
- package/dist/layout/OverlayLayer.svelte.d.ts +0 -19
- package/dist/layout/PageContent.svelte +0 -82
- package/dist/layout/PageContent.svelte.d.ts +0 -25
- package/dist/layout/Theme.svelte +0 -243
- package/dist/layout/Theme.svelte.d.ts +0 -19
- package/dist/layout/UIContent.svelte +0 -15
- package/dist/layout/UIContent.svelte.d.ts +0 -18
- package/dist/layout/index.d.ts +0 -11
- package/dist/layout/index.js +0 -11
- package/dist/nav/Breadcrumb.svelte +0 -82
- package/dist/nav/Breadcrumb.svelte.d.ts +0 -28
- package/dist/nav/Menu.svelte +0 -170
- package/dist/nav/Menu.svelte.d.ts +0 -27
- package/dist/nav/MenuItem.svelte.d.ts +0 -22
- package/dist/nav/NavMenu.svelte +0 -181
- package/dist/nav/NavMenu.svelte.d.ts +0 -19
- package/dist/nav/TabbedContent.svelte +0 -43
- package/dist/nav/TabbedContent.svelte.d.ts +0 -23
- package/dist/nav/Tabs.svelte.d.ts +0 -25
- package/dist/nav/index.d.ts +0 -7
- package/dist/nav/index.js +0 -6
- package/dist/style.css +0 -950
- package/dist/typo/Clamp.svelte +0 -25
- package/dist/typo/Clamp.svelte.d.ts +0 -24
- package/dist/typo/H.svelte +0 -52
- package/dist/typo/H.svelte.d.ts +0 -28
- package/dist/typo/H1.svelte +0 -14
- package/dist/typo/H1.svelte.d.ts +0 -26
- package/dist/typo/H2.svelte +0 -14
- package/dist/typo/H2.svelte.d.ts +0 -26
- package/dist/typo/H3.svelte +0 -14
- package/dist/typo/H3.svelte.d.ts +0 -26
- package/dist/typo/H4.svelte +0 -14
- package/dist/typo/H4.svelte.d.ts +0 -26
- package/dist/typo/H5.svelte +0 -14
- package/dist/typo/H5.svelte.d.ts +0 -26
- package/dist/typo/H6.svelte +0 -14
- package/dist/typo/H6.svelte.d.ts +0 -26
- package/dist/typo/P.svelte +0 -34
- package/dist/typo/P.svelte.d.ts +0 -26
- package/dist/typo/index.d.ts +0 -9
- package/dist/typo/index.js +0 -9
- package/dist/utils/StringOrComponent.svelte +0 -14
- package/dist/utils/StringOrComponent.svelte.d.ts +0 -19
- package/dist/utils/StringOrSnippet.svelte +0 -11
- package/dist/utils/StringOrSnippet.svelte.d.ts +0 -19
- package/dist/utils/defaults.d.ts +0 -4
- package/dist/utils/hooks.server.d.ts +0 -2
- package/dist/utils/hooks.server.js +0 -16
- package/dist/utils/id.d.ts +0 -1
- package/dist/utils/id.js +0 -3
- package/dist/utils/index.d.ts +0 -9
- package/dist/utils/index.js +0 -6
- package/dist/utils/isSnippet.d.ts +0 -3
- package/dist/utils/isSnippet.js +0 -11
- /package/dist/{nav → components}/MenuTypes.js +0 -0
- /package/dist/{layout → components}/overlays.svelte.js +0 -0
- /package/dist/{utils → util}/attr.d.ts +0 -0
- /package/dist/{utils → util}/attr.js +0 -0
- /package/dist/{utils → util}/color.d.ts +0 -0
- /package/dist/{utils → util}/color.js +0 -0
- /package/dist/{utils → util}/dom.d.ts +0 -0
- /package/dist/{utils → util}/keyboard.svelte.d.ts +0 -0
- /package/dist/{utils → util}/keyboard.svelte.js +0 -0
- /package/dist/{utils/defaults.js → util/settings.js} +0 -0
- /package/dist/{utils → util}/transitions.d.ts +0 -0
- /package/dist/{utils → util}/transitions.js +0 -0
@@ -1,28 +1,16 @@
|
|
1
1
|
import { type Snippet } from "svelte";
|
2
|
-
import type { Autocomplete } from "
|
3
|
-
|
4
|
-
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
5
|
-
$$bindings?: Bindings;
|
6
|
-
} & Exports;
|
7
|
-
(internal: unknown, props: Props & {
|
8
|
-
$$events?: Events;
|
9
|
-
$$slots?: Slots;
|
10
|
-
}): Exports;
|
11
|
-
z_$$bindings?: Bindings;
|
12
|
-
}
|
13
|
-
declare const Textarea: $$__sveltets_2_IsomorphicComponent<{
|
2
|
+
import type { Autocomplete } from "./types.js";
|
3
|
+
type $$ComponentProps = {
|
14
4
|
/** Whether the input should be autofocused. */
|
15
5
|
autofocus?: boolean;
|
16
6
|
/** Whether the input should be autocapitalized. */
|
17
|
-
autocapitalize?: boolean |
|
7
|
+
autocapitalize?: boolean | 'off' | 'none' | 'on' | 'sentences' | 'words' | 'characters';
|
18
8
|
/** Specifies whether autocomplete is enabled for the input. */
|
19
9
|
autocomplete?: Autocomplete;
|
20
|
-
/** Whether the input should be autocorrected. (Safari only) */
|
21
|
-
autocorrect?: boolean;
|
22
10
|
/** Whether the input should resize automatically. */
|
23
11
|
autoresize?: boolean;
|
24
12
|
/** A hint to the browser for which capture method to use. */
|
25
|
-
capture?:
|
13
|
+
capture?: 'user' | 'environment';
|
26
14
|
/** Whether the input should be checked. */
|
27
15
|
checked?: boolean;
|
28
16
|
/** Whether the input should be contained. */
|
@@ -36,7 +24,7 @@ declare const Textarea: $$__sveltets_2_IsomorphicComponent<{
|
|
36
24
|
/** Whether the input should be disabled. */
|
37
25
|
disabled?: boolean;
|
38
26
|
/** A hint to the browser for which enter key to display for the input. */
|
39
|
-
enterkeyhint?:
|
27
|
+
enterkeyhint?: 'enter' | 'done' | 'go' | 'next' | 'previous' | 'search' | 'send';
|
40
28
|
/** The height of the input element. Valid for image inputs. */
|
41
29
|
height?: number;
|
42
30
|
/** Help text to display below the input. */
|
@@ -46,7 +34,7 @@ declare const Textarea: $$__sveltets_2_IsomorphicComponent<{
|
|
46
34
|
/** Whether the input should be indeterminate. */
|
47
35
|
indeterminate?: boolean;
|
48
36
|
/** A hint to the browser for which keyboard to display. This is only used for type="text" inputs. Strongly consider using type="email" or type="url" etc. instead */
|
49
|
-
inputmode?:
|
37
|
+
inputmode?: 'none' | 'text' | 'tel' | 'url' | 'email' | 'numeric' | 'decimal' | 'search';
|
50
38
|
/** The label for the input */
|
51
39
|
label?: string | Snippet;
|
52
40
|
/** Context tooltip for a label. Renders with a questionmark using ContextTip. */
|
@@ -86,9 +74,9 @@ declare const Textarea: $$__sveltets_2_IsomorphicComponent<{
|
|
86
74
|
/** Whether the input should be required. */
|
87
75
|
required?: boolean;
|
88
76
|
/** Whether the textarea is resizable. */
|
89
|
-
resize?: boolean |
|
77
|
+
resize?: boolean | 'both' | 'horizontal' | 'vertical' | 'none';
|
90
78
|
/** The shape of the input element. */
|
91
|
-
shape?:
|
79
|
+
shape?: 'default' | 'rounded' | 'pill' | 'circle';
|
92
80
|
/** Spellcheck the input. */
|
93
81
|
spellcheck?: boolean;
|
94
82
|
/** A number that specifies the granularity that the value must adhere to. Valid for date, month, week, time, datetime-local, number, and range. */
|
@@ -101,8 +89,7 @@ declare const Textarea: $$__sveltets_2_IsomorphicComponent<{
|
|
101
89
|
title?: string;
|
102
90
|
/** The value of the input element. */
|
103
91
|
value?: string | null;
|
104
|
-
}
|
105
|
-
|
106
|
-
|
107
|
-
type Textarea = InstanceType<typeof Textarea>;
|
92
|
+
};
|
93
|
+
declare const Textarea: import("svelte").Component<$$ComponentProps, {}, "id" | "value">;
|
94
|
+
type Textarea = ReturnType<typeof Textarea>;
|
108
95
|
export default Textarea;
|
package/dist/form/Toggle.svelte
CHANGED
@@ -5,7 +5,10 @@ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> =
|
|
5
5
|
(internal: unknown, props: {
|
6
6
|
$$events?: Events;
|
7
7
|
$$slots?: Slots;
|
8
|
-
}): Exports
|
8
|
+
}): Exports & {
|
9
|
+
$set?: any;
|
10
|
+
$on?: any;
|
11
|
+
};
|
9
12
|
z_$$bindings?: Bindings;
|
10
13
|
}
|
11
14
|
declare const Toggle: $$__sveltets_2_IsomorphicComponent<Record<string, never>, {
|
@@ -6,6 +6,7 @@
|
|
6
6
|
export function useForm(form) {
|
7
7
|
let _form = Object.assign(form, {
|
8
8
|
originalData: JSON.parse(JSON.stringify(form.data ?? {})),
|
9
|
+
domForm: null,
|
9
10
|
data: form.data ?? {},
|
10
11
|
state: 'idle',
|
11
12
|
});
|
@@ -63,8 +64,11 @@ export function fieldKeydown(form, name, el, validator, onkeydown) {
|
|
63
64
|
};
|
64
65
|
}
|
65
66
|
function getTypedValue(el) {
|
66
|
-
if (el?.type === 'number')
|
67
|
-
|
67
|
+
if (el?.type === 'number') {
|
68
|
+
const parsed = parseFloat(el.value);
|
69
|
+
// Zod v4 no longer accepts infinite values
|
70
|
+
return isFinite(parsed) ? parsed : el.value;
|
71
|
+
}
|
68
72
|
if (el?.type === 'checkbox')
|
69
73
|
return el.checked;
|
70
74
|
return el?.value;
|
package/dist/form/form.d.ts
CHANGED
@@ -1,17 +1,18 @@
|
|
1
1
|
import { Bodyguard, type BodyguardFormConfig, type BodyguardResult, type GenericIssue, type JSONLike } from "@auth70/bodyguard";
|
2
2
|
import type { RequestEvent } from "@sveltejs/kit";
|
3
|
-
import type {
|
4
|
-
import
|
3
|
+
import type { infer as Infer } from "zod";
|
4
|
+
import { type ZodTypes } from "zodex";
|
5
|
+
import type { LutraForm, FormField, FormIssue } from "./types.js";
|
5
6
|
export declare const bodyguard: Bodyguard;
|
6
7
|
/**
|
7
8
|
* Get fields from a Zod schema.
|
8
|
-
* @param {
|
9
|
+
* @param {ZodTypes} schema - The schema to get fields from.
|
9
10
|
* @returns {Record<string, any>} - The fields from the schema.
|
10
11
|
*/
|
11
|
-
export declare function getFieldsFromSchema(schema:
|
12
|
+
export declare function getFieldsFromSchema<Z extends ZodTypes>(schema: Z, data?: BodyguardResult<any>, parents?: string[]): Record<string, FormField>;
|
12
13
|
/**
|
13
14
|
* Server page load call. Optionally with a default object to populate the form with from locals.
|
14
|
-
* @param {
|
15
|
+
* @param {ZodTypes} schema - The schema to parse the form with.
|
15
16
|
* @param {RequestEvent} event - The event to load the (possible) form from.
|
16
17
|
* @param {JSONLike | string} objOrName - The default object to populate the form with, or the name of the object in locals.
|
17
18
|
* @param {JSONLike} obj - The default object to populate the form with.
|
@@ -26,19 +27,19 @@ export declare function loadForm<Z extends ZodTypes>(schema: Z, event: RequestEv
|
|
26
27
|
export declare function parseFormIssues(issues: GenericIssue[]): FormIssue[];
|
27
28
|
/**
|
28
29
|
* Parse a form using a schema.
|
29
|
-
* @param {
|
30
|
+
* @param {ZodTypes} schema - The schema to parse the form with.
|
30
31
|
* @param {Request} request - The request to parse.
|
31
32
|
* @param {BodyguardFormConfig | string} optsOrName - The options for the form validation, or the name of the form in locals.
|
32
33
|
* @param {BodyguardFormConfig} opts - The options for the form validation.
|
33
34
|
* @returns {Promise<{ valid: false } | { valid: true, data: Infer<Z> }>} - The result of the form validation.
|
34
35
|
*/
|
35
|
-
export declare function parseForm<Z extends
|
36
|
+
export declare function parseForm<Z extends ZodTypes>(schema: Z, event: RequestEvent, optsOrName?: BodyguardFormConfig | string, opts?: BodyguardFormConfig): Promise<LutraForm<Z>>;
|
36
37
|
/**
|
37
38
|
* Convert an array path from a Zod issue to a string path for a form field.
|
38
|
-
* @param {
|
39
|
+
* @param {PropertyKey[]} path - The path to convert.
|
39
40
|
* @returns {string} - The string path.
|
40
41
|
*/
|
41
|
-
export declare function arrayPathToStringPath(path:
|
42
|
+
export declare function arrayPathToStringPath(path: PropertyKey[]): string;
|
42
43
|
/**
|
43
44
|
* Get a value from an object using a string path.
|
44
45
|
* @param {any} obj - The object to get the value from.
|
package/dist/form/form.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import { Bodyguard } from "@auth70/bodyguard";
|
2
|
-
import { ZodArray, ZodNullable, ZodOptional,
|
3
|
-
import { zerialize, dezerialize } from "
|
2
|
+
import { ZodArray, ZodNullable, ZodOptional, ZodObject, ZodDefault, ZodString, ZodNumber, ZodBoolean, ZodDate } from "zod";
|
3
|
+
import { zerialize, dezerialize } from "zodex";
|
4
4
|
export const bodyguard = new Bodyguard();
|
5
5
|
/**
|
6
6
|
* Map a Zod type to a field type as a string.
|
@@ -14,9 +14,6 @@ function mapZodTypeToFieldType(schema) {
|
|
14
14
|
if (schema instanceof ZodOptional) {
|
15
15
|
return mapZodTypeToFieldType(schema.unwrap());
|
16
16
|
}
|
17
|
-
if (schema instanceof ZodEffects) {
|
18
|
-
return mapZodTypeToFieldType(schema._def?.schema ?? schema);
|
19
|
-
}
|
20
17
|
if (schema instanceof ZodArray) {
|
21
18
|
return `Array<${mapZodTypeToFieldType(schema.element)}>`;
|
22
19
|
}
|
@@ -24,7 +21,7 @@ function mapZodTypeToFieldType(schema) {
|
|
24
21
|
return 'object';
|
25
22
|
}
|
26
23
|
if (schema instanceof ZodDefault) {
|
27
|
-
return mapZodTypeToFieldType(schema.
|
24
|
+
return mapZodTypeToFieldType(schema._zod.def.innerType);
|
28
25
|
}
|
29
26
|
if (schema instanceof ZodDate) {
|
30
27
|
return 'date';
|
@@ -42,7 +39,7 @@ function mapZodTypeToFieldType(schema) {
|
|
42
39
|
}
|
43
40
|
/**
|
44
41
|
* Get fields from a Zod schema.
|
45
|
-
* @param {
|
42
|
+
* @param {ZodTypes} schema - The schema to get fields from.
|
46
43
|
* @returns {Record<string, any>} - The fields from the schema.
|
47
44
|
*/
|
48
45
|
export function getFieldsFromSchema(schema, data, parents) {
|
@@ -51,17 +48,14 @@ export function getFieldsFromSchema(schema, data, parents) {
|
|
51
48
|
else
|
52
49
|
parents = [...parents];
|
53
50
|
const fields = {};
|
54
|
-
if (schema instanceof ZodEffects) {
|
55
|
-
return getFieldsFromSchema(schema._def.schema, data);
|
56
|
-
}
|
57
51
|
if (!(schema instanceof ZodObject)) {
|
58
52
|
console.error('[lutra] getFieldsFromSchema: Schema is not an object:', schema.constructor.name);
|
59
53
|
return fields;
|
60
54
|
}
|
61
55
|
for (const key in schema.shape) {
|
62
56
|
const field = schema.shape[key];
|
63
|
-
// Fields can be wrapped like ZodDefault.
|
64
|
-
// On the way, let's check if any of the
|
57
|
+
// Fields can be wrapped like ZodDefault.def.innerType.def.InnerType, etc. We want the last inner type's definition.
|
58
|
+
// On the way, let's check if any of the def include a defaultValue.
|
65
59
|
let required = true;
|
66
60
|
let defaultValue = undefined;
|
67
61
|
let min = undefined;
|
@@ -70,24 +64,26 @@ export function getFieldsFromSchema(schema, data, parents) {
|
|
70
64
|
let minlength = undefined;
|
71
65
|
let maxlength = undefined;
|
72
66
|
let type = field;
|
73
|
-
while (type instanceof
|
67
|
+
while (type instanceof ZodOptional || type instanceof ZodDefault || type instanceof ZodNullable) {
|
74
68
|
if (type instanceof ZodOptional || type instanceof ZodNullable) {
|
75
69
|
required = false;
|
76
|
-
type = type.
|
70
|
+
type = type._zod.def.innerType;
|
77
71
|
}
|
78
72
|
if (type instanceof ZodDefault) {
|
79
|
-
defaultValue = type.
|
80
|
-
|
73
|
+
defaultValue = typeof type._zod.def.defaultValue === 'function'
|
74
|
+
? type._zod.def.defaultValue()
|
75
|
+
: type._zod.def.defaultValue;
|
76
|
+
type = type._zod.def.innerType;
|
81
77
|
}
|
82
78
|
else {
|
83
|
-
type = type.
|
79
|
+
type = type._zod.def.innerType ? type._zod.def.innerType : type;
|
84
80
|
}
|
85
81
|
}
|
86
82
|
// Check for min/max/regex checks
|
87
|
-
if (type.
|
88
|
-
for (const check of type.
|
83
|
+
if ((type._zod.def).checks) {
|
84
|
+
for (const check of type._zod.def.checks) {
|
89
85
|
if (check.kind === 'min') {
|
90
|
-
if (field instanceof ZodString || field.
|
86
|
+
if (field instanceof ZodString || field._zod?.def?.innerType instanceof ZodString) {
|
91
87
|
minlength = check.value;
|
92
88
|
}
|
93
89
|
else {
|
@@ -95,7 +91,7 @@ export function getFieldsFromSchema(schema, data, parents) {
|
|
95
91
|
}
|
96
92
|
}
|
97
93
|
if (check.kind === 'max') {
|
98
|
-
if (field instanceof ZodString || field.
|
94
|
+
if (field instanceof ZodString || field._zod?.def?.innerType instanceof ZodString) {
|
99
95
|
maxlength = check.value;
|
100
96
|
}
|
101
97
|
else {
|
@@ -106,7 +102,13 @@ export function getFieldsFromSchema(schema, data, parents) {
|
|
106
102
|
pattern = check.regex.source;
|
107
103
|
}
|
108
104
|
if (check.kind === 'email') {
|
109
|
-
|
105
|
+
pattern = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
|
106
|
+
}
|
107
|
+
if (check.kind === 'url') {
|
108
|
+
pattern = /^(https?:\/\/)?[^\s/$.?#].[^\s]*$/;
|
109
|
+
}
|
110
|
+
if (check.kind === 'uuid') {
|
111
|
+
pattern = /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/;
|
110
112
|
}
|
111
113
|
}
|
112
114
|
}
|
@@ -150,7 +152,7 @@ export function getFieldsFromSchema(schema, data, parents) {
|
|
150
152
|
}
|
151
153
|
/**
|
152
154
|
* Server page load call. Optionally with a default object to populate the form with from locals.
|
153
|
-
* @param {
|
155
|
+
* @param {ZodTypes} schema - The schema to parse the form with.
|
154
156
|
* @param {RequestEvent} event - The event to load the (possible) form from.
|
155
157
|
* @param {JSONLike | string} objOrName - The default object to populate the form with, or the name of the object in locals.
|
156
158
|
* @param {JSONLike} obj - The default object to populate the form with.
|
@@ -198,7 +200,7 @@ export function parseFormIssues(issues) {
|
|
198
200
|
}
|
199
201
|
/**
|
200
202
|
* Parse a form using a schema.
|
201
|
-
* @param {
|
203
|
+
* @param {ZodTypes} schema - The schema to parse the form with.
|
202
204
|
* @param {Request} request - The request to parse.
|
203
205
|
* @param {BodyguardFormConfig | string} optsOrName - The options for the form validation, or the name of the form in locals.
|
204
206
|
* @param {BodyguardFormConfig} opts - The options for the form validation.
|
@@ -208,7 +210,7 @@ export async function parseForm(schema, event, optsOrName = 'form', opts) {
|
|
208
210
|
let name = typeof optsOrName === 'string' ? optsOrName : 'form';
|
209
211
|
opts = typeof optsOrName === 'string' ? opts : optsOrName;
|
210
212
|
// Use bodyguard to parse the form.
|
211
|
-
const data = await bodyguard.softForm(event.request, schema.parse, opts);
|
213
|
+
const data = await bodyguard.softForm(event.request, (input) => schema.parse(input), opts);
|
212
214
|
// Get the fields from the schema.
|
213
215
|
const fields = getFieldsFromSchema(schema, data);
|
214
216
|
// Serialize the schema to send over the wire.
|
@@ -225,13 +227,14 @@ export async function parseForm(schema, event, optsOrName = 'form', opts) {
|
|
225
227
|
// Mark fields as tainted if they were in the request.
|
226
228
|
return [key, {
|
227
229
|
...field,
|
228
|
-
tainted: data.success ? false : data.value.hasOwnProperty(key),
|
230
|
+
tainted: data.success ? false : (data.value && typeof data.value === 'object' && 'hasOwnProperty' in data.value ? data.value.hasOwnProperty(key) : false),
|
229
231
|
}];
|
230
232
|
})),
|
231
233
|
// ensure all fields are present by populating `data` from `fields` instead of trusting `data` to have all fields
|
232
234
|
data: Object.assign(Object.fromEntries(Object.entries(fields).map(([key, value]) => {
|
233
|
-
|
234
|
-
|
235
|
+
const dataValue = data.value && typeof data.value === 'object' ? data.value[key] : undefined;
|
236
|
+
return [key, value.isArray ? (dataValue || []) : (dataValue !== undefined ? dataValue : (value.defaultValue ?? null))];
|
237
|
+
})), data.value || {}),
|
235
238
|
issues: data.success ? undefined : parseFormIssues(data.error.issues),
|
236
239
|
};
|
237
240
|
// Attach the form to the locals to pass it to the client via loadForm.
|
@@ -240,16 +243,18 @@ export async function parseForm(schema, event, optsOrName = 'form', opts) {
|
|
240
243
|
}
|
241
244
|
/**
|
242
245
|
* Convert an array path from a Zod issue to a string path for a form field.
|
243
|
-
* @param {
|
246
|
+
* @param {PropertyKey[]} path - The path to convert.
|
244
247
|
* @returns {string} - The string path.
|
245
248
|
*/
|
246
249
|
export function arrayPathToStringPath(path) {
|
247
250
|
// Joins the path with dots. For arrays, it adds brackets.
|
251
|
+
// Symbols are converted to strings using String()
|
248
252
|
return path.map((p) => {
|
249
|
-
|
250
|
-
|
253
|
+
const pStr = typeof p === 'symbol' ? String(p) : p.toString();
|
254
|
+
if (pStr.match(/^\d+$/)) {
|
255
|
+
return `${pStr}[]`;
|
251
256
|
}
|
252
|
-
return
|
257
|
+
return pStr;
|
253
258
|
}).join('.');
|
254
259
|
}
|
255
260
|
/**
|
package/dist/form/index.d.ts
CHANGED
@@ -1,9 +1,7 @@
|
|
1
1
|
export { default as Button } from './Button.svelte';
|
2
|
-
export { default as
|
3
|
-
export { default as FieldContainer } from './FieldContainer.svelte';
|
4
|
-
export { default as FieldContent } from './FieldContent.svelte';
|
2
|
+
export { default as FormActions } from './FormActions.svelte';
|
5
3
|
export { default as FieldError } from './FieldError.svelte';
|
6
|
-
export { default as
|
4
|
+
export { default as FormSection } from './FormSection.svelte';
|
7
5
|
export { default as Fieldset } from './Fieldset.svelte';
|
8
6
|
export { default as Form } from './Form.svelte';
|
9
7
|
export { default as ImageUpload } from './ImageUpload.svelte';
|
@@ -13,6 +11,7 @@ export { default as Label } from './Label.svelte';
|
|
13
11
|
export { default as LogoUpload } from './LogoUpload.svelte';
|
14
12
|
export { default as Select } from './Select.svelte';
|
15
13
|
export { default as Textarea } from './Textarea.svelte';
|
14
|
+
export { default as Toggle } from './Toggle.svelte';
|
16
15
|
export * from './types.js';
|
17
16
|
export * from './form.js';
|
18
17
|
export * from './client.svelte.js';
|
package/dist/form/index.js
CHANGED
@@ -1,9 +1,7 @@
|
|
1
1
|
export { default as Button } from './Button.svelte';
|
2
|
-
export { default as
|
3
|
-
export { default as FieldContainer } from './FieldContainer.svelte';
|
4
|
-
export { default as FieldContent } from './FieldContent.svelte';
|
2
|
+
export { default as FormActions } from './FormActions.svelte';
|
5
3
|
export { default as FieldError } from './FieldError.svelte';
|
6
|
-
export { default as
|
4
|
+
export { default as FormSection } from './FormSection.svelte';
|
7
5
|
export { default as Fieldset } from './Fieldset.svelte';
|
8
6
|
export { default as Form } from './Form.svelte';
|
9
7
|
export { default as ImageUpload } from './ImageUpload.svelte';
|
@@ -13,6 +11,7 @@ export { default as Label } from './Label.svelte';
|
|
13
11
|
export { default as LogoUpload } from './LogoUpload.svelte';
|
14
12
|
export { default as Select } from './Select.svelte';
|
15
13
|
export { default as Textarea } from './Textarea.svelte';
|
14
|
+
export { default as Toggle } from './Toggle.svelte';
|
16
15
|
export * from './types.js';
|
17
16
|
export * from './form.js';
|
18
17
|
export * from './client.svelte.js';
|
package/dist/form/types.d.ts
CHANGED
@@ -1,28 +1,19 @@
|
|
1
1
|
import type { GenericIssue } from "@auth70/bodyguard";
|
2
|
-
import type {
|
3
|
-
|
4
|
-
|
5
|
-
export type
|
2
|
+
import type { ZodTypes } from "zodex";
|
3
|
+
import type { infer as Infer } from "zod";
|
4
|
+
import type { FullAutoFill } from "svelte/elements";
|
5
|
+
export type Autocomplete = 'on' | 'off' | FullAutoFill;
|
6
6
|
export type BeforeSubmitFn = (opts: {
|
7
7
|
form: HTMLFormElement;
|
8
8
|
data: FormData;
|
9
9
|
cancel: () => void;
|
10
10
|
}) => void | Promise<void>;
|
11
11
|
export type AddBeforeSubmitFn = (id: string, fn: BeforeSubmitFn) => void;
|
12
|
-
export type
|
13
|
-
export type Modifiers = ZodOptional<ZodTypes> | ZodNullable<ZodTypes> | ZodDefault<ZodTypes>;
|
14
|
-
export type Primitives = ZodString | ZodNumber | ZodNaN | ZodBigInt | ZodBoolean | ZodDate | ZodUndefined | ZodNull | ZodAny | ZodUnknown | ZodNever | ZodVoid;
|
15
|
-
export type ListCollections = ZodTuple<any, any> | ZodSet<ZodTypes> | ZodArray<ZodTypes>;
|
16
|
-
export type KVCollections = ZodObject<any> | ZodRecord<any, ZodTypes> | ZodMap<ZodTypes, ZodTypes>;
|
17
|
-
export type ADTs = ZodUnion<readonly [ZodTypes, ...ZodTypes[]]> | ZodDiscriminatedUnion<any, ZodObject<{
|
18
|
-
[k: string]: ZodTypes;
|
19
|
-
}>[]> | ZodIntersection<ZodTypes, ZodTypes> | ZodNativeEnum<any> | ZodEnum<any>;
|
20
|
-
export type ZodTypes = Modifiers | Primitives | ListCollections | KVCollections | ADTs | ZodFunction<any, ZodTypes> | ZodLazy<ZodTypes> | ZodLiteral<any> | ZodEffects<any, any> | ZodCatch<ZodTypes> | ZodPromise<ZodTypes> | ZodBranded<ZodTypes, any> | ZodPipeline<ZodTypes, ZodTypes>;
|
21
|
-
export type ZTypeName<T extends ZodTypes> = T["_def"]["typeName"];
|
22
|
-
export type FormIssue = GenericIssue & {
|
12
|
+
export type FormIssue = Omit<GenericIssue, 'path'> & {
|
23
13
|
name: string;
|
14
|
+
path: PropertyKey[];
|
24
15
|
};
|
25
|
-
export type LutraForm<T extends
|
16
|
+
export type LutraForm<T extends ZodTypes> = {
|
26
17
|
/** The name of the form. */
|
27
18
|
name: string;
|
28
19
|
/** Whether the form is valid. */
|
@@ -43,6 +34,8 @@ export type LutraForm<T extends ZodType<any, any>> = {
|
|
43
34
|
issues?: FormIssue[];
|
44
35
|
/** The state of the form. */
|
45
36
|
state: 'idle' | 'loading' | 'success' | 'error';
|
37
|
+
/** The DOM form element. */
|
38
|
+
domForm?: HTMLFormElement | null;
|
46
39
|
};
|
47
40
|
export type FormField = {
|
48
41
|
name: string;
|
@@ -18,6 +18,9 @@ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> =
|
|
18
18
|
(internal: unknown, props: {
|
19
19
|
$$events?: Events;
|
20
20
|
$$slots?: Slots;
|
21
|
-
}): Exports
|
21
|
+
}): Exports & {
|
22
|
+
$set?: any;
|
23
|
+
$on?: any;
|
24
|
+
};
|
22
25
|
z_$$bindings?: Bindings;
|
23
26
|
}
|
@@ -18,6 +18,9 @@ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> =
|
|
18
18
|
(internal: unknown, props: {
|
19
19
|
$$events?: Events;
|
20
20
|
$$slots?: Slots;
|
21
|
-
}): Exports
|
21
|
+
}): Exports & {
|
22
|
+
$set?: any;
|
23
|
+
$on?: any;
|
24
|
+
};
|
22
25
|
z_$$bindings?: Bindings;
|
23
26
|
}
|
@@ -18,6 +18,9 @@ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> =
|
|
18
18
|
(internal: unknown, props: {
|
19
19
|
$$events?: Events;
|
20
20
|
$$slots?: Slots;
|
21
|
-
}): Exports
|
21
|
+
}): Exports & {
|
22
|
+
$set?: any;
|
23
|
+
$on?: any;
|
24
|
+
};
|
22
25
|
z_$$bindings?: Bindings;
|
23
26
|
}
|
@@ -18,6 +18,9 @@ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> =
|
|
18
18
|
(internal: unknown, props: {
|
19
19
|
$$events?: Events;
|
20
20
|
$$slots?: Slots;
|
21
|
-
}): Exports
|
21
|
+
}): Exports & {
|
22
|
+
$set?: any;
|
23
|
+
$on?: any;
|
24
|
+
};
|
22
25
|
z_$$bindings?: Bindings;
|
23
26
|
}
|
@@ -18,6 +18,9 @@ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> =
|
|
18
18
|
(internal: unknown, props: {
|
19
19
|
$$events?: Events;
|
20
20
|
$$slots?: Slots;
|
21
|
-
}): Exports
|
21
|
+
}): Exports & {
|
22
|
+
$set?: any;
|
23
|
+
$on?: any;
|
24
|
+
};
|
22
25
|
z_$$bindings?: Bindings;
|
23
26
|
}
|
@@ -18,6 +18,9 @@ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> =
|
|
18
18
|
(internal: unknown, props: {
|
19
19
|
$$events?: Events;
|
20
20
|
$$slots?: Slots;
|
21
|
-
}): Exports
|
21
|
+
}): Exports & {
|
22
|
+
$set?: any;
|
23
|
+
$on?: any;
|
24
|
+
};
|
22
25
|
z_$$bindings?: Bindings;
|
23
26
|
}
|
@@ -18,6 +18,9 @@ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> =
|
|
18
18
|
(internal: unknown, props: {
|
19
19
|
$$events?: Events;
|
20
20
|
$$slots?: Slots;
|
21
|
-
}): Exports
|
21
|
+
}): Exports & {
|
22
|
+
$set?: any;
|
23
|
+
$on?: any;
|
24
|
+
};
|
22
25
|
z_$$bindings?: Bindings;
|
23
26
|
}
|
@@ -18,6 +18,9 @@ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> =
|
|
18
18
|
(internal: unknown, props: {
|
19
19
|
$$events?: Events;
|
20
20
|
$$slots?: Slots;
|
21
|
-
}): Exports
|
21
|
+
}): Exports & {
|
22
|
+
$set?: any;
|
23
|
+
$on?: any;
|
24
|
+
};
|
22
25
|
z_$$bindings?: Bindings;
|
23
26
|
}
|
@@ -18,6 +18,9 @@ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> =
|
|
18
18
|
(internal: unknown, props: {
|
19
19
|
$$events?: Events;
|
20
20
|
$$slots?: Slots;
|
21
|
-
}): Exports
|
21
|
+
}): Exports & {
|
22
|
+
$set?: any;
|
23
|
+
$on?: any;
|
24
|
+
};
|
22
25
|
z_$$bindings?: Bindings;
|
23
26
|
}
|
@@ -18,6 +18,9 @@ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> =
|
|
18
18
|
(internal: unknown, props: {
|
19
19
|
$$events?: Events;
|
20
20
|
$$slots?: Slots;
|
21
|
-
}): Exports
|
21
|
+
}): Exports & {
|
22
|
+
$set?: any;
|
23
|
+
$on?: any;
|
24
|
+
};
|
22
25
|
z_$$bindings?: Bindings;
|
23
26
|
}
|
@@ -18,6 +18,9 @@ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> =
|
|
18
18
|
(internal: unknown, props: {
|
19
19
|
$$events?: Events;
|
20
20
|
$$slots?: Slots;
|
21
|
-
}): Exports
|
21
|
+
}): Exports & {
|
22
|
+
$set?: any;
|
23
|
+
$on?: any;
|
24
|
+
};
|
22
25
|
z_$$bindings?: Bindings;
|
23
26
|
}
|
@@ -18,6 +18,9 @@ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> =
|
|
18
18
|
(internal: unknown, props: {
|
19
19
|
$$events?: Events;
|
20
20
|
$$slots?: Slots;
|
21
|
-
}): Exports
|
21
|
+
}): Exports & {
|
22
|
+
$set?: any;
|
23
|
+
$on?: any;
|
24
|
+
};
|
22
25
|
z_$$bindings?: Bindings;
|
23
26
|
}
|
@@ -18,6 +18,9 @@ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> =
|
|
18
18
|
(internal: unknown, props: {
|
19
19
|
$$events?: Events;
|
20
20
|
$$slots?: Slots;
|
21
|
-
}): Exports
|
21
|
+
}): Exports & {
|
22
|
+
$set?: any;
|
23
|
+
$on?: any;
|
24
|
+
};
|
22
25
|
z_$$bindings?: Bindings;
|
23
26
|
}
|
@@ -18,6 +18,9 @@ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> =
|
|
18
18
|
(internal: unknown, props: {
|
19
19
|
$$events?: Events;
|
20
20
|
$$slots?: Slots;
|
21
|
-
}): Exports
|
21
|
+
}): Exports & {
|
22
|
+
$set?: any;
|
23
|
+
$on?: any;
|
24
|
+
};
|
22
25
|
z_$$bindings?: Bindings;
|
23
26
|
}
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
@@ -1,2 +1,3 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
export * from './components/index.js';
|
2
|
+
export * from './form/index.js';
|
3
|
+
export * from './icons/index.js';
|