@formisch/qwik 0.7.2 → 0.7.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 CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Formisch is a schema-based, headless form library for Qwik. 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-qwik)!
4
4
 
5
- Formisch is also available for [Preact][formisch-preact], [SolidJS][formisch-solid], [Svelte][formisch-svelte] and [Vue][formisch-vue].
5
+ Formisch is also available for [Preact][formisch-preact], [React][formisch-react], [SolidJS][formisch-solid], [Svelte][formisch-svelte] and [Vue][formisch-vue].
6
6
 
7
7
  ## Highlights
8
8
 
@@ -81,6 +81,7 @@ Find a bug or have an idea how to improve the library? Please fill out an [issue
81
81
  This project is available free of charge and licensed under the [MIT license](https://github.com/open-circle/formisch/blob/main/LICENSE.md).
82
82
 
83
83
  [formisch-preact]: https://github.com/open-circle/formisch/tree/main/frameworks/preact
84
+ [formisch-react]: https://github.com/open-circle/formisch/tree/main/frameworks/react
84
85
  [formisch-solid]: https://github.com/open-circle/formisch/tree/main/frameworks/solid
85
86
  [formisch-svelte]: https://github.com/open-circle/formisch/tree/main/frameworks/svelte
86
87
  [formisch-vue]: https://github.com/open-circle/formisch/tree/main/frameworks/vue
@@ -41,7 +41,7 @@ function batch(fn) {
41
41
  function initializeFieldStore(internalFieldStore, schema, initialInput, path, nullish = false) {
42
42
  if (framework === "qwik" && schema.type === "lazy" || schema.type === "object_with_rest" || schema.type === "record" || schema.type === "tuple_with_rest" || schema.type === "promise") throw new Error(`"${schema.type}" schema is not supported`);
43
43
  else if (schema.type === "lazy") initializeFieldStore(internalFieldStore, schema.getter(void 0), initialInput, path);
44
- else if (schema.type === "exact_optional" || schema.type === "nullable" || schema.type === "nullish" || schema.type === "optional" || schema.type === "undefinedable") initializeFieldStore(internalFieldStore, schema.wrapped, initialInput ?? v.getDefault(schema), path, true);
44
+ else if (schema.type === "exact_optional" || schema.type === "nullable" || schema.type === "nullish" || schema.type === "optional" || schema.type === "undefinedable") initializeFieldStore(internalFieldStore, schema.wrapped, initialInput === void 0 ? v.getDefault(schema) : initialInput, path, true);
45
45
  else if (schema.type === "non_nullable" || schema.type === "non_nullish" || schema.type === "non_optional") initializeFieldStore(internalFieldStore, schema.wrapped, initialInput, path);
46
46
  else if (schema.type === "intersect" || schema.type === "union" || schema.type === "variant") for (const schemaOption of schema.options) initializeFieldStore(internalFieldStore, schemaOption, initialInput, path);
47
47
  else {
@@ -404,8 +404,8 @@ function setFieldInput(internalFormStore, path, input) {
404
404
  for (let index = 0; index < path.length; index++) {
405
405
  internalFieldStore = internalFieldStore.children[path[index]];
406
406
  if (index < path.length - 1) internalFieldStore.input.value = true;
407
- else setNestedInput(internalFieldStore, input);
408
407
  }
408
+ setNestedInput(internalFieldStore, input);
409
409
  });
410
410
  });
411
411
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@formisch/qwik",
3
3
  "description": "The modular and type-safe form library for Qwik",
4
- "version": "0.7.2",
4
+ "version": "0.7.4",
5
5
  "license": "MIT",
6
6
  "author": "Fabian Hiller",
7
7
  "homepage": "https://formisch.dev",
@@ -46,11 +46,11 @@
46
46
  "tsdown": "0.12.9",
47
47
  "typescript": "5.8.3",
48
48
  "typescript-eslint": "8.36.0",
49
- "valibot": "^1.1.0",
49
+ "valibot": "^1.2.0",
50
50
  "vite": "7.0.4",
51
51
  "vite-tsconfig-paths": "^5.1.4",
52
- "@formisch/core": "0.4.3",
53
- "@formisch/methods": "0.5.1"
52
+ "@formisch/core": "0.4.5",
53
+ "@formisch/methods": "0.5.2"
54
54
  },
55
55
  "peerDependencies": {
56
56
  "@qwik.dev/core": ">=2",