@formisch/qwik 0.7.0 → 0.7.2

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
@@ -30,9 +30,6 @@ interface Signal<T> {
30
30
  * Field element type.
31
31
  */
32
32
  type FieldElement = HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement;
33
- /**
34
- * Internal base store interface.
35
- */
36
33
  //#endregion
37
34
  //#region src/types/field.qwik.d.ts
38
35
  /**
@@ -227,10 +224,6 @@ type PartialValues<TValue> = TValue extends readonly unknown[] ? number extends
227
224
  * Validation mode type.
228
225
  */
229
226
  type ValidationMode = "initial" | "touch" | "input" | "change" | "blur" | "submit";
230
- /**
231
- * Form config interface.
232
- */
233
-
234
227
  /**
235
228
  * Submit handler type.
236
229
  */
@@ -499,7 +492,7 @@ declare function getInput<TSchema extends Schema, TFieldPath extends RequiredPat
499
492
  *
500
493
  * @returns A submit event handler function to attach to the form element.
501
494
  */
502
- declare function handleSubmit<TSchema extends Schema>(form: BaseFormStore<TSchema>, handler: SubmitHandler<TSchema>): (event: SubmitEvent) => void;
495
+ declare function handleSubmit<TSchema extends Schema>(form: BaseFormStore<TSchema>, handler: SubmitHandler<TSchema>): (event: SubmitEvent) => Promise<void>;
503
496
  //#endregion
504
497
  //#region src/insert/insert.d.ts
505
498
  /**
@@ -288,9 +288,8 @@ function getElementInput(element, internalFieldStore) {
288
288
  return element.checked;
289
289
  }
290
290
  if (element.type === "radio") {
291
- const prevValue = untrack(() => /* @__PURE__ */ getFieldInput(internalFieldStore));
292
- if (element.checked) return [...prevValue, element.value];
293
- return prevValue.filter((value) => value !== element.value);
291
+ if (element.checked) return element.value;
292
+ return untrack(() => /* @__PURE__ */ getFieldInput(internalFieldStore));
294
293
  }
295
294
  if (element.type === "file") {
296
295
  if (element.multiple) return [...element.files];
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.0",
4
+ "version": "0.7.2",
5
5
  "license": "MIT",
6
6
  "author": "Fabian Hiller",
7
7
  "homepage": "https://formisch.dev",
@@ -43,14 +43,14 @@
43
43
  "eslint-plugin-qwik": "2.0.0-beta.5",
44
44
  "globals": "16.3.0",
45
45
  "prettier": "3.6.2",
46
- "tsdown": "^0.12.9",
46
+ "tsdown": "0.12.9",
47
47
  "typescript": "5.8.3",
48
48
  "typescript-eslint": "8.36.0",
49
49
  "valibot": "^1.1.0",
50
50
  "vite": "7.0.4",
51
51
  "vite-tsconfig-paths": "^5.1.4",
52
- "@formisch/core": "0.4.2",
53
- "@formisch/methods": "0.5.0"
52
+ "@formisch/core": "0.4.3",
53
+ "@formisch/methods": "0.5.1"
54
54
  },
55
55
  "peerDependencies": {
56
56
  "@qwik.dev/core": ">=2",