@formisch/qwik 0.9.4 → 0.9.6

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/dist/index.d.ts CHANGED
@@ -1031,7 +1031,7 @@ type FormProps<TSchema extends Schema = Schema> = Omit<PropsOf<'form'>, 'onSubmi
1031
1031
  /**
1032
1032
  * The submit handler called when the form is submitted and validation succeeds.
1033
1033
  */
1034
- readonly onSubmit$: QRL<SubmitHandler<TSchema>> | QRL<SubmitEventHandler<TSchema>>;
1034
+ readonly onSubmit$: QRL<SubmitEventHandler<TSchema>>;
1035
1035
  };
1036
1036
  /**
1037
1037
  * Form component that manages form submission and applies internal state.
@@ -40,10 +40,10 @@ function batch(fn) {
40
40
  */
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
- else if (schema.type === "lazy") initializeFieldStore(internalFieldStore, schema.getter(void 0), initialInput, path);
43
+ else if (schema.type === "lazy") initializeFieldStore(internalFieldStore, schema.getter(void 0), initialInput, path, nullish);
44
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
- else if (schema.type === "intersect" || schema.type === "union" || schema.type === "variant") for (const schemaOption of schema.options) initializeFieldStore(internalFieldStore, schemaOption, initialInput, path);
46
+ else if (schema.type === "intersect" || schema.type === "union" || schema.type === "variant") for (const schemaOption of schema.options) initializeFieldStore(internalFieldStore, schemaOption, initialInput, path, nullish);
47
47
  else {
48
48
  internalFieldStore.schema = schema;
49
49
  internalFieldStore.name = JSON.stringify(path);
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.9.4",
4
+ "version": "0.9.6",
5
5
  "license": "MIT",
6
6
  "author": "Fabian Hiller",
7
7
  "homepage": "https://formisch.dev",
@@ -35,7 +35,18 @@
35
35
  "engines": {
36
36
  "node": "^18.17.0 || ^20.3.0 || >=21.0.0"
37
37
  },
38
+ "scripts": {
39
+ "build": "tsdown",
40
+ "lint": "eslint \"src/**/*.ts*\" && tsc --noEmit",
41
+ "lint.fix": "eslint \"src/**/*.ts*\" --fix",
42
+ "format": "prettier --write ./src",
43
+ "format.check": "prettier --check ./src",
44
+ "qwik": "qwik"
45
+ },
38
46
  "devDependencies": {
47
+ "@formisch/core": "workspace:*",
48
+ "@formisch/eslint-config": "workspace:*",
49
+ "@formisch/methods": "workspace:*",
39
50
  "@qwik.dev/core": "2.0.0-beta.5",
40
51
  "@types/node": "24.0.13",
41
52
  "eslint": "9.31.0",
@@ -46,10 +57,7 @@
46
57
  "typescript": "5.8.3",
47
58
  "valibot": "^1.2.0",
48
59
  "vite": "7.0.4",
49
- "vite-tsconfig-paths": "^5.1.4",
50
- "@formisch/eslint-config": "0.1.0",
51
- "@formisch/core": "0.6.2",
52
- "@formisch/methods": "0.7.0"
60
+ "vite-tsconfig-paths": "^5.1.4"
53
61
  },
54
62
  "peerDependencies": {
55
63
  "@qwik.dev/core": ">=2",
@@ -60,13 +68,5 @@
60
68
  "typescript": {
61
69
  "optional": true
62
70
  }
63
- },
64
- "scripts": {
65
- "build": "tsdown",
66
- "lint": "eslint \"src/**/*.ts*\" && tsc --noEmit",
67
- "lint.fix": "eslint \"src/**/*.ts*\" --fix",
68
- "format": "prettier --write ./src",
69
- "format.check": "prettier --check ./src",
70
- "qwik": "qwik"
71
71
  }
72
- }
72
+ }