@softwareone/spi-sv5-library 1.4.0 → 1.5.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.
@@ -0,0 +1,155 @@
1
+ <script lang="ts">
2
+ import type { ActionResult } from '@sveltejs/kit';
3
+ import { onDestroy, untrack, type Snippet } from 'svelte';
4
+
5
+ import { zod4Client } from 'sveltekit-superforms/adapters';
6
+ import {
7
+ superForm,
8
+ type TaintedFields,
9
+ type ValidationErrors
10
+ } from 'sveltekit-superforms/client';
11
+ import { z } from 'zod';
12
+
13
+ import { addToast, Spinner } from '../../index.js';
14
+ import { getFormContext } from './context.js';
15
+ import type { FormError } from './types.js';
16
+ import { isEqual } from './helper.js';
17
+
18
+ type Schema = z.infer<typeof schema>;
19
+
20
+ interface Props {
21
+ initialData: Schema;
22
+ action: string;
23
+ schema: z.ZodObject;
24
+ extraData?: Record<string, string | number>;
25
+ onsuccess: (data?: Record<string, unknown>) => void;
26
+ onfailure?: (status: number | undefined, error: unknown) => void;
27
+ children: Snippet;
28
+ }
29
+
30
+ let {
31
+ initialData,
32
+ action,
33
+ schema,
34
+ extraData,
35
+ onsuccess,
36
+ onfailure = undefined,
37
+ children
38
+ }: Props = $props();
39
+
40
+ let actionResult: ActionResult;
41
+ let isLoading = $state(false);
42
+
43
+ const { form, errors, isFormValid } = getFormContext<Schema>();
44
+
45
+ $form = structuredClone($state.snapshot(initialData));
46
+
47
+ const onUpdated = () => {
48
+ isLoading = false;
49
+
50
+ const data = actionResult && 'data' in actionResult ? actionResult.data : undefined;
51
+ const success = actionResult?.type === 'success';
52
+
53
+ addToast({ message: data?.message, type: success ? 'success' : 'warning' });
54
+ if (success) {
55
+ onsuccess(data);
56
+ }
57
+ };
58
+
59
+ const onError = ({ result }: { result: ActionResult }) => {
60
+ if (result.type === 'error') {
61
+ addToast({ message: 'There was an unexpected error.', type: 'danger' });
62
+ onfailure?.(result.status, result.error);
63
+ }
64
+ };
65
+
66
+ const {
67
+ form: superFormData,
68
+ enhance,
69
+ validateForm,
70
+ errors: superFormErrors,
71
+ tainted: superFormTained
72
+ } = superForm(initialData, {
73
+ applyAction: false,
74
+ autoFocusOnError: true,
75
+ dataType: 'json',
76
+ resetForm: false,
77
+ scrollToError: 'smooth',
78
+ validationMethod: 'oninput',
79
+ validators: zod4Client(schema),
80
+ warnings: { duplicateId: false },
81
+ onSubmit: ({ formData }) => {
82
+ isLoading = true;
83
+ return appendExtraData(formData);
84
+ },
85
+ onResult: ({ result }) => (actionResult = result),
86
+ onUpdated,
87
+ onError
88
+ });
89
+
90
+ const getErrors = (
91
+ errors: ValidationErrors<Record<string, unknown>>,
92
+ tained: TaintedFields<Record<string, unknown>>
93
+ ) => {
94
+ const errorEntries = Object.entries(errors)
95
+ .filter(([field]) => Object.hasOwn(tained, field))
96
+ .map(([field, error]) => [field, error && '_errors' in error ? error._errors : error]);
97
+
98
+ return Object.fromEntries(errorEntries) as FormError<Schema>;
99
+ };
100
+
101
+ const appendExtraData = (formData: FormData) => {
102
+ if (extraData) {
103
+ Object.entries(extraData).forEach(([key, value]) => {
104
+ formData.set(key, String(value));
105
+ });
106
+ }
107
+
108
+ return formData;
109
+ };
110
+
111
+ $effect(() => {
112
+ if (
113
+ !isEqual(
114
+ $form,
115
+ untrack(() => $superFormData)
116
+ )
117
+ ) {
118
+ $superFormData = structuredClone($form);
119
+ validateForm().then((result) => ($isFormValid = result.valid));
120
+ }
121
+ });
122
+
123
+ $effect(() => {
124
+ if (
125
+ !isEqual(
126
+ $superFormErrors,
127
+ untrack(() => $errors)
128
+ )
129
+ ) {
130
+ $errors = getErrors(
131
+ $superFormErrors,
132
+ untrack(() => $superFormTained!)
133
+ );
134
+ }
135
+ });
136
+
137
+ onDestroy(() => {
138
+ $form = {};
139
+ $errors = {};
140
+ $isFormValid = false;
141
+ });
142
+ </script>
143
+
144
+ <Spinner show={isLoading} />
145
+
146
+ <form
147
+ class="w-full"
148
+ id="form"
149
+ method="POST"
150
+ action="?/{action}"
151
+ use:enhance
152
+ onsubmit={(event) => event.preventDefault()}
153
+ >
154
+ {@render children()}
155
+ </form>
@@ -0,0 +1,13 @@
1
+ import { type Snippet } from 'svelte';
2
+ import { z } from 'zod';
3
+ declare const Form: import("svelte").Component<{
4
+ initialData: Record<string, unknown>;
5
+ action: string;
6
+ schema: z.ZodObject;
7
+ extraData?: Record<string, string | number>;
8
+ onsuccess: (data?: Record<string, unknown>) => void;
9
+ onfailure?: (status: number | undefined, error: unknown) => void;
10
+ children: Snippet;
11
+ }, {}, "">;
12
+ type Form = ReturnType<typeof Form>;
13
+ export default Form;
@@ -0,0 +1,3 @@
1
+ import type { FormContext } from './types.js';
2
+ export declare const setFormContext: <T>() => FormContext<T>;
3
+ export declare const getFormContext: <T>() => FormContext<T>;
@@ -0,0 +1,15 @@
1
+ import { getContext, setContext } from 'svelte';
2
+ import { writable } from 'svelte/store';
3
+ const formContextKey = Symbol('formContext');
4
+ export const setFormContext = () => {
5
+ const formContext = {
6
+ form: writable({}),
7
+ errors: writable({}),
8
+ isFormValid: writable(false)
9
+ };
10
+ setContext(formContextKey, formContext);
11
+ return formContext;
12
+ };
13
+ export const getFormContext = () => {
14
+ return getContext(formContextKey);
15
+ };
@@ -0,0 +1,3 @@
1
+ import type z from 'zod';
2
+ export declare const validateSchema: (schema: z.ZodObject, data: z.infer<typeof schema>) => boolean;
3
+ export declare const isEqual: (source: unknown, target: unknown) => boolean;
@@ -0,0 +1,24 @@
1
+ export const validateSchema = (schema, data) => {
2
+ const result = schema.safeParse(data);
3
+ return result.success;
4
+ };
5
+ export const isEqual = (source, target) => {
6
+ if (arePrimitivesEqual(source, target))
7
+ return true;
8
+ if (Array.isArray(source) && Array.isArray(target))
9
+ return areArraysEqual(source, target);
10
+ if (isObject(source) && isObject(target))
11
+ return areObjectsEqual(source, target);
12
+ return false;
13
+ };
14
+ const arePrimitivesEqual = (source, target) => source === target;
15
+ const isObject = (object) => object !== null && typeof object === 'object' && !Array.isArray(object);
16
+ const areArraysEqual = (sourceArray, targetArray) => sourceArray.length === targetArray.length &&
17
+ sourceArray.every((value, index) => isEqual(value, targetArray[index]));
18
+ const areObjectsEqual = (sourceObject, targetObject) => {
19
+ const keys1 = Object.keys(sourceObject);
20
+ const keys2 = Object.keys(targetObject);
21
+ if (keys1.length !== keys2.length)
22
+ return false;
23
+ return keys1.every((key) => isEqual(sourceObject[key], targetObject[key]));
24
+ };
@@ -0,0 +1,7 @@
1
+ import type { Writable } from 'svelte/store';
2
+ export type FormError<T> = Record<keyof T, string[] | undefined>;
3
+ export interface FormContext<T> {
4
+ form: Writable<T>;
5
+ errors: Writable<FormError<T>>;
6
+ isFormValid: Writable<boolean>;
7
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,19 @@
1
+ import { type ZodString } from 'zod';
2
+ type Range = {
3
+ from: number;
4
+ to: number;
5
+ };
6
+ declare class ZodValidationBuilder {
7
+ private validator;
8
+ constructor();
9
+ range(regex: RegExp, range: Range): this;
10
+ required(): this;
11
+ noWhitespace(): this;
12
+ uuid(): this;
13
+ min(length: number): this;
14
+ max(length: number): this;
15
+ regex(pattern: RegExp, message: string): this;
16
+ build(): ZodString;
17
+ }
18
+ export declare const createZodString: () => ZodValidationBuilder;
19
+ export {};
@@ -0,0 +1,40 @@
1
+ import { z } from 'zod';
2
+ const REGEX_NO_WHITESPACE = /^\S*$/;
3
+ class ZodValidationBuilder {
4
+ validator;
5
+ constructor() {
6
+ this.validator = z.string().trim();
7
+ }
8
+ range(regex, range) {
9
+ this.validator = this.validator.regex(regex, `Must be between ${range.from} and ${range.to}`);
10
+ return this;
11
+ }
12
+ required() {
13
+ this.validator = this.validator.min(1, 'Required');
14
+ return this;
15
+ }
16
+ noWhitespace() {
17
+ this.validator = this.validator.regex(REGEX_NO_WHITESPACE, 'Whitespace not allowed');
18
+ return this;
19
+ }
20
+ uuid() {
21
+ this.validator = this.validator.uuid('Invalid UUID format');
22
+ return this;
23
+ }
24
+ min(length) {
25
+ this.validator = this.validator.min(length, `Min ${length} characters required`);
26
+ return this;
27
+ }
28
+ max(length) {
29
+ this.validator = this.validator.max(length, `Max ${length} characters allowed`);
30
+ return this;
31
+ }
32
+ regex(pattern, message) {
33
+ this.validator = this.validator.regex(pattern, message);
34
+ return this;
35
+ }
36
+ build() {
37
+ return this.validator;
38
+ }
39
+ }
40
+ export const createZodString = () => new ZodValidationBuilder();
@@ -0,0 +1,31 @@
1
+ <script lang="ts">
2
+ import type { Snippet } from 'svelte';
3
+ import type { HTMLAnchorAttributes } from 'svelte/elements';
4
+
5
+ interface Props extends HTMLAnchorAttributes {
6
+ name?: string;
7
+ children?: Snippet;
8
+ }
9
+
10
+ let { name, children, ...props }: Props = $props();
11
+ </script>
12
+
13
+ <a class="link" {...props}>
14
+ {#if children}
15
+ {@render children()}
16
+ {:else}
17
+ {name}
18
+ {/if}
19
+ </a>
20
+
21
+ <style>
22
+ .link {
23
+ color: var(--primary-color, #472aff);
24
+ text-decoration: none;
25
+ }
26
+
27
+ .link:hover,
28
+ .link:focus-visible {
29
+ text-decoration: underline;
30
+ }
31
+ </style>
@@ -0,0 +1,9 @@
1
+ import type { Snippet } from 'svelte';
2
+ import type { HTMLAnchorAttributes } from 'svelte/elements';
3
+ interface Props extends HTMLAnchorAttributes {
4
+ name?: string;
5
+ children?: Snippet;
6
+ }
7
+ declare const Link: import("svelte").Component<Props, {}, "">;
8
+ type Link = ReturnType<typeof Link>;
9
+ export default Link;
@@ -31,7 +31,7 @@
31
31
  aria-label="Close waffle menu"
32
32
  ></div>
33
33
 
34
- <aside
34
+ <div
35
35
  class="waffle-dropdown"
36
36
  transition:fade={{ duration: 250 }}
37
37
  role="dialog"
@@ -49,7 +49,7 @@
49
49
  {/each}
50
50
  </ul>
51
51
  </div>
52
- </aside>
52
+ </div>
53
53
  {/if}
54
54
 
55
55
  <style>
package/dist/index.d.ts CHANGED
@@ -1,46 +1,56 @@
1
1
  import Accordion from './Accordion/Accordion.svelte';
2
2
  import Avatar from './Avatar/Avatar.svelte';
3
3
  import Breadcrumbs from './Breadcrumbs/Breadcrumbs.svelte';
4
- import { addBreadcrumbsNameMap, type BreadcrumbsNameMap } from './Breadcrumbs/breadcrumbsState.svelte.js';
5
4
  import Button from './Button/Button.svelte';
6
5
  import Card from './Card/Card.svelte';
7
6
  import Chips from './Chips/Chips.svelte';
8
- import { ChipType } from './Chips/chipsState.svelte.js';
9
7
  import ErrorPage from './ErrorPage/ErrorPage.svelte';
10
8
  import Footer from './Footer/Footer.svelte';
11
- import Input from './Form/Input/Input.svelte';
12
- import Select from './Form/Select/Select.svelte';
13
- import type { SelectOption } from './Form/Select/selectState.svelte.js';
14
- import TextArea from './Form/TextArea/TextArea.svelte';
15
- import Toggle from './Form/Toggle/Toggle.svelte';
9
+ import Form from './Form/FormController/Form.svelte';
16
10
  import Header from './Header/Header.svelte';
17
11
  import HeaderAccount from './Header/HeaderAccount.svelte';
18
12
  import HeaderLoader from './Header/HeaderLoader.svelte';
19
13
  import HeaderLogo from './Header/HeaderLogo.svelte';
20
14
  import HighlightPanel from './HighlightPanel/HighlightPanel.svelte';
21
- import { ColumnType, ImageType, type HighlightPanelColumn } from './HighlightPanel/highlightPanelState.svelte.js';
22
15
  import Home from './Home/Home.svelte';
23
- import type { HomeItem } from './Home/homeState.svelte.js';
16
+ import Input from './Form/Input/Input.svelte';
17
+ import Link from './Link/Link.svelte';
24
18
  import Menu from './Menu/Menu.svelte';
25
- import Sidebar from './Menu/Sidebar.svelte';
26
- import type { MenuItem } from './Menu/SidebarState.svelte';
27
19
  import Modal from './Modal/Modal.svelte';
28
- import type { ModalProps } from './Modal/modalState.svelte.js';
29
20
  import Notification from './Notification/Notification.svelte';
30
21
  import Processing from './Processing/Processing.svelte';
31
22
  import ProgressPage from './ProgressPage/ProgressPage.svelte';
32
- import { setProgressWizardStepsContext, getProgressWizardContext } from './ProgressWizard/context.js';
33
23
  import ProgressWizard from './ProgressWizard/ProgressWizard.svelte';
34
- import { setStepValidity, type ProgressWizardStep } from './ProgressWizard/progressWizardState.svelte.js';
35
24
  import Search from './Search/Search.svelte';
25
+ import Select from './Form/Select/Select.svelte';
26
+ import Sidebar from './Menu/Sidebar.svelte';
36
27
  import Spinner from './Spinner/Spinner.svelte';
37
28
  import Switcher from './Switcher/Switcher.svelte';
38
- import type { SwitcherOption } from './Switcher/switcherState.svelte.js';
39
29
  import Tabs from './Tabs/Tabs.svelte';
40
- import type { Tab } from './Tabs/tabsState.svelte.js';
30
+ import TextArea from './Form/TextArea/TextArea.svelte';
41
31
  import Toaster from './Toast/Toast.svelte';
42
- import { addToast, type Toast } from './Toast/toastState.svelte';
32
+ import Toggle from './Form/Toggle/Toggle.svelte';
43
33
  import Tooltip from './Tooltip/Tooltip.svelte';
44
34
  import Waffle from './Waffle/Waffle.svelte';
35
+ import { addBreadcrumbsNameMap } from './Breadcrumbs/breadcrumbsState.svelte.js';
36
+ import { ChipType } from './Chips/chipsState.svelte.js';
37
+ import { ColumnType, ImageType } from './HighlightPanel/highlightPanelState.svelte.js';
38
+ import { setProgressWizardStepsContext, getProgressWizardContext } from './ProgressWizard/context.js';
39
+ import { setStepValidity } from './ProgressWizard/progressWizardState.svelte.js';
40
+ import { addToast } from './Toast/toastState.svelte';
41
+ import { setFormContext, getFormContext } from './Form/FormController/context.js';
42
+ import { validateSchema } from './Form/FormController/helper.js';
43
+ import { createZodString } from './Form/FormController/zod-validations.js';
44
+ import type { BreadcrumbsNameMap } from './Breadcrumbs/breadcrumbsState.svelte.js';
45
+ import type { FormError, FormContext } from './Form/FormController/types.js';
46
+ import type { HighlightPanelColumn } from './HighlightPanel/highlightPanelState.svelte.js';
47
+ import type { HomeItem } from './Home/homeState.svelte.js';
48
+ import type { MenuItem } from './Menu/SidebarState.svelte';
49
+ import type { ModalProps } from './Modal/modalState.svelte.js';
50
+ import type { ProgressWizardStep } from './ProgressWizard/progressWizardState.svelte.js';
51
+ import type { SwitcherOption } from './Switcher/switcherState.svelte.js';
52
+ import type { SelectOption } from './Form/Select/selectState.svelte.js';
53
+ import type { Tab } from './Tabs/tabsState.svelte.js';
54
+ import type { Toast } from './Toast/toastState.svelte';
45
55
  import type { WaffleItem } from './Waffle/waffleState.svelte.js';
46
- export { Accordion, addBreadcrumbsNameMap, addToast, Avatar, Breadcrumbs, Button, Card, Chips, ChipType, ColumnType, ErrorPage, Footer, getProgressWizardContext, Header, HeaderAccount, HeaderLoader, HeaderLogo, HighlightPanel, Home, ImageType, Input, Menu, Modal, Notification, Processing, ProgressPage, ProgressWizard, Search, Select, setStepValidity, setProgressWizardStepsContext, Sidebar, Spinner, Switcher, Tabs, TextArea, Toaster, Toggle, Tooltip, Waffle, type BreadcrumbsNameMap, type HighlightPanelColumn, type HomeItem, type MenuItem, type ModalProps, type ProgressWizardStep, type SelectOption, type SwitcherOption, type Tab, type Toast, type WaffleItem };
56
+ export { Accordion, Avatar, Breadcrumbs, Button, Card, Chips, ErrorPage, Footer, Form, Header, HeaderAccount, HeaderLoader, HeaderLogo, HighlightPanel, Home, Input, Link, Menu, Modal, Notification, Processing, ProgressPage, ProgressWizard, Search, Select, Sidebar, Spinner, Switcher, Tabs, TextArea, Toaster, Toggle, Tooltip, Waffle, addBreadcrumbsNameMap, addToast, getProgressWizardContext, setProgressWizardStepsContext, setStepValidity, setFormContext, getFormContext, validateSchema, createZodString, ChipType, ColumnType, ImageType, type BreadcrumbsNameMap, type HighlightPanelColumn, type HomeItem, type MenuItem, type ModalProps, type ProgressWizardStep, type SelectOption, type SwitcherOption, type Tab, type Toast, type WaffleItem, type FormError, type FormContext };
package/dist/index.js CHANGED
@@ -1,39 +1,52 @@
1
+ // Components
1
2
  import Accordion from './Accordion/Accordion.svelte';
2
3
  import Avatar from './Avatar/Avatar.svelte';
3
4
  import Breadcrumbs from './Breadcrumbs/Breadcrumbs.svelte';
4
- import { addBreadcrumbsNameMap } from './Breadcrumbs/breadcrumbsState.svelte.js';
5
5
  import Button from './Button/Button.svelte';
6
6
  import Card from './Card/Card.svelte';
7
7
  import Chips from './Chips/Chips.svelte';
8
- import { ChipType } from './Chips/chipsState.svelte.js';
9
8
  import ErrorPage from './ErrorPage/ErrorPage.svelte';
10
9
  import Footer from './Footer/Footer.svelte';
11
- import Input from './Form/Input/Input.svelte';
12
- import Select from './Form/Select/Select.svelte';
13
- import TextArea from './Form/TextArea/TextArea.svelte';
14
- import Toggle from './Form/Toggle/Toggle.svelte';
10
+ import Form from './Form/FormController/Form.svelte';
15
11
  import Header from './Header/Header.svelte';
16
12
  import HeaderAccount from './Header/HeaderAccount.svelte';
17
13
  import HeaderLoader from './Header/HeaderLoader.svelte';
18
14
  import HeaderLogo from './Header/HeaderLogo.svelte';
19
15
  import HighlightPanel from './HighlightPanel/HighlightPanel.svelte';
20
- import { ColumnType, ImageType } from './HighlightPanel/highlightPanelState.svelte.js';
21
16
  import Home from './Home/Home.svelte';
17
+ import Input from './Form/Input/Input.svelte';
18
+ import Link from './Link/Link.svelte';
22
19
  import Menu from './Menu/Menu.svelte';
23
- import Sidebar from './Menu/Sidebar.svelte';
24
20
  import Modal from './Modal/Modal.svelte';
25
21
  import Notification from './Notification/Notification.svelte';
26
22
  import Processing from './Processing/Processing.svelte';
27
23
  import ProgressPage from './ProgressPage/ProgressPage.svelte';
28
- import { setProgressWizardStepsContext, getProgressWizardContext } from './ProgressWizard/context.js';
29
24
  import ProgressWizard from './ProgressWizard/ProgressWizard.svelte';
30
- import { setStepValidity } from './ProgressWizard/progressWizardState.svelte.js';
31
25
  import Search from './Search/Search.svelte';
26
+ import Select from './Form/Select/Select.svelte';
27
+ import Sidebar from './Menu/Sidebar.svelte';
32
28
  import Spinner from './Spinner/Spinner.svelte';
33
29
  import Switcher from './Switcher/Switcher.svelte';
34
30
  import Tabs from './Tabs/Tabs.svelte';
31
+ import TextArea from './Form/TextArea/TextArea.svelte';
35
32
  import Toaster from './Toast/Toast.svelte';
36
- import { addToast } from './Toast/toastState.svelte';
33
+ import Toggle from './Form/Toggle/Toggle.svelte';
37
34
  import Tooltip from './Tooltip/Tooltip.svelte';
38
35
  import Waffle from './Waffle/Waffle.svelte';
39
- export { Accordion, addBreadcrumbsNameMap, addToast, Avatar, Breadcrumbs, Button, Card, Chips, ChipType, ColumnType, ErrorPage, Footer, getProgressWizardContext, Header, HeaderAccount, HeaderLoader, HeaderLogo, HighlightPanel, Home, ImageType, Input, Menu, Modal, Notification, Processing, ProgressPage, ProgressWizard, Search, Select, setStepValidity, setProgressWizardStepsContext, Sidebar, Spinner, Switcher, Tabs, TextArea, Toaster, Toggle, Tooltip, Waffle };
36
+ // State, enums, and helpers
37
+ import { addBreadcrumbsNameMap } from './Breadcrumbs/breadcrumbsState.svelte.js';
38
+ import { ChipType } from './Chips/chipsState.svelte.js';
39
+ import { ColumnType, ImageType } from './HighlightPanel/highlightPanelState.svelte.js';
40
+ import { setProgressWizardStepsContext, getProgressWizardContext } from './ProgressWizard/context.js';
41
+ import { setStepValidity } from './ProgressWizard/progressWizardState.svelte.js';
42
+ import { addToast } from './Toast/toastState.svelte';
43
+ import { setFormContext, getFormContext } from './Form/FormController/context.js';
44
+ import { validateSchema } from './Form/FormController/helper.js';
45
+ import { createZodString } from './Form/FormController/zod-validations.js';
46
+ export {
47
+ // Components
48
+ Accordion, Avatar, Breadcrumbs, Button, Card, Chips, ErrorPage, Footer, Form, Header, HeaderAccount, HeaderLoader, HeaderLogo, HighlightPanel, Home, Input, Link, Menu, Modal, Notification, Processing, ProgressPage, ProgressWizard, Search, Select, Sidebar, Spinner, Switcher, Tabs, TextArea, Toaster, Toggle, Tooltip, Waffle,
49
+ // Functions and helpers
50
+ addBreadcrumbsNameMap, addToast, getProgressWizardContext, setProgressWizardStepsContext, setStepValidity, setFormContext, getFormContext, validateSchema, createZodString,
51
+ // Enums
52
+ ChipType, ColumnType, ImageType };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@softwareone/spi-sv5-library",
3
- "version": "1.4.0",
3
+ "version": "1.5.0",
4
4
  "description": "Svelte components",
5
5
  "keywords": [
6
6
  "svelte",
@@ -41,24 +41,35 @@
41
41
  }
42
42
  },
43
43
  "peerDependencies": {
44
- "svelte": "^5.0.0"
44
+ "svelte": "^5.0.0",
45
+ "sveltekit-superforms": "^2.0.0",
46
+ "zod": "^4.0.0"
47
+ },
48
+ "peerDependenciesMeta": {
49
+ "sveltekit-superforms": {
50
+ "optional": true
51
+ },
52
+ "zod": {
53
+ "optional": true
54
+ }
45
55
  },
46
56
  "devDependencies": {
47
- "@sveltejs/adapter-auto": "^4.0.0",
48
- "@sveltejs/adapter-node": "^5.2.12",
49
- "@sveltejs/kit": "^2.16.0",
50
- "@sveltejs/package": "^2.0.0",
51
- "@sveltejs/vite-plugin-svelte": "^5.0.0",
52
- "prettier": "^3.4.2",
53
- "prettier-plugin-svelte": "^3.3.3",
54
- "publint": "^0.3.2",
55
- "svelte": "^5.0.0",
56
- "svelte-check": "^4.0.0",
57
- "typescript": "^5.0.0",
58
- "vite": "^6.0.0",
59
- "zod": "^3.25.76"
57
+ "@sveltejs/adapter-auto": "^7.0.0",
58
+ "@sveltejs/adapter-node": "^5.4.0",
59
+ "@sveltejs/kit": "^2.48.4",
60
+ "@sveltejs/package": "^2.5.4",
61
+ "@sveltejs/vite-plugin-svelte": "^6.2.1",
62
+ "prettier": "^3.6.2",
63
+ "prettier-plugin-svelte": "^3.4.0",
64
+ "publint": "^0.3.15",
65
+ "svelte": "^5.43.5",
66
+ "svelte-check": "^4.3.3",
67
+ "typescript": "^5.9.3",
68
+ "vite": "^6.3.0",
69
+ "zod": "^4.1.12",
70
+ "sveltekit-superforms": "^2.28.1"
60
71
  },
61
72
  "dependencies": {
62
- "@sveltejs/kit": "^2.16.0"
73
+ "@sveltejs/kit": "^2.48.4"
63
74
  }
64
75
  }