@formisch/svelte 0.5.3 → 0.5.5

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 CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Formisch is a schema-based, headless form library for Svelte. It manages form state and validation. It is type-safe, fast by default and its bundle size is small due to its modular design. Try it out in our [playground](https://stackblitz.com/edit/formisch-playground-svelte)!
4
4
 
5
- Formisch is also available for [Preact][formisch-preact], [Qwik][formisch-qwik], [SolidJS][formisch-solid], and [Vue][formisch-vue].
5
+ Formisch is also available for [Preact][formisch-preact], [Qwik][formisch-qwik], [React][formisch-react], [SolidJS][formisch-solid], and [Vue][formisch-vue].
6
6
 
7
7
  ## Highlights
8
8
 
@@ -77,5 +77,6 @@ This project is available free of charge and licensed under the [MIT license](ht
77
77
 
78
78
  [formisch-preact]: https://github.com/open-circle/formisch/tree/main/frameworks/preact
79
79
  [formisch-qwik]: https://github.com/open-circle/formisch/tree/main/frameworks/qwik
80
+ [formisch-react]: https://github.com/open-circle/formisch/tree/main/frameworks/react
80
81
  [formisch-solid]: https://github.com/open-circle/formisch/tree/main/frameworks/solid
81
82
  [formisch-vue]: https://github.com/open-circle/formisch/tree/main/frameworks/vue
@@ -1,6 +1,6 @@
1
1
  import type { RequiredPath, Schema, ValidPath } from '../../core/index.svelte';
2
2
  import type * as v from 'valibot';
3
- import type { FieldStore, FormStore } from '../../types/index.ts';
3
+ import type { FieldStore, FormStore } from '../../types/index';
4
4
  import type { Snippet } from 'svelte';
5
5
  /**
6
6
  * Field component props interface.
@@ -1,6 +1,6 @@
1
1
  import type { RequiredPath, Schema, ValidArrayPath } from '../../core/index.svelte';
2
2
  import type * as v from 'valibot';
3
- import type { FieldArrayStore, FormStore } from '../../types/index.ts';
3
+ import type { FieldArrayStore, FormStore } from '../../types/index';
4
4
  import type { Snippet } from 'svelte';
5
5
  /**
6
6
  * Field array component props interface.
@@ -1,5 +1,5 @@
1
1
  import { type Schema, type SubmitHandler } from '../../core/index.svelte';
2
- import type { FormStore } from '../../types/index.ts';
2
+ import type { FormStore } from '../../types/index';
3
3
  import type { Snippet } from 'svelte';
4
4
  import type { HTMLFormAttributes } from 'svelte/elements';
5
5
  /**
@@ -1,3 +1,3 @@
1
- export * from './Field/index.ts';
2
- export * from './FieldArray/index.ts';
3
- export * from './Form/index.ts';
1
+ export * from './Field/index';
2
+ export * from './FieldArray/index';
3
+ export * from './Form/index';
@@ -547,7 +547,7 @@ declare function validateIfRequired(internalFormStore: InternalFormStore, intern
547
547
  /**
548
548
  * Framework type.
549
549
  */
550
- type Framework = "preact" | "qwik" | "solid" | "svelte" | "vue";
550
+ type Framework = "preact" | "qwik" | "solid" | "svelte" | "vanilla" | "vue";
551
551
  //#endregion
552
552
  //#region src/framework/index.svelte.d.ts
553
553
  /**
@@ -452,8 +452,8 @@ function setFieldInput(internalFormStore, path, input) {
452
452
  for (let index = 0; index < path.length; index++) {
453
453
  internalFieldStore = internalFieldStore.children[path[index]];
454
454
  if (index < path.length - 1) internalFieldStore.input.value = true;
455
- else setNestedInput(internalFieldStore, input);
456
455
  }
456
+ setNestedInput(internalFieldStore, input);
457
457
  });
458
458
  });
459
459
  }
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  export type { DeepPartial, FieldElement, FormConfig, PartialValues, PathValue, RequiredPath, Schema, SubmitHandler, ValidArrayPath, ValidationMode, ValidPath, } from './core/index.svelte';
2
2
  export * from './methods/index.svelte';
3
- export * from './components/index.ts';
4
- export * from './runes/index.ts';
5
- export * from './types/index.ts';
3
+ export * from './components/index';
4
+ export * from './runes/index';
5
+ export * from './types/index';
@@ -1,5 +1,5 @@
1
1
  import { type FormConfig, type Schema } from '../../core/index.svelte';
2
- import type { FormStore } from '../../types/index.ts';
2
+ import type { FormStore } from '../../types/index';
3
3
  /**
4
4
  * Creates a reactive form store from a form configuration. The form store
5
5
  * manages form state and provides reactive properties.
@@ -1 +1 @@
1
- export * from './createForm.svelte.ts';
1
+ export * from './createForm.svelte';
@@ -1,3 +1,3 @@
1
- export * from './createForm/index.ts';
2
- export * from './useField/index.ts';
3
- export * from './useFieldArray/index.ts';
1
+ export * from './createForm/index';
2
+ export * from './useField/index';
3
+ export * from './useFieldArray/index';
@@ -1 +1 @@
1
- export * from './useField.svelte.ts';
1
+ export * from './useField.svelte';
@@ -1,6 +1,6 @@
1
1
  import { type RequiredPath, type Schema, type ValidPath } from '../../core/index.svelte';
2
2
  import type * as v from 'valibot';
3
- import type { FieldStore, FormStore, MaybeGetter } from '../../types/index.ts';
3
+ import type { FieldStore, FormStore, MaybeGetter } from '../../types/index';
4
4
  /**
5
5
  * Use field config interface.
6
6
  */
@@ -1 +1 @@
1
- export * from './useFieldArray.svelte.ts';
1
+ export * from './useFieldArray.svelte';
@@ -1,6 +1,6 @@
1
1
  import { type RequiredPath, type Schema, type ValidArrayPath } from '../../core/index.svelte';
2
2
  import type * as v from 'valibot';
3
- import type { FieldArrayStore, FormStore, MaybeGetter } from '../../types/index.ts';
3
+ import type { FieldArrayStore, FormStore, MaybeGetter } from '../../types/index';
4
4
  /**
5
5
  * Use field array config interface.
6
6
  */
@@ -1,3 +1,3 @@
1
- export * from './field.ts';
2
- export * from './form.ts';
3
- export * from './utils.ts';
1
+ export * from './field';
2
+ export * from './form';
3
+ export * from './utils';
@@ -1 +1 @@
1
- export * from './unwrap/index.ts';
1
+ export * from './unwrap/index';
@@ -1 +1 @@
1
- export * from './unwrap.ts';
1
+ export * from './unwrap';
@@ -1,2 +1,2 @@
1
- import type { MaybeGetter } from '../../types/index.ts';
1
+ import type { MaybeGetter } from '../../types/index';
2
2
  export declare function unwrap<T>(value: MaybeGetter<T>): T;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@formisch/svelte",
3
3
  "description": "The modular and type-safe form library for Svelte",
4
- "version": "0.5.3",
4
+ "version": "0.5.5",
5
5
  "license": "MIT",
6
6
  "author": "Fabian Hiller",
7
7
  "homepage": "https://formisch.dev",
@@ -18,11 +18,11 @@
18
18
  ],
19
19
  "type": "module",
20
20
  "main": "./dist/index.js",
21
- "types": "./dist/types/index.d.ts",
21
+ "types": "./dist/index.d.ts",
22
22
  "svelte": "./dist/index.js",
23
23
  "exports": {
24
24
  ".": {
25
- "types": "./dist/types/index.d.ts",
25
+ "types": "./dist/index.d.ts",
26
26
  "svelte": "./dist/index.js"
27
27
  }
28
28
  },
@@ -52,8 +52,8 @@
52
52
  "typescript-eslint": "^8.43.0",
53
53
  "valibot": "^1.2.0",
54
54
  "vite": "^7.1.5",
55
- "@formisch/core": "0.4.3",
56
- "@formisch/methods": "0.5.1"
55
+ "@formisch/methods": "0.5.2",
56
+ "@formisch/core": "0.4.4"
57
57
  },
58
58
  "peerDependencies": {
59
59
  "svelte": "^5.29.0",