@formisch/solid 0.6.1 → 0.7.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/README.md CHANGED
@@ -65,17 +65,17 @@ What makes Formisch unique is its framework-agnostic core, which is fully native
65
65
 
66
66
  Thanks to our partners who support the development! [Join them](https://github.com/sponsors/fabian-hiller) and contribute to the sustainability of open source software!
67
67
 
68
- ![Partners of Formisch](https://github.com/fabian-hiller/formisch/blob/main/partners.webp?raw=true)
68
+ ![Partners of Formisch](https://github.com/open-circle/formisch/blob/main/partners.webp?raw=true)
69
69
 
70
70
  ## Feedback
71
71
 
72
- Find a bug or have an idea how to improve the library? Please fill out an [issue](https://github.com/fabian-hiller/formisch/issues/new). Together we can make forms even better!
72
+ Find a bug or have an idea how to improve the library? Please fill out an [issue](https://github.com/open-circle/formisch/issues/new). Together we can make forms even better!
73
73
 
74
74
  ## License
75
75
 
76
- This project is available free of charge and licensed under the [MIT license](https://github.com/fabian-hiller/formisch/blob/main/LICENSE.md).
76
+ This project is available free of charge and licensed under the [MIT license](https://github.com/open-circle/formisch/blob/main/LICENSE.md).
77
77
 
78
- [formisch-preact]: https://github.com/fabian-hiller/formisch/tree/main/frameworks/preact
79
- [formisch-qwik]: https://github.com/fabian-hiller/formisch/tree/main/frameworks/qwik
80
- [formisch-svelte]: https://github.com/fabian-hiller/formisch/tree/main/frameworks/svelte
81
- [formisch-vue]: https://github.com/fabian-hiller/formisch/tree/main/frameworks/vue
78
+ [formisch-preact]: https://github.com/open-circle/formisch/tree/main/frameworks/preact
79
+ [formisch-qwik]: https://github.com/open-circle/formisch/tree/main/frameworks/qwik
80
+ [formisch-svelte]: https://github.com/open-circle/formisch/tree/main/frameworks/svelte
81
+ [formisch-vue]: https://github.com/open-circle/formisch/tree/main/frameworks/vue
package/dist/dev.js CHANGED
@@ -286,7 +286,7 @@ function setNestedInput(internalFieldStore, input) {
286
286
  } else {
287
287
  internalFieldStore.input.value = input;
288
288
  const startInput = internalFieldStore.startInput.value;
289
- internalFieldStore.isDirty.value = startInput !== input && (startInput !== void 0 || input !== "" && !Number.isNaN(input));
289
+ internalFieldStore.isDirty.value = startInput !== input && (startInput != null || input !== "" && !Number.isNaN(input));
290
290
  }
291
291
  }
292
292
  function setFieldInput(internalFormStore, path, input) {
@@ -420,7 +420,7 @@ function handleSubmit(form, handler) {
420
420
  const result = await validateFormInput(internalFormStore, { shouldFocus: true });
421
421
  if (result.success) await handler(result.output, event);
422
422
  } catch (error) {
423
- internalFormStore.errors.value = [error instanceof Error ? error.message : "An unknown error has occurred."];
423
+ internalFormStore.errors.value = [error && typeof error === "object" && "message" in error && typeof error.message === "string" ? error.message : "An unknown error has occurred."];
424
424
  } finally {
425
425
  internalFormStore.isSubmitting.value = false;
426
426
  }
@@ -520,7 +520,7 @@ function reset(form, config) {
520
520
  else {
521
521
  const startInput = internalFieldStore$1.startInput.value;
522
522
  const input = internalFieldStore$1.input.value;
523
- internalFieldStore$1.isDirty.value = startInput !== input && (startInput !== void 0 || input !== "" && !Number.isNaN(input));
523
+ internalFieldStore$1.isDirty.value = startInput !== input && (startInput != null || input !== "" && !Number.isNaN(input));
524
524
  for (const element of internalFieldStore$1.elements) if (element.type === "file") element.value = "";
525
525
  }
526
526
  });
package/dist/dev.jsx CHANGED
@@ -284,7 +284,7 @@ function setNestedInput(internalFieldStore, input) {
284
284
  } else {
285
285
  internalFieldStore.input.value = input;
286
286
  const startInput = internalFieldStore.startInput.value;
287
- internalFieldStore.isDirty.value = startInput !== input && (startInput !== void 0 || input !== "" && !Number.isNaN(input));
287
+ internalFieldStore.isDirty.value = startInput !== input && (startInput != null || input !== "" && !Number.isNaN(input));
288
288
  }
289
289
  }
290
290
  function setFieldInput(internalFormStore, path, input) {
@@ -418,7 +418,7 @@ function handleSubmit(form, handler) {
418
418
  const result = await validateFormInput(internalFormStore, { shouldFocus: true });
419
419
  if (result.success) await handler(result.output, event);
420
420
  } catch (error) {
421
- internalFormStore.errors.value = [error instanceof Error ? error.message : "An unknown error has occurred."];
421
+ internalFormStore.errors.value = [error && typeof error === "object" && "message" in error && typeof error.message === "string" ? error.message : "An unknown error has occurred."];
422
422
  } finally {
423
423
  internalFormStore.isSubmitting.value = false;
424
424
  }
@@ -518,7 +518,7 @@ function reset(form, config) {
518
518
  else {
519
519
  const startInput = internalFieldStore$1.startInput.value;
520
520
  const input = internalFieldStore$1.input.value;
521
- internalFieldStore$1.isDirty.value = startInput !== input && (startInput !== void 0 || input !== "" && !Number.isNaN(input));
521
+ internalFieldStore$1.isDirty.value = startInput !== input && (startInput != null || input !== "" && !Number.isNaN(input));
522
522
  for (const element of internalFieldStore$1.elements) if (element.type === "file") element.value = "";
523
523
  }
524
524
  });
package/dist/index.d.ts CHANGED
@@ -483,7 +483,7 @@ declare function getInput<TSchema extends Schema, TFieldPath extends RequiredPat
483
483
  *
484
484
  * @returns A submit event handler function to attach to the form element.
485
485
  */
486
- declare function handleSubmit<TSchema extends Schema>(form: BaseFormStore<TSchema>, handler: SubmitHandler<TSchema>): (event: SubmitEvent) => void;
486
+ declare function handleSubmit<TSchema extends Schema>(form: BaseFormStore<TSchema>, handler: SubmitHandler<TSchema>): (event: SubmitEvent) => Promise<void>;
487
487
  //#endregion
488
488
  //#region src/insert/insert.d.ts
489
489
  /**
package/dist/index.js CHANGED
@@ -286,7 +286,7 @@ function setNestedInput(internalFieldStore, input) {
286
286
  } else {
287
287
  internalFieldStore.input.value = input;
288
288
  const startInput = internalFieldStore.startInput.value;
289
- internalFieldStore.isDirty.value = startInput !== input && (startInput !== void 0 || input !== "" && !Number.isNaN(input));
289
+ internalFieldStore.isDirty.value = startInput !== input && (startInput != null || input !== "" && !Number.isNaN(input));
290
290
  }
291
291
  }
292
292
  function setFieldInput(internalFormStore, path, input) {
@@ -420,7 +420,7 @@ function handleSubmit(form, handler) {
420
420
  const result = await validateFormInput(internalFormStore, { shouldFocus: true });
421
421
  if (result.success) await handler(result.output, event);
422
422
  } catch (error) {
423
- internalFormStore.errors.value = [error instanceof Error ? error.message : "An unknown error has occurred."];
423
+ internalFormStore.errors.value = [error && typeof error === "object" && "message" in error && typeof error.message === "string" ? error.message : "An unknown error has occurred."];
424
424
  } finally {
425
425
  internalFormStore.isSubmitting.value = false;
426
426
  }
@@ -520,7 +520,7 @@ function reset(form, config) {
520
520
  else {
521
521
  const startInput = internalFieldStore$1.startInput.value;
522
522
  const input = internalFieldStore$1.input.value;
523
- internalFieldStore$1.isDirty.value = startInput !== input && (startInput !== void 0 || input !== "" && !Number.isNaN(input));
523
+ internalFieldStore$1.isDirty.value = startInput !== input && (startInput != null || input !== "" && !Number.isNaN(input));
524
524
  for (const element of internalFieldStore$1.elements) if (element.type === "file") element.value = "";
525
525
  }
526
526
  });
package/dist/index.jsx CHANGED
@@ -284,7 +284,7 @@ function setNestedInput(internalFieldStore, input) {
284
284
  } else {
285
285
  internalFieldStore.input.value = input;
286
286
  const startInput = internalFieldStore.startInput.value;
287
- internalFieldStore.isDirty.value = startInput !== input && (startInput !== void 0 || input !== "" && !Number.isNaN(input));
287
+ internalFieldStore.isDirty.value = startInput !== input && (startInput != null || input !== "" && !Number.isNaN(input));
288
288
  }
289
289
  }
290
290
  function setFieldInput(internalFormStore, path, input) {
@@ -418,7 +418,7 @@ function handleSubmit(form, handler) {
418
418
  const result = await validateFormInput(internalFormStore, { shouldFocus: true });
419
419
  if (result.success) await handler(result.output, event);
420
420
  } catch (error) {
421
- internalFormStore.errors.value = [error instanceof Error ? error.message : "An unknown error has occurred."];
421
+ internalFormStore.errors.value = [error && typeof error === "object" && "message" in error && typeof error.message === "string" ? error.message : "An unknown error has occurred."];
422
422
  } finally {
423
423
  internalFormStore.isSubmitting.value = false;
424
424
  }
@@ -518,7 +518,7 @@ function reset(form, config) {
518
518
  else {
519
519
  const startInput = internalFieldStore$1.startInput.value;
520
520
  const input = internalFieldStore$1.input.value;
521
- internalFieldStore$1.isDirty.value = startInput !== input && (startInput !== void 0 || input !== "" && !Number.isNaN(input));
521
+ internalFieldStore$1.isDirty.value = startInput !== input && (startInput != null || input !== "" && !Number.isNaN(input));
522
522
  for (const element of internalFieldStore$1.elements) if (element.type === "file") element.value = "";
523
523
  }
524
524
  });
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@formisch/solid",
3
3
  "description": "The modular and type-safe form library for SolidJS",
4
- "version": "0.6.1",
4
+ "version": "0.7.1",
5
5
  "license": "MIT",
6
6
  "author": "Fabian Hiller",
7
7
  "homepage": "https://formisch.dev",
8
8
  "repository": {
9
9
  "type": "git",
10
- "url": "https://github.com/fabian-hiller/formisch"
10
+ "url": "https://github.com/open-circle/formisch"
11
11
  },
12
12
  "keywords": [
13
13
  "solidjs",
@@ -62,8 +62,8 @@
62
62
  "typescript-eslint": "^8.36.0",
63
63
  "valibot": "^1.1.0",
64
64
  "vitest": "3.2.4",
65
- "@formisch/methods": "0.4.1",
66
- "@formisch/core": "0.4.1"
65
+ "@formisch/core": "0.4.2",
66
+ "@formisch/methods": "0.5.1"
67
67
  },
68
68
  "peerDependencies": {
69
69
  "solid-js": "^1.6.0",